summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-10-18 12:32:04 (GMT)
committerDimitar Petrovski <dimeptr@gmail.com>2012-10-18 12:32:04 (GMT)
commit6810f79e1b5f78a0b3d2389714924738295a6497 (patch)
tree951670799a35d3bfa389e5f9f65ba46c3c582ec8 /util.h
parentcee549473dacfa3e82cb13bd9bbe1c8f0e8c1a6a (diff)
downloadvdr-plugin-eepg-6810f79e1b5f78a0b3d2389714924738295a6497.tar.gz
vdr-plugin-eepg-6810f79e1b5f78a0b3d2389714924738295a6497.tar.bz2
fix compile
Diffstat (limited to 'util.h')
-rw-r--r--util.h80
1 files changed, 55 insertions, 25 deletions
diff --git a/util.h b/util.h
index 88e6c62..69c0717 100644
--- a/util.h
+++ b/util.h
@@ -11,9 +11,18 @@
class cChannel;
struct tChannelID;
class cEvent;
+class cEquivHandler;
+class cSchedules;
+
+#define START '\0'
+#define STOP '\0'
+#define ESCAPE '\1'
+
+#define Asprintf(a, b, c...) void( asprintf(a, b, c) < 0 ? esyslog("memory allocation error - %s", b) : void() )
namespace util
{
+
extern int AvailableSources[32];
extern int NumberOfAvailableSources;
@@ -21,41 +30,62 @@ extern int Yesterday;
extern int YesterdayEpoch;
extern int YesterdayEpochUTC;
+extern enum EFormat
+{
+//First all batchmode, load ONCE protocols:
+ MHW1 = 0,
+ MHW2,
+ SKY_IT,
+ SKY_UK,
+ NAGRA,
+//Than all CONTinuous protocols, so they will be processed LAST:
+ PREMIERE,
+ FREEVIEW,
+ DISH_BEV,
+ EIT,
+//the highest number of EPG-formats that is supported by this plugin
+ HIGHEST_FORMAT = EIT
+} Format;
+
+extern cEquivHandler* EquivHandler;
+
void AddEvent(cEvent *event, tChannelID ChannelID);
cChannel *GetChannelByID(tChannelID & channelID, bool searchOtherPos);
-time_t LocalTime2UTC (time_t t);
-time_t UTC2LocalTime (time_t t);
-void GetLocalTimeOffset (void);
-void CleanString (unsigned char *String);
-void decodeText2 (const unsigned char *from, int len, char *buffer, int buffsize);
-char *freesat_huffman_decode (const unsigned char *src, size_t size);
-
-struct sNode
-{
- char *Value;
- struct sNode *P0;
- struct sNode *P1;
-};
+time_t LocalTime2UTC(time_t t);
+time_t UTC2LocalTime(time_t t);
+void GetLocalTimeOffset(void);
+void CleanString(unsigned char *String);
+void decodeText2(const unsigned char *from, int len, char *buffer, int buffsize);
+char *freesat_huffman_decode(const unsigned char *src, size_t size);
+void sortSchedules(cSchedules * Schedules, tChannelID channelID);
-typedef struct sNode sNodeH;
+//struct sNode
+//{
+// char *Value;
+// struct sNode *P0;
+// struct sNode *P1;
+//};
+//
+//typedef struct sNode sNodeH;
-struct hufftab {
+template<class T> T REALLOC(T Var, size_t Size)
+{
+ T p = (T) realloc(Var, Size);
+ if (!p) free(Var);
+ return p;
+}
+
+struct hufftab
+{
unsigned int value;
short bits;
char next;
};
-#define START '\0'
-#define STOP '\0'
-#define ESCAPE '\1'
-
-static struct hufftab *tables[2][128];
-static int table_size[2][128];
-static sNodeH* sky_tables[2];
-
-
-#define Asprintf(a, b, c...) void( asprintf(a, b, c) < 0 ? esyslog("memory allocation error - %s", b) : void() )
+extern struct hufftab *tables[2][128];
+extern int table_size[2][128];
+//static sNodeH* sky_tables[2];
}
#endif /* UTIL_H_ */