• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium OS 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 SYSTEM_API_DBUS_LOGIN_MANAGER_DBUS_CONSTANTS_H_
6 #define SYSTEM_API_DBUS_LOGIN_MANAGER_DBUS_CONSTANTS_H_
7 
8 namespace login_manager {
9 const char kSessionManagerInterface[] = "org.chromium.SessionManagerInterface";
10 const char kSessionManagerServicePath[] = "/org/chromium/SessionManager";
11 const char kSessionManagerServiceName[] = "org.chromium.SessionManager";
12 // Methods
13 const char kSessionManagerEmitLoginPromptVisible[] = "EmitLoginPromptVisible";
14 const char kSessionManagerStartSession[] = "StartSession";
15 const char kSessionManagerStopSession[] = "StopSession";
16 const char kSessionManagerRestartJob[] = "RestartJob";
17 const char kSessionManagerStorePolicy[] = "StorePolicy";
18 const char kSessionManagerStoreUnsignedPolicy[] = "StoreUnsignedPolicy";
19 const char kSessionManagerRetrievePolicy[] = "RetrievePolicy";
20 const char kSessionManagerStorePolicyForUser[] = "StorePolicyForUser";
21 const char kSessionManagerStoreUnsignedPolicyForUser[] =
22     "StoreUnsignedPolicyForUser";
23 const char kSessionManagerRetrievePolicyForUser[] = "RetrievePolicyForUser";
24 const char kSessionManagerRetrievePolicyForUserWithoutSession[] =
25     "RetrievePolicyForUserWithoutSession";
26 const char kSessionManagerStoreDeviceLocalAccountPolicy[] =
27     "StoreDeviceLocalAccountPolicy";
28 const char kSessionManagerRetrieveDeviceLocalAccountPolicy[] =
29     "RetrieveDeviceLocalAccountPolicy";
30 const char kSessionManagerRetrieveSessionState[] = "RetrieveSessionState";
31 const char kSessionManagerRetrieveActiveSessions[] = "RetrieveActiveSessions";
32 const char kSessionManagerStartDeviceWipe[] = "StartDeviceWipe";
33 const char kSessionManagerHandleSupervisedUserCreationStarting[] =
34     "HandleSupervisedUserCreationStarting";
35 const char kSessionManagerHandleSupervisedUserCreationFinished[] =
36     "HandleSupervisedUserCreationFinished";
37 const char kSessionManagerLockScreen[] = "LockScreen";
38 const char kSessionManagerHandleLockScreenShown[] = "HandleLockScreenShown";
39 const char kSessionManagerHandleLockScreenDismissed[] =
40     "HandleLockScreenDismissed";
41 const char kSessionManagerSetFlagsForUser[] = "SetFlagsForUser";
42 const char kSessionManagerGetServerBackedStateKeys[] =
43     "GetServerBackedStateKeys";
44 const char kSessionManagerInitMachineInfo[] = "InitMachineInfo";
45 const char kSessionManagerCheckArcAvailability[] = "CheckArcAvailability";
46 const char kSessionManagerStartArcInstance[] = "StartArcInstance";
47 const char kSessionManagerStopArcInstance[] = "StopArcInstance";
48 const char kSessionManagerSetArcCpuRestriction[] = "SetArcCpuRestriction";
49 const char kSessionManagerEmitArcBooted[] = "EmitArcBooted";
50 const char kSessionManagerGetArcStartTimeTicks[] = "GetArcStartTimeTicks";
51 const char kSessionManagerRemoveArcData[] = "RemoveArcData";
52 const char kSessionManagerStartContainer[] = "StartContainer";
53 const char kSessionManagerStopContainer[] = "StopContainer";
54 // Signals
55 const char kLoginPromptVisibleSignal[] = "LoginPromptVisible";
56 const char kSessionStateChangedSignal[] = "SessionStateChanged";
57 // ScreenLock signals.
58 const char kScreenIsLockedSignal[] = "ScreenIsLocked";
59 const char kScreenIsUnlockedSignal[] = "ScreenIsUnlocked";
60 // Ownership API signals.
61 const char kOwnerKeySetSignal[] = "SetOwnerKeyComplete";
62 const char kPropertyChangeCompleteSignal[] = "PropertyChangeComplete";
63 // ARC instance signals.
64 const char kArcInstanceStopped[] = "ArcInstanceStopped";
65 const char kArcInstanceRebooted[] = "ArcInstanceRebooted";
66 
67 // D-Bus error codes
68 namespace dbus_error {
69 #define INTERFACE "org.chromium.SessionManagerInterface"
70 
71 const char kNone[] = INTERFACE ".None";
72 const char kArcCpuCgroupFail[] = INTERFACE ".ArcCpuCgroupFail";
73 const char kArcInstanceRunning[] = INTERFACE ".ArcInstanceRunning";
74 const char kContainerStartupFail[] = INTERFACE ".ContainerStartupFail";
75 const char kContainerShutdownFail[] = INTERFACE ".ContainerShutdownFail";
76 const char kEmitFailed[] = INTERFACE ".EmitFailed";
77 const char kInitMachineInfoFail[] = INTERFACE ".InitMachineInfoFail";
78 const char kInvalidAccount[] = INTERFACE ".InvalidAccount";
79 const char kLowFreeDisk[] = INTERFACE ".LowFreeDisk";
80 const char kNoOwnerKey[] = INTERFACE ".NoOwnerKey";
81 const char kNoUserNssDb[] = INTERFACE ".NoUserNssDb";
82 const char kNotAvailable[] = INTERFACE ".NotAvailable";
83 const char kNotStarted[] = INTERFACE ".NotStarted";
84 const char kPolicyInitFail[] = INTERFACE ".PolicyInitFail";
85 const char kPubkeySetIllegal[] = INTERFACE ".PubkeySetIllegal";
86 const char kPolicySignatureRequired[] = INTERFACE ".PolicySignatureRequired";
87 const char kSessionDoesNotExist[] = INTERFACE ".SessionDoesNotExist";
88 const char kSessionExists[] = INTERFACE ".SessionExists";
89 const char kSigDecodeFail[] = INTERFACE ".SigDecodeFail";
90 const char kSigEncodeFail[] = INTERFACE ".SigEncodeFail";
91 const char kTestingChannelError[] = INTERFACE ".TestingChannelError";
92 const char kUnknownPid[] = INTERFACE ".UnknownPid";
93 const char kVerifyFail[] = INTERFACE ".VerifyFail";
94 const char kVpdUpdateFailed[] = INTERFACE ".VpdUpdateFailed";
95 
96 #undef INTERFACE
97 }  // namespace dbus_error
98 
99 // Values
100 enum ContainerCpuRestrictionState {
101   CONTAINER_CPU_RESTRICTION_FOREGROUND = 0,
102   CONTAINER_CPU_RESTRICTION_BACKGROUND = 1,
103   NUM_CONTAINER_CPU_RESTRICTION_STATES = 2,
104 };
105 
106 }  // namespace login_manager
107 
108 #endif  // SYSTEM_API_DBUS_LOGIN_MANAGER_DBUS_CONSTANTS_H_
109