7 #include <aws/common/cbor.h>
37 Unknown = AWS_CBOR_TYPE_UNKNOWN,
38 UInt = AWS_CBOR_TYPE_UINT,
39 NegInt = AWS_CBOR_TYPE_NEGINT,
40 Float = AWS_CBOR_TYPE_FLOAT,
41 Bytes = AWS_CBOR_TYPE_BYTES,
42 Text = AWS_CBOR_TYPE_TEXT,
43 ArrayStart = AWS_CBOR_TYPE_ARRAY_START,
44 MapStart = AWS_CBOR_TYPE_MAP_START,
45 Tag = AWS_CBOR_TYPE_TAG,
46 Bool = AWS_CBOR_TYPE_BOOL,
47 Null = AWS_CBOR_TYPE_NULL,
48 Undefined = AWS_CBOR_TYPE_UNDEFINED,
49 Break = AWS_CBOR_TYPE_BREAK,
50 IndefBytesStart = AWS_CBOR_TYPE_INDEF_BYTES_START,
51 IndefTextStart = AWS_CBOR_TYPE_INDEF_TEXT_START,
52 IndefArrayStart = AWS_CBOR_TYPE_INDEF_ARRAY_START,
78 void Reset() noexcept;
86 void WriteUInt(uint64_t value) noexcept;
95 void WriteNegInt(uint64_t value) noexcept;
106 void WriteFloat(
double value) noexcept;
133 void WriteArrayStart(
size_t number_entries) noexcept;
144 void WriteMapStart(
size_t number_entries) noexcept;
155 void WriteTag(uint64_t tag_number) noexcept;
160 void WriteNull() noexcept;
165 void WriteUndefined() noexcept;
170 void WriteBool(
bool value) noexcept;
177 void WriteBreak() noexcept;
184 void WriteIndefBytesStart() noexcept;
191 void WriteIndefTextStart() noexcept;
198 void WriteIndefArrayStart() noexcept;
205 void WriteIndefMapStart() noexcept;
208 struct aws_cbor_encoder *m_encoder;
235 size_t GetRemainingLength() noexcept;
266 bool ConsumeNextWholeDataItem() noexcept;
286 bool ConsumeNextSingleElement() noexcept;
302 Optional<uint64_t> PopNextUnsignedIntVal() noexcept;
303 Optional<uint64_t> PopNextNegativeIntVal() noexcept;
304 Optional<
double> PopNextFloatVal() noexcept;
305 Optional<
bool> PopNextBooleanVal() noexcept;
324 Optional<uint64_t> PopNextArrayStart() noexcept;
341 Optional<uint64_t> PopNextMapStart() noexcept;
352 Optional<uint64_t> PopNextTagVal() noexcept;
357 int LastError() const noexcept {
return m_lastError ? m_lastError : AWS_ERROR_UNKNOWN; }
360 struct aws_cbor_decoder *m_decoder;