Lines Matching refs:offset
94 uint16_t MtpPacket::getUInt16(int offset) const { in getUInt16()
95 return ((uint16_t)mBuffer[offset + 1] << 8) | (uint16_t)mBuffer[offset]; in getUInt16()
98 uint32_t MtpPacket::getUInt32(int offset) const { in getUInt32()
99 return ((uint32_t)mBuffer[offset + 3] << 24) | ((uint32_t)mBuffer[offset + 2] << 16) | in getUInt32()
100 ((uint32_t)mBuffer[offset + 1] << 8) | (uint32_t)mBuffer[offset]; in getUInt32()
103 void MtpPacket::putUInt16(int offset, uint16_t value) { in putUInt16() argument
104 mBuffer[offset++] = (uint8_t)(value & 0xFF); in putUInt16()
105 mBuffer[offset++] = (uint8_t)((value >> 8) & 0xFF); in putUInt16()
108 void MtpPacket::putUInt32(int offset, uint32_t value) { in putUInt32() argument
109 mBuffer[offset++] = (uint8_t)(value & 0xFF); in putUInt32()
110 mBuffer[offset++] = (uint8_t)((value >> 8) & 0xFF); in putUInt32()
111 mBuffer[offset++] = (uint8_t)((value >> 16) & 0xFF); in putUInt32()
112 mBuffer[offset++] = (uint8_t)((value >> 24) & 0xFF); in putUInt32()
148 int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t); in setParameter() local
149 if (mPacketSize < offset + sizeof(uint32_t)) in setParameter()
150 mPacketSize = offset + sizeof(uint32_t); in setParameter()
151 putUInt32(offset, value); in setParameter()