From d3305f07d7eed8afce4f4ca3f4b6dfd5fe66b3f0 Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Sat, 28 Nov 2009 13:10:28 +0000 Subject: [PATCH] changed: split up epg_query in internal + convenience functions --- src/epg.c | 21 +++++++++++++++------ src/epg.h | 2 ++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/epg.c b/src/epg.c index c163ce16..b669d78d 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 e09456f4..d6665241 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);