|
SASC-NG
DVBSoftCAM
|
00001 #include "include/vdr/plugin.h" 00002 #include "include/vdr/interface.h" 00003 #include "include/vdr/status.h" 00004 #include "include/vdr/skins.h" 00005 #include "include/vdr/channels.h" 00006 //#include "include/vdr/dvbci.h" 00007 #include "include/vdr/menu.h" 00008 #include "include/vdr/config.h" 00009 #include <ctype.h> 00010 00011 cSetup Setup; 00012 00013 const char *I18nTranslate(const char *s, const char *Plugin) { 00014 return s; 00015 } 00016 00017 cSetup::cSetup(void) {} 00018 void cSetup::Store(const char *Name, const char *Value, const char *Plugin, bool AllowMultiple) {} 00019 bool cSetup::Save(void) { return true;} 00020 00021 cPlugin::cPlugin() {} 00022 cPlugin::~cPlugin() {} 00023 const char* cPlugin::CommandLineHelp() {return NULL;} 00024 bool cPlugin::ProcessArgs(int count, char**args) {return true;} 00025 bool cPlugin::Initialize(void) {return true;} 00026 bool cPlugin::Start(void) {return true;} 00027 void cPlugin::Stop(void) {} 00028 void cPlugin::Housekeeping(void) {} 00029 void cPlugin::MainThreadHook(void) {} 00030 cString cPlugin::Active(void) {return NULL;} 00031 time_t cPlugin::WakeupTime(void) {return 0;} 00032 const char *cPlugin::MainMenuEntry(void) {return NULL;} 00033 cOsdObject *cPlugin::MainMenuAction(void) {return NULL;} 00034 cMenuSetupPage *cPlugin::SetupMenu(void) {return NULL;} 00035 bool cPlugin::SetupParse(const char *Name, const char *Value) {return true;} 00036 void cPlugin::SetupStore(const char *Name, const char *Value) {} 00037 void cPlugin::SetupStore(const char *Name, int Value) {} 00038 void cPlugin::RegisterI18n(const tI18nPhrase * const Phrases){} 00039 bool cPlugin::Service(const char *Id, void *Data) {return true;} 00040 const char **cPlugin::SVDRPHelpPages(void) {return NULL;} 00041 cString cPlugin::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) {return NULL;} 00042 void cPlugin::SetConfigDirectory(const char *Dir) {} 00043 const char cPlugin::*ConfigDirectory(const char *PluginName) {return NULL;} 00044 00045 bool cInterface::Confirm(char const*, int, bool) {return true;} 00046 00047 //cDvbCiAdapter *cDvbCiAdapter::CreateCiAdapter(cDevice *Device, int Fd) {return NULL;} 00048 00049 cSkins::cSkins() {} 00050 cSkins::~cSkins() {} 00051 eKeys cSkins::Message(eMessageType, char const*, int) { return kNone;} 00052 void cSkins::Clear(void) {} 00053 00054 cChannels::cChannels() { 00055 } 00056 00057 void cStatus::MsgOsdCurrentItem(char const* c) {} 00058 00059 /* 00060 cCaDefinitions CaDefinitions; 00061 00062 const cCaDefinition *cCaDefinitions::Get(int Number) 00063 { 00064 cCaDefinition *p = First(); 00065 while (p) { 00066 if (p->Number() == Number) 00067 return p; 00068 p = (cCaDefinition *)p->Next(); 00069 } 00070 return NULL; 00071 } 00072 */ 00073 cSkins Skins; 00074 cChannels Channels; 00075 cInterface *Interface; 00076 00077 //const cCaDefinition *caDefinitions::Get(int Number) {return NULL;} 00078 00079 cString cSource::ToString(int Code) 00080 { 00081 char buffer[16]; 00082 char *q = buffer; 00083 switch (Code & st_Mask) { 00084 case stCable: *q++ = 'C'; break; 00085 case stSat: *q++ = 'S'; 00086 { 00087 int pos = Code & ~st_Mask; 00088 q += snprintf(q, sizeof(buffer) - 2, "%u.%u", (pos & ~st_Neg) / 10, (pos & ~st_Neg) % 10); // can't simply use "%g" here since the silly 'locale' messes up the decimal point 00089 *q++ = (Code & st_Neg) ? 'E' : 'W'; 00090 } 00091 break; 00092 case stTerr: *q++ = 'T'; break; 00093 default: *q++ = Code + '0'; // backward compatibility 00094 } 00095 *q = 0; 00096 return buffer; 00097 } 00098 00099 int cSource::FromString(const char *s) 00100 { 00101 int type = stNone; 00102 switch (toupper(*s)) { 00103 case 'C': type = stCable; break; 00104 case 'S': type = stSat; break; 00105 case 'T': type = stTerr; break; 00106 case '0' ... '9': type = *s - '0'; break; // backward compatibility 00107 default: esyslog("ERROR: unknown source key '%c'", *s); 00108 return stNone; 00109 } 00110 int code = type; 00111 if (type == stSat) { 00112 int pos = 0; 00113 bool dot = false; 00114 bool neg = false; 00115 while (*++s) { 00116 switch (toupper(*s)) { 00117 case '0' ... '9': pos *= 10; 00118 pos += *s - '0'; 00119 break; 00120 case '.': dot = true; 00121 break; 00122 case 'E': neg = true; // fall through to 'W' 00123 case 'W': if (!dot) 00124 pos *= 10; 00125 break; 00126 default: esyslog("ERROR: unknown source character '%c'", *s); 00127 return stNone; 00128 } 00129 } 00130 if (neg) 00131 pos |= st_Neg; 00132 code |= pos; 00133 } 00134 return code; 00135 } 00136 00137 00138 cMenuText::cMenuText(const char *Title, const char *Text, eDvbFont Font) 00139 :cOsdMenu(Title) 00140 { 00141 } 00142 00143 cMenuText::~cMenuText() 00144 { 00145 } 00146 00147 void cMenuText::SetText(char const *Text) 00148 { 00149 } 00150 00151 void cMenuText::Display(void) 00152 { 00153 } 00154 00155 eOSState cMenuText::ProcessKey(eKeys Key) 00156 { 00157 return osContinue; 00158 }