more pid cache stuff
[enigma2.git] / lib / service / iservice.h
index f699bdb91853eff51fda94c7452726198e67090d..7e24f9c10503a40c26f2dc7762558334b29c3d1d 100644 (file)
@@ -6,14 +6,6 @@
 #include <connection.h>
 #include <list>
 
-#ifdef SWIG
-#define TEMPLATE_TYPEDEF(x, y) \
-%template(y) x; \
-typedef x y
-#else
-#define TEMPLATE_TYPEDEF(x, y) typedef x y
-#endif
-
 class eServiceReference
 {
 public:
@@ -151,15 +143,21 @@ class iStaticServiceInformation: public iObject
 {
 public:
        virtual RESULT getName(const eServiceReference &ref, std::string &name)=0;
+
+               // FOR SWIG
+       std::string getName(const eServiceReference &ref) { std::string temp; getName(ref, temp); return temp; }
 };
 
 TEMPLATE_TYPEDEF(ePtr<iStaticServiceInformation>, iStaticServiceInformationPtr);
 
 class eServiceEvent;
 
-class iServiceInformation: public iStaticServiceInformation
+class iServiceInformation: public iObject
 {
 public:
+       virtual RESULT getName(std::string &name)=0;
+               // FOR SWIG
+       std::string getName() { std::string temp; getName(temp); return temp; }
        virtual RESULT getEvent(ePtr<eServiceEvent> &evt, int nownext);
 };
 
@@ -184,7 +182,7 @@ public:
                evEnd,
                
                // when iServiceInformation is implemented:
-               evNewEvent
+               evUpdatedEventInfo
        };
        virtual RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection)=0;
        virtual RESULT start()=0;
@@ -198,6 +196,7 @@ TEMPLATE_TYPEDEF(ePtr<iPlayableService>, iPlayableServicePtr);
 class iRecordableService: public iObject
 {
 public:
+       virtual RESULT prepare()=0;
        virtual RESULT start()=0;
        virtual RESULT stop()=0;
 };
@@ -209,7 +208,11 @@ TEMPLATE_TYPEDEF(ePtr<iRecordableService>, iRecordableServicePtr);
 class iListableService: public iObject
 {
 public:
+               /* legacy interface: get a list */
        virtual RESULT getContent(std::list<eServiceReference> &list)=0;
+       
+               /* new, shiny interface: streaming. */
+       virtual RESULT getNext(eServiceReference &ptr)=0;
 };
 
 TEMPLATE_TYPEDEF(ePtr<iListableService>, iListableServicePtr);