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

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

Issue 2256003002: components/arc: implement multi advertising (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb-incoming-connections
Patch Set: setting 5 max advs to fix apps Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LE_ADVERTISING_MANAGER_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_LE_ADVERTISING_MANAGER_CLIENT_H_
6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_LE_ADVERTISING_MANAGER_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_LE_ADVERTISING_MANAGER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const ErrorCallback& error_callback) override; 54 const ErrorCallback& error_callback) override;
55 55
56 // Register, unregister and retrieve pointers to profile server providers. 56 // Register, unregister and retrieve pointers to profile server providers.
57 void RegisterAdvertisementServiceProvider( 57 void RegisterAdvertisementServiceProvider(
58 FakeBluetoothLEAdvertisementServiceProvider* service_provider); 58 FakeBluetoothLEAdvertisementServiceProvider* service_provider);
59 void UnregisterAdvertisementServiceProvider( 59 void UnregisterAdvertisementServiceProvider(
60 FakeBluetoothLEAdvertisementServiceProvider* service_provider); 60 FakeBluetoothLEAdvertisementServiceProvider* service_provider);
61 FakeBluetoothLEAdvertisementServiceProvider* GetAdvertisementServiceProvider( 61 FakeBluetoothLEAdvertisementServiceProvider* GetAdvertisementServiceProvider(
62 const std::string& uuid); 62 const std::string& uuid);
63 63
64 bool currently_registered() { return !currently_registered_.value().empty(); }
65
64 private: 66 private:
65 // Map of a D-Bus object path to the FakeBluetoothAdvertisementServiceProvider 67 // Map of a D-Bus object path to the FakeBluetoothAdvertisementServiceProvider
66 // registered for it; maintained by RegisterAdvertisementServiceProvider() and 68 // registered for it; maintained by RegisterAdvertisementServiceProvider() and
67 // UnregisterProfileServiceProvicer() called by the constructor and 69 // UnregisterProfileServiceProvicer() called by the constructor and
68 // destructor of FakeBluetoothAdvertisementServiceProvider. 70 // destructor of FakeBluetoothAdvertisementServiceProvider.
69 typedef std::map<dbus::ObjectPath, 71 typedef std::map<dbus::ObjectPath,
70 FakeBluetoothLEAdvertisementServiceProvider*> 72 FakeBluetoothLEAdvertisementServiceProvider*>
71 ServiceProviderMap; 73 ServiceProviderMap;
72 ServiceProviderMap service_provider_map_; 74 ServiceProviderMap service_provider_map_;
73 75
74 // Holds the currently registered advertisement. If there is no advertisement 76 // Holds the currently registered advertisement. If there is no advertisement
75 // registered, this path is empty. 77 // registered, this path is empty.
76 dbus::ObjectPath currently_registered_; 78 dbus::ObjectPath currently_registered_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisingManagerClient); 80 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisingManagerClient);
79 }; 81 };
80 82
81 } // namespace bluez 83 } // namespace bluez
82 84
83 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_LE_ADVERTISING_MANAGER_CLIENT_H_ 85 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_LE_ADVERTISING_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698