1 #include <glib-object.h>
2 #include <gmyth/gmyth.h>
8 main (int args, const char **argv)
10 GMythBackendInfo *backend_info;
14 backend_info = gmyth_backend_info_new ();
16 gmyth_backend_info_set_hostname (backend_info, "192.168.3.165");
17 gmyth_backend_info_set_port (backend_info, 6543);
18 gmyth_backend_info_set_status_port (backend_info, 6544);
20 GTimeVal* start = gmyth_util_string_to_time_val("2007-03-19T17:00:00");
21 //GTimeVal* end = gmyth_util_string_to_time_val("2007-03-10T00:00:00");
22 fprintf(stdout, SYNC_STRING);
28 epg = gmyth_http_retrieve_epg(backend_info, start, end, 1000, 10000, "1");
30 if ( NULL == epg.channelList || g_slist_length( epg.channelList ) <= 0 )
31 printf( "Channel list is empty!!!" );
33 GMythRecorded recorded;
34 recorded = gmyth_http_retrieve_recorded(backend_info);
36 GMythRecorded_Program* program = recorded.programList->data;
38 GMythRecProfile* profile;
40 GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
42 profile = profiles->data;
44 gchar* sett = gmyth_http_retrieve_setting(backend_info, "JobQueueTranscodeCommand", "wakko");
46 profile = gmyth_recprofile_new();
48 gmyth_recprofile_set_name(profile, "Teste");
49 gmyth_recprofile_set_group(profile, "Transcoders");
50 gmyth_recprofile_set_vcodec(profile, "MPEG-4");
51 gmyth_recprofile_set_acodec(profile, "MP3");
53 int teste = gmyth_http_create_rec_profile(backend_info, profile);
55 printf("Hello: %d\n", teste);
57 int teste2 = gmyth_http_del_rec_profile(backend_info, 56);
59 gint ret = gmyth_http_retrieve_job_status(backend_info, 1000, start);
60 printf("Status: %d\n\n", ret);
62 //if ( profile != NULL )
63 // g_object_unref( profile );
65 if ( backend_info != NULL )
66 g_object_unref( backend_info );