diff options
author | Alex Deymo <deymo@chromium.org> | 2015-08-26 19:38:43 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-08-27 21:27:43 -0700 |
commit | 9bbde1b1afee1529c6ed7b6569630b591c60ddb4 (patch) | |
tree | 8a1437afe3720f1f6405d2527748b77bf19e50c4 /dbus/update_engine/dbus-constants.h | |
parent | 383376f7a551a823d4300188c5d41f19dc16dc00 (diff) | |
download | system_api-9bbde1b1afee1529c6ed7b6569630b591c60ddb4.tar.gz |
Split DBus constants per daemon.
The service_constants.h file defines the DBus method names, property
names, signal names, property values and other DBus string constants
that define the API from Chromium to the Chromium OS system. It was
also the main way daemons in Chromium OS could talk to other daemons,
by sending DBus method calls using the method and interface names
defined here.
We are moving towards generated proxies for DBus communication packaged
in client libraries. Each daemon should expose a client library use to
talk to that daemon. The code generated from the .xml description
covers the interface names, methods names and property names, but
doesn't include property values and other required constants involved
in the interface but not expressed in the .xml file.
This patch splits the DBus constants used by Chromium and other daemons
in one file per daemon, that will eventually be part of the client
library presented by that daemon.
CQ-DEPEND=CL:295757
BUG=b:23560718
TEST=emerge-link system_api update_engine
Change-Id: I726633454ef248d280e0a21c534da6c42b1d53ab
Reviewed-on: https://chromium-review.googlesource.com/295756
Commit-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Diffstat (limited to 'dbus/update_engine/dbus-constants.h')
-rw-r--r-- | dbus/update_engine/dbus-constants.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dbus/update_engine/dbus-constants.h b/dbus/update_engine/dbus-constants.h new file mode 100644 index 0000000..a580bd0 --- /dev/null +++ b/dbus/update_engine/dbus-constants.h @@ -0,0 +1,42 @@ +// Copyright 2015 The Chromium OS 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 SYSTEM_API_DBUS_UPDATE_ENGINE_DBUS_CONSTANTS_H_ +#define SYSTEM_API_DBUS_UPDATE_ENGINE_DBUS_CONSTANTS_H_ + +namespace update_engine { +const char kUpdateEngineInterface[] = "org.chromium.UpdateEngineInterface"; +const char kUpdateEngineServicePath[] = "/org/chromium/UpdateEngine"; +const char kUpdateEngineServiceName[] = "org.chromium.UpdateEngine"; + +// Methods. +const char kAttemptUpdate[] = "AttemptUpdate"; +const char kGetStatus[] = "GetStatus"; +const char kRebootIfNeeded[] = "RebootIfNeeded"; +const char kSetChannel[] = "SetChannel"; +const char kGetChannel[] = "GetChannel"; +const char kAttemptRollback[] = "AttemptRollback"; +const char kCanRollback[] = "CanRollback"; + +// Signals. +const char kStatusUpdate[] = "StatusUpdate"; + +// Operations contained in StatusUpdate signals. +const char kUpdateStatusIdle[] = "UPDATE_STATUS_IDLE"; +const char kUpdateStatusCheckingForUpdate[] = + "UPDATE_STATUS_CHECKING_FOR_UPDATE"; +const char kUpdateStatusUpdateAvailable[] = "UPDATE_STATUS_UPDATE_AVAILABLE"; +const char kUpdateStatusDownloading[] = "UPDATE_STATUS_DOWNLOADING"; +const char kUpdateStatusVerifying[] = "UPDATE_STATUS_VERIFYING"; +const char kUpdateStatusFinalizing[] = "UPDATE_STATUS_FINALIZING"; +const char kUpdateStatusUpdatedNeedReboot[] = + "UPDATE_STATUS_UPDATED_NEED_REBOOT"; +const char kUpdateStatusReportingErrorEvent[] = + "UPDATE_STATUS_REPORTING_ERROR_EVENT"; +const char kUpdateStatusAttemptingRollback[] = + "UPDATE_STATUS_ATTEMPTING_ROLLBACK"; +const char kUpdateStatusDisabled[] = "UPDATE_STATUS_DISABLED"; +} // namespace update_engine + +#endif // SYSTEM_API_DBUS_UPDATE_ENGINE_DBUS_CONSTANTS_H_ |