]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
move tvheadend_capabilities_list to main.c
authorJaroslav Kysela <perex@perex.cz>
Tue, 15 Sep 2015 18:40:01 +0000 (20:40 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 15 Sep 2015 18:40:01 +0000 (20:40 +0200)
src/main.c
src/tvheadend.h

index c2ce9570189db51e2575d679815c45e93cdae17b..5ef84bf2dd42adabb5a1d20a7606c68ca1779d84 100644 (file)
@@ -1215,3 +1215,19 @@ scopedunlock(pthread_mutex_t **mtxp)
 {
   pthread_mutex_unlock(*mtxp);
 }
+
+
+/**
+ *
+ */
+htsmsg_t *tvheadend_capabilities_list(int check)
+{
+  const tvh_caps_t *tc = tvheadend_capabilities;
+  htsmsg_t *r = htsmsg_create_list();
+  while (tc->name) {
+    if (!check || !tc->enabled || *tc->enabled)
+      htsmsg_add_str(r, NULL, tc->name);
+    tc++;
+  }
+  return r;
+}
index 8e6c97d703ac556b0207fce4198c0041ff53adbd..4fb6c0ff9d92b001bc309ed93d3a469458662474 100644 (file)
@@ -80,19 +80,7 @@ extern const char      *tvheadend_cwd;
 extern const char      *tvheadend_webroot;
 extern const tvh_caps_t tvheadend_capabilities[];
 
-static inline htsmsg_t *tvheadend_capabilities_list(int check)
-{
-  int i = 0;
-  htsmsg_t *r = htsmsg_create_list();
-  while (tvheadend_capabilities[i].name) {
-    if (!check ||
-        !tvheadend_capabilities[i].enabled ||
-        *tvheadend_capabilities[i].enabled)
-      htsmsg_add_str(r, NULL, tvheadend_capabilities[i].name);
-    i++;
-  }
-  return r;
-}
+htsmsg_t *tvheadend_capabilities_list(int check);
 
 typedef struct str_list
 {