[libsocialweb] service: Add internal sw_service_has_dynamic_cap



commit 5dbda13e1a75d80ef16b9aacf3b0dff7d1ff2222
Author: Rob Bradford <rob linux intel com>
Date:   Wed Nov 9 16:18:14 2011 +0000

    service: Add internal sw_service_has_dynamic_cap

 libsocialweb/sw-service.c |    9 +++++++++
 libsocialweb/sw-service.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libsocialweb/sw-service.c b/libsocialweb/sw-service.c
index 2d834b5..9dc69fb 100644
--- a/libsocialweb/sw-service.c
+++ b/libsocialweb/sw-service.c
@@ -318,3 +318,12 @@ sw_service_get_static_caps (SwService *service)
     return no_caps;
 }
 
+gboolean
+sw_service_has_dynamic_cap (SwService *service, const gchar *cap)
+{
+  const gchar **caps;
+
+  caps = sw_service_get_dynamic_caps (service);
+
+  return sw_service_has_cap (caps, cap);
+}
diff --git a/libsocialweb/sw-service.h b/libsocialweb/sw-service.h
index 5b6b689..001b522 100644
--- a/libsocialweb/sw-service.h
+++ b/libsocialweb/sw-service.h
@@ -132,6 +132,8 @@ void sw_service_map_params (const ParameterNameMapping *mapping,
 const char **sw_service_get_dynamic_caps (SwService *service);
 const char **sw_service_get_static_caps (SwService *service);
 
+gboolean sw_service_has_dynamic_cap (SwService *service, const gchar *cap);
+
 G_END_DECLS
 
 #endif /* _SW_SERVICE */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]