2 #include "gmyth_backendinfo.h"
6 test_epg_connection (GMythBackendInfo *backend_info)
8 GMythEPG *epg = gmyth_epg_new ();
11 res = gmyth_epg_connect (epg, backend_info);
13 gmyth_epg_disconnect (epg);
21 test_epg_get_channels (GMythBackendInfo *backend_info)
23 GMythEPG *epg = gmyth_epg_new ();
27 if (!gmyth_epg_connect (epg, backend_info)) {
31 length = gmyth_epg_get_channel_list (epg, &clist);
32 g_print ("==== %d channels found in the EPG ====\n", length);
33 for (i=0; i<length; i++) {
34 GMythChannelInfo *channel_info = (GMythChannelInfo*) g_list_nth_data (clist, i);
36 gmyth_channel_info_print(channel_info);
40 gmyth_epg_disconnect (epg);
45 main (int args, const char **argv)
47 const char* uri = argv[1];
49 GMythBackendInfo *backend_info;
53 backend_info = gmyth_backend_info_new_with_uri (argv[1]);
55 test_epg_connection (backend_info);
56 test_epg_get_channels (backend_info);