1.1 --- a/gmyth/src/gmyth_http.c Tue Mar 20 14:00:10 2007 +0000
1.2 +++ b/gmyth/src/gmyth_http.c Tue Mar 20 14:46:32 2007 +0000
1.3 @@ -302,17 +302,35 @@
1.4 sscanf ((char *)xmlGetProp(node, (xmlChar *)"dupMethod"),\
1.5 "%d", &(recording.dupMethod));
1.6
1.7 - sscanf ((char *)xmlGetProp(node, (xmlChar *)"preRollSeconds"),\
1.8 - "%d", &(recording.preRollSeconds));
1.9 + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recStatus"),\
1.10 + "%d", &(recording.recStatus));
1.11 +
1.12 + sscanf ((char *)xmlGetProp(node, (xmlChar *)"encoderId"),\
1.13 + "%d", &(recording.encoderId));
1.14 +
1.15 + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recordId"),\
1.16 + "%d", &(recording.recordId));
1.17 +
1.18 + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recType"),\
1.19 + "%d", &(recording.recType));
1.20
1.21 recording.playGroup = g_strdup((char *)\
1.22 xmlGetProp(node, (xmlChar *)"playGroup"));
1.23
1.24 + recording.recGroup = g_strdup((char *)\
1.25 + xmlGetProp(node, (xmlChar *)"recGroup"));
1.26 +
1.27 + recording.recProfile = g_strdup((char *)\
1.28 + xmlGetProp(node, (xmlChar *)"recProfile"));
1.29 +
1.30 sscanf ((char *)xmlGetProp(node, (xmlChar *)"recPriority"),\
1.31 "%d", &(recording.recPriority));
1.32
1.33 recording.recStartTs = gmyth_util_string_to_time_val\
1.34 ((char *)xmlGetProp(node, (xmlChar *)"recStartTs"));
1.35 +
1.36 + recording.recEndTs = gmyth_util_string_to_time_val\
1.37 + ((char *)xmlGetProp(node, (xmlChar *)"recEndTs"));
1.38 }
1.39
1.40 return recording;
2.1 --- a/gmyth/src/gmyth_http.h Tue Mar 20 14:00:10 2007 +0000
2.2 +++ b/gmyth/src/gmyth_http.h Tue Mar 20 14:46:32 2007 +0000
2.3 @@ -66,92 +66,98 @@
2.4
2.5 struct _GMythProgram
2.6 {
2.7 - gchar* title;
2.8 - gchar* subtitle;
2.9 - gchar* catType;
2.10 - gchar* category;
2.11 - gint repeat;
2.12 - GTimeVal* startTime;
2.13 - GTimeVal* endTime;
2.14 + gchar* title;
2.15 + gchar* subtitle;
2.16 + gchar* catType;
2.17 + gchar* category;
2.18 + gint repeat;
2.19 + GTimeVal* startTime;
2.20 + GTimeVal* endTime;
2.21 };
2.22
2.23 struct _GMythChannel
2.24 {
2.25 - gchar* channelName;
2.26 - gchar* chanNum;
2.27 - gint chanId;
2.28 - gint callSign;
2.29 - GSList* programList;
2.30 + gchar* channelName;
2.31 + gchar* chanNum;
2.32 + gint chanId;
2.33 + gint callSign;
2.34 + GSList* programList;
2.35 };
2.36
2.37 struct _GMythEpg
2.38 {
2.39 - gint startChanId;
2.40 - gint endChanId;
2.41 - gchar* version;
2.42 - gint protoVer;
2.43 - gint totalCount;
2.44 - gint numOfChannels;
2.45 - GTimeVal* asOf;
2.46 - GTimeVal* startTime;
2.47 - GTimeVal* endTime;
2.48 - gint details;
2.49 - GSList* channelList;
2.50 + gint startChanId;
2.51 + gint endChanId;
2.52 + gchar* version;
2.53 + gint protoVer;
2.54 + gint totalCount;
2.55 + gint numOfChannels;
2.56 + GTimeVal* asOf;
2.57 + GTimeVal* startTime;
2.58 + GTimeVal* endTime;
2.59 + gint details;
2.60 + GSList* channelList;
2.61 };
2.62
2.63
2.64 struct _GMythRecorded_Recording
2.65 {
2.66 - gint dupInType;
2.67 - gint dupMethod;
2.68 - gint preRollSeconds;
2.69 - gchar* playGroup;
2.70 - gint recPriority;
2.71 - GTimeVal* recStartTs;
2.72 + gint dupInType;
2.73 + gint dupMethod;
2.74 + gchar* playGroup;
2.75 + gchar* recGroup;
2.76 + gchar* recProfile;
2.77 + gint recPriority;
2.78 + gint recStatus;
2.79 + gint encoderId;
2.80 + gint recordId;
2.81 + gint recType;
2.82 + GTimeVal* recStartTs;
2.83 + GTimeVal* recEndTs;
2.84 };
2.85
2.86
2.87 struct _GMythRecorded_Channel
2.88 {
2.89 - gchar* chanFilters;
2.90 - gchar* channelName;
2.91 - gint chanNum;
2.92 - gint sourceId;
2.93 - gint commFree;
2.94 - gint inputId;
2.95 - gint chanId;
2.96 - gint callSign;
2.97 + gchar* chanFilters;
2.98 + gchar* channelName;
2.99 + gint chanNum;
2.100 + gint sourceId;
2.101 + gint commFree;
2.102 + gint inputId;
2.103 + gint chanId;
2.104 + gint callSign;
2.105 };
2.106
2.107
2.108 struct _GMythRecorded_Program
2.109 {
2.110 - gint programFlags;
2.111 - gchar* title;
2.112 - gint programId;
2.113 - gchar* catType;
2.114 - gchar* category;
2.115 - gint seriesId;
2.116 - GTimeVal* startTime;
2.117 - GTimeVal* endTime;
2.118 - GTimeVal* airdate; //?
2.119 - GTimeVal* lastModified;
2.120 - gchar* subTitle;
2.121 - gint stars;
2.122 - gint repeat;
2.123 - gint fileSize;
2.124 - gchar* hostname;
2.125 - GMythRecorded_Channel channel;
2.126 - GMythRecorded_Recording recording;
2.127 + gint programFlags;
2.128 + gchar* title;
2.129 + gint programId;
2.130 + gchar* catType;
2.131 + gchar* category;
2.132 + gint seriesId;
2.133 + GTimeVal* startTime;
2.134 + GTimeVal* endTime;
2.135 + GTimeVal* airdate; //?
2.136 + GTimeVal* lastModified;
2.137 + gchar* subTitle;
2.138 + gint stars;
2.139 + gint repeat;
2.140 + gint fileSize;
2.141 + gchar* hostname;
2.142 + GMythRecorded_Channel channel;
2.143 + GMythRecorded_Recording recording;
2.144 };
2.145
2.146 struct _GMythRecorded
2.147 {
2.148 - gchar* version;
2.149 - gint protoVer;
2.150 - gint totalCount;
2.151 - GTimeVal* asOf;
2.152 - GSList* programList;
2.153 + gchar* version;
2.154 + gint protoVer;
2.155 + gint totalCount;
2.156 + GTimeVal* asOf;
2.157 + GSList* programList;
2.158 };
2.159
2.160
3.1 --- a/gmyth/tests/gmyth_test_http.c Tue Mar 20 14:00:10 2007 +0000
3.2 +++ b/gmyth/tests/gmyth_test_http.c Tue Mar 20 14:46:32 2007 +0000
3.3 @@ -11,12 +11,12 @@
3.4
3.5 backend_info = gmyth_backend_info_new ();
3.6
3.7 - gmyth_backend_info_set_hostname (backend_info, "127.0.0.1");
3.8 + gmyth_backend_info_set_hostname (backend_info, "192.168.3.165");
3.9 gmyth_backend_info_set_port (backend_info, 6543);
3.10 gmyth_backend_info_set_status_port (backend_info, 6544);
3.11
3.12 - //GTimeVal* start = gmyth_util_string_to_time_val("2006-01-01T00:00:00");
3.13 - //GTimeVal* end = gmyth_util_string_to_time_val("2007-03-10T00:00:00");
3.14 + GTimeVal* start = gmyth_util_string_to_time_val("2006-01-01T00:00:00");
3.15 + GTimeVal* end = gmyth_util_string_to_time_val("2007-03-10T00:00:00");
3.16
3.17 GMythEpg epg;
3.18 epg = gmyth_http_retrieve_epg(backend_info, start, end, 1000, 10000, "1");
3.19 @@ -24,16 +24,16 @@
3.20 //if ( NULL == epg.channelList || g_slist_length( epg.channelList ) <= 0 )
3.21 // printf( "Channel list is empty!!!" );
3.22
3.23 - //GMythRecorded recorded;
3.24 - //recorded = gmyth_http_retrieve_recorded(backend_info);
3.25 + GMythRecorded recorded;
3.26 + recorded = gmyth_http_retrieve_recorded(backend_info);
3.27
3.28 - //GMythRecorded_Program* program = recorded.ProgramList->data;
3.29 + GMythRecorded_Program* program = recorded.programList->data;
3.30
3.31 - //GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
3.32 + GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders");
3.33
3.34 - //GMythRecProfile* prof = profiles->data;
3.35 + GMythRecProfile* prof = profiles->data;
3.36
3.37 - //gchar* sett = gmyth_http_retrieve_setting(backend_info, "JobQueueTranscodeCommand", "wakko");
3.38 + gchar* sett = gmyth_http_retrieve_setting(backend_info, "JobQueueTranscodeCommand", "wakko");
3.39
3.40 GMythRecProfile* profile = gmyth_recprofile_new();
3.41