[glibmm] DBusConnection, DBusMessage: Wrap properties and signals.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] DBusConnection, DBusMessage: Wrap properties and signals.
- Date: Thu, 13 Jan 2011 18:06:40 +0000 (UTC)
commit af417557edb5565f2a8be817db43d4c70b929aa3
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Thu Jan 13 12:47:45 2011 -0500
DBusConnection, DBusMessage: Wrap properties and signals.
* tools/extra_defs_gen/generate_defs_gio.cc:
* gio/src/gio_signals.defs: Add the GDBusConnection and the
GDBusMessage types to the signal and properties generation tool and
regenerate the defs file.
* gio/src/dbusconnection.hg: Wrap the properties and signals.
* gio/src/dbusmessage.hg: Wrap the properties (no signals).
* gio/src/dbusproxy.hg: Comment out a write-only/construct-only
property.
ChangeLog | 14 +++
gio/src/dbusconnection.hg | 12 +++
gio/src/dbusmessage.hg | 3 +-
gio/src/dbusproxy.hg | 2 +-
gio/src/gio_signals.defs | 140 +++++++++++++++++++++++++++++
tools/extra_defs_gen/generate_defs_gio.cc | 2 +
6 files changed, 171 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 919d06d..abc45c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-13 José Alburquerque <jaalburqu svn gnome org>
+
+ DBusConnection, DBusMessage: Wrap properties and signals.
+
+ * tools/extra_defs_gen/generate_defs_gio.cc:
+ * gio/src/gio_signals.defs: Add the GDBusConnection and the
+ GDBusMessage types to the signal and properties generation tool and
+ regenerate the defs file.
+
+ * gio/src/dbusconnection.hg: Wrap the properties and signals.
+ * gio/src/dbusmessage.hg: Wrap the properties (no signals).
+ * gio/src/dbusproxy.hg: Comment out a write-only/construct-only
+ property.
+
2011-01-12 José Alburquerque <jaalburqu svn gnome org>
DBus Peer Example: Correct some code to complete the example.
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index 01770e0..a79784b 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -926,6 +926,18 @@ public:
_WRAP_METHOD(bool unregister_subtree(guint registration_id), g_dbus_connection_unregister_subtree)
+ // _WRAP_PROPERTY("address", std::string) // write-only construct-only
+ //_WRAP_PROPERTY("authentication-observer", Glib::RefPtr<AuthObserver>) // write-only construct-only
+ _WRAP_PROPERTY("capabilities", DBusCapabilityFlags)
+ _WRAP_PROPERTY("closed", bool)
+ _WRAP_PROPERTY("exit-on-close", bool)
+ //_WRAP_PROPERTY("flags", DBusConnectionFlags) // write-only construct-only
+ _WRAP_PROPERTY("guid", std::string)
+ _WRAP_PROPERTY("stream", Glib::RefPtr<IOStream>)
+ _WRAP_PROPERTY("unique-name", Glib::ustring)
+
+#m4 _CONVERSION(`GError*', `const Glib::Error&', `Glib::Error($3, true)')
+ _WRAP_SIGNAL(void closed(bool remote_peer_vanished, const Glib::Error& error), "closed", no_default_handler)
};
/** DBusInterfaceVTable - A class used to represent a virtual table for
diff --git a/gio/src/dbusmessage.hg b/gio/src/dbusmessage.hg
index 2f34669..25afc3b 100644
--- a/gio/src/dbusmessage.hg
+++ b/gio/src/dbusmessage.hg
@@ -160,7 +160,8 @@ public:
_WRAP_METHOD(guchar* to_blob(gsize& out_size, DBusCapabilityFlags capabilities = DBUS_CAPABILITY_FLAGS_NONE), g_dbus_message_to_blob, errthrow)
_WRAP_METHOD(void to_exception(), g_dbus_message_to_gerror, errthrow)
-};
+ _WRAP_PROPERTY("locked", bool)
+};
} // namespace Gio
diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg
index 4738a60..0d795bf 100644
--- a/gio/src/dbusproxy.hg
+++ b/gio/src/dbusproxy.hg
@@ -322,7 +322,7 @@ public:
DBusCallFlags flags = Gio::DBUS_CALL_FLAGS_NONE
);
- _WRAP_PROPERTY("g-bus-type", BusType)
+ //_WRAP_PROPERTY("g-bus-type", BusType) // write-only construct-only
_WRAP_PROPERTY("g-connection", Glib::RefPtr<DBusConnection>)
_WRAP_PROPERTY("g-default-timeout", int)
_WRAP_PROPERTY("g-flags", DBusProxyFlags)
diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs
index 60de98f..c52c58d 100644
--- a/gio/src/gio_signals.defs
+++ b/gio/src/gio_signals.defs
@@ -879,6 +879,15 @@
(construct-only #f)
)
+(define-property delay-apply
+ (of-object "GSettings")
+ (prop-type "GParamBoolean")
+ (docs "Whether this settings object is in 'delay-apply' mode")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
;; From GSettingsBackend
;; From GSimpleAsyncResult
@@ -1342,6 +1351,15 @@
(construct-only #f)
)
+(define-property delay-apply
+ (of-object "GSettings")
+ (prop-type "GParamBoolean")
+ (docs "Whether this settings object is in 'delay-apply' mode")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
;; From GSocket
(define-property family
@@ -1490,6 +1508,24 @@
(construct-only #f)
)
+(define-property tls
+ (of-object "GSocketClient")
+ (prop-type "GParamBoolean")
+ (docs "Whether to create TLS connections")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property tls-validation-flags
+ (of-object "GSocketClient")
+ (prop-type "GParamFlags")
+ (docs "TLS validation flags to use")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GSocketConnection
(define-property input-stream
@@ -1687,6 +1723,110 @@
)
)
+;; From GDBusConnection
+
+(define-signal closed
+ (of-object "GDBusConnection")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("gboolean" "p0")
+ '("GError*" "p1")
+ )
+)
+
+(define-property stream
+ (of-object "GDBusConnection")
+ (prop-type "GParamObject")
+ (docs "The underlying streams used for I/O")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property address
+ (of-object "GDBusConnection")
+ (prop-type "GParamString")
+ (docs "D-Bus address specifying potential socket endpoints")
+ (readable #f)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property flags
+ (of-object "GDBusConnection")
+ (prop-type "GParamFlags")
+ (docs "Flags")
+ (readable #f)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property guid
+ (of-object "GDBusConnection")
+ (prop-type "GParamString")
+ (docs "GUID of the server peer")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property unique-name
+ (of-object "GDBusConnection")
+ (prop-type "GParamString")
+ (docs "Unique name of bus connection")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property closed
+ (of-object "GDBusConnection")
+ (prop-type "GParamBoolean")
+ (docs "Whether the connection is closed")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property exit-on-close
+ (of-object "GDBusConnection")
+ (prop-type "GParamBoolean")
+ (docs "Whether the process is terminated when the connection is closed")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property capabilities
+ (of-object "GDBusConnection")
+ (prop-type "GParamFlags")
+ (docs "Capabilities")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property authentication-observer
+ (of-object "GDBusConnection")
+ (prop-type "GParamObject")
+ (docs "Object used to assist in the authentication process")
+ (readable #f)
+ (writable #t)
+ (construct-only #t)
+)
+
+;; From GDBusMessage
+
+(define-property locked
+ (of-object "GDBusMessage")
+ (prop-type "GParamBoolean")
+ (docs "Whether the message is locked")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
;; From GDBusProxy
(define-signal g-properties-changed
diff --git a/tools/extra_defs_gen/generate_defs_gio.cc b/tools/extra_defs_gen/generate_defs_gio.cc
index d9e070d..1353c93 100644
--- a/tools/extra_defs_gen/generate_defs_gio.cc
+++ b/tools/extra_defs_gen/generate_defs_gio.cc
@@ -113,6 +113,8 @@ int main(int, char**)
// DBus classes.
<< get_defs(G_TYPE_DBUS_AUTH_OBSERVER)
+ << get_defs(G_TYPE_DBUS_CONNECTION)
+ << get_defs(G_TYPE_DBUS_MESSAGE)
<< get_defs(G_TYPE_DBUS_PROXY)
<< get_defs(G_TYPE_DBUS_SERVER)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]