Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(103)  |  Call(103)  |  Derive(0)  |  Import(0)

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x04.py   digsby(Download)
              ('unknown', 'H'))
    info = oscar.unpack(format, data)
    assert not info[-1] # leftover data
                   ('channel',      'H'),
                   ('userinfo', 'userinfo'))
    info = oscar.unpack(snac_format, data)
    channel = info[1]
    # There are more TLVs, but they depend on the channels
           ('new_val', 'H'))
    incr_val, new_val, data = oscar.unpack(fmt, data)
    print 'yay warn', incr_val, new_val
    assert not data
    infolist = []
    while data:
        chan, info, num_missed, reason, data = oscar.unpack(fmt, data)
        log.warning('could not deliver %d ch%d messages, %r, %r' % \
                    (num_missed, chan, info, reasons.get(reason, 'unknown')))
               3: 'Channel specific'}
    cookie, channel, screenname, reason, data = oscar.unpack(fmt, data)
    warn("ch%d message error for cookie %r, screenname %s:", channel, cookie, screenname)

src/d/i/digsby-HEAD/digsby/src/oscar/rendezvous/icqrelay.py   digsby(Download)
        # chunk1 and 2 don't seem to have any useful information.
        # XXX: Not sure if the number of chunks is always the same or not
        _, chunk1, _, chunk2, data = oscar.unpack(fmt, data, byte_order='<')
        fmt = ( ('type',     'B'),
        type,flags,status,priority,_,message,data = oscar.unpack(fmt, data, byte_order='<')
        if message:
            _, _, _, request, phase, _, _, _, response, _, content_type, data = oscar.unpack(fmt, data, byte_order = '<')
            log.info('request = %r, phase = %r, response = %r, encoding = %r, data = %r', request, phase, response, content_type, data)
        except Exception:

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x15.py   digsby(Download)
    fmt = zip(fmt[::2],fmt[1::2])
    sz, uid, reqtype, reqid, data = oscar.unpack(fmt, data, '<')
    assert len(data) == (sz - 8)
    fmt = zip(fmt[::2],fmt[1::2])
    sender, year, month, day, hour, minute, mtype, mflags, mlength, message = oscar.unpack(fmt, data, '<')
def icq_srv_07da(o, uid, data):
    kind, result, data = oscar.unpack((('kind','H'),('result','B')), data, '<')
        f = getattr(oscar.snac, 'icq_srv_07da_%04x' % kind)
    except Exception:
    fmt = (('tlvs', 'named_tlvs', -1, tlv_types),)
    tlvs, data = oscar.unpack(fmt, data)
    unknown_tlvs = {}
def _extract_address_info(data, tlv_names):
    fmt = (('tlvs', 'named_tlvs', -1, tlv_names),)
    tlvs, data = oscar.unpack(fmt, data)
    for k in tlvs:

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x01.py   digsby(Download)
    snac_format = (('families', 'list', 'H'),)
    families, data = oscar.unpack(snac_format, data)
    assert not data
    return families
    format = (('tlvs', 'named_tlvs', -1, tlv_types),)
    tlvs, data = oscar.unpack(format, data)
    id, addr, cookie = tlvs.service_id, tlvs.server_addr, tlvs.cookie
    (id,) = struct.unpack('!H', id)
    rate_classes,  \
    rate_groups,   \
    data = oscar.unpack(snac_format, data)
    log.info('Received %d rate classes, %d rate groups',
             len(rate_classes), len(rate_groups))
    reference: U{http://iserverd.khstu.ru/oscar/snac_01_09.html}
    rate_classes = oscar.unpack((('rate_classes', 'list', 'H'),), data)
    with sock.rate_lock:
        for (id, index) in ((rc.id, sock.rate_classes.index(rc)) for rc in sock.rate_classes):
                  0x0004: 'Rate limit clear (current level become > clear level)',}
    msg, data = oscar.unpack((('msg','H'),), data)
    log.warning(rate_codes.get(msg, 'Unknown rate message %r' % msg))

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x09.py   digsby(Download)
    format = (('tlvs', 'tlv_dict'),)
    tlvs, data = oscar.unpack(format, data)
    assert not data
    reference: U{http://iserverd.khstu.ru/oscar/snac_09_09.html}
    errcode, data = oscar.unpack((('_', 'H'),), data)
    if data:
        fmt = (('tlvs', 'tlv_dict'),)
        tlvs, data = oscar.unpack(fmt, data)
        assert not data
        subcode, tlvs[8] = oscar.unpack((('code', 'H'),),tlvs[8])
        errmsg = tlvs[4]

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x07.py   digsby(Download)
    write = 2
    flags, __, tlvs, data = oscar.unpack(fmt, data)
    assert not data
    error, data = oscar.unpack((('code', 'H'),), data)
    if data:
        tlv, data = oscar.unpack((('tlv', 'tlv'),), data)
        fmt = (('tlvs', 'tlv_dict'),)
        tlvs, data = oscar.unpack(fmt, data)
        assert not data
        subcode, tlvs[8] = oscar.unpack((('code', 'H'),),tlvs[8])

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x02.py   digsby(Download)
           ('_2', 'named_tlvs', -1, tlv_types))
    userinfo, tlvs, data = oscar.unpack(fmt, data)
    # Decode profile and away message.
    reference: U{http://iserverd.khstu.ru/oscar/snac_02_0a.html}
    teh_win, data = oscar.unpack((('result','H'),), data)
    assert not data
    reference: U{http://iserverd.khstu.ru/oscar/snac_02_10.html}
    teh_win, data = oscar.unpack((('result','H'),), data)
    assert not data

src/d/i/digsby-HEAD/digsby/src/oscar/snac/family_x13.py   digsby(Download)
    reference: U{http://iserverd.khstu.ru/oscar/snac_13_03.html}
    tlvs, data = oscar.unpack((('tlvs','tlv_dict'),), data)
    return tlvs[0x04]
                      ('num_ssis', 'H'),
                      ('ssis', 'ssi_dict', 'num_ssis'),)
    __,__,ssis,data = oscar.unpack(roster_reply_fmt, data)
    return ssis, data
    reference: U{http://iserverd.khstu.ru/oscar/snac_13_08.html}
    ssis, data = oscar.unpack((('ssis', 'ssi_dict'),), data)
    reference: U{http://iserverd.khstu.ru/oscar/snac_13_09.html}
    ssis, data = oscar.unpack((('ssis', 'ssi_dict'),), data)
    o.ssimanager.ssis.update(ssis, modify=True)
    reference: U{http://iserverd.khstu.ru/oscar/snac_13_0a.html}
    d, data = oscar.unpack((('ssis', 'ssi_dict'),), data)
    [o.ssimanager.ssis.pop(k) for k in d if k in o.ssimanager.ssis]

src/d/i/digsby-HEAD/digsby/src/oscar/OscarBuddies.py   digsby(Download)
        caps = []
        while newval:
            caphi, caplo, newval = oscar.unpack((('caphi', 'Q'),
                                                 ('caplo', 'Q')),
    def _set_dc_info(self, newval):
        dc_info, data = oscar.unpack((('_', 'dc_info'),), newval)
        if data: print 'extra data on dc_info for %s: %s' % (self.name, util.to_hex(data))
        self._dc_info = dc_info
        tflvs = {}        # type, flag, length, value
            tflvs_list, newval = oscar.unpack((('values', 'tflv_list'),), newval)
        except Exception:
                    __, msg, __, tlvs, tflvs[2] = oscar.unpack(fmt, tflvs[2])
                except Exception, e:
                    log.error('Error unpacking available message. (exc=%r, data=%r)', e, tflvs[2])

src/d/i/digsby-HEAD/digsby/src/oscar/rendezvous/chat.py   digsby(Download)
def unpack_chat_invite(data):
    fmt = (('rendtlvs', 'named_tlvs', -1, rdv_tlvs),)
    rendtlvs, data = oscar.unpack(fmt, data)
    invite_msg = oscar.decode(rendtlvs.user_message, getattr(rendtlvs, 'encoding', 'ascii'))
    xdata = rendtlvs.extended_data

  1 | 2  Next