File: cbor.h

package info (click to toggle)
aws-crt-python 0.28.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 78,428 kB
  • sloc: ansic: 437,955; python: 27,657; makefile: 5,855; sh: 4,289; ruby: 208; java: 82; perl: 73; cpp: 25; xml: 11
file content (56 lines) | stat: -rw-r--r-- 3,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef AWS_CRT_PYTHON_CBOR_H
#define AWS_CRT_PYTHON_CBOR_H
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */
#include "module.h"

/*******************************************************************************
 * ENCODE
 ******************************************************************************/

PyObject *aws_py_cbor_encoder_new(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_get_encoded_data(PyObject *self, PyObject *args);

PyObject *aws_py_cbor_encoder_write_uint(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_negint(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_float(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_bytes(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_text(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_array_start(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_map_start(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_tag(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_bool(PyObject *self, PyObject *args);

/* Encode the types without value needed. The arg is the type to encode. */
PyObject *aws_py_cbor_encoder_write_simple_types(PyObject *self, PyObject *args);

PyObject *aws_py_cbor_encoder_write_py_list(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_py_dict(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_encoder_write_data_item(PyObject *self, PyObject *args);

/*******************************************************************************
 * DECODE
 ******************************************************************************/

PyObject *aws_py_cbor_decoder_new(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_peek_type(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_get_remaining_bytes_len(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_consume_next_element(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_consume_next_data_item(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_unsigned_int(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_negative_int(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_float(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_boolean(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_bytes(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_text(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_array_start(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_map_start(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_tag(PyObject *self, PyObject *args);

PyObject *aws_py_cbor_decoder_pop_next_py_list(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_py_dict(PyObject *self, PyObject *args);
PyObject *aws_py_cbor_decoder_pop_next_data_item(PyObject *self, PyObject *args);

#endif /* AWS_CRT_PYTHON_CBOR_H */