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

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

Issue 206443009: chromeos/dbus: Add fake D-Bus clients for GATT client-mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 9 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 | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/fake_bluetooth_device_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) 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 CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 static const char kUnpairableDevicePath[]; 152 static const char kUnpairableDevicePath[];
153 static const char kUnpairableDeviceName[]; 153 static const char kUnpairableDeviceName[];
154 static const char kUnpairableDeviceAddress[]; 154 static const char kUnpairableDeviceAddress[];
155 static const uint32 kUnpairableDeviceClass; 155 static const uint32 kUnpairableDeviceClass;
156 156
157 static const char kJustWorksPath[]; 157 static const char kJustWorksPath[];
158 static const char kJustWorksName[]; 158 static const char kJustWorksName[];
159 static const char kJustWorksAddress[]; 159 static const char kJustWorksAddress[];
160 static const uint32 kJustWorksClass; 160 static const uint32 kJustWorksClass;
161 161
162 static const char kLowEnergyPath[];
163 static const char kLowEnergyName[];
164 static const char kLowEnergyAddress[];
165 static const uint32 kLowEnergyClass;
166
162 private: 167 private:
163 // Property callback passed when we create Properties* structures. 168 // Property callback passed when we create Properties* structures.
164 void OnPropertyChanged(const dbus::ObjectPath& object_path, 169 void OnPropertyChanged(const dbus::ObjectPath& object_path,
165 const std::string& property_name); 170 const std::string& property_name);
166 171
167 void DiscoverySimulationTimer(); 172 void DiscoverySimulationTimer();
168 void IncomingPairingSimulationTimer(); 173 void IncomingPairingSimulationTimer();
169 174
170 void CompleteSimulatedPairing( 175 void CompleteSimulatedPairing(
171 const dbus::ObjectPath& object_path, 176 const dbus::ObjectPath& object_path,
172 const base::Closure& callback, 177 const base::Closure& callback,
173 const ErrorCallback& error_callback); 178 const ErrorCallback& error_callback);
174 void TimeoutSimulatedPairing( 179 void TimeoutSimulatedPairing(
175 const dbus::ObjectPath& object_path, 180 const dbus::ObjectPath& object_path,
176 const ErrorCallback& error_callback); 181 const ErrorCallback& error_callback);
177 void CancelSimulatedPairing( 182 void CancelSimulatedPairing(
178 const dbus::ObjectPath& object_path, 183 const dbus::ObjectPath& object_path,
179 const ErrorCallback& error_callback); 184 const ErrorCallback& error_callback);
180 void RejectSimulatedPairing( 185 void RejectSimulatedPairing(
181 const dbus::ObjectPath& object_path, 186 const dbus::ObjectPath& object_path,
182 const ErrorCallback& error_callback); 187 const ErrorCallback& error_callback);
183 void FailSimulatedPairing( 188 void FailSimulatedPairing(
184 const dbus::ObjectPath& object_path, 189 const dbus::ObjectPath& object_path,
185 const ErrorCallback& error_callback); 190 const ErrorCallback& error_callback);
186 void AddInputDeviceIfNeeded( 191 void AddInputDeviceIfNeeded(
187 const dbus::ObjectPath& object_path, 192 const dbus::ObjectPath& object_path,
188 Properties* properties); 193 Properties* properties);
189 194
195 // Updates the RSSI property of fake device with object path |object_path|
196 // to |rssi|, if the fake device exists.
197 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16 rssi);
198
190 void PinCodeCallback( 199 void PinCodeCallback(
191 const dbus::ObjectPath& object_path, 200 const dbus::ObjectPath& object_path,
192 const base::Closure& callback, 201 const base::Closure& callback,
193 const ErrorCallback& error_callback, 202 const ErrorCallback& error_callback,
194 BluetoothAgentServiceProvider::Delegate::Status status, 203 BluetoothAgentServiceProvider::Delegate::Status status,
195 const std::string& pincode); 204 const std::string& pincode);
196 void PasskeyCallback( 205 void PasskeyCallback(
197 const dbus::ObjectPath& object_path, 206 const dbus::ObjectPath& object_path,
198 const base::Closure& callback, 207 const base::Closure& callback,
199 const ErrorCallback& error_callback, 208 const ErrorCallback& error_callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 240
232 int simulation_interval_ms_; 241 int simulation_interval_ms_;
233 uint32_t discovery_simulation_step_; 242 uint32_t discovery_simulation_step_;
234 uint32_t incoming_pairing_simulation_step_; 243 uint32_t incoming_pairing_simulation_step_;
235 bool pairing_cancelled_; 244 bool pairing_cancelled_;
236 }; 245 };
237 246
238 } // namespace chromeos 247 } // namespace chromeos
239 248
240 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ 249 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/fake_bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698