From: Stephan Diederich Date: Sat, 28 Nov 2009 13:10:28 +0000 (+0000) Subject: changed: split up epg_query in internal + convenience functions X-Git-Tag: 2.12~393 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3305f07d7eed8afce4f4ca3f4b6dfd5fe66b3f0;p=thirdparty%2Ftvheadend.git changed: split up epg_query in internal + convenience functions --- diff --git a/src/epg.c b/src/epg.c index c163ce163..b669d78d0 100644 --- a/src/epg.c +++ b/src/epg.c @@ -540,13 +540,9 @@ epg_query_add_channel(epg_query_result_t *eqr, channel_t *ch, * */ void -epg_query(epg_query_result_t *eqr, const char *channel, const char *tag, - const char *contentgroup, const char *title) +epg_query0(epg_query_result_t *eqr, channel_t *ch, channel_tag_t *ct, + epg_content_group_t *ecg, const char *title) { - channel_t *ch = channel ? channel_find_by_name(channel, 0) : NULL; - channel_tag_t *ct = tag ? channel_tag_find_by_name(tag, 0) : NULL; - epg_content_group_t *ecg = contentgroup ? - epg_content_group_find_by_name(contentgroup) : NULL; channel_tag_mapping_t *ctm; time_t now; @@ -581,6 +577,19 @@ epg_query(epg_query_result_t *eqr, const char *channel, const char *tag, epg_query_add_channel(eqr, ch, ecg, preg, now); } +/** + * + */ +void +epg_query(epg_query_result_t *eqr, const char *channel, const char *tag, + const char *contentgroup, const char *title) +{ + channel_t *ch = channel ? channel_find_by_name(channel, 0) : NULL; + channel_tag_t *ct = tag ? channel_tag_find_by_name(tag, 0) : NULL; + epg_content_group_t *ecg = contentgroup ? + epg_content_group_find_by_name(contentgroup) : NULL; + epg_query0(eqr, ch, ct, ecg, title); +} /** * diff --git a/src/epg.h b/src/epg.h index e09456f4a..d66652415 100644 --- a/src/epg.h +++ b/src/epg.h @@ -106,6 +106,8 @@ typedef struct epg_query_result { int eqr_alloced; } epg_query_result_t; +void epg_query0(epg_query_result_t *eqr, channel_t *ch, channel_tag_t *ct, + epg_content_group_t *ecg, const char *title); void epg_query(epg_query_result_t *eqr, const char *channel, const char *tag, const char *contentgroup, const char *title); void epg_query_free(epg_query_result_t *eqr);