diff -r 000000000000 -r e326033fb048 branches/gmyth-0.1b/src/gmyth_http.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/branches/gmyth-0.1b/src/gmyth_http.h Wed Feb 07 20:39:10 2007 +0000 @@ -0,0 +1,110 @@ +/** + * GMyth Library + * + * @file gmyth/gmyth_http.c + * + * @brief

GMythHttp class provides a wrapper to access + * data from the database using http+xml + * + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. + * @author Artur Duque de Souza <@indt.org.br> + * + *//* + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __GMYTH_HTTP_H__ +#define __GMYTH_HTTP_H__ + +#include + +#include +#include +#include +#include +#include +#include + +#include "gmyth_backendinfo.h" +#include "gmyth_util.h" + +#include +#include +#include + +G_BEGIN_DECLS + +#define MYTH_PORT_STATUS 6544 + +typedef struct _GMythPacket GMythPacket; +typedef struct _GMythProgram GMythProgram; +typedef struct _GMythChannel GMythChannel; +typedef struct _GMythEpg GMythEpg; +typedef struct _MemoryStruct MemoryStruct; + +struct _MemoryStruct +{ + char *memory; + size_t size; +}; + +struct _GMythPacket +{ + GString *response; + int type; +}; + +struct _GMythProgram +{ + GString* title; + GString* subtitle; + GString* catType; + GString* category; + gint repeat; + GTimeVal* startTime; + GTimeVal* endTime; +}; + +struct _GMythChannel +{ + GString* channelName; + GString* chanNum; + gint chanId; + gint callSign; + GSList* programList; +}; + +struct _GMythEpg +{ + gint startChanId; + gint endChanId; + GString* version; + gint protoVer; + gint totalCount; + gint numOfChannels; + GTimeVal* asOf; + GTimeVal* startTime; + GTimeVal* endTime; + gint details; + GSList* channelList; +}; + +GMythEpg retrieve_epg(GMythBackendInfo *backend_info, int port, GTimeVal* StartTime, GTimeVal* EndTime, gint StartChanId, gint NumOfChannels, gchar* Details); +MemoryStruct gmyth_http_request (GMythBackendInfo *backend_info, GString *command); + +G_END_DECLS + +#endif /* __GMYTH_HTTP_H__ */