Пример #1
0
 def __createresponse(self, resp):
     headers = resp[1]
     for hid, value in headers.items():
         if hid == 0x44:
             headers[hid] = _obexcommon._datetimefromstring(value[:])
         elif hid == 0xC4:
             headers[hid] = datetime.datetime.fromtimestamp(value)
         elif type(value) == buffer:
             headers[hid] = value[:]
     return _obexcommon.OBEXResponse(resp[0], headers)
Пример #2
0
 def __getresponse(self):
     code = self.__response.responseCode()
     rawheaders = _headersettodict(self.__response.allHeaders())
     return _obexcommon.OBEXResponse(_cutresponsefinalbit(code), rawheaders)