summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2020-08-21 16:36:52 +0200
committerhorchi <vdr@jwendel.de>2020-08-21 16:36:52 +0200
commit740602403557156183e5fdedca7f0e9b9618897f (patch)
tree682debe540be0d18547c47f4ff09ddd1b5673d75 /common.h
parent6853f2b6327e468efb77fa989dfa6080c257cf6c (diff)
downloadvdr-plugin-seduatmo-740602403557156183e5fdedca7f0e9b9618897f.tar.gz
vdr-plugin-seduatmo-740602403557156183e5fdedca7f0e9b9618897f.tar.bz2
2020-08-21: Version 0.0.10\n - added: Auto powerof by TV state (option -t <ip\ndns>)\n\n0.0.10
Diffstat (limited to 'common.h')
-rw-r--r--common.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/common.h b/common.h
index a774793..a200d2a 100644
--- a/common.h
+++ b/common.h
@@ -9,7 +9,7 @@
#define __COMMON_H
//***************************************************************************
-//
+//
//***************************************************************************
enum Misc
@@ -23,17 +23,25 @@ enum Misc
on = 1,
off = 0,
no = 0,
- TB = 1
+ TB = 1,
+
+ tmeSecondsPerMinute = 60,
+ tmeSecondsPerHour = tmeSecondsPerMinute * 60,
+ tmeSecondsPerDay = 24 * tmeSecondsPerHour,
+ tmeUsecondsPerSecond = 1000 * 1000
};
//***************************************************************************
// Misc ..
//***************************************************************************
+int isEmpty(const char* str);
int minMax(int x, int min, int max);
int getrand(int min, int max);
double min(double a, double b);
double max(double a, double b);
+int isAlive(const char* address);
+int ping(const char* address);
//***************************************************************************
// Time
@@ -47,7 +55,7 @@ MsTime msNow();
// Tell
//***************************************************************************
-void tell(int eloquence, const char* format, ...);
+void __attribute__ ((format(printf, 2, 3))) tell(int eloquence, const char* format, ...);
int error(const char* format, ...);
//***************************************************************************