forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdbus_clients_common.h
78 lines (65 loc) · 2.55 KB
/
dbus_clients_common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_
#define CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_
#include <memory>
#include "base/component_export.h"
#include "base/macros.h"
namespace dbus {
class Bus;
}
namespace chromeos {
class BiodClient;
class CecServiceClient;
class CrasAudioClient;
class CryptohomeClient;
class GsmSMSClient;
class MachineLearningClient;
class ModemMessagingClient;
class PermissionBrokerClient;
class SessionManagerClient;
class ShillDeviceClient;
class ShillIPConfigClient;
class ShillManagerClient;
class ShillProfileClient;
class ShillServiceClient;
class ShillThirdPartyVpnDriverClient;
class SMSClient;
class UpdateEngineClient;
class UpstartClient;
// D-Bus clients used in multiple processes (e.g. ash, browser, mus).
class COMPONENT_EXPORT(CHROMEOS_DBUS) DBusClientsCommon {
public:
// Creates real implementations if |use_real_clients| is true and fakes
// otherwise. Fakes are used when running on Linux desktop and in tests.
explicit DBusClientsCommon(bool use_real_clients);
~DBusClientsCommon();
// Initialize proper runtime environment for its dbus clients.
void Initialize(dbus::Bus* system_bus);
private:
friend class DBusThreadManager;
friend class DBusThreadManagerSetter;
std::unique_ptr<BiodClient> biod_client_;
std::unique_ptr<CecServiceClient> cec_service_client_;
std::unique_ptr<CrasAudioClient> cras_audio_client_;
std::unique_ptr<CryptohomeClient> cryptohome_client_;
std::unique_ptr<GsmSMSClient> gsm_sms_client_;
std::unique_ptr<MachineLearningClient> machine_learning_client_;
std::unique_ptr<ModemMessagingClient> modem_messaging_client_;
std::unique_ptr<ShillDeviceClient> shill_device_client_;
std::unique_ptr<ShillIPConfigClient> shill_ipconfig_client_;
std::unique_ptr<ShillManagerClient> shill_manager_client_;
std::unique_ptr<ShillServiceClient> shill_service_client_;
std::unique_ptr<ShillProfileClient> shill_profile_client_;
std::unique_ptr<ShillThirdPartyVpnDriverClient>
shill_third_party_vpn_driver_client_;
std::unique_ptr<PermissionBrokerClient> permission_broker_client_;
std::unique_ptr<SMSClient> sms_client_;
std::unique_ptr<SessionManagerClient> session_manager_client_;
std::unique_ptr<UpdateEngineClient> update_engine_client_;
std::unique_ptr<UpstartClient> upstart_client_;
DISALLOW_COPY_AND_ASSIGN(DBusClientsCommon);
};
} // namespace chromeos
#endif // CHROMEOS_DBUS_DBUS_CLIENTS_COMMON_H_