Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Unified Diff: src/common/chromeos/dbus/dbus.h

Issue 2133004: Proxy Constructor for peer proxy. (Closed) Base URL: http://src.chromium.org/git/chromiumos.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/common/chromeos/dbus/dbus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/chromeos/dbus/dbus.h
diff --git a/src/common/chromeos/dbus/dbus.h b/src/common/chromeos/dbus/dbus.h
index af8b5dc89f338ee153a11b21bd14098ba8315bbd..47758678e423a723b8598b5355119a50a436ed8a 100644
--- a/src/common/chromeos/dbus/dbus.h
+++ b/src/common/chromeos/dbus/dbus.h
@@ -105,6 +105,13 @@ class Proxy {
: object_(GetGProxy(connection, name, path, interface, false)) {
}
+ // Creates a peer proxy using dbus_g_proxy_new_for_peer.
+ Proxy(const BusConnection& connection,
+ const char* path,
+ const char* interface)
+ : object_(GetGPeerProxy(connection, path, interface)) {
+ }
+
Proxy(const Proxy& x)
: object_(x.object_) {
if (object_)
@@ -145,6 +152,10 @@ class Proxy {
const char* interface,
bool connect_to_name_owner);
+ static value_type GetGPeerProxy(const BusConnection& connection,
+ const char* path,
+ const char* interface);
+
operator int() const; // for safe bool cast
friend void swap(Proxy& x, Proxy& y);
« no previous file with comments | « no previous file | src/common/chromeos/dbus/dbus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698