summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2010-12-21 20:36:58 +0100
committeranbr <vdr07@deltab.de>2010-12-21 20:36:58 +0100
commit10a33e14d6338ff004410413f6fe52810be43f67 (patch)
tree6f71b062e9235be1383a9e6c536fea336d400e6c /debug.h
downloadvdr-plugin-dvdswitch-10a33e14d6338ff004410413f6fe52810be43f67.tar.gz
vdr-plugin-dvdswitch-10a33e14d6338ff004410413f6fe52810be43f67.tar.bz2
release 0.1.0 from http://www.schmidtie.de/download/vdr-dvdswitch-0.1.0.tar.bz20.1.0
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/debug.h b/debug.h
new file mode 100644
index 0000000..f7a7f7f
--- /dev/null
+++ b/debug.h
@@ -0,0 +1,28 @@
+#ifndef __DEBUG_DVDSWITCH_H
+#define __DEBUG_DVDSWITCH_H
+
+#include <stdio.h>
+
+#define DEBUG(a...) DebugLog.WriteLine(__FILE__, __LINE__, a)
+
+class cDebugLog
+{
+ private:
+ char *FileName;
+ FILE *File;
+
+
+ bool Open(void);
+ void Close(void);
+ public:
+ cDebugLog(void);
+ ~cDebugLog(void);
+
+ bool SetLogFile(char *filename);
+ void WriteLine(char *file, int line, char *format, ...);
+ void End(void);
+};
+
+extern cDebugLog DebugLog;
+
+#endif // __DEBUG_DVDSWITCH_H