[libsocialweb] service: Add internal API for accessing capabilities
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsocialweb] service: Add internal API for accessing capabilities
- Date: Wed, 9 Nov 2011 18:41:19 +0000 (UTC)
commit 7ce1fc37348ad102ab228b997a7ad60c293cfe2e
Author: Rob Bradford <rob linux intel com>
Date: Wed Nov 9 15:54:47 2011 +0000
service: Add internal API for accessing capabilities
libsocialweb/sw-service.c | 29 +++++++++++++++++++++++++++++
libsocialweb/sw-service.h | 3 +++
2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/libsocialweb/sw-service.c b/libsocialweb/sw-service.c
index 22f2e63..2d834b5 100644
--- a/libsocialweb/sw-service.c
+++ b/libsocialweb/sw-service.c
@@ -289,3 +289,32 @@ sw_service_map_params (const ParameterNameMapping *mapping,
}
}
+
+static const gchar *no_caps[] = { NULL, };
+
+const char **
+sw_service_get_dynamic_caps (SwService *service)
+{
+ SwServiceClass *service_class;
+
+ service_class = SW_SERVICE_GET_CLASS (service);
+
+ if (service_class->get_dynamic_caps)
+ return service_class->get_dynamic_caps (service);
+ else
+ return no_caps;
+}
+
+const char **
+sw_service_get_static_caps (SwService *service)
+{
+ SwServiceClass *service_class;
+
+ service_class = SW_SERVICE_GET_CLASS (service);
+
+ if (service_class->get_static_caps)
+ return service_class->get_static_caps (service);
+ else
+ return no_caps;
+}
+
diff --git a/libsocialweb/sw-service.h b/libsocialweb/sw-service.h
index 5ccaef1..5b6b689 100644
--- a/libsocialweb/sw-service.h
+++ b/libsocialweb/sw-service.h
@@ -129,6 +129,9 @@ void sw_service_map_params (const ParameterNameMapping *mapping,
SwServiceSetParamFunc set_param_func,
gpointer remote_call_object);
+const char **sw_service_get_dynamic_caps (SwService *service);
+const char **sw_service_get_static_caps (SwService *service);
+
G_END_DECLS
#endif /* _SW_SERVICE */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]