changeset cecb094f42f3 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=cecb094f42f3 description: refactoring
diffstat:
src/common/jingle_transport.py | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-)
diffs (73 lines):
diff -r ad00da030d2b -r cecb094f42f3 src/common/jingle_transport.py --- a/src/common/jingle_transport.py Fri Nov 18 18:21:34 2011 -0500 +++ b/src/common/jingle_transport.py Thu Dec 22 20:12:11 2011 -0500 @@ -59,6 +59,8 @@ Build a candidate stanza for the given candidate """ pass + +
def make_transport(self, candidates=None): """ @@ -77,6 +79,20 @@ Return the list of transport candidates from a transport stanza """ return [] + + def set_connection(self, conn): + self.connection = conn + if not self.sid: + self.sid = self.connection.connection.getAnID() + + def set_file_props(self, file_props): + self.file_props = file_props + + def set_our_jid(self, jid): + self.ourjid = jid + + def set_sid(self, sid): + self.sid = sid
class JingleTransportSocks5(JingleTransport): """ @@ -91,16 +107,6 @@ if node and node.getAttr('sid'): self.sid = node.getAttr('sid')
- def set_file_props(self, file_props): - self.file_props = file_props - - def set_our_jid(self, jid): - self.ourjid = jid - - def set_connection(self, conn): - self.connection = conn - if not self.sid: - self.sid = self.connection.connection.getAnID()
def make_candidate(self, candidate): import logging @@ -309,9 +315,6 @@ self.sid = node.getAttr('sid')
- def set_sid(self, sid): - self.sid = sid - def make_transport(self):
transport = xmpp.Node('transport') @@ -319,11 +322,7 @@ transport.setAttr('block-size', self.block_sz) transport.setAttr('sid', self.sid) return transport - - def set_file_props(self, file_props): - self.file_props = file_props - - + import farsight
class JingleTransportICEUDP(JingleTransport):