summaryrefslogtreecommitdiff
path: root/chromium/fuchsia/fidl/cast/application_context.fidl
blob: 4a1027a6092571c8d9bafe1b738af2b73168eedc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

library chromium.cast;

[Discoverable]
protocol ApplicationContext {
  /// Returns session_id to use in the AudioConsumer API.
  GetMediaSessionId() -> (uint64 media_session_id);

  /// Used by the Agent to receive a controller from the Cast Runner.
  /// Can only be called at most one time for the lifetime of the Component.
  SetApplicationController(ApplicationController controller);

  /// Called if the application component exits gracefully, with the same
  /// `exit_code` as would be reported via `ComponentController.OnTerminated()`.
  /// Values less than or equal to zero are `zx.status` codes.
  /// May be called at most once, immediately prior to termination.
  [Transitional]
  OnApplicationExit(int64 exit_code);
};