Lines Matching refs:value
75 bool MtpDataPacket::getUInt8(uint8_t& value) { in getUInt8() argument
76 if (mPacketSize - mOffset < sizeof(value)) in getUInt8()
78 value = mBuffer[mOffset++]; in getUInt8()
82 bool MtpDataPacket::getUInt16(uint16_t& value) { in getUInt16() argument
83 if (mPacketSize - mOffset < sizeof(value)) in getUInt16()
86 value = (uint16_t)mBuffer[offset] | ((uint16_t)mBuffer[offset + 1] << 8); in getUInt16()
87 mOffset += sizeof(value); in getUInt16()
91 bool MtpDataPacket::getUInt32(uint32_t& value) { in getUInt32() argument
92 if (mPacketSize - mOffset < sizeof(value)) in getUInt32()
95 value = (uint32_t)mBuffer[offset] | ((uint32_t)mBuffer[offset + 1] << 8) | in getUInt32()
97 mOffset += sizeof(value); in getUInt32()
101 bool MtpDataPacket::getUInt64(uint64_t& value) { in getUInt64() argument
102 if (mPacketSize - mOffset < sizeof(value)) in getUInt64()
105 value = (uint64_t)mBuffer[offset] | ((uint64_t)mBuffer[offset + 1] << 8) | in getUInt64()
109 mOffset += sizeof(value); in getUInt64()
113 bool MtpDataPacket::getUInt128(uint128_t& value) { in getUInt128() argument
114 return getUInt32(value[0]) && getUInt32(value[1]) && getUInt32(value[2]) && getUInt32(value[3]); in getUInt128()
128 int8_t value; in getAInt8() local
129 if (!getInt8(value)) { in getAInt8()
133 result->push_back(value); in getAInt8()
144 uint8_t value; in getAUInt8() local
145 if (!getUInt8(value)) { in getAUInt8()
149 result->push_back(value); in getAUInt8()
160 int16_t value; in getAInt16() local
161 if (!getInt16(value)) { in getAInt16()
165 result->push_back(value); in getAInt16()
176 uint16_t value; in getAUInt16() local
177 if (!getUInt16(value)) { in getAUInt16()
181 result->push_back(value); in getAUInt16()
192 int32_t value; in getAInt32() local
193 if (!getInt32(value)) { in getAInt32()
197 result->push_back(value); in getAInt32()
208 uint32_t value; in getAUInt32() local
209 if (!getUInt32(value)) { in getAUInt32()
213 result->push_back(value); in getAUInt32()
224 int64_t value; in getAInt64() local
225 if (!getInt64(value)) { in getAInt64()
229 result->push_back(value); in getAInt64()
240 uint64_t value; in getAUInt64() local
241 if (!getUInt64(value)) { in getAUInt64()
245 result->push_back(value); in getAUInt64()
250 void MtpDataPacket::putInt8(int8_t value) { in putInt8() argument
252 mBuffer[mOffset++] = (uint8_t)value; in putInt8()
257 void MtpDataPacket::putUInt8(uint8_t value) { in putUInt8() argument
259 mBuffer[mOffset++] = (uint8_t)value; in putUInt8()
264 void MtpDataPacket::putInt16(int16_t value) { in putInt16() argument
266 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putInt16()
267 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putInt16()
272 void MtpDataPacket::putUInt16(uint16_t value) { in putUInt16() argument
274 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putUInt16()
275 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putUInt16()
280 void MtpDataPacket::putInt32(int32_t value) { in putInt32() argument
282 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putInt32()
283 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putInt32()
284 mBuffer[mOffset++] = (uint8_t)((value >> 16) & 0xFF); in putInt32()
285 mBuffer[mOffset++] = (uint8_t)((value >> 24) & 0xFF); in putInt32()
290 void MtpDataPacket::putUInt32(uint32_t value) { in putUInt32() argument
292 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putUInt32()
293 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putUInt32()
294 mBuffer[mOffset++] = (uint8_t)((value >> 16) & 0xFF); in putUInt32()
295 mBuffer[mOffset++] = (uint8_t)((value >> 24) & 0xFF); in putUInt32()
300 void MtpDataPacket::putInt64(int64_t value) { in putInt64() argument
302 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putInt64()
303 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putInt64()
304 mBuffer[mOffset++] = (uint8_t)((value >> 16) & 0xFF); in putInt64()
305 mBuffer[mOffset++] = (uint8_t)((value >> 24) & 0xFF); in putInt64()
306 mBuffer[mOffset++] = (uint8_t)((value >> 32) & 0xFF); in putInt64()
307 mBuffer[mOffset++] = (uint8_t)((value >> 40) & 0xFF); in putInt64()
308 mBuffer[mOffset++] = (uint8_t)((value >> 48) & 0xFF); in putInt64()
309 mBuffer[mOffset++] = (uint8_t)((value >> 56) & 0xFF); in putInt64()
314 void MtpDataPacket::putUInt64(uint64_t value) { in putUInt64() argument
316 mBuffer[mOffset++] = (uint8_t)(value & 0xFF); in putUInt64()
317 mBuffer[mOffset++] = (uint8_t)((value >> 8) & 0xFF); in putUInt64()
318 mBuffer[mOffset++] = (uint8_t)((value >> 16) & 0xFF); in putUInt64()
319 mBuffer[mOffset++] = (uint8_t)((value >> 24) & 0xFF); in putUInt64()
320 mBuffer[mOffset++] = (uint8_t)((value >> 32) & 0xFF); in putUInt64()
321 mBuffer[mOffset++] = (uint8_t)((value >> 40) & 0xFF); in putUInt64()
322 mBuffer[mOffset++] = (uint8_t)((value >> 48) & 0xFF); in putUInt64()
323 mBuffer[mOffset++] = (uint8_t)((value >> 56) & 0xFF); in putUInt64()
328 void MtpDataPacket::putInt128(const int128_t& value) { in putInt128() argument
329 putInt32(value[0]); in putInt128()
330 putInt32(value[1]); in putInt128()
331 putInt32(value[2]); in putInt128()
332 putInt32(value[3]); in putInt128()
335 void MtpDataPacket::putUInt128(const uint128_t& value) { in putUInt128() argument
336 putUInt32(value[0]); in putUInt128()
337 putUInt32(value[1]); in putUInt128()
338 putUInt32(value[2]); in putUInt128()
339 putUInt32(value[3]); in putUInt128()
342 void MtpDataPacket::putInt128(int64_t value) { in putInt128() argument
343 putInt64(value); in putInt128()
344 putInt64(value < 0 ? -1 : 0); in putInt128()
347 void MtpDataPacket::putUInt128(uint64_t value) { in putUInt128() argument
348 putUInt64(value); in putUInt128()