client: Replace DBus client generated method names.

The dbus-binding-tool uses a different annotation name to specify
the C Symbol of a method when generating the interface .h file from
the .xml file. For the server side, the
org.freedesktop.DBus.GLib.CSymbol is used while for the client side
org.freedesktop.DBus.GLib.ClientCSymbol is used.

This fix adds the client annotation C Symbol and replaces all the
function calls to those functions.

BUG=None
TEST=Code compiles. Generated names are correct.

Change-Id: Ibc9c6c343e618fb2c455f61f89e06c58f9551656
Reviewed-on: https://chromium-review.googlesource.com/167525
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/update_engine_client.cc b/update_engine_client.cc
index d904d71..6e3e4f3 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -110,8 +110,7 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_reset_status(proxy, &error);
+  gboolean rc = update_engine_client_reset_status(proxy, &error);
   return rc;
 }
 
@@ -130,14 +129,13 @@
   char* new_version = NULL;
   gint64 new_size = 0;
 
-  gboolean rc = org_chromium_UpdateEngineInterface_get_status(
-      proxy,
-      &last_checked_time,
-      &progress,
-      &current_op,
-      &new_version,
-      &new_size,
-      &error);
+  gboolean rc = update_engine_client_get_status(proxy,
+                                                &last_checked_time,
+                                                &progress,
+                                                &current_op,
+                                                &new_version,
+                                                &new_size,
+                                                &error);
   if (rc == FALSE) {
     LOG(INFO) << "Error getting status: " << GetAndFreeGError(&error);
   }
@@ -196,10 +194,9 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_attempt_rollback(proxy,
-                                                          rollback,
-                                                          &error);
+  gboolean rc = update_engine_client_attempt_rollback(proxy,
+                                                      rollback,
+                                                      &error);
   CHECK_EQ(rc, TRUE) << "Error with rollback request: "
                      << GetAndFreeGError(&error);
   return true;
@@ -211,11 +208,10 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_attempt_update(proxy,
-                                                        app_version.c_str(),
-                                                        omaha_url.c_str(),
-                                                        &error);
+  gboolean rc = update_engine_client_attempt_update(proxy,
+                                                    app_version.c_str(),
+                                                    omaha_url.c_str(),
+                                                    &error);
   CHECK_EQ(rc, TRUE) << "Error checking for update: "
                      << GetAndFreeGError(&error);
   return true;
@@ -228,7 +224,7 @@
   CHECK(GetProxy(&proxy));
 
   gboolean rc =
-      org_chromium_UpdateEngineInterface_reboot_if_needed(proxy, &error);
+      update_engine_client_reboot_if_needed(proxy, &error);
   // Reboot error code doesn't necessarily mean that a reboot
   // failed. For example, D-Bus may be shutdown before we receive the
   // result.
@@ -242,11 +238,10 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_set_channel(proxy,
-                                                     target_channel.c_str(),
-                                                     allow_powerwash,
-                                                     &error);
+  gboolean rc = update_engine_client_set_channel(proxy,
+                                                 target_channel.c_str(),
+                                                 allow_powerwash,
+                                                 &error);
   CHECK_EQ(rc, true) << "Error setting the channel: "
                      << GetAndFreeGError(&error);
   LOG(INFO) << "Channel permanently set to: " << target_channel;
@@ -259,11 +254,10 @@
   CHECK(GetProxy(&proxy));
 
   char* channel = NULL;
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_get_channel(proxy,
-                                                     get_current_channel,
-                                                     &channel,
-                                                     &error);
+  gboolean rc = update_engine_client_get_channel(proxy,
+                                                 get_current_channel,
+                                                 &channel,
+                                                 &error);
   CHECK_EQ(rc, true) << "Error getting the channel: "
                      << GetAndFreeGError(&error);
   string output = channel;
@@ -277,11 +271,10 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_set_update_over_cellular_permission(
-          proxy,
-          allowed,
-          &error);
+  gboolean rc = update_engine_client_set_update_over_cellular_permission(
+      proxy,
+      allowed,
+      &error);
   CHECK_EQ(rc, true) << "Error setting the update over cellular setting: "
                      << GetAndFreeGError(&error);
 }
@@ -293,11 +286,10 @@
   CHECK(GetProxy(&proxy));
 
   gboolean allowed;
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_get_update_over_cellular_permission(
-          proxy,
-          &allowed,
-          &error);
+  gboolean rc = update_engine_client_get_update_over_cellular_permission(
+      proxy,
+      &allowed,
+      &error);
   CHECK_EQ(rc, true) << "Error getting the update over cellular setting: "
                      << GetAndFreeGError(&error);
   return allowed;
@@ -309,11 +301,10 @@
 
   CHECK(GetProxy(&proxy));
 
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_set_p2_pupdate_permission(
-          proxy,
-          enabled,
-          &error);
+  gboolean rc = update_engine_client_set_p2p_update_permission(
+      proxy,
+      enabled,
+      &error);
   CHECK_EQ(rc, true) << "Error setting the peer-to-peer update setting: "
                      << GetAndFreeGError(&error);
 }
@@ -325,11 +316,10 @@
   CHECK(GetProxy(&proxy));
 
   gboolean enabled;
-  gboolean rc =
-      org_chromium_UpdateEngineInterface_get_p2_pupdate_permission(
-          proxy,
-          &enabled,
-          &error);
+  gboolean rc = update_engine_client_get_p2p_update_permission(
+      proxy,
+      &enabled,
+      &error);
   CHECK_EQ(rc, true) << "Error getting the peer-to-peer update setting: "
                      << GetAndFreeGError(&error);
   return enabled;