ScByteArray.h
Go to the documentation of this file.
1 
10 #ifndef SC_BYTE_ARRAY_H_
11 #define SC_BYTE_ARRAY_H_
12 
13 #include "Scandit/ScConfig.h"
14 
15 #if defined(__cplusplus)
16 extern "C" {
17 #endif
18 
29 typedef struct {
31  union {
33  uint8_t const *bytes;
34  uint8_t const *data;
35  char const *str;
37  char const *c_str;
38  };
40  union {
41  uint32_t size;
42  uint32_t length;
43  };
44  uint32_t flags;
45 } ScByteArray;
47 
58 SC_EXPORT
59 uint32_t sc_byte_array_get_size(ScByteArray array);
60 
71 SC_EXPORT
72 uint8_t const *sc_byte_array_get_data(ScByteArray array);
73 
84 SC_EXPORT
85 char const *sc_byte_array_get_string(ScByteArray array);
86 
93 SC_EXPORT
95 
96 #if defined(__cplusplus)
97 }
98 #endif
99 
100 #endif // SC_BYTE_ARRAY_H_
void sc_byte_array_free(ScByteArray array)
uint32_t sc_byte_array_get_size(ScByteArray array)
Get the number of bytes in the array.
char const * sc_byte_array_get_string(ScByteArray array)
Get a const string pointer to the array data.
uint8_t const * sc_byte_array_get_data(ScByteArray array)
Get a const pointer to the byte data.
Common definitions used throughout the ScanditSDK API.
A null terminated array of bytes.