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

Side by Side Diff: chromeos/dbus/fake_old_bluetooth_adapter_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_ADAPTER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_OLD_BLUETOOTH_ADAPTER_CLIENT_H_
7
8 #include "chromeos/dbus/bluetooth_adapter_client.h"
9
10 namespace chromeos {
11
12 // A fake implementation of BluetoothAdapterClient used on Linux desktop and for
13 // tests. This class does nothing.
14 class FakeOldBluetoothAdapterClient : public BluetoothAdapterClient {
15 public:
16 struct Properties : public BluetoothAdapterClient::Properties {
17 explicit Properties(const PropertyChangedCallback& callback);
18 virtual ~Properties();
19
20 // BluetoothAdapterClient::Properties overrides.
21 virtual void Get(dbus::PropertyBase* property,
22 dbus::PropertySet::GetCallback callback) OVERRIDE;
23 virtual void GetAll() OVERRIDE;
24 virtual void Set(dbus::PropertyBase *property,
25 dbus::PropertySet::SetCallback callback) OVERRIDE;
26 };
27
28 FakeOldBluetoothAdapterClient();
29 virtual ~FakeOldBluetoothAdapterClient();
30
31 // BluetoothAdapterClient overrides.
32 virtual void AddObserver(Observer* observer) OVERRIDE;
33 virtual void RemoveObserver(Observer* observer) OVERRIDE;
34 virtual Properties* GetProperties(
35 const dbus::ObjectPath& object_path) OVERRIDE;
36 virtual void RequestSession(const dbus::ObjectPath& object_path,
37 const AdapterCallback& callback) OVERRIDE;
38 virtual void ReleaseSession(const dbus::ObjectPath& object_path,
39 const AdapterCallback& callback) OVERRIDE;
40 virtual void StartDiscovery(const dbus::ObjectPath& object_path,
41 const AdapterCallback& callback) OVERRIDE;
42 virtual void StopDiscovery(const dbus::ObjectPath& object_path,
43 const AdapterCallback& callback) OVERRIDE;
44 virtual void FindDevice(const dbus::ObjectPath& object_path,
45 const std::string& address,
46 const DeviceCallback& callback) OVERRIDE;
47 virtual void CreateDevice(
48 const dbus::ObjectPath& object_path,
49 const std::string& address,
50 const CreateDeviceCallback& callback,
51 const CreateDeviceErrorCallback& error_callback) OVERRIDE;
52 virtual void CreatePairedDevice(
53 const dbus::ObjectPath& object_path,
54 const std::string& address,
55 const dbus::ObjectPath& agent_path,
56 const std::string& capability,
57 const CreateDeviceCallback& callback,
58 const CreateDeviceErrorCallback& error_callback) OVERRIDE;
59 virtual void CancelDeviceCreation(const dbus::ObjectPath& object_path,
60 const std::string& address,
61 const AdapterCallback& callback) OVERRIDE;
62 virtual void RemoveDevice(const dbus::ObjectPath& object_path,
63 const dbus::ObjectPath& device_path,
64 const AdapterCallback& callback) OVERRIDE;
65 virtual void RegisterAgent(const dbus::ObjectPath& object_path,
66 const dbus::ObjectPath& agent_path,
67 const std::string& capability,
68 const AdapterCallback& callback) OVERRIDE;
69 virtual void UnregisterAgent(const dbus::ObjectPath& object_path,
70 const dbus::ObjectPath& agent_path,
71 const AdapterCallback& callback) OVERRIDE;
72
73 // List of observers interested in event notifications from us.
74 ObserverList<Observer> observers_;
75
76 // Static properties we return.
77 scoped_ptr<Properties> properties_;
78
79 private:
80 void OnPropertyChanged(const std::string& property_name);
81
82 DISALLOW_COPY_AND_ASSIGN(FakeOldBluetoothAdapterClient);
83 };
84
85 } // namespace chromeos
86
87 #endif // CHROMEOS_DBUS_FAKE_OLD_BLUETOOTH_ADAPTER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_input_client.cc ('k') | chromeos/dbus/fake_old_bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698