summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpProperty.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/mtp/MtpProperty.h')
-rw-r--r--media/mtp/MtpProperty.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/media/mtp/MtpProperty.h b/media/mtp/MtpProperty.h
index 64cfb93..98b465a 100644
--- a/media/mtp/MtpProperty.h
+++ b/media/mtp/MtpProperty.h
@@ -23,6 +23,23 @@ namespace android {
class MtpDataPacket;
+struct MtpPropertyValue {
+ union {
+ int8_t i8;
+ uint8_t u8;
+ int16_t i16;
+ uint16_t u16;
+ int32_t i32;
+ uint32_t u32;
+ int64_t i64;
+ uint64_t u64;
+ int128_t i128;
+ uint128_t u128;
+ } u;
+ // string in UTF8 format
+ char* str;
+};
+
class MtpProperty {
public:
MtpPropertyCode mCode;
@@ -68,6 +85,9 @@ public:
void read(MtpDataPacket& packet);
void write(MtpDataPacket& packet);
+ void setDefaultValue(const uint16_t* string);
+ void setCurrentValue(const uint16_t* string);
+
void print();
inline bool isDeviceProperty() const {