From a4e33bf97827e04c364210f29ccb85ed6254050f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 2 Dec 2009 10:15:11 -0600 Subject: Adding _new functions that include the version number in them. --- libindicator/indicator-service.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'libindicator/indicator-service.c') 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); +} -- cgit v1.2.3