summaryrefslogtreecommitdiff
path: root/libcore/helpers.h
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-09-27 09:25:14 +0200
committerlouis <louis.braun@gmx.de>2014-09-27 09:25:14 +0200
commitb0509b5182b6e0d04f05e6b3d5676b0d21f51966 (patch)
tree22b302342f22843e0815eb5f516c85f1478cbf0b /libcore/helpers.h
downloadvdr-plugin-skindesigner-0.0.1.tar.gz
vdr-plugin-skindesigner-0.0.1.tar.bz2
initial commit version 0.0.10.0.1
Diffstat (limited to 'libcore/helpers.h')
-rw-r--r--libcore/helpers.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libcore/helpers.h b/libcore/helpers.h
new file mode 100644
index 0000000..60f3345
--- /dev/null
+++ b/libcore/helpers.h
@@ -0,0 +1,35 @@
+#ifndef __HELPERS_H
+#define __HELPERS_H
+
+#include <vdr/osd.h>
+#include <vdr/plugin.h>
+#include "../config.h"
+
+cPlugin *GetScraperPlugin(void);
+
+cSize ScaleToFit(int widthMax, int heightMax, int widthOriginal, int heightOriginal);
+int Minimum(int a, int b, int c, int d, int e, int f);
+std::string CutText(string &text, int width, string fontName, int fontSize);
+std::string StrToLowerCase(string str);
+bool isNumber(const string& s);
+bool FileExists(const string &path, const string &name, const string &ext);
+bool FirstFileInFolder(string &path, string &extension, string &fileName);
+
+class splitstring : public std::string {
+ std::vector<std::string> flds;
+public:
+ splitstring(const char *s) : std::string(s) { };
+ std::vector<std::string>& split(char delim, int rep=0);
+};
+
+class cStopWatch {
+private:
+ uint64_t start;
+ uint64_t last;
+public:
+ cStopWatch(void);
+ ~cStopWatch(void) {};
+ void Report(const char* message);
+ void Stop(const char* message);
+};
+#endif // __HELPERS_H