[svn r344] Next program chain with different MythTV backend messages.
1 #include <glib-object.h>
4 #include "gmyth_backendinfo.h"
5 #include "gmyth_scheduler.h"
7 #include "gmyth_common.h"
10 test_recording_list (GMythBackendInfo *backend_info)
14 GMythScheduler *scheduler = gmyth_scheduler_new ();
16 if (gmyth_scheduler_connect_with_timeout (scheduler,
17 backend_info, 10) == TRUE) {
18 g_debug ("===== Scheduler connection success =====");
20 g_debug ("===== Scheduler connection failed =====");
24 length = gmyth_scheduler_get_recorded_list (scheduler, &list);
26 g_debug ("===== %d Recordings found =====\n", length);
29 RecordedInfo *record = (RecordedInfo*) g_list_nth_data (list, length);
31 g_debug ("===== Recorded list returned NULL pointer =====\n");
35 g_debug ("===== Record id = %d =====\n", record->record_id);
36 g_debug ("===== Record name = %s =====\n", (record ? record->basename->str : "NULL"));
40 gmyth_scheduler_disconnect (scheduler);
45 main (int args, const char **argv)
47 const char* uri = argv[1];
49 GMythBackendInfo *backend_info;
52 backend_info = gmyth_backend_info_new_with_uri (argv[1]);
54 test_recording_list (backend_info);