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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class ArcObbMounterClient; | 16 class ArcObbMounterClient; |
17 class CrasAudioClient; | 17 class CrasAudioClient; |
18 class CrosDisksClient; | 18 class CrosDisksClient; |
19 class CryptohomeClient; | 19 class CryptohomeClient; |
| 20 class CupsClient; |
20 class DebugDaemonClient; | 21 class DebugDaemonClient; |
21 class EasyUnlockClient; | 22 class EasyUnlockClient; |
22 class GsmSMSClient; | 23 class GsmSMSClient; |
23 class ImageBurnerClient; | 24 class ImageBurnerClient; |
24 class LorgnetteManagerClient; | 25 class LorgnetteManagerClient; |
25 class ModemMessagingClient; | 26 class ModemMessagingClient; |
26 class PermissionBrokerClient; | 27 class PermissionBrokerClient; |
27 class PowerManagerClient; | 28 class PowerManagerClient; |
28 class SMSClient; | 29 class SMSClient; |
29 class SessionManagerClient; | 30 class SessionManagerClient; |
(...skipping 28 matching lines...) Expand all Loading... |
58 GSM_SMS = 1 << 8, | 59 GSM_SMS = 1 << 8, |
59 IMAGE_BURNER = 1 << 9, | 60 IMAGE_BURNER = 1 << 9, |
60 MODEM_MESSAGING = 1 << 10, | 61 MODEM_MESSAGING = 1 << 10, |
61 PERMISSION_BROKER = 1 << 11, | 62 PERMISSION_BROKER = 1 << 11, |
62 POWER_MANAGER = 1 << 12, | 63 POWER_MANAGER = 1 << 12, |
63 SESSION_MANAGER = 1 << 13, | 64 SESSION_MANAGER = 1 << 13, |
64 SMS = 1 << 14, | 65 SMS = 1 << 14, |
65 SYSTEM_CLOCK = 1 << 15, | 66 SYSTEM_CLOCK = 1 << 15, |
66 UPDATE_ENGINE = 1 << 16, | 67 UPDATE_ENGINE = 1 << 16, |
67 ARC_OBB_MOUNTER = 1 << 17, | 68 ARC_OBB_MOUNTER = 1 << 17, |
| 69 CUPS_CLIENT = 1 << 18, |
68 }; | 70 }; |
69 | 71 |
70 explicit DBusClientBundle(DBusClientTypeMask unstub_client_mask); | 72 explicit DBusClientBundle(DBusClientTypeMask unstub_client_mask); |
71 ~DBusClientBundle(); | 73 ~DBusClientBundle(); |
72 | 74 |
73 // Returns true if |client| is stubbed. | 75 // Returns true if |client| is stubbed. |
74 bool IsUsingStub(DBusClientType client); | 76 bool IsUsingStub(DBusClientType client); |
75 | 77 |
76 // Returns true if any real DBusClient is used. | 78 // Returns true if any real DBusClient is used. |
77 bool IsUsingAnyRealClient(); | 79 bool IsUsingAnyRealClient(); |
(...skipping 14 matching lines...) Expand all Loading... |
92 } | 94 } |
93 | 95 |
94 CrosDisksClient* cros_disks_client() { | 96 CrosDisksClient* cros_disks_client() { |
95 return cros_disks_client_.get(); | 97 return cros_disks_client_.get(); |
96 } | 98 } |
97 | 99 |
98 CryptohomeClient* cryptohome_client() { | 100 CryptohomeClient* cryptohome_client() { |
99 return cryptohome_client_.get(); | 101 return cryptohome_client_.get(); |
100 } | 102 } |
101 | 103 |
| 104 CupsClient* cups_client() { return cups_client_.get(); } |
| 105 |
102 DebugDaemonClient* debug_daemon_client() { | 106 DebugDaemonClient* debug_daemon_client() { |
103 return debug_daemon_client_.get(); | 107 return debug_daemon_client_.get(); |
104 } | 108 } |
105 | 109 |
106 EasyUnlockClient* easy_unlock_client() { | 110 EasyUnlockClient* easy_unlock_client() { |
107 return easy_unlock_client_.get(); | 111 return easy_unlock_client_.get(); |
108 } | 112 } |
109 | 113 |
110 LorgnetteManagerClient* lorgnette_manager_client() { | 114 LorgnetteManagerClient* lorgnette_manager_client() { |
111 return lorgnette_manager_client_.get(); | 115 return lorgnette_manager_client_.get(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 friend class DBusThreadManagerSetter; | 179 friend class DBusThreadManagerSetter; |
176 | 180 |
177 // Bitmask that defines which dbus clients are not stubbed out. Bitmap flags | 181 // Bitmask that defines which dbus clients are not stubbed out. Bitmap flags |
178 // are defined within DBusClientType enum. | 182 // are defined within DBusClientType enum. |
179 DBusClientTypeMask unstub_client_mask_; | 183 DBusClientTypeMask unstub_client_mask_; |
180 | 184 |
181 std::unique_ptr<ArcObbMounterClient> arc_obb_mounter_client_; | 185 std::unique_ptr<ArcObbMounterClient> arc_obb_mounter_client_; |
182 std::unique_ptr<CrasAudioClient> cras_audio_client_; | 186 std::unique_ptr<CrasAudioClient> cras_audio_client_; |
183 std::unique_ptr<CrosDisksClient> cros_disks_client_; | 187 std::unique_ptr<CrosDisksClient> cros_disks_client_; |
184 std::unique_ptr<CryptohomeClient> cryptohome_client_; | 188 std::unique_ptr<CryptohomeClient> cryptohome_client_; |
| 189 std::unique_ptr<CupsClient> cups_client_; |
185 std::unique_ptr<DebugDaemonClient> debug_daemon_client_; | 190 std::unique_ptr<DebugDaemonClient> debug_daemon_client_; |
186 std::unique_ptr<EasyUnlockClient> easy_unlock_client_; | 191 std::unique_ptr<EasyUnlockClient> easy_unlock_client_; |
187 std::unique_ptr<LorgnetteManagerClient> lorgnette_manager_client_; | 192 std::unique_ptr<LorgnetteManagerClient> lorgnette_manager_client_; |
188 std::unique_ptr<ShillDeviceClient> shill_device_client_; | 193 std::unique_ptr<ShillDeviceClient> shill_device_client_; |
189 std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_; | 194 std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_; |
190 std::unique_ptr<ShillManagerClient> shill_manager_client_; | 195 std::unique_ptr<ShillManagerClient> shill_manager_client_; |
191 std::unique_ptr<ShillServiceClient> shill_service_client_; | 196 std::unique_ptr<ShillServiceClient> shill_service_client_; |
192 std::unique_ptr<ShillProfileClient> shill_profile_client_; | 197 std::unique_ptr<ShillProfileClient> shill_profile_client_; |
193 std::unique_ptr<ShillThirdPartyVpnDriverClient> | 198 std::unique_ptr<ShillThirdPartyVpnDriverClient> |
194 shill_third_party_vpn_driver_client_; | 199 shill_third_party_vpn_driver_client_; |
195 std::unique_ptr<GsmSMSClient> gsm_sms_client_; | 200 std::unique_ptr<GsmSMSClient> gsm_sms_client_; |
196 std::unique_ptr<ImageBurnerClient> image_burner_client_; | 201 std::unique_ptr<ImageBurnerClient> image_burner_client_; |
197 std::unique_ptr<ModemMessagingClient> modem_messaging_client_; | 202 std::unique_ptr<ModemMessagingClient> modem_messaging_client_; |
198 std::unique_ptr<PermissionBrokerClient> permission_broker_client_; | 203 std::unique_ptr<PermissionBrokerClient> permission_broker_client_; |
199 std::unique_ptr<SystemClockClient> system_clock_client_; | 204 std::unique_ptr<SystemClockClient> system_clock_client_; |
200 std::unique_ptr<PowerManagerClient> power_manager_client_; | 205 std::unique_ptr<PowerManagerClient> power_manager_client_; |
201 std::unique_ptr<SessionManagerClient> session_manager_client_; | 206 std::unique_ptr<SessionManagerClient> session_manager_client_; |
202 std::unique_ptr<SMSClient> sms_client_; | 207 std::unique_ptr<SMSClient> sms_client_; |
203 std::unique_ptr<UpdateEngineClient> update_engine_client_; | 208 std::unique_ptr<UpdateEngineClient> update_engine_client_; |
204 | 209 |
205 DISALLOW_COPY_AND_ASSIGN(DBusClientBundle); | 210 DISALLOW_COPY_AND_ASSIGN(DBusClientBundle); |
206 }; | 211 }; |
207 | 212 |
208 } // namespace chromeos | 213 } // namespace chromeos |
209 | 214 |
210 #endif // CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ | 215 #endif // CHROMEOS_DBUS_DBUS_CLIENT_BUNDLE_H_ |
OLD | NEW |