Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/recordtube.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-24 21:22:38 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-24 21:22:38 (GMT)
commit6ca3952d853a738b53dc24a270ff598e98767364 (patch)
tree4f3ca59bd01cbbf80b40fcc0a520029fea895082 /recordtube.py
parent85a00079f8b3e2aa1783a5121023523b5eb51919 (diff)
ready for testing sending of xml from xo to xo!
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@721 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'recordtube.py')
-rw-r--r--recordtube.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/recordtube.py b/recordtube.py
index f9cf76a..694fa43 100644
--- a/recordtube.py
+++ b/recordtube.py
@@ -1,8 +1,9 @@
#todo: access these same vars from ra
SERVICE = "org.laptop.RecordActivity"
-IFACE = RecordActivity.SERVICE
+IFACE = SERVICE
PATH = "/org/laptop/RecordActivity"
+import gobject
from dbus import Interface
from dbus.service import method, signal
from dbus.gobject_service import ExportedGObject
@@ -19,7 +20,7 @@ class RecordTube(ExportedGObject):
def __init__(self, tube, get_buddy, myHashKey, logger):
- super(HelloTube, self).__init__(tube, PATH)
+ super(RecordTube, self).__init__(tube, PATH)
self.tube = tube
self._get_buddy = get_buddy # Converts handle to Buddy object
self.myHashKey = myHashKey
@@ -34,22 +35,14 @@ class RecordTube(ExportedGObject):
self._logger.debug('Ive taken a new photo!')
- def _newRecdCb(self, borrower, lender, sender=None):
- """Somebody Hello'd me. I should share with them my pdf. i hope they like to read bookz!"""
- self._logger.debug("hello_cb from " + borrower + " for " + sender )
+ def _newRecdCb(self, recorder, recdXml, sender=None):
+ self._logger.debug("_newRecdCb from " + recorder )
if sender == self.tube.get_unique_name():
self._logger.debug("sender is my bus name, so ignore my own signal")
return
- elif (borrower == self.myHashKey):
+ elif (recorder == self.myHashKey):
self._logger.debug('excuse me? you are asking me to share this with myself?')
return
- elif (self.thePdfPath == None):
- self._logger.debug('i dont have the pdf. there has been a mistake')
- return
- elif (lender != self.myHashKey):
- self._logger.debug('i do indeed have this pdf, but ive only overheard you asking someone else for it')
- return
- #you should not be here if you don't have the pdf.
- self._logger.debug("ya, i have that pdf, thanks for asking! here it is!")
- self.send_file( self.thePdfPath, borrower, lender ) \ No newline at end of file
+ print("here is the xml:", recdXml)
+ self.emit( "new-recd", recorder, recdXml) \ No newline at end of file