def __init__(self, msgType, state=CHAT_STATE.UNDEFINED): super(_MessageCustomExtension, self).__init__(_TAG.MESSAGE) self.setAttribute('type', msgType) self.setChild(ChatStateExtension(state)) self.setChild(WgSharedExtension(False)) self.setChild(DelayExtension()) self.setChild(MessageIDExtension()) self.setChild(PrivateHistoryItem())
def __init__(self): super(UserSearchItemExtension, self).__init__(_TAG.ITEM) self.setChild(WgSharedExtension())
def __init__(self): super(CreatedByElement, self).__init__(_TAG.CREATED_BY) self.setXmlNs(_NS.WG_DISCO_ITEMS) self.setChild(WgSharedExtension())
def __init__(self, jid=None): super(ContactItemExtension, self).__init__(_TAG.ITEM) if jid: self.setAttribute('jid', str(jid)) self.setChild(WgSharedExtension())