00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _EPGDBASE_H
00025 #define _EPGDBASE_H
00026 #include <time.h>
00027 #include "types.h"
00028
00040 #define EPG_EVENT_DETAIL_TITLE "title"
00041
00045 #define EPG_EVENT_DETAIL_DESCRIPTION "description"
00046
00050 typedef struct EPGServiceRef_s
00051 {
00052 unsigned int netId;
00053 unsigned int tsId;
00054 unsigned int serviceId;
00055 }EPGServiceRef_t;
00056
00060 typedef struct EPGEvent_s
00061 {
00062 EPGServiceRef_t serviceRef;
00063 unsigned int eventId;
00064 struct tm startTime;
00065 struct tm endTime;
00066 bool ca;
00067 }EPGEvent_t;
00068
00072 typedef struct EPGEventRating_s
00073 {
00074 char *system;
00075 char *rating;
00076 }EPGEventRating_t;
00077
00081 typedef struct EPGEventDetail_s
00082 {
00083 char lang[4];
00084 char *name;
00085 char *value;
00086 }EPGEventDetail_t;
00087
00091 typedef void *EPGDBaseEnumerator_t;
00092
00099 int EPGDBaseInit(int adapter);
00104 int EPGDBaseDeInit(void);
00105
00106 int EPGDBaseTransactionStart(void);
00107 int EPGDBaseTransactionCommit(void);
00108
00109 int EPGDBaseEventAdd(EPGEvent_t *event);
00110 int EPGDBaseEventRemove(EPGServiceRef_t *serviceRef, unsigned int eventId);
00111 int EPGDBaseEventCountAll();
00112 int EPGDBaseEventCountService(EPGServiceRef_t *serviceRef);
00113 EPGDBaseEnumerator_t EPGDBaseEventEnumeratorGetAll();
00114 EPGDBaseEnumerator_t EPGDBaseEventEnumeratorGetService(EPGServiceRef_t *serviceRef);
00115 EPGEvent_t *EPGDBaseEventGetNext(EPGDBaseEnumerator_t enumerator);
00116
00117
00118 int EPGDBaseRatingAdd(EPGServiceRef_t *serviceRef, unsigned int eventId, char *system, char *rating);
00119 int EPGDBaseRatingRemoveAll(EPGServiceRef_t *serviceRef, unsigned int eventId);
00120 int EPGDBaseRatingCount(EPGServiceRef_t *serviceRef, unsigned int eventId);
00121 EPGDBaseEnumerator_t EPGDBaseRatingEnumeratorGet(EPGServiceRef_t *serviceRef, unsigned int eventId);
00122 EPGEventRating_t *EPGDBaseRatingGetNext(EPGDBaseEnumerator_t enumerator);
00123
00124 int EPGDBaseDetailAdd(EPGServiceRef_t *serviceRef, unsigned int eventId, char *lang, char * name, char *value);
00125 int EPGDBaseDetailRemoveAll(EPGServiceRef_t *serviceRef, unsigned int eventId);
00126 int EPGDBaseDetailCount(EPGServiceRef_t *serviceRef, unsigned int eventId);
00127 EPGDBaseEnumerator_t EPGDBaseDetailGet(EPGServiceRef_t *serviceRef, unsigned int eventId, char *name);
00128 EPGDBaseEnumerator_t EPGDBaseDetailEnumeratorGet(EPGServiceRef_t *serviceRef, unsigned int eventId);
00129 EPGEventDetail_t *EPGDBaseDetailGetNext(EPGDBaseEnumerator_t enumerator);
00130 void EPGDBaseEnumeratorDestroy(EPGDBaseEnumerator_t enumerator);
00131
00133 #endif