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

Side by Side Diff: device/bluetooth/dbus/fake_bluetooth_adapter_client.h

Issue 2084463002: BlueZ + DBus implementations of create/remove service record functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const base::Closure& callback, 53 const base::Closure& callback,
54 const ErrorCallback& error_callback) override; 54 const ErrorCallback& error_callback) override;
55 void RemoveDevice(const dbus::ObjectPath& object_path, 55 void RemoveDevice(const dbus::ObjectPath& object_path,
56 const dbus::ObjectPath& device_path, 56 const dbus::ObjectPath& device_path,
57 const base::Closure& callback, 57 const base::Closure& callback,
58 const ErrorCallback& error_callback) override; 58 const ErrorCallback& error_callback) override;
59 void SetDiscoveryFilter(const dbus::ObjectPath& object_path, 59 void SetDiscoveryFilter(const dbus::ObjectPath& object_path,
60 const DiscoveryFilter& discovery_filter, 60 const DiscoveryFilter& discovery_filter,
61 const base::Closure& callback, 61 const base::Closure& callback,
62 const ErrorCallback& error_callback) override; 62 const ErrorCallback& error_callback) override;
63 void CreateServiceRecord(const dbus::ObjectPath& object_path,
64 const bluez::BluetoothServiceRecordBlueZ& record,
65 const ServiceRecordCallback& callback,
66 const ErrorCallback& error_callback) override;
67 void RemoveServiceRecord(const dbus::ObjectPath& object_path,
68 uint32_t handle,
69 const base::Closure& callback,
70 const ErrorCallback& error_callback) override;
63 71
64 // Sets the current simulation timeout interval. 72 // Sets the current simulation timeout interval.
65 void SetSimulationIntervalMs(int interval_ms); 73 void SetSimulationIntervalMs(int interval_ms);
66 74
67 // Returns current discovery filter in use by this adapter. 75 // Returns current discovery filter in use by this adapter.
68 DiscoveryFilter* GetDiscoveryFilter(); 76 DiscoveryFilter* GetDiscoveryFilter();
69 77
70 // Make SetDiscoveryFilter fail when called next time. 78 // Make SetDiscoveryFilter fail when called next time.
71 void MakeSetDiscoveryFilterFail(); 79 void MakeSetDiscoveryFilterFail();
72 80
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 int discovering_count_; 118 int discovering_count_;
111 119
112 // Current discovery filter 120 // Current discovery filter
113 std::unique_ptr<DiscoveryFilter> discovery_filter_; 121 std::unique_ptr<DiscoveryFilter> discovery_filter_;
114 122
115 // When set, next call to SetDiscoveryFilter would fail. 123 // When set, next call to SetDiscoveryFilter would fail.
116 bool set_discovery_filter_should_fail_; 124 bool set_discovery_filter_should_fail_;
117 125
118 // Current timeout interval used when posting delayed tasks. 126 // Current timeout interval used when posting delayed tasks.
119 int simulation_interval_ms_; 127 int simulation_interval_ms_;
128
129 // Last used handle value issued for a service record.
130 uint32_t last_handle_;
131
132 // Service records manually registered with this adapter by handle.
133 std::map<uint32_t, BluetoothServiceRecordBlueZ> records_;
120 }; 134 };
121 135
122 } // namespace bluez 136 } // namespace bluez
123 137
124 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 138 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_agent_service_provider.cc ('k') | device/bluetooth/dbus/fake_bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698