Example #1
0
 def parseTag(self, pyGlooxTag):
     jid = pyGlooxTag.findAttribute('jid')
     if jid:
         jid = ContactJID(jid)
     else:
         jid = None
     info = self._getChildData(pyGlooxTag, 0, WgSharedExtension.getDefaultData())
     return (jid, info)
Example #2
0
 def parseTag(self, pyGlooxTag):
     dbId, nickname, _ = super(UserSearchItemExtension, self).parseTag(pyGlooxTag)
     info = self._getChildData(pyGlooxTag, 1, WgSharedExtension.getDefaultData())
     if 'clanInfo' in info:
         clanInfo = info['clanInfo']
     else:
         clanInfo = None
     return XmppUserSearchInfo(dbId, nickname, clanInfo)
Example #3
0
 def parseTag(self, pyGlooxTag):
     dbId, nickname, _ = super(UserSearchItemExtension, self).parseTag(pyGlooxTag)
     info = self._getChildData(pyGlooxTag, 1, WgSharedExtension.getDefaultData())
     if 'clanInfo' in info:
         clanInfo = info['clanInfo']
     else:
         clanInfo = None
     return XmppUserSearchInfo(dbId, nickname, clanInfo)
Example #4
0
 def parseTag(self, pyGlooxTag):
     jid = pyGlooxTag.findAttribute('jid')
     if jid:
         jid = ContactJID(jid)
     else:
         jid = None
     info = self._getChildData(pyGlooxTag, 0, WgSharedExtension.getDefaultData())
     return (jid, info)
Example #5
0
 def parseTag(self, pyGlooxTag):
     message = ChatMessage()
     message.state = self._getChildData(pyGlooxTag, 0, ChatStateExtension.getDefaultData())
     info = self._getChildData(pyGlooxTag, 1, WgSharedExtension.getDefaultData())
     if info:
         message.accountDBID = info['dbID']
         message.accountName = info['name']
     message.sentAt = self._getChildData(pyGlooxTag, 2, DelayExtension.getDefaultData())
     message.uuid = self._getChildData(pyGlooxTag, 3, MessageIDExtension.getDefaultData())
     message.requestID, message.isFinalInHistory = self._getChildData(pyGlooxTag, 4, PrivateHistoryItem.getDefaultData())
     return message
Example #6
0
 def parseTag(self, pyGlooxTag):
     message = ChatMessage()
     message.state = self._getChildData(pyGlooxTag, 0,
                                        ChatStateExtension.getDefaultData())
     info = self._getChildData(pyGlooxTag, 1,
                               WgSharedExtension.getDefaultData())
     if info:
         message.accountDBID = info['dbID']
         message.accountName = info['name']
     message.sentAt = self._getChildData(pyGlooxTag, 2,
                                         DelayExtension.getDefaultData())
     message.uuid = self._getChildData(pyGlooxTag, 3,
                                       MessageIDExtension.getDefaultData())
     message.requestID, message.isFinalInHistory = self._getChildData(
         pyGlooxTag, 4, PrivateHistoryItem.getDefaultData())
     return message
Example #7
0
 def getDefaultData(cls):
     return (SpaResolverItem.getDefaultData(), WgSharedExtension.getDefaultData())
 def parseTag(self, pyGlooxTag):
     info = self._getChildData(pyGlooxTag, 0,
                               WgSharedExtension.getDefaultData())
     return info
 def getDefaultData(cls):
     return WgSharedExtension.getDefaultData()
Example #10
0
 def getDefaultData(cls):
     return (None, WgSharedExtension.getDefaultData())
Example #11
0
 def parseTag(self, pyGlooxTag):
     info = self._getChildData(pyGlooxTag, 0, WgSharedExtension.getDefaultData())
     return info
Example #12
0
 def parseTag(self, pyGlooxTag):
     info = self._getChildData(pyGlooxTag, 0, WgSharedExtension.getDefaultData())
     state = self._getChildData(pyGlooxTag, 1, ChatStateExtension.getDefaultData())
     sentAt = self._getChildData(pyGlooxTag, 2, time.time())
     return (state, info, sentAt)
Example #13
0
 def getDefaultData(cls):
     return (SpaResolverItem.getDefaultData(), WgSharedExtension.getDefaultData())