Example #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()
Example #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()
Example #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()
Example #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()
 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()
Example #7
0
 def server_errorOccurred_description_(self, server, error, desc):
     self.__error = (error, desc)
     _macutil.interruptwait()
Example #8
0
 def server_shouldHandleDisconnectRequest_(self, server, requestheaders):
     self.__gotdisconnect = True
     _macutil.interruptwait()
     return True
Example #9
0
 def serverDidHandleDisconnectRequest_(self, server):
     self.__disconnected = True
     _macutil.interruptwait()
Example #10
0
 def devicePairingFinished_error_(self, sender, error):
     if error:
         print "devicePairingFinished_error_: %lu" % error
         self.error = error
     _macutil.interruptwait()
 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()
 def _handle_channeldata(self, channel, data):
     self.__incomingdata.write(data)
     _macutil.interruptwait()
 def _handle_channeldata(self, channel, data):
     self.__incomingdata.write(data)
     _macutil.interruptwait()
 def devicePairingUserPasskeyNotification_passkey_(self, sender, passkey):
     self.pairResult = passkey
     print "devicePairingUserPasskeyNotification_passkey_: %lu" % passkey
     _macutil.interruptwait()
 def sdpQueryComplete_status_(self, device, status):
     # can't raise exception during a callback, so just keep the err value
     self._queryresult = status
     _macutil.interruptwait()
Example #16
0
 def server_errorOccurred_description_(self, server, error, desc):
     self.__error = (error, desc)
     _macutil.interruptwait()
# Copyright (c) 2009 Bea Lam. All rights reserved.
Example #18
0
 def serverDidHandleDisconnectRequest_(self, server):
     self.__disconnected = True
     _macutil.interruptwait()
Example #19
0
 def server_shouldHandleDisconnectRequest_(self, server, requestheaders):
     self.__gotdisconnect = True    
     _macutil.interruptwait()
     return True
# Copyright (c) 2009 Bea Lam. All rights reserved.
 def devicePairingUserConfirmationRequest_numericValue_(self, sender, numericValue):
     print "devicePairingUserConfirmationRequest_numericValue_: %lu" % numericValue
     if self.pair:
         self.pair.replyUserConfirmation_(True)
     self.pairResult = numericValue
     _macutil.interruptwait()
Example #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()
 def devicePairingFinished_error_(self, sender, error):
     if error:
         print "devicePairingFinished_error_: %lu" % error
         self.error = error
     _macutil.interruptwait()
Example #24
0
 def _inquirycomplete(self, err, aborted):
     if err != 188:      # no devices found
         self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()
 def _inquirycomplete(self, err, aborted):
     if err != 188:      # no devices found
         self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()
Example #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()
Example #27
0
 def devicePairingUserPasskeyNotification_passkey_(self, sender, passkey):
     self.pairResult = passkey
     print "devicePairingUserPasskeyNotification_passkey_: %lu" % passkey
     _macutil.interruptwait()
Example #28
0
 def _inquirycomplete(self, err, aborted): 
     self._inquiryerr = err
     self._inquiring = False
     _macutil.interruptwait()