| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CLIENT_BUNDLE_H_ | 5 #ifndef CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ |
| 6 #define CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | 6 #define CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chromeos/chromeos_export.h" | 9 #include "chromeos/chromeos_export.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 class BluetoothAdapterClient; | 13 class BluetoothAdapterClient; |
| 14 class BluetoothAgentManagerClient; | 14 class BluetoothAgentManagerClient; |
| 15 class BluetoothDeviceClient; | 15 class BluetoothDeviceClient; |
| 16 class BluetoothGattCharacteristicClient; | 16 class BluetoothGattCharacteristicClient; |
| 17 class BluetoothGattDescriptorClient; | 17 class BluetoothGattDescriptorClient; |
| 18 class BluetoothGattManagerClient; | 18 class BluetoothGattManagerClient; |
| 19 class BluetoothGattServiceClient; | 19 class BluetoothGattServiceClient; |
| 20 class BluetoothInputClient; | 20 class BluetoothInputClient; |
| 21 class BluetoothProfileManagerClient; | 21 class BluetoothProfileManagerClient; |
| 22 class ConsoleServiceClient; |
| 22 class CrasAudioClient; | 23 class CrasAudioClient; |
| 23 class CrosDisksClient; | 24 class CrosDisksClient; |
| 24 class CryptohomeClient; | 25 class CryptohomeClient; |
| 25 class DebugDaemonClient; | 26 class DebugDaemonClient; |
| 26 class EasyUnlockClient; | 27 class EasyUnlockClient; |
| 27 class LorgnetteManagerClient; | 28 class LorgnetteManagerClient; |
| 28 class ShillDeviceClient; | 29 class ShillDeviceClient; |
| 29 class ShillIPConfigClient; | 30 class ShillIPConfigClient; |
| 30 class ShillManagerClient; | 31 class ShillManagerClient; |
| 31 class ShillServiceClient; | 32 class ShillServiceClient; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 49 // The bundle of all D-Bus clients used in DBusThreadManager. The bundle | 50 // The bundle of all D-Bus clients used in DBusThreadManager. The bundle |
| 50 // is used to delete them at once in the right order before shutting down the | 51 // is used to delete them at once in the right order before shutting down the |
| 51 // system bus. See also the comment in the destructor of DBusThreadManager. | 52 // system bus. See also the comment in the destructor of DBusThreadManager. |
| 52 class CHROMEOS_EXPORT DBusClientBundle { | 53 class CHROMEOS_EXPORT DBusClientBundle { |
| 53 public: | 54 public: |
| 54 typedef int DBusClientTypeMask; | 55 typedef int DBusClientTypeMask; |
| 55 | 56 |
| 56 // TODO(zelidrag): We might want to collapse few more of these subsystems if | 57 // TODO(zelidrag): We might want to collapse few more of these subsystems if |
| 57 // their dbus interfaced correspond to the same daemon. | 58 // their dbus interfaced correspond to the same daemon. |
| 58 enum DBusClientType { | 59 enum DBusClientType { |
| 59 NO_CLIENT = 0, | 60 NO_CLIENT = 0, |
| 60 BLUETOOTH = 1 << 0, | 61 BLUETOOTH = 1 << 0, |
| 61 CRAS = 1 << 1, | 62 CRAS = 1 << 1, |
| 62 CROS_DISKS = 1 << 2, | 63 CROS_DISKS = 1 << 2, |
| 63 CRYPTOHOME = 1 << 3, | 64 CRYPTOHOME = 1 << 3, |
| 64 DEBUG_DAEMON = 1 << 4, | 65 DEBUG_DAEMON = 1 << 4, |
| 65 EASY_UNLOCK = 1 << 5, | 66 EASY_UNLOCK = 1 << 5, |
| 66 LORGNETTE_MANAGER = 1 << 6, | 67 LORGNETTE_MANAGER = 1 << 6, |
| 67 SHILL = 1 << 7, | 68 SHILL = 1 << 7, |
| 68 GSM_SMS = 1 << 8, | 69 GSM_SMS = 1 << 8, |
| 69 IMAGE_BURNER = 1 << 9, | 70 IMAGE_BURNER = 1 << 9, |
| 70 INTROSPECTABLE = 1 << 10, | 71 INTROSPECTABLE = 1 << 10, |
| 71 MODEM_MESSAGING = 1 << 11, | 72 MODEM_MESSAGING = 1 << 11, |
| 72 NFC = 1 << 12, | 73 NFC = 1 << 12, |
| 73 PERMISSION_BROKER = 1 << 13, | 74 PERMISSION_BROKER = 1 << 13, |
| 74 POWER_MANAGER = 1 << 14, | 75 POWER_MANAGER = 1 << 14, |
| 75 SESSION_MANAGER = 1 << 15, | 76 SESSION_MANAGER = 1 << 15, |
| 76 SMS = 1 << 16, | 77 SMS = 1 << 16, |
| 77 SYSTEM_CLOCK = 1 << 17, | 78 SYSTEM_CLOCK = 1 << 17, |
| 78 UPDATE_ENGINE = 1 << 18, | 79 UPDATE_ENGINE = 1 << 18, |
| 80 CONSOLE = 1 << 19, |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 explicit DBusClientBundle(DBusClientTypeMask unstub_client_mask); | 83 explicit DBusClientBundle(DBusClientTypeMask unstub_client_mask); |
| 82 ~DBusClientBundle(); | 84 ~DBusClientBundle(); |
| 83 | 85 |
| 84 // Returns true if |client| is stubbed. | 86 // Returns true if |client| is stubbed. |
| 85 bool IsUsingStub(DBusClientType client); | 87 bool IsUsingStub(DBusClientType client); |
| 86 | 88 |
| 87 // Returns true if any real DBusClient is used. | 89 // Returns true if any real DBusClient is used. |
| 88 bool IsUsingAnyRealClient(); | 90 bool IsUsingAnyRealClient(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 129 } |
| 128 | 130 |
| 129 BluetoothProfileManagerClient* bluetooth_profile_manager_client() { | 131 BluetoothProfileManagerClient* bluetooth_profile_manager_client() { |
| 130 return bluetooth_profile_manager_client_.get(); | 132 return bluetooth_profile_manager_client_.get(); |
| 131 } | 133 } |
| 132 | 134 |
| 133 CrasAudioClient* cras_audio_client() { | 135 CrasAudioClient* cras_audio_client() { |
| 134 return cras_audio_client_.get(); | 136 return cras_audio_client_.get(); |
| 135 } | 137 } |
| 136 | 138 |
| 139 ConsoleServiceClient* console_service_client() { |
| 140 return console_service_client_.get(); |
| 141 } |
| 142 |
| 137 CrosDisksClient* cros_disks_client() { | 143 CrosDisksClient* cros_disks_client() { |
| 138 return cros_disks_client_.get(); | 144 return cros_disks_client_.get(); |
| 139 } | 145 } |
| 140 | 146 |
| 141 CryptohomeClient* cryptohome_client() { | 147 CryptohomeClient* cryptohome_client() { |
| 142 return cryptohome_client_.get(); | 148 return cryptohome_client_.get(); |
| 143 } | 149 } |
| 144 | 150 |
| 145 DebugDaemonClient* debug_daemon_client() { | 151 DebugDaemonClient* debug_daemon_client() { |
| 146 return debug_daemon_client_.get(); | 152 return debug_daemon_client_.get(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 scoped_ptr<BluetoothAgentManagerClient> bluetooth_agent_manager_client_; | 251 scoped_ptr<BluetoothAgentManagerClient> bluetooth_agent_manager_client_; |
| 246 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 252 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
| 247 scoped_ptr<BluetoothGattCharacteristicClient> | 253 scoped_ptr<BluetoothGattCharacteristicClient> |
| 248 bluetooth_gatt_characteristic_client_; | 254 bluetooth_gatt_characteristic_client_; |
| 249 scoped_ptr<BluetoothGattDescriptorClient> bluetooth_gatt_descriptor_client_; | 255 scoped_ptr<BluetoothGattDescriptorClient> bluetooth_gatt_descriptor_client_; |
| 250 scoped_ptr<BluetoothGattManagerClient> bluetooth_gatt_manager_client_; | 256 scoped_ptr<BluetoothGattManagerClient> bluetooth_gatt_manager_client_; |
| 251 scoped_ptr<BluetoothGattServiceClient> bluetooth_gatt_service_client_; | 257 scoped_ptr<BluetoothGattServiceClient> bluetooth_gatt_service_client_; |
| 252 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 258 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
| 253 scoped_ptr<BluetoothProfileManagerClient> bluetooth_profile_manager_client_; | 259 scoped_ptr<BluetoothProfileManagerClient> bluetooth_profile_manager_client_; |
| 254 scoped_ptr<CrasAudioClient> cras_audio_client_; | 260 scoped_ptr<CrasAudioClient> cras_audio_client_; |
| 261 scoped_ptr<ConsoleServiceClient> console_service_client_; |
| 255 scoped_ptr<CrosDisksClient> cros_disks_client_; | 262 scoped_ptr<CrosDisksClient> cros_disks_client_; |
| 256 scoped_ptr<CryptohomeClient> cryptohome_client_; | 263 scoped_ptr<CryptohomeClient> cryptohome_client_; |
| 257 scoped_ptr<DebugDaemonClient> debug_daemon_client_; | 264 scoped_ptr<DebugDaemonClient> debug_daemon_client_; |
| 258 scoped_ptr<EasyUnlockClient> easy_unlock_client_; | 265 scoped_ptr<EasyUnlockClient> easy_unlock_client_; |
| 259 scoped_ptr<LorgnetteManagerClient> lorgnette_manager_client_; | 266 scoped_ptr<LorgnetteManagerClient> lorgnette_manager_client_; |
| 260 scoped_ptr<ShillDeviceClient> shill_device_client_; | 267 scoped_ptr<ShillDeviceClient> shill_device_client_; |
| 261 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; | 268 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; |
| 262 scoped_ptr<ShillManagerClient> shill_manager_client_; | 269 scoped_ptr<ShillManagerClient> shill_manager_client_; |
| 263 scoped_ptr<ShillServiceClient> shill_service_client_; | 270 scoped_ptr<ShillServiceClient> shill_service_client_; |
| 264 scoped_ptr<ShillProfileClient> shill_profile_client_; | 271 scoped_ptr<ShillProfileClient> shill_profile_client_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 279 scoped_ptr<SessionManagerClient> session_manager_client_; | 286 scoped_ptr<SessionManagerClient> session_manager_client_; |
| 280 scoped_ptr<SMSClient> sms_client_; | 287 scoped_ptr<SMSClient> sms_client_; |
| 281 scoped_ptr<UpdateEngineClient> update_engine_client_; | 288 scoped_ptr<UpdateEngineClient> update_engine_client_; |
| 282 | 289 |
| 283 DISALLOW_COPY_AND_ASSIGN(DBusClientBundle); | 290 DISALLOW_COPY_AND_ASSIGN(DBusClientBundle); |
| 284 }; | 291 }; |
| 285 | 292 |
| 286 } // namespace chromeos | 293 } // namespace chromeos |
| 287 | 294 |
| 288 #endif // CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | 295 #endif // CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ |
| OLD | NEW |