update_engine: fixes to use chromeos-dbus-bindings generation
Add dbus-service-config.json and fix update_engine.xml to have the
correct DBus path. Move both into dbus_bindings folder.
BUG=None
TEST=Successful build and tested generated bindings
CQ-DEPEND=CL:256827,CL:*204736
Change-Id: I7020940c17cc3cf085cf2ef38275ed3a16f37ceb
Reviewed-on: https://chromium-review.googlesource.com/255935
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Timothy Jennison <tjennison@google.com>
Commit-Queue: Timothy Jennison <tjennison@google.com>
diff --git a/dbus_bindings/dbus-service-config.json b/dbus_bindings/dbus-service-config.json
new file mode 100644
index 0000000..fdae3ba
--- /dev/null
+++ b/dbus_bindings/dbus-service-config.json
@@ -0,0 +1,3 @@
+{
+ "service_name": "org.chromium.UpdateEngine"
+}
diff --git a/update_engine.xml b/dbus_bindings/org.chromium.UpdateEngineInterface.xml
similarity index 97%
rename from update_engine.xml
rename to dbus_bindings/org.chromium.UpdateEngineInterface.xml
index 80fe128..dda972d 100644
--- a/update_engine.xml
+++ b/dbus_bindings/org.chromium.UpdateEngineInterface.xml
@@ -3,7 +3,7 @@
dbus-binding-tool -mode=glib-server -prefix=update_engine update_engine.xml
> glib_server.h
-->
-<node name="/org/chromium">
+<node name="/org/chromium/UpdateEngine">
<interface name="org.chromium.UpdateEngineInterface">
<annotation name="org.freedesktop.DBus.GLib.CSymbol"
value="update_engine_service" />
diff --git a/main.cc b/main.cc
index 763e823..0fbfdaa 100644
--- a/main.cc
+++ b/main.cc
@@ -30,7 +30,7 @@
#include "update_engine/terminator.h"
#include "update_engine/update_attempter.h"
extern "C" {
-#include "update_engine/update_engine.dbusserver.h"
+#include "update_engine/org.chromium.UpdateEngineInterface.dbusserver.h"
}
#include "update_engine/utils.h"
diff --git a/update_engine.gyp b/update_engine.gyp
index 6fe642f..b0f5110 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -70,7 +70,7 @@
'dbus_glib_prefix': 'update_engine_service',
},
'sources': [
- 'update_engine.xml',
+ 'dbus_bindings/org.chromium.UpdateEngineInterface.xml',
],
'includes': ['../common-mk/dbus_glib.gypi'],
},
@@ -83,7 +83,7 @@
'dbus_glib_prefix': 'update_engine_service',
},
'sources': [
- 'update_engine.xml',
+ 'dbus_bindings/org.chromium.UpdateEngineInterface.xml',
],
'includes': ['../common-mk/dbus_glib.gypi'],
},
diff --git a/update_engine_client.cc b/update_engine_client.cc
index 75da89f..4678a83 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -16,7 +16,7 @@
#include "update_engine/glib_utils.h"
extern "C" {
-#include "update_engine/update_engine.dbusclient.h"
+#include "update_engine/org.chromium.UpdateEngineInterface.dbusclient.h"
}
using chromeos_update_engine::AttemptUpdateFlags;