summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-15 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-15 18:00:00 +0200
commit37250a0568d5b1d689d5c59f983e9be228ed49c2 (patch)
treef5b3cb133d5ec1ede63de04cf9c394bcf4a514a2 /tools.h
parent6feebe674c09b65e43012bf439c201cfb65aa82c (diff)
downloadvdr-patch-lnbsharing-37250a0568d5b1d689d5c59f983e9be228ed49c2.tar.gz
vdr-patch-lnbsharing-37250a0568d5b1d689d5c59f983e9be228ed49c2.tar.bz2
Version 0.03vdr_osm-0.03
- Actual record/replay now works. - Dropped the idea of different "recording qualities" (a 36GB harddisk is able to store some 18 hours in full quality, so we don't really need that). - Termination signals are now caught and the program cleans up before exiting. - Support for CICAM.
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/tools.h b/tools.h
index 9f87bbd..48665a8 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'osm.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.2 2000/03/05 16:14:05 kls Exp $
+ * $Id: tools.h 1.3 2000/04/15 15:09:47 kls Exp $
*/
#ifndef __TOOLS_H
@@ -13,18 +13,28 @@
#include <stdio.h>
#include <syslog.h>
-//TODO
-#define dsyslog syslog
-#define esyslog syslog
-#define isyslog syslog
+extern int SysLogLevel;
+
+#define esyslog if (SysLogLevel > 0) syslog
+#define isyslog if (SysLogLevel > 1) syslog
+#define dsyslog if (SysLogLevel > 2) syslog
+
+#define LOG_ERROR esyslog(LOG_ERR, "ERROR (%s,%d): %s", __FILE__, __LINE__, strerror(errno))
+#define LOG_ERROR_STR(s) esyslog(LOG_ERR, "ERROR: %s: %s", s, strerror(errno));
#define SECSINDAY 86400
#define DELETENULL(p) (delete (p), p = NULL)
+void writechar(int filedes, char c);
+void writeint(int filedes, int n);
+char readchar(int filedes);
+bool readint(int filedes, int &n);
char *readline(FILE *f);
int time_ms(void);
-bool MakeDirs(const char *FileName);
+void delay_ms(int ms);
+bool MakeDirs(const char *FileName, bool IsDirectory = false);
+bool RemoveFileOrDir(const char *FileName);
class cListObject {
private:
@@ -47,7 +57,7 @@ public:
virtual ~cListBase();
void Add(cListObject *Object);
void Del(cListObject *Object);
- void Move(int From, int To);
+ virtual void Move(int From, int To);
void Move(cListObject *From, cListObject *To);
void Clear(void);
cListObject *Get(int Index);