aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-02 10:15:11 -0600
committerTed Gould <ted@gould.cx>2009-12-02 10:15:11 -0600
commita4e33bf97827e04c364210f29ccb85ed6254050f (patch)
tree8d8336bc6f9464c090a4e18ca09c9d0fd227b043 /libindicator/indicator-service.c
parentd7e9d013ae0d872fe0657b79f081a2a44b42f4c0 (diff)
downloadlibayatana-indicator-a4e33bf97827e04c364210f29ccb85ed6254050f.tar.gz
libayatana-indicator-a4e33bf97827e04c364210f29ccb85ed6254050f.tar.bz2
libayatana-indicator-a4e33bf97827e04c364210f29ccb85ed6254050f.zip
Adding _new functions that include the version number in them.
Diffstat (limited to 'libindicator/indicator-service.c')
-rw-r--r--libindicator/indicator-service.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c
index eebe3f8..2ce5521 100644
--- a/libindicator/indicator-service.c
+++ b/libindicator/indicator-service.c
@@ -350,3 +350,28 @@ indicator_service_new (gchar * name)
return INDICATOR_SERVICE(obj);
}
+
+/**
+ indicator_service_new_version:
+ @name: The name for the service on dbus
+ @version: The version of the other interfaces provide
+ by the service.
+
+ This function creates the service on DBus and tries to
+ get a well-known name specified in @name. If the name
+ can't be estabilished then the #IndicatorService::shutdown
+ signal will be sent.
+
+ Return value: A brand new #IndicatorService object or #NULL
+ if there is an error.
+*/
+IndicatorService *
+indicator_service_new_version (gchar * name, guint version)
+{
+ GObject * obj = g_object_new(INDICATOR_SERVICE_TYPE,
+ PROP_NAME_S, name,
+ PROP_VERSION_S, version,
+ NULL);
+
+ return INDICATOR_SERVICE(obj);
+}