# HG changeset patch # User morphbr # Date 1174401992 0 # Node ID fb1b1b2f16cc304662e1b5fc41d6d9796e2ee087 # Parent a0de91f6be04de507d7a04ba67a50a681bd10601 [svn r423] - Bug Fix inside gmyth_http diff -r a0de91f6be04 -r fb1b1b2f16cc gmyth/src/gmyth_http.c --- a/gmyth/src/gmyth_http.c Tue Mar 20 14:00:10 2007 +0000 +++ b/gmyth/src/gmyth_http.c Tue Mar 20 14:46:32 2007 +0000 @@ -302,17 +302,35 @@ sscanf ((char *)xmlGetProp(node, (xmlChar *)"dupMethod"),\ "%d", &(recording.dupMethod)); - sscanf ((char *)xmlGetProp(node, (xmlChar *)"preRollSeconds"),\ - "%d", &(recording.preRollSeconds)); + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recStatus"),\ + "%d", &(recording.recStatus)); + + sscanf ((char *)xmlGetProp(node, (xmlChar *)"encoderId"),\ + "%d", &(recording.encoderId)); + + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recordId"),\ + "%d", &(recording.recordId)); + + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recType"),\ + "%d", &(recording.recType)); recording.playGroup = g_strdup((char *)\ xmlGetProp(node, (xmlChar *)"playGroup")); + recording.recGroup = g_strdup((char *)\ + xmlGetProp(node, (xmlChar *)"recGroup")); + + recording.recProfile = g_strdup((char *)\ + xmlGetProp(node, (xmlChar *)"recProfile")); + sscanf ((char *)xmlGetProp(node, (xmlChar *)"recPriority"),\ "%d", &(recording.recPriority)); recording.recStartTs = gmyth_util_string_to_time_val\ ((char *)xmlGetProp(node, (xmlChar *)"recStartTs")); + + recording.recEndTs = gmyth_util_string_to_time_val\ + ((char *)xmlGetProp(node, (xmlChar *)"recEndTs")); } return recording; diff -r a0de91f6be04 -r fb1b1b2f16cc gmyth/src/gmyth_http.h --- a/gmyth/src/gmyth_http.h Tue Mar 20 14:00:10 2007 +0000 +++ b/gmyth/src/gmyth_http.h Tue Mar 20 14:46:32 2007 +0000 @@ -66,92 +66,98 @@ struct _GMythProgram { - gchar* title; - gchar* subtitle; - gchar* catType; - gchar* category; - gint repeat; - GTimeVal* startTime; - GTimeVal* endTime; + gchar* title; + gchar* subtitle; + gchar* catType; + gchar* category; + gint repeat; + GTimeVal* startTime; + GTimeVal* endTime; }; struct _GMythChannel { - gchar* channelName; - gchar* chanNum; - gint chanId; - gint callSign; - GSList* programList; + gchar* channelName; + gchar* chanNum; + gint chanId; + gint callSign; + GSList* programList; }; struct _GMythEpg { - gint startChanId; - gint endChanId; - gchar* version; - gint protoVer; - gint totalCount; - gint numOfChannels; - GTimeVal* asOf; - GTimeVal* startTime; - GTimeVal* endTime; - gint details; - GSList* channelList; + gint startChanId; + gint endChanId; + gchar* version; + gint protoVer; + gint totalCount; + gint numOfChannels; + GTimeVal* asOf; + GTimeVal* startTime; + GTimeVal* endTime; + gint details; + GSList* channelList; }; struct _GMythRecorded_Recording { - gint dupInType; - gint dupMethod; - gint preRollSeconds; - gchar* playGroup; - gint recPriority; - GTimeVal* recStartTs; + gint dupInType; + gint dupMethod; + gchar* playGroup; + gchar* recGroup; + gchar* recProfile; + gint recPriority; + gint recStatus; + gint encoderId; + gint recordId; + gint recType; + GTimeVal* recStartTs; + GTimeVal* recEndTs; }; struct _GMythRecorded_Channel { - gchar* chanFilters; - gchar* channelName; - gint chanNum; - gint sourceId; - gint commFree; - gint inputId; - gint chanId; - gint callSign; + gchar* chanFilters; + gchar* channelName; + gint chanNum; + gint sourceId; + gint commFree; + gint inputId; + gint chanId; + gint callSign; }; struct _GMythRecorded_Program { - gint programFlags; - gchar* title; - gint programId; - gchar* catType; - gchar* category; - gint seriesId; - GTimeVal* startTime; - GTimeVal* endTime; - GTimeVal* airdate; //? - GTimeVal* lastModified; - gchar* subTitle; - gint stars; - gint repeat; - gint fileSize; - gchar* hostname; - GMythRecorded_Channel channel; - GMythRecorded_Recording recording; + gint programFlags; + gchar* title; + gint programId; + gchar* catType; + gchar* category; + gint seriesId; + GTimeVal* startTime; + GTimeVal* endTime; + GTimeVal* airdate; //? + GTimeVal* lastModified; + gchar* subTitle; + gint stars; + gint repeat; + gint fileSize; + gchar* hostname; + GMythRecorded_Channel channel; + GMythRecorded_Recording recording; }; struct _GMythRecorded { - gchar* version; - gint protoVer; - gint totalCount; - GTimeVal* asOf; - GSList* programList; + gchar* version; + gint protoVer; + gint totalCount; + GTimeVal* asOf; + GSList* programList; }; diff -r a0de91f6be04 -r fb1b1b2f16cc gmyth/tests/gmyth_test_http.c --- a/gmyth/tests/gmyth_test_http.c Tue Mar 20 14:00:10 2007 +0000 +++ b/gmyth/tests/gmyth_test_http.c Tue Mar 20 14:46:32 2007 +0000 @@ -11,12 +11,12 @@ backend_info = gmyth_backend_info_new (); - gmyth_backend_info_set_hostname (backend_info, "127.0.0.1"); + gmyth_backend_info_set_hostname (backend_info, "192.168.3.165"); gmyth_backend_info_set_port (backend_info, 6543); gmyth_backend_info_set_status_port (backend_info, 6544); - //GTimeVal* start = gmyth_util_string_to_time_val("2006-01-01T00:00:00"); - //GTimeVal* end = gmyth_util_string_to_time_val("2007-03-10T00:00:00"); + GTimeVal* start = gmyth_util_string_to_time_val("2006-01-01T00:00:00"); + GTimeVal* end = gmyth_util_string_to_time_val("2007-03-10T00:00:00"); GMythEpg epg; epg = gmyth_http_retrieve_epg(backend_info, start, end, 1000, 10000, "1"); @@ -24,16 +24,16 @@ //if ( NULL == epg.channelList || g_slist_length( epg.channelList ) <= 0 ) // printf( "Channel list is empty!!!" ); - //GMythRecorded recorded; - //recorded = gmyth_http_retrieve_recorded(backend_info); + GMythRecorded recorded; + recorded = gmyth_http_retrieve_recorded(backend_info); - //GMythRecorded_Program* program = recorded.ProgramList->data; + GMythRecorded_Program* program = recorded.programList->data; - //GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders"); + GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, "Transcoders"); - //GMythRecProfile* prof = profiles->data; + GMythRecProfile* prof = profiles->data; - //gchar* sett = gmyth_http_retrieve_setting(backend_info, "JobQueueTranscodeCommand", "wakko"); + gchar* sett = gmyth_http_retrieve_setting(backend_info, "JobQueueTranscodeCommand", "wakko"); GMythRecProfile* profile = gmyth_recprofile_new();