| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DBUS_THREAD_MANAGER_H_ | 5 #ifndef CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
| 6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 6 #define CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
| 14 #include "chromeos/dbus/dbus_client_bundle.h" | 14 #include "chromeos/dbus/dbus_client_bundle.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class Thread; | 17 class Thread; |
| 18 } // namespace base | 18 } // namespace base |
| 19 | 19 |
| 20 namespace dbus { | 20 namespace dbus { |
| 21 class Bus; | 21 class Bus; |
| 22 class ObjectPath; | 22 class ObjectPath; |
| 23 } // namespace dbus | 23 } // namespace dbus |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| 27 // Style Note: Clients are sorted by names. | 27 // Style Note: Clients are sorted by names. |
| 28 class AmplifierClient; | 28 class AmplifierClient; |
| 29 class ApManagerClient; | 29 class ApManagerClient; |
| 30 class ArcBridgeClient; | 30 class ArcInstanceClient; |
| 31 class AudioDspClient; | 31 class AudioDspClient; |
| 32 class BluetoothAdapterClient; | 32 class BluetoothAdapterClient; |
| 33 class BluetoothLEAdvertisingManagerClient; | 33 class BluetoothLEAdvertisingManagerClient; |
| 34 class BluetoothAgentManagerClient; | 34 class BluetoothAgentManagerClient; |
| 35 class BluetoothDeviceClient; | 35 class BluetoothDeviceClient; |
| 36 class BluetoothGattCharacteristicClient; | 36 class BluetoothGattCharacteristicClient; |
| 37 class BluetoothGattDescriptorClient; | 37 class BluetoothGattDescriptorClient; |
| 38 class BluetoothGattManagerClient; | 38 class BluetoothGattManagerClient; |
| 39 class BluetoothGattServiceClient; | 39 class BluetoothGattServiceClient; |
| 40 class BluetoothInputClient; | 40 class BluetoothInputClient; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Returns true if |client| is stubbed. | 117 // Returns true if |client| is stubbed. |
| 118 bool IsUsingStub(DBusClientBundle::DBusClientType client); | 118 bool IsUsingStub(DBusClientBundle::DBusClientType client); |
| 119 | 119 |
| 120 // Returns various D-Bus bus instances, owned by DBusThreadManager. | 120 // Returns various D-Bus bus instances, owned by DBusThreadManager. |
| 121 dbus::Bus* GetSystemBus(); | 121 dbus::Bus* GetSystemBus(); |
| 122 | 122 |
| 123 // All returned objects are owned by DBusThreadManager. Do not use these | 123 // All returned objects are owned by DBusThreadManager. Do not use these |
| 124 // pointers after DBusThreadManager has been shut down. | 124 // pointers after DBusThreadManager has been shut down. |
| 125 AmplifierClient* GetAmplifierClient(); | 125 AmplifierClient* GetAmplifierClient(); |
| 126 ApManagerClient* GetApManagerClient(); | 126 ApManagerClient* GetApManagerClient(); |
| 127 ArcBridgeClient* GetArcBridgeClient(); | 127 ArcInstanceClient* GetArcInstanceClient(); |
| 128 AudioDspClient* GetAudioDspClient(); | 128 AudioDspClient* GetAudioDspClient(); |
| 129 BluetoothAdapterClient* GetBluetoothAdapterClient(); | 129 BluetoothAdapterClient* GetBluetoothAdapterClient(); |
| 130 BluetoothLEAdvertisingManagerClient* GetBluetoothLEAdvertisingManagerClient(); | 130 BluetoothLEAdvertisingManagerClient* GetBluetoothLEAdvertisingManagerClient(); |
| 131 BluetoothAgentManagerClient* GetBluetoothAgentManagerClient(); | 131 BluetoothAgentManagerClient* GetBluetoothAgentManagerClient(); |
| 132 BluetoothDeviceClient* GetBluetoothDeviceClient(); | 132 BluetoothDeviceClient* GetBluetoothDeviceClient(); |
| 133 BluetoothGattCharacteristicClient* GetBluetoothGattCharacteristicClient(); | 133 BluetoothGattCharacteristicClient* GetBluetoothGattCharacteristicClient(); |
| 134 BluetoothGattDescriptorClient* GetBluetoothGattDescriptorClient(); | 134 BluetoothGattDescriptorClient* GetBluetoothGattDescriptorClient(); |
| 135 BluetoothGattManagerClient* GetBluetoothGattManagerClient(); | 135 BluetoothGattManagerClient* GetBluetoothGattManagerClient(); |
| 136 BluetoothGattServiceClient* GetBluetoothGattServiceClient(); | 136 BluetoothGattServiceClient* GetBluetoothGattServiceClient(); |
| 137 BluetoothInputClient* GetBluetoothInputClient(); | 137 BluetoothInputClient* GetBluetoothInputClient(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 scoped_ptr<DBusClientBundle> client_bundle_; | 204 scoped_ptr<DBusClientBundle> client_bundle_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); | 206 DISALLOW_COPY_AND_ASSIGN(DBusThreadManager); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 class CHROMEOS_EXPORT DBusThreadManagerSetter { | 209 class CHROMEOS_EXPORT DBusThreadManagerSetter { |
| 210 public: | 210 public: |
| 211 ~DBusThreadManagerSetter(); | 211 ~DBusThreadManagerSetter(); |
| 212 | 212 |
| 213 void SetAmplifierClient(scoped_ptr<AmplifierClient> client); | 213 void SetAmplifierClient(scoped_ptr<AmplifierClient> client); |
| 214 void SetArcBridgeClient(scoped_ptr<ArcBridgeClient> client); | 214 void SetArcInstanceClient(scoped_ptr<ArcInstanceClient> client); |
| 215 void SetAudioDspClient(scoped_ptr<AudioDspClient> client); | 215 void SetAudioDspClient(scoped_ptr<AudioDspClient> client); |
| 216 void SetBluetoothAdapterClient(scoped_ptr<BluetoothAdapterClient> client); | 216 void SetBluetoothAdapterClient(scoped_ptr<BluetoothAdapterClient> client); |
| 217 void SetBluetoothLEAdvertisingManagerClient( | 217 void SetBluetoothLEAdvertisingManagerClient( |
| 218 scoped_ptr<BluetoothLEAdvertisingManagerClient> client); | 218 scoped_ptr<BluetoothLEAdvertisingManagerClient> client); |
| 219 void SetBluetoothAgentManagerClient( | 219 void SetBluetoothAgentManagerClient( |
| 220 scoped_ptr<BluetoothAgentManagerClient> client); | 220 scoped_ptr<BluetoothAgentManagerClient> client); |
| 221 void SetBluetoothDeviceClient(scoped_ptr<BluetoothDeviceClient> client); | 221 void SetBluetoothDeviceClient(scoped_ptr<BluetoothDeviceClient> client); |
| 222 void SetBluetoothGattCharacteristicClient( | 222 void SetBluetoothGattCharacteristicClient( |
| 223 scoped_ptr<BluetoothGattCharacteristicClient> client); | 223 scoped_ptr<BluetoothGattCharacteristicClient> client); |
| 224 void SetBluetoothGattDescriptorClient( | 224 void SetBluetoothGattDescriptorClient( |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 friend class DBusThreadManager; | 269 friend class DBusThreadManager; |
| 270 | 270 |
| 271 DBusThreadManagerSetter(); | 271 DBusThreadManagerSetter(); |
| 272 | 272 |
| 273 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter); | 273 DISALLOW_COPY_AND_ASSIGN(DBusThreadManagerSetter); |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 } // namespace chromeos | 276 } // namespace chromeos |
| 277 | 277 |
| 278 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ | 278 #endif // CHROMEOS_DBUS_DBUS_THREAD_MANAGER_H_ |
| OLD | NEW |