示例#1
0
    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
示例#2
0
 def test_testSite(self):
     hostname = 'http://mml03.test.mediamatic.nl/'
     self.assertEquals(JID('mml03.test.mediamatic.nl'),
                       xmpp.getPubSubService(hostname))
示例#3
0
 def test_mdnsLocal(self):
     hostname = 'http://dwaal.local/'
     self.assertEquals(JID('dwaal.local'),
                       xmpp.getPubSubService(hostname))
示例#4
0
 def test_withWWW(self):
     hostname = 'http://www.mediamatic.nl/'
     self.assertEquals(JID('pubsub.mediamatic.nl'),
                       xmpp.getPubSubService(hostname))
示例#5
0
 def getNode(self):
     if self.site is not None:
         return (getPubSubService(self.site.uri), u'activity')
示例#6
0
 def getNode(self):
     if self.race is not None:
         return (getPubSubService(self.race.uri), unicode('race/' + getThingID(self.race.uri)))
示例#7
0
 def getNode(self):
     if self.event is not None:
         return (getPubSubService(self.event.uri), unicode('regdesk/by_event/' + getThingID(self.event.uri)))
示例#8
0
 def getNode(self):
     if self.site is not None:
         return (getPubSubService(self.site.uri), u'status')
示例#9
0
 def getNode(self):
     if self.question is not None:
         return (getPubSubService(self.question.uri), unicode('vote/' + getThingID(self.question.uri)))
示例#10
0
 def getNode(self):
     if self.agent is not None:
         return (getPubSubService(self.agent.uri), u'activity')