diff options
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-service-manager.c | 11 | ||||
-rw-r--r-- | libindicator/indicator-service-manager.h | 2 | ||||
-rw-r--r-- | libindicator/indicator-service.c | 25 | ||||
-rw-r--r-- | libindicator/indicator-service.h | 4 |
4 files changed, 41 insertions, 1 deletions
diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index cbe66d3..293ae03 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -337,6 +337,17 @@ indicator_service_manager_new (gchar * dbus_name) return INDICATOR_SERVICE_MANAGER(obj); } +IndicatorServiceManager * +indicator_service_manager_new_version (gchar * dbus_name, guint version) +{ + GObject * obj = g_object_new(INDICATOR_SERVICE_MANAGER_TYPE, + PROP_NAME_S, dbus_name, + PROP_VERSION_S, version, + NULL); + + return INDICATOR_SERVICE_MANAGER(obj); +} + gboolean indicator_service_manager_connected (IndicatorServiceManager * sm) { diff --git a/libindicator/indicator-service-manager.h b/libindicator/indicator-service-manager.h index 127d56b..65a93ea 100644 --- a/libindicator/indicator-service-manager.h +++ b/libindicator/indicator-service-manager.h @@ -54,6 +54,8 @@ struct _IndicatorServiceManager { GType indicator_service_manager_get_type (void); IndicatorServiceManager * indicator_service_manager_new (gchar * dbus_name); +IndicatorServiceManager * indicator_service_manager_new_version (gchar * dbus_name, + guint version); gboolean indicator_service_manager_connected (IndicatorServiceManager * sm); void indicator_service_manager_set_refresh (IndicatorServiceManager * sm, guint time_in_ms); 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); +} diff --git a/libindicator/indicator-service.h b/libindicator/indicator-service.h index b47a91a..59c5385 100644 --- a/libindicator/indicator-service.h +++ b/libindicator/indicator-service.h @@ -53,7 +53,9 @@ struct _IndicatorService { GType indicator_service_get_type (void); -IndicatorService * indicator_service_new (gchar * name); +IndicatorService * indicator_service_new (gchar * name); +IndicatorService * indicator_service_new_version (gchar * name, + guint version); G_END_DECLS |