[glibmm] giomm: Add D-Bus Introspection Data classes.



commit ab788ccee419a102a45d016577b76a3d40a727ad
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Tue Sep 7 15:38:44 2010 -0400

    	giomm: Add D-Bus Introspection Data classes.
    
    	* gio/src/dbusintrospection.{ccg,hg}:
    	* gio/src/filelist.am: Add new sources containing the various
    	introspection data classes (with their methods) representing
    	annotations, methods, signals, properties and interfaces for the DBus
    	API.
    	* tools/m4/convert_gio.m4: Add the necessary conversions.

 ChangeLog                     |   11 ++++
 gio/src/dbusintrospection.ccg |   23 ++++++++
 gio/src/dbusintrospection.hg  |  123 +++++++++++++++++++++++++++++++++++++++++
 gio/src/filelist.am           |    1 +
 tools/m4/convert_gio.m4       |    7 ++
 5 files changed, 165 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fb2f85d..7f93bf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-07  José Alburquerque  <jaalburqu svn gnome org>
+
+	giomm: Add D-Bus Introspection Data classes.
+
+	* gio/src/dbusintrospection.{ccg,hg}:
+	* gio/src/filelist.am: Add new sources containing the various
+	introspection data classes (with their methods) representing
+	annotations, methods, signals, properties and interfaces for the DBus
+	API.
+	* tools/m4/convert_gio.m4: Add the necessary conversions.
+
 2010-09-06  José Alburquerque  <jaalburqu svn gnome org>
 
 	giomm: DBusProxy: Add constructors and create methods.
diff --git a/gio/src/dbusintrospection.ccg b/gio/src/dbusintrospection.ccg
new file mode 100644
index 0000000..4ea7e16
--- /dev/null
+++ b/gio/src/dbusintrospection.ccg
@@ -0,0 +1,23 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2010 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gio
+{
+
+} // namespace Gio
diff --git a/gio/src/dbusintrospection.hg b/gio/src/dbusintrospection.hg
new file mode 100644
index 0000000..2ad85f3
--- /dev/null
+++ b/gio/src/dbusintrospection.hg
@@ -0,0 +1,123 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2010 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gio/gio.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gio
+{
+
+_WRAP_ENUM(DBusPropertyInfoFlags, GDBusPropertyInfoFlags, NO_GTYPE)
+
+/** DBusAnnotationInfo - Stores information about an annotation.
+ *
+ * @newin{2,26}
+ */
+class DBusAnnotationInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusAnnotationInfo, GDBusAnnotationInfo, NONE, g_dbus_annotation_info_ref, g_dbus_annotation_info_unref)
+
+public:
+#m4 _CONVERSION(`const Glib::ArrayHandle< Glib::RefPtr<DBusAnnotationInfo> >&', `GDBusAnnotationInfo**', `const_cast<GDBusAnnotationInfo**>($3.data())')
+  _WRAP_METHOD(static Glib::ustring info_lookup(const Glib::ArrayHandle< Glib::RefPtr<DBusAnnotationInfo> >& annotations, const Glib::ustring& name), g_dbus_annotation_info_lookup)
+};
+
+/** DBusArgInfo - Stores information about an argument for a method or a
+ * signal.
+ *
+ * @newin{2,26}
+ */
+class DBusArgInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusArgInfo, GDBusArgInfo, NONE, g_dbus_arg_info_ref, g_dbus_arg_info_unref)
+
+public:
+};
+
+/** DBusMethodInfo - Stores information about a method on an D-Bus interface.
+ *
+ * @newin{2,26}
+ */
+class DBusMethodInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusMethodInfo, GDBusMethodInfo, NONE, g_dbus_method_info_ref, g_dbus_method_info_unref)
+
+public:
+};
+
+/** Stores information about a signal on a D-Bus interface.
+ *
+ * @newin{2,26}
+ */
+class DBusSignalInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusSignalInfo, GDBusSignalInfo, NONE, g_dbus_signal_info_ref, g_dbus_signal_info_unref)
+
+public:
+};
+
+/**
+ *
+ * @newin{2,26}
+ */
+class DBusPropertyInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusPropertyInfo, GDBusPropertyInfo, NONE, g_dbus_property_info_ref, g_dbus_property_info_unref)
+
+public:
+};
+
+/** DBusInterfaceInfo - Stores information about a D-Bus interface.
+ *
+ * @newin{2,26}
+ */
+class DBusInterfaceInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusInterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref, g_dbus_interface_info_unref)
+
+public:
+  _WRAP_METHOD(Glib::RefPtr<DBusMethodInfo> lookup_method(const Glib::ustring& name), g_dbus_interface_info_lookup_method)
+  _WRAP_METHOD(Glib::RefPtr<DBusSignalInfo> lookup_signal(const Glib::ustring& name), g_dbus_interface_info_lookup_signal)
+  _WRAP_METHOD(Glib::RefPtr<DBusPropertyInfo> lookup_property(const Glib::ustring& name), g_dbus_interface_info_lookup_property)
+
+  //TODO: _WRAP_METHOD(void generate_xml(guint indent, GString* string_builder), g_dbus_interface_info_generate_xml)
+};
+
+/** DBusNodeInfo - Stores information about nodes in a remote object
+ * hierarchy.
+ *
+ * @newin{2,26}
+ */
+class DBusNodeInfo
+{
+  _CLASS_OPAQUE_REFCOUNTED(DBusNodeInfo, GDBusNodeInfo, NONE, g_dbus_node_info_ref, g_dbus_node_info_unref)
+
+public:
+  /** @throw Glib::Error.
+   */
+  _WRAP_METHOD(static Glib::RefPtr<DBusNodeInfo> new_for_xml(const Glib::ustring& xml_data), g_dbus_node_info_new_for_xml, errthrow)
+
+  _WRAP_METHOD(Glib::RefPtr<DBusInterfaceInfo> lookup_interface(const Glib::ustring& name), g_dbus_node_info_lookup_interface)
+
+  //TODO: _WRAP_METHOD(void generate_xml(guint indent, GString* string_builder), g_dbus_node_info_generate_xml)
+};
+
+} // namespace Gio
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index 4237446..901fc57 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -25,6 +25,7 @@ giomm_files_any_hg =			\
 	dataoutputstream.hg		\
 	dbusauthobserver.hg \
 	dbusconnection.hg \
+	dbusintrospection.hg \
 	dbusmessage.hg \
 	dbusmethodinvocation.hg \
 	dbusownname.hg \
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index b6b8c6b..6726d0d 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -72,6 +72,13 @@ _CONVERSION(`const Glib::RefPtr<DBusMessage>&',`GDBusMessage*',__CONVERT_REFPTR_
 _CONVERSION(`GDBusMessage*',`Glib::RefPtr<DBusMessage>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<const DBusMessage>&',`GDBusMessage*',__CONVERT_CONST_REFPTR_TO_P)
 
+# DBus*Info
+_CONVERSION(`GDBusMethodInfo*',`Glib::RefPtr<DBusMethodInfo>',`Glib::wrap($3)')
+_CONVERSION(`GDBusSignalInfo*',`Glib::RefPtr<DBusSignalInfo>',`Glib::wrap($3)')
+_CONVERSION(`GDBusPropertyInfo*',`Glib::RefPtr<DBusPropertyInfo>',`Glib::wrap($3)')
+_CONVERSION(`GDBusNodeInfo*',`Glib::RefPtr<DBusNodeInfo>',`Glib::wrap($3)')
+_CONVERSION(`GDBusInterfaceInfo*',`Glib::RefPtr<DBusInterfaceInfo>',`Glib::wrap($3)')
+
 # DBusProxy
 _CONVERSION(`GDBusProxy*',`Glib::RefPtr<DBusProxy>',`Glib::wrap($3)')
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]