Exemplo n.º 1
0
 def server_didHandlePutRequestForStream_requestWasAborted_(self, server,
         stream, aborted):
     if aborted:
         self.__error = (_kOBEXGeneralError, "client aborted file transfer")
     else:
         self.__gotfile = True
     _macutil.interruptwait()
Exemplo n.º 2
0
 def server_didHandlePutRequestForStream_requestWasAborted_(
         self, server, stream, aborted):
     if aborted:
         self.__error = (_kOBEXGeneralError, "client aborted file transfer")
     else:
         self.__gotfile = True
     _macutil.interruptwait()
Exemplo n.º 3
0
 def _finishedrequest(self, error, response):
     if error in (_kOBEXSessionNoTransportError,
                  _kOBEXSessionTransportDiedError):
         self.__closetransport()
     self.__error = error
     self.__response = response
     self.__busy = False
     _macutil.interruptwait()
Exemplo n.º 4
0
 def _finishedrequest(self, error, response):
     if error in (_kOBEXSessionNoTransportError,
                  _kOBEXSessionTransportDiedError):
         self.__closetransport()
     self.__error = error
     self.__response = response
     self.__busy = False
     _macutil.interruptwait()
 def _handle_channelopened(self, channel):
     # put new channels into a queue, which 'accept' can then pull out
     self.__queuedchannels_lock.acquire()
     try:
         # need to implement max connections
         #if len(self.__queuedchannels) < self.__maxqueuedconns:
         self.__queuedchannels.append(channel)
         _macutil.interruptwait()
     finally:
         self.__queuedchannels_lock.release()
Exemplo n.º 6
0
 def _handle_channelopened(self, channel):
     # put new channels into a queue, which 'accept' can then pull out
     self.__queuedchannels_lock.acquire()
     try:
         # need to implement max connections
         #if len(self.__queuedchannels) < self.__maxqueuedconns:
         self.__queuedchannels.append(channel)
         _macutil.interruptwait()
     finally:
         self.__queuedchannels_lock.release()
Exemplo n.º 7
0
 def server_errorOccurred_description_(self, server, error, desc):
     self.__error = (error, desc)
     _macutil.interruptwait()
Exemplo n.º 8
0
 def server_shouldHandleDisconnectRequest_(self, server, requestheaders):
     self.__gotdisconnect = True
     _macutil.interruptwait()
     return True
Exemplo n.º 9
0
 def serverDidHandleDisconnectRequest_(self, server):
     self.__disconnected = True
     _macutil.interruptwait()
Exemplo n.º 10
0
 def devicePairingFinished_error_(self, sender, error):
     if error:
         print "devicePairingFinished_error_: %lu" % error
         self.error = error
     _macutil.interruptwait()
Exemplo n.º 11
0
 def _handle_channelclosed(self, channel):
     # beware that this value won't actually be set until the event loop
     # has been driven so that this method is actually called
     self.__closed = True
     _macutil.interruptwait()
Exemplo n.º 12
0
 def _handle_channeldata(self, channel, data):
     self.__incomingdata.write(data)
     _macutil.interruptwait()
Exemplo n.º 13
0
 def _handle_channeldata(self, channel, data):
     self.__incomingdata.write(data)
     _macutil.interruptwait()
Exemplo n.º 14
0
 def devicePairingUserPasskeyNotification_passkey_(self, sender, passkey):
     self.pairResult = passkey
     print "devicePairingUserPasskeyNotification_passkey_: %lu" % passkey
     _macutil.interruptwait()
Exemplo n.º 15
0
 def sdpQueryComplete_status_(self, device, status):
     # can't raise exception during a callback, so just keep the err value
     self._queryresult = status
     _macutil.interruptwait()
Exemplo n.º 16
0
 def server_errorOccurred_description_(self, server, error, desc):
     self.__error = (error, desc)
     _macutil.interruptwait()
Exemplo n.º 17
0
# Copyright (c) 2009 Bea Lam. All rights reserved.
Exemplo n.º 18
0
 def serverDidHandleDisconnectRequest_(self, server):
     self.__disconnected = True
     _macutil.interruptwait()
Exemplo n.º 19
0
 def server_shouldHandleDisconnectRequest_(self, server, requestheaders):
     self.__gotdisconnect = True    
     _macutil.interruptwait()
     return True
Exemplo n.º 20
0
# Copyright (c) 2009 Bea Lam. All rights reserved.
Exemplo n.º 21
0
 def devicePairingUserConfirmationRequest_numericValue_(self, sender, numericValue):
     print "devicePairingUserConfirmationRequest_numericValue_: %lu" % numericValue
     if self.pair:
         self.pair.replyUserConfirmation_(True)
     self.pairResult = numericValue
     _macutil.interruptwait()
Exemplo n.º 22
0
 def sdpQueryComplete_status_(self, device, status):
     # can't raise exception during a callback, so just keep the err value
     self._queryresult = status
     _macutil.interruptwait()
Exemplo n.º 23
0
 def devicePairingFinished_error_(self, sender, error):
     if error:
         print "devicePairingFinished_error_: %lu" % error
         self.error = error
     _macutil.interruptwait()
Exemplo n.º 24
0
 def _inquirycomplete(self, err, aborted):
     if err != 188:      # no devices found
         self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()
Exemplo n.º 25
0
 def _inquirycomplete(self, err, aborted):
     if err != 188:      # no devices found
         self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()
Exemplo n.º 26
0
 def devicePairingUserConfirmationRequest_numericValue_(self, sender, numericValue):
     print "devicePairingUserConfirmationRequest_numericValue_: %lu" % numericValue
     if self.pair:
         self.pair.replyUserConfirmation_(True)
     self.pairResult = numericValue
     _macutil.interruptwait()
Exemplo n.º 27
0
 def devicePairingUserPasskeyNotification_passkey_(self, sender, passkey):
     self.pairResult = passkey
     print "devicePairingUserPasskeyNotification_passkey_: %lu" % passkey
     _macutil.interruptwait()
Exemplo n.º 28
0
 def _inquirycomplete(self, err, aborted): 
     self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()