Beispiel #1
0
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = MediaMessageProtocolEntity
     entity.setMediaType(node.getChild("media").getAttributeValue("type"))
     preview = node.getChild("media").getData()
     entity.setPreview(preview)
     return entity
Beispiel #2
0
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = EncryptedMessageProtocolEntity
     encNode = node.getChild("enc")
     entity.setEncProps(encNode["type"], encNode["v"],
                        encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)
     return entity
Beispiel #3
0
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = EncryptedMessageProtocolEntity
     entity.setEncEntities(
         [EncProtocolEntity.fromProtocolTreeNode(encNode) for encNode in node.getAllChildren("enc")]
     )
     return entity
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = MediaMessageProtocolEntity
     entity.setMediaType(node.getChild("media").getAttributeValue("type"))
     preview = node.getChild("media").getData()
     entity.setPreview(preview)
     return entity
Beispiel #5
0
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = EncryptedMessageProtocolEntity
     encNode = node.getChild("enc")
     entity.setEncProps(encNode["type"], encNode["v"],
                        encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)
     return entity
Beispiel #6
0
 def fromProtocolTreeNode(node):
     entity = MessageProtocolEntity.fromProtocolTreeNode(node)
     entity.__class__ = EncryptedMessageProtocolEntity
     entity.setEncEntities([
         EncProtocolEntity.fromProtocolTreeNode(encNode)
         for encNode in node.getAllChildren("enc")
     ])
     return entity