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

Side by Side Diff: chrome/browser/chromeos/dbus/bluetooth_adapter_client.h

Issue 9317012: chrome: bluetooth: hook up DeviceCreated/Removed signals (Closed) Base URL: http://git.chromium.org/git/chromium/src.git@master
Patch Set: fix the object/device path confusion Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/dbus/bluetooth_adapter_client.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ 6 #define CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 14
15 namespace dbus { 15 namespace dbus {
16 class Bus; 16 class Bus;
17 } // namespace dbus 17 } // namespace dbus
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 // BluetoothAdapterClient is used to communicate with a bluetooth Adapter 21 // BluetoothAdapterClient is used to communicate with a bluetooth Adapter
22 // interface. 22 // interface.
23 class BluetoothAdapterClient { 23 class BluetoothAdapterClient {
24 public: 24 public:
25 // Interface for observing changes from a local bluetooth adapter. 25 // Interface for observing changes from a local bluetooth adapter.
26 class Observer { 26 class Observer {
27 public: 27 public:
28 virtual ~Observer() {} 28 virtual ~Observer() {}
29 29
30 // Called when a new known device has been created.
31 virtual void DeviceCreated(const std::string& object_path,
32 const std::string& device_path) {}
33
34 // Called when a previously known device is removed.
35 virtual void DeviceRemoved(const std::string& object_path,
36 const std::string& device_path) {}
37
30 // Called when the adapter's Discovering property changes. 38 // Called when the adapter's Discovering property changes.
31 virtual void DiscoveringPropertyChanged(const std::string& object_path, 39 virtual void DiscoveringPropertyChanged(const std::string& object_path,
32 bool discovering) {} 40 bool discovering) {}
33 41
34 // Called when a new remote device has been discovered. 42 // Called when a new remote device has been discovered.
35 // |device_properties| should be copied if needed. 43 // |device_properties| should be copied if needed.
36 virtual void DeviceFound(const std::string& object_path, 44 virtual void DeviceFound(const std::string& object_path,
37 const std::string& address, 45 const std::string& address,
38 const DictionaryValue& device_properties) {} 46 const DictionaryValue& device_properties) {}
39 47
(...skipping 24 matching lines...) Expand all
64 protected: 72 protected:
65 BluetoothAdapterClient(); 73 BluetoothAdapterClient();
66 74
67 private: 75 private:
68 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient); 76 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient);
69 }; 77 };
70 78
71 } // namespace chromeos 79 } // namespace chromeos
72 80
73 #endif // CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ 81 #endif // CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/dbus/bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698