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 
16 
27 typedef struct {
29  union {
30  uint8_t const *bytes;
31  char const *str;
32  };
33  uint32_t size;
34  uint32_t flags;
35 } ScByteArray;
37 
48 SC_EXPORT
49 uint32_t sc_byte_array_get_size(ScByteArray array);
50 
61 SC_EXPORT
62 uint8_t const *sc_byte_array_get_data(ScByteArray array);
63 
74 SC_EXPORT
75 char const *sc_byte_array_get_string(ScByteArray array);
76 
83 SC_EXPORT
85 
87 
88 #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.
#define SC_EXTERN_C_BEGIN
Start of external C code.
Definition: ScConfig.h:19
char const * sc_byte_array_get_string(ScByteArray array)
Get a const string pointer to the array data.
#define SC_EXTERN_C_END
End of external C code.
Definition: ScConfig.h:28
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.