• 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_UPDATE_ENGINE_DBUS_CONSTANTS_H_
6 #define SYSTEM_API_DBUS_UPDATE_ENGINE_DBUS_CONSTANTS_H_
7 
8 namespace update_engine {
9 const char kUpdateEngineInterface[] = "org.chromium.UpdateEngineInterface";
10 const char kUpdateEngineServicePath[] = "/org/chromium/UpdateEngine";
11 const char kUpdateEngineServiceName[] = "org.chromium.UpdateEngine";
12 
13 // Generic UpdateEngine D-Bus error.
14 const char kUpdateEngineServiceErrorFailed[] =
15     "org.chromium.UpdateEngine.Error.Failed";
16 
17 // Methods.
18 const char kAttemptUpdate[] = "AttemptUpdate";
19 const char kGetLastAttemptError[] = "GetLastAttemptError";
20 const char kGetStatus[] = "GetStatus";
21 const char kRebootIfNeeded[] = "RebootIfNeeded";
22 const char kSetChannel[] = "SetChannel";
23 const char kGetChannel[] = "GetChannel";
24 const char kAttemptRollback[] = "AttemptRollback";
25 const char kCanRollback[] = "CanRollback";
26 const char kGetEolStatus[] = "GetEolStatus";
27 const char kSetUpdateOverCellularPermission[] =
28     "SetUpdateOverCellularPermission";
29 const char kSetUpdateOverCellularTarget[] =
30     "SetUpdateOverCellularTarget";
31 
32 // Signals.
33 const char kStatusUpdate[] = "StatusUpdate";
34 
35 // Flags used in the AttemptUpdateWithFlags() D-Bus method.
36 typedef enum {
37   kAttemptUpdateFlagNonInteractive = (1 << 0)
38 } AttemptUpdateFlags;
39 
40 // End of Life status used in the GetEolStatus() D-Bus method.
41 typedef enum {
42    kSupported = 0,
43    kSecurityOnly = 1,
44    kEol = 2,
45 } EndOfLifeStatus;
46 
47 // Operations contained in StatusUpdate signals.
48 const char kUpdateStatusIdle[] = "UPDATE_STATUS_IDLE";
49 const char kUpdateStatusCheckingForUpdate[] =
50     "UPDATE_STATUS_CHECKING_FOR_UPDATE";
51 const char kUpdateStatusUpdateAvailable[] = "UPDATE_STATUS_UPDATE_AVAILABLE";
52 const char kUpdateStatusDownloading[] = "UPDATE_STATUS_DOWNLOADING";
53 const char kUpdateStatusVerifying[] = "UPDATE_STATUS_VERIFYING";
54 const char kUpdateStatusFinalizing[] = "UPDATE_STATUS_FINALIZING";
55 const char kUpdateStatusUpdatedNeedReboot[] =
56     "UPDATE_STATUS_UPDATED_NEED_REBOOT";
57 const char kUpdateStatusReportingErrorEvent[] =
58     "UPDATE_STATUS_REPORTING_ERROR_EVENT";
59 const char kUpdateStatusAttemptingRollback[] =
60     "UPDATE_STATUS_ATTEMPTING_ROLLBACK";
61 const char kUpdateStatusDisabled[] = "UPDATE_STATUS_DISABLED";
62 const char kUpdateStatusNeedPermissionToUpdate[] =
63     "UPDATE_STATUS_NEED_PERMISSION_TO_UPDATE";
64 }  // namespace update_engine
65 
66 #endif  // SYSTEM_API_DBUS_UPDATE_ENGINE_DBUS_CONSTANTS_H_
67