diff options
author | Ted Gould <ted@canonical.com> | 2009-04-27 15:16:37 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-04-27 15:16:37 -0500 |
commit | 60f782f81da8eafc9fed93046a51ba8371a58595 (patch) | |
tree | 3e16960969e17a3a9eff809f18cae6e20f4e43f7 /libdbusmenu-glib | |
parent | 70ed48c403fd63620320aa8c3924568a4a7c0289 (diff) | |
download | libdbusmenu-60f782f81da8eafc9fed93046a51ba8371a58595.tar.gz libdbusmenu-60f782f81da8eafc9fed93046a51ba8371a58595.tar.bz2 libdbusmenu-60f782f81da8eafc9fed93046a51ba8371a58595.zip |
Adding in properties.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 65871fc..dab07a6 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -5,11 +5,21 @@ #include "client.h" #include "dbusmenu-client.h" +/* Properties */ +enum { + PROP_0, + PROP_DBUSOBJECT, + PROP_DBUSNAME +}; + typedef struct _DbusmenuClientPrivate DbusmenuClientPrivate; struct _DbusmenuClientPrivate { DbusmenuMenuitem * root; + + gchar * dbus_object; + gchar * dbus_name; DBusGProxy * menuproxy; DBusGProxy * propproxy; @@ -23,6 +33,8 @@ static void dbusmenu_client_class_init (DbusmenuClientClass *klass); static void dbusmenu_client_init (DbusmenuClient *self); static void dbusmenu_client_dispose (GObject *object); static void dbusmenu_client_finalize (GObject *object); +static void set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec); +static void get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec); G_DEFINE_TYPE (DbusmenuClient, dbusmenu_client, G_TYPE_OBJECT); @@ -35,6 +47,19 @@ dbusmenu_client_class_init (DbusmenuClientClass *klass) object_class->dispose = dbusmenu_client_dispose; object_class->finalize = dbusmenu_client_finalize; + object_class->set_property = set_property; + object_class->get_property = get_property; + + g_object_class_install_property (object_class, PROP_DBUSOBJECT, + g_param_spec_string("dbus-object", "DBus Object we represent", + "The Object on the client that we're getting our data from.", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (object_class, PROP_DBUSNAME, + g_param_spec_string("dbus-name", "DBus Client we connect to", + "Name of the DBus client we're connecting to.", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); return; } @@ -45,6 +70,10 @@ dbusmenu_client_init (DbusmenuClient *self) DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(self); priv->root = NULL; + + priv->dbus_object = NULL; + priv->dbus_name = NULL; + priv->menuproxy = NULL; priv->propproxy = NULL; priv->layoutcall = NULL; @@ -66,6 +95,20 @@ dbusmenu_client_finalize (GObject *object) return; } +static void +set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec) +{ + + return; +} + +static void +get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec) +{ + + return; +} + /* Internal funcs */ /* When we have a name and an object, build the two proxies and get the |