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

Side by Side Diff: chromeos/dbus/fake_old_bluetooth_device_client.h

Issue 15020009: Bluetooth: remove legacy backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_DBUS_FAKE_OLD_BLUETOOTH_DEVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_OLD_BLUETOOTH_DEVICE_CLIENT_H_
7
8 #include "chromeos/dbus/bluetooth_device_client.h"
9
10 namespace chromeos {
11
12 // A fake implementation of BluetoothDeviceClient used on Linux desktop and for
13 // tests. . This class does nothing.
14 class FakeOldBluetoothDeviceClient : public BluetoothDeviceClient {
15 public:
16 struct Properties : public BluetoothDeviceClient::Properties {
17 explicit Properties(const PropertyChangedCallback& callback);
18
19 virtual ~Properties();
20
21 // BluetoothDeviceClient::Properties overrides.
22 virtual void Get(dbus::PropertyBase* property,
23 dbus::PropertySet::GetCallback callback) OVERRIDE;
24 virtual void GetAll() OVERRIDE;
25 virtual void Set(dbus::PropertyBase *property,
26 dbus::PropertySet::SetCallback callback) OVERRIDE;
27 };
28
29 FakeOldBluetoothDeviceClient();
30 virtual ~FakeOldBluetoothDeviceClient();
31
32 // BluetoothDeviceClient overrides.
33 virtual void AddObserver(Observer* observer) OVERRIDE;
34 virtual void RemoveObserver(Observer* observer) OVERRIDE;
35 virtual Properties* GetProperties(
36 const dbus::ObjectPath& object_path) OVERRIDE;
37 virtual void DiscoverServices(const dbus::ObjectPath& object_path,
38 const std::string& pattern,
39 const ServicesCallback& callback) OVERRIDE;
40 virtual void CancelDiscovery(const dbus::ObjectPath& object_path,
41 const DeviceCallback& callback) OVERRIDE;
42 virtual void Disconnect(const dbus::ObjectPath& object_path,
43 const DeviceCallback& callback) OVERRIDE;
44 virtual void CreateNode(const dbus::ObjectPath& object_path,
45 const std::string& uuid,
46 const NodeCallback& callback) OVERRIDE;
47 virtual void RemoveNode(const dbus::ObjectPath& object_path,
48 const dbus::ObjectPath& node_path,
49 const DeviceCallback& callback) OVERRIDE;
50
51 private:
52 void OnPropertyChanged(dbus::ObjectPath object_path,
53 const std::string& property_name);
54
55 // List of observers interested in event notifications from us.
56 ObserverList<Observer> observers_;
57
58 // Static properties we typedef.
59 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap;
60 PropertiesMap properties_map_;
61
62 DISALLOW_COPY_AND_ASSIGN(FakeOldBluetoothDeviceClient);
63 };
64
65 } // namespace chromeos
66
67 #endif // CHROMEOS_DBUS_FAKE_OLD_BLUETOOTH_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_old_bluetooth_adapter_client.cc ('k') | chromeos/dbus/fake_old_bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698