Home
last modified time | relevance | path

Searched refs:TLVHead (Results 1 - 14 of 14) sorted by relevance

/foundation/distributeddatamgr/udmf/framework/common/unittest/mock/
H A Dtlv_util_mock.cpp23 return sizeof(TLVHead); in CountBufferSize()
31 template <> bool Reading(std::nullptr_t &output, TLVObject &data, const TLVHead &head) in Reading()
38 return sizeof(TLVHead); in CountBufferSize()
46 template <> bool Reading(std::monostate &output, TLVObject &data, const TLVHead &head) in Reading()
53 return sizeof(TLVHead); in CountBufferSize()
61 template <> bool Reading(std::string &output, TLVObject &data, const TLVHead &head) in Reading()
68 return sizeof(TLVHead); in CountBufferSize()
76 template <> bool Reading(std::vector<uint8_t> &output, TLVObject &data, const TLVHead &head) in Reading()
83 return sizeof(TLVHead); in CountBufferSize()
91 template <> bool Reading(UDType &output, TLVObject &data, const TLVHead
[all...]
/foundation/distributeddatamgr/pasteboard/framework/tlv/
H A Dtlv_object.h33 struct TLVHead { struct
75 return sizeof(value) + sizeof(TLVHead); in Count()
79 return sizeof(value) + sizeof(TLVHead); in Count()
83 return sizeof(value) + sizeof(TLVHead); in Count()
87 return sizeof(value) + sizeof(TLVHead); in Count()
91 return sizeof(value) + sizeof(TLVHead); in Count()
95 return sizeof(value) + sizeof(TLVHead); in Count()
99 return sizeof(value) + sizeof(TLVHead); in Count()
103 return value.size() + sizeof(TLVHead); in Count()
107 return value.bufferLen + sizeof(TLVHead); in Count()
[all...]
H A Dtlv_object.cpp23 if (!HasExpectBuffer(buffer, sizeof(TLVHead))) { in Write()
26 cursor_ += sizeof(TLVHead); in Write()
31 if (!HasExpectBuffer(buffer, sizeof(TLVHead))) { in Write()
34 cursor_ += sizeof(TLVHead); in Write()
67 if (!HasExpectBuffer(buffer, sizeof(TLVHead) + value.size())) { in Write()
70 auto *tlvHead = reinterpret_cast<TLVHead *>(buffer.data() + cursor_); in Write()
80 cursor_ += sizeof(TLVHead) + value.size(); in Write()
86 if (!HasExpectBuffer(buffer, sizeof(TLVHead) + value.bufferLen)) { in Write()
89 auto *tlvHead = reinterpret_cast<TLVHead *>(buffer.data() + cursor_); in Write()
91 cursor_ += sizeof(TLVHead); in Write()
[all...]
/foundation/distributeddatamgr/udmf/framework/innerkitsimpl/test/unittest/mock/
H A Dtlv_object_mock.cpp58 fseek(file_, sizeof(TLVHead), SEEK_CUR); in OffsetHead()
60 cursor_ += sizeof(TLVHead); in OffsetHead()
74 return sizeof(TLVHead); in Count()
79 return sizeof(TLVHead); in Count()
84 return sizeof(TLVHead); in Count()
89 return sizeof(TLVHead); in Count()
94 return sizeof(TLVHead); in Count()
102 bool TLVObject::Read(std::string &value, const TLVHead &head) in Read()
113 bool TLVObject::Read(std::vector<uint8_t> &value, const TLVHead &head) in Read()
123 bool TLVObject::Read(OHOS::AAFwk::Want &value, const TLVHead
[all...]
/foundation/distributeddatamgr/udmf/framework/common/
H A Dtlv_object.cpp72 if (fseek(file_, sizeof(TLVHead), SEEK_CUR) != 0) { in OffsetHead()
77 cursor_ += sizeof(TLVHead); in OffsetHead()
93 auto size = sizeof(TLVHead) + value.size(); in Count()
100 auto size = sizeof(TLVHead) + value.size(); in Count()
112 auto size = sizeof(TLVHead) + parcel.GetDataSize(); in Count()
119 auto size = sizeof(TLVHead); in Count()
126 auto size = sizeof(TLVHead); in Count()
133 if (!HasExpectBuffer(sizeof(TLVHead) + value.size())) { in Write()
138 auto tlvHead = reinterpret_cast<TLVHead *>(GetStartCursor()); in Write()
149 cursor_ += sizeof(TLVHead) in Write()
[all...]
H A Dtlv_object.h28 struct TLVHead { struct
60 bool Read(std::string &value, const TLVHead &head);
61 bool Read(std::vector<uint8_t> &value, const TLVHead &head);
62 bool Read(OHOS::AAFwk::Want &value, const TLVHead &head);
63 bool Read(std::monostate &value, const TLVHead &head);
64 bool Read(void *value, const TLVHead &head);
68 template <typename T> bool ReadBasic(T &value, const TLVHead &head);
73 bool ReadHead(TLVHead &head);
75 bool Skip(TLVHead &head);
95 auto size = sizeof(value) + sizeof(TLVHead); in CountBasic()
[all...]
H A Dtlv_util.h37 template <typename T> bool API_EXPORT Reading(T &output, TLVObject &data, const TLVHead &head);
42 bool API_EXPORT Reading(std::variant<_Types...> &output, TLVObject &data, const TLVHead &head);
46 template <typename T> bool API_EXPORT Reading(std::shared_ptr<T> &output, TLVObject &data, const TLVHead &head);
50 template <typename T> bool API_EXPORT Reading(std::vector<T> &output, TLVObject &data, const TLVHead &head);
54 template <typename T, typename R> bool API_EXPORT Reading(std::map<T, R> &output, TLVObject &data, const TLVHead &head);
58 template <> bool API_EXPORT Reading(std::nullptr_t &output, TLVObject &data, const TLVHead &head);
62 template <> bool API_EXPORT Reading(std::monostate &output, TLVObject &data, const TLVHead &head);
66 template <> bool API_EXPORT Reading(std::string &output, TLVObject &data, const TLVHead &head);
70 template <> bool API_EXPORT Reading(std::vector<uint8_t> &output, TLVObject &data, const TLVHead &head);
74 template <> bool API_EXPORT Reading(UDType &output, TLVObject &data, const TLVHead
[all...]
H A Dtlv_util.cpp36 template <> bool Reading(std::nullptr_t &output, TLVObject &data, const TLVHead &head) in Reading()
52 template <> bool Reading(std::monostate &output, TLVObject &data, const TLVHead &head) in Reading()
68 template <> bool Reading(std::string &output, TLVObject &data, const TLVHead &head) in Reading()
84 template <> bool Reading(std::vector<uint8_t> &output, TLVObject &data, const TLVHead &head) in Reading()
102 template <> bool Reading(UDType &output, TLVObject &data, const TLVHead &head) in Reading()
128 template <> bool Reading(DataStatus &output, TLVObject &data, const TLVHead &head) in Reading()
154 return data.WriteBackHead(static_cast<uint16_t>(tag), tagCursor, data.GetCursor() - tagCursor - sizeof(TLVHead)); in Writing()
156 template <> bool Reading(Object &output, TLVObject &data, const TLVHead &head) in Reading()
158 TLVHead headValue{}; in Reading()
193 return data.WriteBackHead(static_cast<uint16_t>(tag), tagCursor, data.GetCursor() - tagCursor - sizeof(TLVHead)); in Writing()
[all...]
/foundation/distributeddatamgr/udmf/framework/common/unittest/
H A Dtlv_util_test.cpp69 EXPECT_EQ(sizeof(TLVHead) + sizeof(num1), TLVUtil::CountBufferSize(num1, tlvObject)); // 7 in HWTEST_F()
71 EXPECT_EQ(sizeof(TLVHead) + sizeof(num2), TLVUtil::CountBufferSize(num2, tlvObject)); // 8 in HWTEST_F()
73 EXPECT_EQ(sizeof(TLVHead) + sizeof(num3), TLVUtil::CountBufferSize(num3, tlvObject)); // 10 in HWTEST_F()
75 EXPECT_EQ(sizeof(TLVHead) + sizeof(num4), TLVUtil::CountBufferSize(num4, tlvObject)); // 8 in HWTEST_F()
77 EXPECT_EQ(sizeof(TLVHead) + sizeof(num5), TLVUtil::CountBufferSize(num5, tlvObject)); // 10 in HWTEST_F()
79 EXPECT_EQ(sizeof(TLVHead) + sizeof(boolean), TLVUtil::CountBufferSize(boolean, tlvObject)); // 7 in HWTEST_F()
81 EXPECT_EQ(sizeof(TLVHead) + sizeof(doubleNum), TLVUtil::CountBufferSize(doubleNum, tlvObject)); // 14 in HWTEST_F()
82 EXPECT_EQ(sizeof(TLVHead), TLVUtil::CountBufferSize(std::nullptr_t(), tlvObject)); // 6 in HWTEST_F()
84 EXPECT_EQ(sizeof(TLVHead), TLVUtil::CountBufferSize(monostate, tlvObject)); // 6 in HWTEST_F()
86 EXPECT_EQ(sizeof(TLVHead) in HWTEST_F()
[all...]
/foundation/distributeddatamgr/pasteboard/framework/innerkits/src/
H A Dpaste_data_record.cpp236 {TAG_MIMETYPE, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
238 {TAG_HTMLTEXT, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
240 {TAG_WANT, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
244 {TAG_PLAINTEXT, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
246 {TAG_URI, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
250 {TAG_CONVERT_URI, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
252 {TAG_PIXELMAP, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
256 {TAG_CUSTOM_DATA, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
258 {TAG_URI_PERMISSION, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
260 {TAG_UDC_UDTYPE, [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead in InitDecodeMap()
[all...]
H A Dpaste_data.cpp453 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
457 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
461 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
465 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
469 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
473 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
477 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
481 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
485 [&](bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head) -> void { in InitDecodeMap()
495 TLVHead hea in Decode()
[all...]
H A Dpaste_data_entry.cpp53 TLVHead head{}; in Decode()
142 TLVHead head{}; in Decode()
/foundation/distributeddatamgr/pasteboard/framework/innerkits/include/
H A Dpaste_data.h169 using Func = std::function<void(bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head)>;
H A Dpaste_data_record.h162 using Func = std::function<void(bool &ret, const std::vector<std::uint8_t> &buffer, TLVHead &head)>;

Completed in 10 milliseconds