diff -r 000000000000 -r 81b1f3006eb2 branches/gmyth-0.1b/tests/gmyth_test_epg.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/branches/gmyth-0.1b/tests/gmyth_test_epg.c Tue Feb 06 00:33:35 2007 +0000 @@ -0,0 +1,60 @@ + +#include "gmyth_backendinfo.h" +#include "gmyth_epg.h" + +static gboolean +test_epg_connection (GMythBackendInfo *backend_info) +{ + GMythEPG *epg = gmyth_epg_new (); + gboolean res = FALSE; + + res = gmyth_epg_connect (epg, backend_info); + + gmyth_epg_disconnect (epg); + g_object_unref (epg); + + return res; +} + + +static gboolean +test_epg_get_channels (GMythBackendInfo *backend_info) +{ + GMythEPG *epg = gmyth_epg_new (); + GList *clist; + gint i, length; + + if (!gmyth_epg_connect (epg, backend_info)) { + return FALSE; + } + + length = gmyth_epg_get_channel_list (epg, &clist); + g_print ("==== %d channels found in the EPG ====\n", length); + for (i=0; i