Soletta™ Framework
|
Operations specific to SOL_MEMDESC_TYPE_ENUMERATION. More...
#include <sol-memdesc.h>
Data Fields | |
uint16_t | api_version |
API version, must match SOL_MEMDESC_OPS_ENUMERATION_API_VERSION at runtime. More... | |
int(* | from_str )(const struct sol_memdesc *desc, void *ptr_return, const struct sol_str_slice str) |
convert enumeration value from string. More... | |
const char *(* | to_str )(const struct sol_memdesc *desc, const void *memory) |
convert enumeration value to string. More... | |
Operations specific to SOL_MEMDESC_TYPE_ENUMERATION.
This provides enumeration-specific operations to use when dealing with a memory description.
uint16_t sol_memdesc_ops_enumeration::api_version |
API version, must match SOL_MEMDESC_OPS_ENUMERATION_API_VERSION at runtime.
int(* sol_memdesc_ops_enumeration::from_str)(const struct sol_memdesc *desc, void *ptr_return, const struct sol_str_slice str) |
convert enumeration value from string.
The return is stored in ptr_return
, which must be the size stated in struct sol_memdesc::size as returned by sol_memdesc_get_size().
The string is given in the form of a slice so it doesn't need to be null-terminated.
On error, negative errno is returned. 0 on success.
const char*(* sol_memdesc_ops_enumeration::to_str)(const struct sol_memdesc *desc, const void *memory) |
convert enumeration value to string.
On error, NULL should be returned and errno set. On success non-NULL is returned.