예제 #1
0
 def run(self):
     transport = jt_transport2.getTransport(self.cfg.getJoggerAddress(),
         self.cfg.getJabberServer(), self.cfg.getJabberUser(),
         self.cfg.getJabberPasswd())
     self.queue.put_nowait(Event(10001))
     transport.send(self.message)
     self.receiver.data.writeMessage(self.message)
     del self.locks[self.locks.index(self.message['msgid'])]
     event = Event(10000)
     event.setData(transport.message)
     self.queue.put_nowait(event)
     self.status = transport.status
     transport.close()
예제 #2
0
 def run(self):
     if not self.mutex.tryLock():
         raise IOError, qApp.translate('Misc', 
             'Already sending this message.', None)
         return
     if not self.stopped:
         transport = jt_transport.getTransport(self.cfg.getJoggerAddress(),
             self.cfg.getJabberServer(), self.cfg.getJabberUser(),
             self.cfg.getJabberPasswd())
         event = QCustomEvent(10001)
         QThread.postEvent(self.receiver, event)
         transport.send(self.message)
         self.receiver.data.writeMessage(self.message)
         self.mutex.unlock()
         event = QCustomEvent(10000)
         event.setData(transport.message)
         QThread.postEvent(self.receiver, event)
         self.status = transport.status
         transport.close()
예제 #3
0
 def run(self):
     if not self.mutex.tryLock():
         raise IOError, qApp.translate('Misc',
                                       'Already sending this message.',
                                       None)
         return
     if not self.stopped:
         transport = jt_transport.getTransport(self.cfg.getJoggerAddress(),
                                               self.cfg.getJabberServer(),
                                               self.cfg.getJabberUser(),
                                               self.cfg.getJabberPasswd())
         event = QCustomEvent(10001)
         QThread.postEvent(self.receiver, event)
         transport.send(self.message)
         self.receiver.data.writeMessage(self.message)
         self.mutex.unlock()
         event = QCustomEvent(10000)
         event.setData(transport.message)
         QThread.postEvent(self.receiver, event)
         self.status = transport.status
         transport.close()