Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: device/bluetooth/public/interfaces/adapter.mojom

Issue 2567983007: bluetooth: Add adapter page to internals page. (Closed)
Patch Set: Merge upstream Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/discovery_session.h ('k') | ui/webui/resources/images/cancel_red.svg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module bluetooth.mojom; 5 module bluetooth.mojom;
6 6
7 import "device/bluetooth/public/interfaces/device.mojom"; 7 import "device/bluetooth/public/interfaces/device.mojom";
8 8
9 // Possible errors sent as a response by Adapter.ConnectToDevice on a Device 9 // Possible errors sent as a response by Adapter.ConnectToDevice on a Device
10 // connection request. 10 // connection request.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Sets the client that listens for the adapter's events. 76 // Sets the client that listens for the adapter's events.
77 SetClient(AdapterClient client); 77 SetClient(AdapterClient client);
78 78
79 // Requests the adapter to start a new discovery session. Returns null if 79 // Requests the adapter to start a new discovery session. Returns null if
80 // session not created successfully. 80 // session not created successfully.
81 StartDiscoverySession() => (DiscoverySession? session); 81 StartDiscoverySession() => (DiscoverySession? session);
82 }; 82 };
83 83
84 interface AdapterClient { 84 interface AdapterClient {
85 // Called when the presence of the adapter changes.
86 PresentChanged(bool present);
87
88 // Called when the radio power state of the adapter changes.
89 PoweredChanged(bool powered);
90
91 // Called when the discoverability state of the adapter changes.
92 DiscoverableChanged(bool discoverable);
93
85 // Called when the discovering state of the adapter changes. 94 // Called when the discovering state of the adapter changes.
86 DiscoveringChanged(bool discovering); 95 DiscoveringChanged(bool discovering);
87 96
88 // Called the first time a device is discovered. 97 // Called the first time a device is discovered.
89 DeviceAdded(DeviceInfo device); 98 DeviceAdded(DeviceInfo device);
90 99
91 // Called when one of the following properties of a device changes: 100 // Called when one of the following properties of a device changes:
92 // Address, appearance, Bluetooth class, Inquiry RSSI, Inquiry TX Power, 101 // Address, appearance, Bluetooth class, Inquiry RSSI, Inquiry TX Power,
93 // Service UUIDs, Connectionable state, Connection state, Pairing state, 102 // Service UUIDs, Connectionable state, Connection state, Pairing state,
94 // Trustable state. 103 // Trustable state.
95 // Generally called for each advertisement packet recevied, but this is not 104 // Generally called for each advertisement packet recevied, but this is not
96 // guaranteed on ChromeOS or Linux. Because the RSSI is always changing, 105 // guaranteed on ChromeOS or Linux. Because the RSSI is always changing,
97 // it's very likely this will be called for each advertising packet. 106 // it's very likely this will be called for each advertising packet.
98 DeviceChanged(DeviceInfo device); 107 DeviceChanged(DeviceInfo device);
99 108
100 // Called after the device hasn't been seen for 3 minutes. 109 // Called after the device hasn't been seen for 3 minutes.
101 DeviceRemoved(DeviceInfo device); 110 DeviceRemoved(DeviceInfo device);
102 }; 111 };
103 112
104 interface AdapterFactory { 113 interface AdapterFactory {
105 // Gets an Adapter interface. Returns null if Bluetooth is not supported. 114 // Gets an Adapter interface. Returns null if Bluetooth is not supported.
106 GetAdapter() => (Adapter? adapter); 115 GetAdapter() => (Adapter? adapter);
107 }; 116 };
OLDNEW
« no previous file with comments | « device/bluetooth/discovery_session.h ('k') | ui/webui/resources/images/cancel_red.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698