[PATCH] upnp: Implement search all elements



Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
---
 src/upnp/grl-upnp.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 6b25b75..5a830f0 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -67,6 +67,9 @@ GRL_LOG_DOMAIN_STATIC(upnp_log_domain);
   "upnp:album contains \"%s\" or "			\
   "upnp:artist contains \"%s\""
 
+#define UPNP_SEARCH_ALL                         \
+  "upnp:class derivedfrom \"object.item\""
+
 struct _GrlUpnpPrivate {
   GUPnPDeviceProxy* device;
   GUPnPServiceProxy* service;
@@ -488,7 +491,11 @@ get_upnp_filter (const GList *keys)
 static gchar *
 get_upnp_search (const gchar *text)
 {
-  return g_strdup_printf (UPNP_SEARCH_SPEC, text, text, text);
+  if (text) {
+    return g_strdup_printf (UPNP_SEARCH_SPEC, text, text, text);
+  } else {
+    return g_strdup (UPNP_SEARCH_ALL);
+  }
 }
 
 static void
-- 
1.7.1



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