summaryrefslogtreecommitdiffstats
path: root/extensions/common/mojo/wifi_display_session_service.mojom
blob: 637a1f0580f52641d653411a7be01d672d201b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2015 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.

module extensions;

// WiFiDisplaySessionService class provides access to the network for
// the render-hosted Wi-Fi Display session.
interface WiFiDisplaySessionService {
  SetClient(WiFiDisplaySessionServiceClient client);

  // Requires connection to a sink using the given authentication information.
  Connect(int32 sink_id, int32 auth_method, string auth_data);

  // Drops the established connection to the connected sink.
  Disconnect();

  // Sends a controlling mesage to the connected sink.
  SendMessage(string message);
};

interface WiFiDisplaySessionServiceClient {
  // Notification of a successfull connection to a sink.
  OnEstablished(string ip_address);

  // Notification of a session termination.
  OnTerminated();

  // Notification of an error occurred during the session.
  OnError(int32 type, string description);

  // Invoked to transmit a controlling message from
  // the connected sink.
  OnMessage(string data);
};