Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | |
| 6 #define CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "chromeos/chromeos_export.h" | |
| 10 | |
| 11 namespace chromeos { | |
| 12 | |
| 13 class BluetoothAdapterClient; | |
| 14 class BluetoothAgentManagerClient; | |
| 15 class BluetoothDeviceClient; | |
| 16 class BluetoothGattCharacteristicClient; | |
| 17 class BluetoothGattDescriptorClient; | |
| 18 class BluetoothGattManagerClient; | |
| 19 class BluetoothGattServiceClient; | |
| 20 class BluetoothInputClient; | |
| 21 class BluetoothProfileManagerClient; | |
| 22 class CrasAudioClient; | |
| 23 class CrosDisksClient; | |
| 24 class CryptohomeClient; | |
| 25 class DebugDaemonClient; | |
| 26 class EasyUnlockClient; | |
| 27 class LorgnetteManagerClient; | |
| 28 class ShillDeviceClient; | |
| 29 class ShillIPConfigClient; | |
| 30 class ShillManagerClient; | |
| 31 class ShillServiceClient; | |
| 32 class ShillProfileClient; | |
| 33 class GsmSMSClient; | |
| 34 class ImageBurnerClient; | |
| 35 class IntrospectableClient; | |
| 36 class ModemMessagingClient; | |
| 37 class NfcManagerClient; | |
| 38 class NfcAdapterClient; | |
| 39 class NfcDeviceClient; | |
| 40 class NfcTagClient; | |
| 41 class NfcRecordClient; | |
| 42 class PermissionBrokerClient; | |
| 43 class SystemClockClient; | |
| 44 class PowerManagerClient; | |
| 45 class SessionManagerClient; | |
| 46 class SMSClient; | |
| 47 class UpdateEngineClient; | |
| 48 | |
| 49 // The bundle of all D-Bus clients used in DBusThreadManagerImpl. The bundle | |
| 50 // 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 DBusThreadManagerImpl. | |
| 52 class CHROMEOS_EXPORT DBusClientBundle { | |
| 53 public: | |
| 54 // TODO(zelidrag): We might want to collapse few more of these subsystems if | |
| 55 // their dbus interfaced correspond to the same daemon. | |
| 56 enum DBusClientType { | |
|
hashimoto
2014/08/08 07:08:44
Do we need all of these clients?
If not, maybe we
zel
2014/08/08 19:00:15
Yes, we have to define them all since in DBusClien
| |
| 57 UNKNOWN = 0, | |
| 58 BLUETOOTH = 1 << 1, | |
| 59 BLUETOOTH_LOW_ENERGY = 1 << 2, | |
| 60 CRAS = 1 << 3, | |
| 61 CROS_DISKS = 1 << 4, | |
| 62 CRYPTOHOME = 1 << 5, | |
| 63 DEBUG_DAEMON = 1 << 6, | |
| 64 EASY_UNLOCK = 1 << 7, | |
| 65 LORGNETTE_MANAGER = 1 << 8, | |
| 66 SHILL = 1 << 9, | |
| 67 GSM_SMS = 1 << 10, | |
| 68 IMAGE_BURNER = 1 << 11, | |
| 69 INTROSPECTABLE = 1 << 12, | |
| 70 MODEM_MESSAGING = 1 << 13, | |
| 71 NFC = 1 << 14, | |
| 72 PERMISSION_BROKER = 1 << 15, | |
| 73 POWER_MANAGER = 1 << 16, | |
| 74 POWER_POLICY = 1 << 17, | |
| 75 SESSION_MANAGER = 1 << 18, | |
| 76 SMS = 1 << 19, | |
| 77 SYSTEM_CLOCK = 1 << 20, | |
| 78 UPDATE_ENGINE = 1 << 21, | |
| 79 All = 0xFFFFFFFF, | |
|
hashimoto
2014/08/08 02:06:15
nit: This should be "ALL".
Also, 0xFFFFFFFF shoul
zel
2014/08/08 19:00:15
Done.
| |
| 80 }; | |
| 81 | |
| 82 explicit DBusClientBundle(unsigned int client_mask); | |
|
hashimoto
2014/08/08 02:06:15
This "unsigned int" should be typedef-ed so that w
zel
2014/08/08 19:00:14
Done.
| |
| 83 virtual ~DBusClientBundle(); | |
| 84 | |
| 85 // Parses command line param values for dbus subsystem that should be | |
| 86 // un-stubbed. | |
| 87 static unsigned int ParseUnstubList(const std::string& unstub_list); | |
| 88 | |
| 89 BluetoothAdapterClient* bluetooth_adapter_client(); | |
| 90 | |
| 91 BluetoothAgentManagerClient* bluetooth_agent_manager_client(); | |
| 92 | |
| 93 BluetoothDeviceClient* bluetooth_device_client(); | |
| 94 | |
| 95 BluetoothGattCharacteristicClient* bluetooth_gatt_characteristic_client(); | |
| 96 | |
| 97 BluetoothGattDescriptorClient* bluetooth_gatt_descriptor_client(); | |
| 98 | |
| 99 BluetoothGattManagerClient* bluetooth_gatt_manager_client(); | |
| 100 | |
| 101 BluetoothGattServiceClient* bluetooth_gatt_service_client(); | |
| 102 | |
| 103 BluetoothInputClient* bluetooth_input_client(); | |
| 104 | |
| 105 BluetoothProfileManagerClient* bluetooth_profile_manager_client(); | |
| 106 | |
| 107 CrasAudioClient* cras_audio_client(); | |
| 108 | |
| 109 CrosDisksClient* cros_disks_client(); | |
| 110 | |
| 111 CryptohomeClient* cryptohome_client(); | |
| 112 | |
| 113 DebugDaemonClient* debug_daemon_client(); | |
| 114 | |
| 115 EasyUnlockClient* easy_unlock_client(); | |
| 116 | |
| 117 LorgnetteManagerClient* lorgnette_manager_client(); | |
| 118 | |
| 119 ShillDeviceClient* shill_device_client(); | |
| 120 | |
| 121 ShillIPConfigClient* shill_ipconfig_client(); | |
| 122 | |
| 123 ShillManagerClient* shill_manager_client(); | |
| 124 | |
| 125 ShillServiceClient* shill_service_client(); | |
| 126 | |
| 127 ShillProfileClient* shill_profile_client(); | |
| 128 | |
| 129 GsmSMSClient* gsm_sms_client(); | |
| 130 | |
| 131 ImageBurnerClient* image_burner_client(); | |
| 132 | |
| 133 IntrospectableClient* introspectable_client(); | |
| 134 | |
| 135 ModemMessagingClient* modem_messaging_client(); | |
| 136 | |
| 137 NfcManagerClient* nfc_manager_client(); | |
| 138 | |
| 139 NfcAdapterClient* nfc_adapter_client(); | |
| 140 | |
| 141 NfcDeviceClient* nfc_device_client(); | |
| 142 | |
| 143 NfcTagClient* nfc_tag_client(); | |
| 144 | |
| 145 NfcRecordClient* nfc_record_client(); | |
| 146 | |
| 147 PermissionBrokerClient* permission_broker_client(); | |
| 148 | |
| 149 SystemClockClient* system_clock_client(); | |
| 150 | |
| 151 PowerManagerClient* power_manager_client(); | |
| 152 | |
| 153 SessionManagerClient* session_manager_client(); | |
| 154 | |
| 155 SMSClient* sms_client(); | |
| 156 | |
| 157 UpdateEngineClient* update_engine_client(); | |
| 158 | |
|
hashimoto
2014/08/08 02:06:15
nit: Unneeded blank line.
zel
2014/08/08 19:00:14
Done.
| |
| 159 | |
| 160 private: | |
| 161 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | |
| 162 scoped_ptr<BluetoothAgentManagerClient> bluetooth_agent_manager_client_; | |
| 163 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | |
| 164 scoped_ptr<BluetoothGattCharacteristicClient> | |
| 165 bluetooth_gatt_characteristic_client_; | |
| 166 scoped_ptr<BluetoothGattDescriptorClient> bluetooth_gatt_descriptor_client_; | |
| 167 scoped_ptr<BluetoothGattManagerClient> bluetooth_gatt_manager_client_; | |
| 168 scoped_ptr<BluetoothGattServiceClient> bluetooth_gatt_service_client_; | |
| 169 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | |
| 170 scoped_ptr<BluetoothProfileManagerClient> bluetooth_profile_manager_client_; | |
| 171 scoped_ptr<CrasAudioClient> cras_audio_client_; | |
| 172 scoped_ptr<CrosDisksClient> cros_disks_client_; | |
| 173 scoped_ptr<CryptohomeClient> cryptohome_client_; | |
| 174 scoped_ptr<DebugDaemonClient> debug_daemon_client_; | |
| 175 scoped_ptr<EasyUnlockClient> easy_unlock_client_; | |
| 176 scoped_ptr<LorgnetteManagerClient> lorgnette_manager_client_; | |
| 177 scoped_ptr<ShillDeviceClient> shill_device_client_; | |
| 178 scoped_ptr<ShillIPConfigClient> shill_ipconfig_client_; | |
| 179 scoped_ptr<ShillManagerClient> shill_manager_client_; | |
| 180 scoped_ptr<ShillServiceClient> shill_service_client_; | |
| 181 scoped_ptr<ShillProfileClient> shill_profile_client_; | |
| 182 scoped_ptr<GsmSMSClient> gsm_sms_client_; | |
| 183 scoped_ptr<ImageBurnerClient> image_burner_client_; | |
| 184 scoped_ptr<IntrospectableClient> introspectable_client_; | |
| 185 scoped_ptr<ModemMessagingClient> modem_messaging_client_; | |
| 186 // The declaration order for NFC client objects is important. See | |
| 187 // DBusThreadManager::CreateDefaultClients for the dependencies. | |
| 188 scoped_ptr<NfcManagerClient> nfc_manager_client_; | |
| 189 scoped_ptr<NfcAdapterClient> nfc_adapter_client_; | |
| 190 scoped_ptr<NfcDeviceClient> nfc_device_client_; | |
| 191 scoped_ptr<NfcTagClient> nfc_tag_client_; | |
| 192 scoped_ptr<NfcRecordClient> nfc_record_client_; | |
| 193 scoped_ptr<PermissionBrokerClient> permission_broker_client_; | |
| 194 scoped_ptr<SystemClockClient> system_clock_client_; | |
| 195 scoped_ptr<PowerManagerClient> power_manager_client_; | |
| 196 scoped_ptr<SessionManagerClient> session_manager_client_; | |
| 197 scoped_ptr<SMSClient> sms_client_; | |
| 198 scoped_ptr<UpdateEngineClient> update_engine_client_; | |
| 199 | |
| 200 DISALLOW_COPY_AND_ASSIGN(DBusClientBundle); | |
| 201 }; | |
| 202 | |
| 203 } // namespace chromeos | |
| 204 | |
| 205 #endif // CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | |
| OLD | NEW |