dbus-c++: remove overloading for async proxy methods

We'd like to take the addresses of asynchronous proxy
methods in shill, and overloading makes that difficult.

In particular, when the synchronous and asynchronous
methods share a name, we must case the name to the
asynchronous method's type, in order to get the
address of the asynchronous method.

Disambiguate the synchronous and asynchronous methods,
by appending "Async" to the name of the asynchronous
methods. This makes it possible to simply say
&<ProxyClass>::MethodAsync.

CQ-DEPEND=CL:195762
BUG=chromium:365390
TEST=emerge dbus-c++, platform2, and mtpd

Change-Id: Ida3176e37e6ba27a53df62d41afb23592784f188
Reviewed-on: https://chromium-review.googlesource.com/195761
Tested-by: mukesh agrawal <[email protected]>
Reviewed-by: Ben Chan <[email protected]>
Commit-Queue: mukesh agrawal <[email protected]>
diff --git a/examples/async/async-client.cpp b/examples/async/async-client.cpp
index 74b8e6d..f407160 100644
--- a/examples/async/async-client.cpp
+++ b/examples/async/async-client.cpp
@@ -64,26 +64,26 @@
 {
 	AsyncClient *client = reinterpret_cast<AsyncClient *>(arg);
 
-        client->Hello("Obi-Wan", NULL);
+        client->HelloAsync("Obi-Wan", NULL);
 	cout << "Called Hello method" << endl;
 
         int32_t nums[] = {3, 1, -5, 7, 23};
 
         std::vector<int32_t> numvec(&nums[0], &nums[5]);
 
-        client->Sum(numvec, NULL);
+        client->SumAsync(numvec, NULL);
 	cout << "Called Sum method" << endl;
 
 	string out1, out2;
 	// TODO(ers) using a timeout results in a deadlock if the timeout
 	// expires
-	client->SplitString("first part,second part", (void *)98/*, 1000*/);
+	client->SplitStringAsync("first part,second part", (void *)98/*, 1000*/);
 	cout << "Called SplitString method" << endl;
 
-	client->SplitString("", NULL);
+	client->SplitStringAsync("", NULL);
 	cout << "Called SplitString method with empty string" << endl;
 
-	client->Timed_Wait(4, NULL);
+	client->Timed_WaitAsync(4, NULL);
 	cout << "Called Timed_Wait" << endl;
 
 	cout << "done " << endl;
diff --git a/tools/proxy-stubs.tpl b/tools/proxy-stubs.tpl
index 4d86643..0c0a922 100644
--- a/tools/proxy-stubs.tpl
+++ b/tools/proxy-stubs.tpl
@@ -116,7 +116,7 @@
      * on the remote objects.
      */
 {{#FOR_EACH_ASYNC_METHOD}}
-    void {{METHOD_NAME}}({{#METHOD_ARG_LIST}}{{METHOD_ARG_DECL}}{{#METHOD_ARG_LIST_separator}}, {{/METHOD_ARG_LIST_separator}}{{/METHOD_ARG_LIST}})
+    void {{METHOD_NAME}}Async({{#METHOD_ARG_LIST}}{{METHOD_ARG_DECL}}{{#METHOD_ARG_LIST_separator}}, {{/METHOD_ARG_LIST_separator}}{{/METHOD_ARG_LIST}})
     {
         ::DBus::CallMessage __call;