X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d0899514fa9495013cb73c8ead8c5a5baaf49111..5a00da9dd62f3f51c50287d218374ad18e49761a:/lib/service/service.cpp diff --git a/lib/service/service.cpp b/lib/service/service.cpp index 3a59d444..a490c3d7 100644 --- a/lib/service/service.cpp +++ b/lib/service/service.cpp @@ -7,8 +7,8 @@ eServiceReference::eServiceReference(const std::string &string) { const char *c=string.c_str(); - int pathl=-1; - + int pathl=0; + if ( sscanf(c, "%d:%d:%x:%x:%x:%x:%x:%x:%x:%x:%n", &type, &flags, &data[0], &data[1], &data[2], &data[3], &data[4], &data[5], &data[6], &data[7], &pathl) < 8 ) { memset( data, 0, sizeof(data) ); @@ -17,7 +17,19 @@ eServiceReference::eServiceReference(const std::string &string) } if (pathl) - path=c+pathl; + { + const char *pathstr = c+pathl; + const char *namestr = strchr(pathstr, ':'); + if (namestr) + { + if (pathstr != namestr) + path.assign(pathstr, namestr-pathstr); + if (*(namestr+1)) + name=namestr+1; + } + else + path=pathstr; + } } std::string eServiceReference::toString() const @@ -27,10 +39,10 @@ std::string eServiceReference::toString() const ret += ":"; ret += getNum(flags); for (unsigned int i=0; i +RESULT iStaticServiceInformation::getEvent(const eServiceReference &ref, ePtr &evt, time_t start_time) +{ + evt = 0; + return -1; +} + +int iStaticServiceInformation::getLength(const eServiceReference &ref) +{ + return -1; +} + +bool iStaticServiceInformation::isPlayable(const eServiceReference &ref, const eServiceReference &ignore) +{ + return true; +} + RESULT iServiceInformation::getEvent(ePtr &evt, int m_nownext) -{ +{ evt = 0; return -1; } +int iStaticServiceInformation::getInfo(const eServiceReference &ref, int w) +{ + return -1; +} + +std::string iStaticServiceInformation::getInfoString(const eServiceReference &ref, int w) +{ + return ""; +} + +int iServiceInformation::getInfo(int w) +{ + return -1; +} + +std::string iServiceInformation::getInfoString(int w) +{ + return ""; +} eAutoInitPtr init_eServiceCenter(eAutoInitNumbers::service, "eServiceCenter");