[glibmm] giomm: Add the DBus::MenuModel class.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] giomm: Add the DBus::MenuModel class.
- Date: Fri, 24 Feb 2012 06:54:29 +0000 (UTC)
commit 0ffe3600df4acd89eaeb5fe4acc4d0d3535a0543
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Thu Feb 23 18:21:54 2012 -0500
giomm: Add the DBus::MenuModel class.
* gio/src/dbusmenumodel.{ccg,hg}: Add the sources wrapping a single
create() method.
* gio/src/filelist.am: Add the sources to the list of files to be
built.
ChangeLog | 9 +++++++
gio/src/dbusmenumodel.ccg | 24 ++++++++++++++++++++
gio/src/dbusmenumodel.hg | 52 +++++++++++++++++++++++++++++++++++++++++++++
gio/src/filelist.am | 1 +
4 files changed, 86 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6ed16ac..fef1ef3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2012-02-23 Josà Alburquerque <jaalburquerque gmail com>
+ giomm: Add the DBus::MenuModel class.
+
+ * gio/src/dbusmenumodel.{ccg,hg}: Add the sources wrapping a single
+ create() method.
+ * gio/src/filelist.am: Add the sources to the list of files to be
+ built.
+
+2012-02-23 Josà Alburquerque <jaalburquerque gmail com>
+
Gio::DBus::Connection: Add the MenuModel export/unexport methods.
* gio/src/dbusconnection.{ccg,hg}: Add the two new methods, wrapping
diff --git a/gio/src/dbusmenumodel.ccg b/gio/src/dbusmenumodel.ccg
new file mode 100644
index 0000000..b8012ef
--- /dev/null
+++ b/gio/src/dbusmenumodel.ccg
@@ -0,0 +1,24 @@
+/* Copyright (C) 2012 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>
+#include <giomm/dbusconnection.h>
+
+namespace Gio
+{
+
+} // namespace Gio
diff --git a/gio/src/dbusmenumodel.hg b/gio/src/dbusmenumodel.hg
new file mode 100644
index 0000000..d0db8b1
--- /dev/null
+++ b/gio/src/dbusmenumodel.hg
@@ -0,0 +1,52 @@
+/* Copyright (C) 2012 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 <giomm/menumodel.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(giomm/private/menumodel_p.h)
+
+namespace Gio
+{
+
+namespace DBus
+{
+
+class Connection;
+
+_GMMPROC_EXTRA_NAMESPACE(DBus)
+
+/** TODO (When the docs is available from the C API).
+ */
+class MenuModel : public ::Gio::MenuModel
+{
+ _CLASS_GOBJECT(MenuModel, GDBusMenuModel, G_DBUS_MENU_MODEL, ::Gio::MenuModel, GMenuModel)
+
+protected:
+ _CTOR_DEFAULT
+
+public:
+#m4 _CONVERSION(`GDBusMenuModel*',`Glib::RefPtr<MenuModel>',`Glib::wrap($3)')
+ //TODO: There should be a constructor and a _WRAP_CREATE instead of a
+ //_WRAP_METHOD. Filing a Glib bug will probably be necessary so that it is
+ //possible to use g_object_new() to create a GDBusMenuModel.
+ _WRAP_METHOD(static Glib::RefPtr<MenuModel> create(const Glib::RefPtr<Connection>& connection, const Glib::ustring& bus_name, const Glib::ustring& object_path), g_dbus_menu_model_get)
+};
+
+} // namespace DBus
+
+} // namespace Gio
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index c98b331..47cad84 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -35,6 +35,7 @@ giomm_files_any_hg = \
dbuserrorutils.hg \
dbusinterfacevtable.hg \
dbusintrospection.hg \
+ dbusmenumodel.hg \
dbusmessage.hg \
dbusmethodinvocation.hg \
dbusownname.hg \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]