]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
changed: split up epg_query in internal + convenience functions
authorStephan Diederich <stephan.diederich@googlemail.com>
Sat, 28 Nov 2009 13:10:28 +0000 (13:10 +0000)
committerStephan Diederich <stephan.diederich@googlemail.com>
Sat, 28 Nov 2009 13:10:28 +0000 (13:10 +0000)
src/epg.c
src/epg.h

index c163ce1634e41d45d3e5f72a9d4e0b0f8c50b06b..b669d78d0e1d709868e62a0fa74c9997e09e2697 100644 (file)
--- 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);
+}
 
 /**
  *
index e09456f4ac56eecc3a4a2ed7084ebab515bf8e20..d66652415ed111e5b425071abf2bd9c97af79fc6 100644 (file)
--- 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);