2013-12-07 15:51:50 +01:00
|
|
|
#ifndef __TVGUIDETOOLS_H
|
|
|
|
#define __TVGUIDETOOLS_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <vdr/font.h>
|
2014-01-10 12:44:01 +01:00
|
|
|
#include <vdr/recording.h>
|
2013-12-07 15:51:50 +01:00
|
|
|
|
|
|
|
std::string CutText(std::string text, int width, const cFont *font);
|
2013-12-21 11:25:03 +01:00
|
|
|
std::string StrToLowerCase(std::string str);
|
2014-01-26 09:42:27 +01:00
|
|
|
std::string GetDirectoryFromTimer(std::string file);
|
2014-02-06 17:38:55 +01:00
|
|
|
void ReadRecordingDirectories(std::vector<std::string> *folders, cList<cNestedItem> *rootFolders, cString path);
|
2013-12-27 17:06:49 +01:00
|
|
|
void DrawRoundedCorners(cPixmap *p, int posX, int posY, int width, int height, int radius, int borderWidth, tColor borderColor);
|
2013-12-07 15:51:50 +01:00
|
|
|
|
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
|
|
|
int FindIgnoreCase(const std::string& expr, const std::string& query);
|
|
|
|
|
2014-01-10 12:44:01 +01:00
|
|
|
char* GetAuxValue(const char* aux, const char* name);
|
|
|
|
char* GetAuxValue(const cRecording *recording, const char* name);
|
|
|
|
char* GetAuxValue(const cTimer* timer, const char* name);
|
|
|
|
|
2013-12-07 15:51:50 +01:00
|
|
|
#ifndef _AFUZZY_H
|
|
|
|
#define _AFUZZY_H
|
|
|
|
|
|
|
|
// source from:
|
|
|
|
/*
|
|
|
|
Leonid Boitsov 2002. (itman@narod.ru)
|
|
|
|
C version of Stas Namin.
|
|
|
|
This code is a GPL software and is distributed under GNU
|
|
|
|
public licence without any warranty.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef unsigned int Uint;
|
|
|
|
|
|
|
|
#define MaxPatSize (sizeof(Uint) * 8)
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
Uint *R,
|
|
|
|
*R1,
|
|
|
|
*RP,
|
|
|
|
*S,
|
|
|
|
*RI;
|
|
|
|
Uint *FilterS;
|
|
|
|
|
|
|
|
int Map[256];
|
|
|
|
int FilterMap[256];
|
|
|
|
int k;
|
|
|
|
Uint mask_ok;
|
|
|
|
Uint filter_ok;
|
|
|
|
Uint filter_shift;
|
|
|
|
int r_size;
|
|
|
|
int FilterSet;
|
|
|
|
} AFUZZY;
|
|
|
|
|
|
|
|
void afuzzy_init(const char *p, int kerr, int UseFilter, AFUZZY *fuzzy);
|
|
|
|
void afuzzy_free(AFUZZY *fuzzy);
|
|
|
|
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy);
|
|
|
|
static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // __TVGUIDETOOLS_H
|