Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move tvheadend_capabilities_list to main.c
  • Loading branch information
perexg committed Sep 15, 2015
1 parent bed3889 commit 73fc487
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
16 changes: 16 additions & 0 deletions src/main.c
Expand Up @@ -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;
}
14 changes: 1 addition & 13 deletions src/tvheadend.h
Expand Up @@ -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
{
Expand Down

0 comments on commit 73fc487

Please sign in to comment.