def getNode(self): nodeIdentifier = 'ikcam/' if self.creator: service = getPubSubService(self.creator.uri) nodeIdentifier += getThingID(self.creator.uri) elif self.event: service = getPubSubService(self.event.uri) nodeIdentifier += 'by_event/' + getThingID(self.event.uri) else: return None return service, nodeIdentifier
def test_testSite(self): hostname = 'http://mml03.test.mediamatic.nl/' self.assertEquals(JID('mml03.test.mediamatic.nl'), xmpp.getPubSubService(hostname))
def test_mdnsLocal(self): hostname = 'http://dwaal.local/' self.assertEquals(JID('dwaal.local'), xmpp.getPubSubService(hostname))
def test_withWWW(self): hostname = 'http://www.mediamatic.nl/' self.assertEquals(JID('pubsub.mediamatic.nl'), xmpp.getPubSubService(hostname))
def getNode(self): if self.site is not None: return (getPubSubService(self.site.uri), u'activity')
def getNode(self): if self.race is not None: return (getPubSubService(self.race.uri), unicode('race/' + getThingID(self.race.uri)))
def getNode(self): if self.event is not None: return (getPubSubService(self.event.uri), unicode('regdesk/by_event/' + getThingID(self.event.uri)))
def getNode(self): if self.site is not None: return (getPubSubService(self.site.uri), u'status')
def getNode(self): if self.question is not None: return (getPubSubService(self.question.uri), unicode('vote/' + getThingID(self.question.uri)))
def getNode(self): if self.agent is not None: return (getPubSubService(self.agent.uri), u'activity')