dbusmm/dbus/src connection.ccg, 1.1.1.1, 1.2 proxy.ccg, 1.1.1.1, 1.2 proxy.hg, 1.1.1.1, 1.2

Murray Cumming murrayc at freedesktop.org
Mon Jun 20 01:10:44 PDT 2005


Update of /cvs/dbus/dbusmm/dbus/src
In directory gabe:/tmp/cvs-serv5178/dbus/src

Modified Files:
	connection.ccg proxy.ccg proxy.hg 
Log Message:
2005-06-20  Murray Cumming <murrayc at murrayc.com>

        * dbus/src/connection.ccg:
        * dbus/src/proxy.ccg:
        * dbus/src/proxy.hg:
        * tools/m4/convert.m4:
        * tools/m4/convert_dbus.m4: Added Proxy, though
        it is currently impossible to wrap the constructors, and
        the signature-less callbacks need some thought.


Index: connection.ccg
===================================================================
RCS file: /cvs/dbus/dbusmm/dbus/src/connection.ccg,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- connection.ccg	20 Jun 2005 07:11:33 -0000	1.1.1.1
+++ connection.ccg	20 Jun 2005 08:10:42 -0000	1.2
@@ -19,6 +19,15 @@
 
 #include <dbus/dbus-glib-lowlevel.h>
 
+//gmmproc guesses that this is called dbux_gerror_quark, so let's help it out:
+extern "C"
+{
+GQuark dbus_gerror_quark()
+{
+  return dbus_g_error_quark();
+}
+} //extern "C"
+
 namespace DBus
 {
 

Index: proxy.ccg
===================================================================
RCS file: /cvs/dbus/dbusmm/dbus/src/proxy.ccg,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- proxy.ccg	20 Jun 2005 07:11:34 -0000	1.1.1.1
+++ proxy.ccg	20 Jun 2005 08:10:42 -0000	1.2
@@ -1,4 +1,4 @@
-/* Copyright 2003 dbusmm Development Team
+/* Copyright 2003 libpanelappletmm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -15,11 +15,32 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <glibmm/private/object_p.h>
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
 
 namespace DBus
 {
 
+Proxy::Proxy(const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, const Glib::ustring& path, const Glib::ustring& interface)
+:
+  _CONSTRUCT()
+{
+  //Based on code from dbus_g_proxy_new(). TODO: DBusGProxy should use construct-only properties:
+
+  /* However, this is impossible because DBusGProxy's definition is private:
+  DBusGProxy *proxy = gobj();
+
+  proxy->manager = dbus_g_proxy_manager_get (DBUS_CONNECTION_FROM_G_CONNECTION (connection->gobj()));
+  
+  proxy->name = g_strdup (name.c_str());
+  proxy->path = g_strdup (path_name.c_str());
+  proxy->interface = g_strdup (interface_name.c_str());
+
+  dbus_g_proxy_manager_register (proxy->manager, proxy);
+  */
+}
 
 } //namespace DBus
 

Index: proxy.hg
===================================================================
RCS file: /cvs/dbus/dbusmm/dbus/src/proxy.hg,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- proxy.hg	20 Jun 2005 07:11:34 -0000	1.1.1.1
+++ proxy.hg	20 Jun 2005 08:10:42 -0000	1.2
@@ -17,8 +17,10 @@
 
 
 _DEFS(dbusmm,dbus_glib)
+_PINCLUDE(glibmm/private/object_p.h)
 
-#include <dbus/dbus-glib.h>
+#include <dbusmm/connection.h>
+//#include <dbus/dbus-glib.h>
 #include <glibmm.h>
 
 namespace DBus
@@ -28,11 +30,49 @@
 {
   _CLASS_GOBJECT(Proxy, DBusGProxy, DBUS_G_PROXY, Glib::Object, GObject)
 protected:
-  _CTOR_DEFAULT()
+  //_WRAP_CTOR(Proxy(const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, const Glib::ustring& path, const Glib::ustring& interface), dbus_g_proxy_new_for_name)
+  Proxy(const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, const Glib::ustring& path, const Glib::ustring& interface);
+
+/*
+DBusGProxy*       dbus_g_proxy_new_for_name          (const Glib::RefPtr<Connection>& connection,
+                                                      const Glib::ustring& name,
+                                                      const Glib::ustring& path,
+                                                      const Glib::ustring& interface), dbus_g_proxy_new_for_name)
+DBusGProxy*       dbus_g_proxy_new_for_name_owner    (const Glib::RefPtr<Connection>& connection,
+                                                      const Glib::ustring& name,
+                                                      const Glib::ustring& path,
+                                                      const Glib::ustring& interface,
+                                                      GError           **error), dbus_g_proxy_new_for_name_owner )
+DBusGProxy*       dbus_g_proxy_new_from_proxy        (DBusGProxy        *proxy,
+                                                      const Glib::ustring& interface,
+                                                      const Glib::ustring& path_name), dbus_g_proxy_new_from_proxy)
+DBusGProxy*       dbus_g_proxy_new_for_peer          (const Glib::RefPtr<Connection>& connection,
+                                                      const Glib::ustring& path_name,
+                                                      const Glib::ustring& interface_name), dbus_g_proxy_new_for_peer)
+*/
 
 public:
-  _WRAP_CREATE()
+  _WRAP_CREATE(const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, const Glib::ustring& path, const Glib::ustring& interface)
+
+
+  _WRAP_METHOD(void set_interface(const Glib::ustring& interface_name), dbus_g_proxy_set_interface)
+  //_WRAP_METHOD(void add_signal(const Glib::ustring& signal_name, GType first_type, ...), dbus_g_proxy_add_signal)
 
+  _WRAP_METHOD(void connect_signal(const Glib::ustring& signal_name, GCallback handler, void* data, GClosureNotify free_data_func), dbus_g_proxy_connect_signal)
+  _WRAP_METHOD(void disconnect_signal(const Glib::ustring& signal_name, GCallback handler, void* data), dbus_g_proxy_disconnect_signal)
+  //_WRAP_METHOD(DBusGPendingCall* begin_call(const Glib::ustring& method, GType first_arg_type, ...), dbus_g_proxy_begin_call)
+  //_WRAP_METHOD(bool  end_call(DBusGPendingCall* pending, GError** error, GType first_arg_type, ...), dbus_g_proxy_end_call)
+  //_WRAP_METHOD(void call_no_reply(const Glib::ustring& method, GType first_arg_type, ...), dbus_g_proxy_call_no_reply)
+
+  _WRAP_METHOD(Glib::ustring get_path() const, dbus_g_proxy_get_path)
+ 
+  _WRAP_METHOD(Glib::ustring get_bus_name() const, dbus_g_proxy_get_bus_name)
+
+  _WRAP_METHOD(Glib::ustring get_interface() const, dbus_g_proxy_get_interface)
+
+//_WRAP_METHOD(bool invoke(const Glib::ustring& method, GError** error, GType first_arg_type, ...), dbus_g_proxy_invoke)
+
+ 
 };
 
 } // namespace DBus



More information about the dbus-commit mailing list