Author: dmeyer
Date: Thu Jan 26 19:31:23 2006
New Revision: 7877

Modified:
   trunk/core/src/ipc/tvserver.py

Log:
connect to mbus as module

Modified: trunk/core/src/ipc/tvserver.py
==============================================================================
--- trunk/core/src/ipc/tvserver.py      (original)
+++ trunk/core/src/ipc/tvserver.py      Thu Jan 26 19:31:23 2006
@@ -31,7 +31,7 @@
 # -----------------------------------------------------------------------------
 
 __all__ = [ 'MISSED', 'SAVED', 'SCHEDULED', 'RECORDING', 'CONFLICT', 'DELETED',
-            'FAILED', 'recordings', 'favorites' ]
+            'FAILED' ]
 
 # python imports
 import sys
@@ -44,9 +44,6 @@
 import kaa.epg
 import kaa.notifier
 
-# freevo core imports
-import freevo.ipc
-
 # get logging object
 log = logging.getLogger('record')
 
@@ -117,15 +114,15 @@
     Handling of recordings from the recordserver. The object will auto sync
     with the recordserver to keep the list up to date.
     """
-    def __init__(self):
+    def __init__(self, instance):
         self.last_update = time.time()
         self.__recordings = {}
         self.server = None
 
-        mbus = freevo.ipc.Instance()
-        mbus.signals['new-entity'].connect(self.new_entity)
-        mbus.signals['lost-entity'].connect(self.lost_entity)
-        
mbus.events['home-theatre.record.list.update'].connect(self.list_update_cb)
+        instance.signals['new-entity'].connect(self.new_entity)
+        instance.signals['lost-entity'].connect(self.lost_entity)
+        
instance.events['home-theatre.record.list.update'].connect(self.list_update_cb)
+
         self.comingup = ''
         self.running = ''
         self.updating = 0
@@ -311,13 +308,13 @@
     Handling of favorites from the recordserver. The object will auto sync with
     the recordserver to keep the list up to date.
     """
-    def __init__(self):
+    def __init__(self, instance):
         self.last_update = time.time()
         self.__favorites = []
         self.server = None
-        mbus = freevo.ipc.Instance()
-        mbus.signals['new-entity'].connect(self.new_entity)
-        mbus.signals['lost-entity'].connect(self.lost_entity)
+
+        instance.signals['new-entity'].connect(self.new_entity)
+        instance.signals['lost-entity'].connect(self.lost_entity)
 
 
     def new_entity(self, entity):
@@ -386,7 +383,11 @@
     def update(self):
         r = self.rpc('home-theatre.favorite.update', None)
         r.call()
-        
-# the two objects handling recordings and favorites
-recordings = Recordings()
-favorites  = Favorites()
+
+
+def ipc_connect(instance):
+    # the two objects handling recordings and favorites
+    return 'tvserver', dict(
+        recordings = Recordings(instance),
+        favorites  = Favorites(instance))
+


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to