UInt8List* MtpDataPacket::getAUInt8() {
	UInt8List* result = new UInt8List;
	int count = getUInt32();
	for (int i = 0; i < count; i++)
		result->push(getUInt8());
	return result;
}
Example #2
0
UInt8List* MtpDataPacket::getAUInt8() {
    uint32_t count;
    if (!getUInt32(count))
        return NULL;
    UInt8List* result = new UInt8List;
    for (uint32_t i = 0; i < count; i++) {
        uint8_t value;
        if (!getUInt8(value)) {
            delete result;
            return NULL;
        }
        result->push(value);
    }
    return result;
}