|
libwebsockets
Lightweight C library for HTML5 websockets
|
Go to the source code of this file.
Data Structures | |
| struct | lws_settings_instance_t |
| struct | lws_settings_ops |
Macros | |
| #define | LSOOPEN_FLAG_WRITEABLE (1 << 0) |
| #define | lws_settings_ops_plat |
Typedefs | |
| typedef struct lws_settings_ops | lws_settings_ops_t |
Functions | |
| LWS_VISIBLE LWS_EXTERN int | lws_settings_plat_get (lws_settings_instance_t *si, const char *name, uint8_t *dest, size_t *max_actual) |
| LWS_VISIBLE LWS_EXTERN int | lws_settings_plat_set (lws_settings_instance_t *si, const char *name, const uint8_t *src, size_t len) |
| LWS_VISIBLE LWS_EXTERN int | lws_settings_plat_printf (lws_settings_instance_t *si, const char *name, const char *format,...) LWS_FORMAT(3) |
| LWS_VISIBLE LWS_EXTERN lws_settings_instance_t * | lws_settings_init (const lws_settings_ops_t *so, void *opaque_plat) |
| LWS_VISIBLE LWS_EXTERN void | lws_settings_deinit (lws_settings_instance_t **si) |
| struct lws_settings_instance_t |
Definition at line 41 of file lws-settings.h.
| Data Fields | ||
|---|---|---|
| void * | handle_plat | |
| const struct lws_settings_ops * | so | |
| uint8_t | refcount | |
| void * | opaque_plat | |
| #define LSOOPEN_FLAG_WRITEABLE (1 << 0) |
Definition at line 37 of file lws-settings.h.
| #define lws_settings_ops_plat |
Definition at line 104 of file lws-settings.h.
| typedef struct lws_settings_ops lws_settings_ops_t |
| LWS_VISIBLE LWS_EXTERN int lws_settings_plat_get | ( | lws_settings_instance_t * | si, |
| const char * | name, | ||
| uint8_t * | dest, | ||
| size_t * | max_actual ) |
lws_settings_plat_get() - read a named blob from a settings instance
| si | the settings instance |
| name | the name of the setting blob in the instance |
| dest | NULL, or the buffer to copy the setting blob info |
| max_actual | point to size of dest, or zero; actual blob size on exit |
If the named blob doesn't exist in the si, or can't read, returns nonzero. Otherwise, returns 0 and sets *max_actual to the true blob size. If dest is non-NULL, as much of the blob as will fit in the amount specified by *max_actual on entry is copied to dest.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_settings_plat_set | ( | lws_settings_instance_t * | si, |
| const char * | name, | ||
| const uint8_t * | src, | ||
| size_t | len ) |
lws_settings_plat_get() - read a named blob from a settings instance
| si | the settings instance |
| name | the name of the setting blob in the instance |
| src | blob to copy to settings instance |
| len | length of blob to copy |
Creates or replaces a settings blob of the given name made up of the len bytes of data from src.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_settings_plat_printf | ( | lws_settings_instance_t * | si, |
| const char * | name, | ||
| const char * | format, | ||
| ... ) |
lws_settings_plat_printf() - read a named blob from a settings instance
| si | the settings instance |
| name | the name of the setting blob in the instance |
| format | printf-style format string |
Creates or replaces a settings blob of the given name from the printf-style format string and arguments provided. There's no specific limit to the size, the size is computed and then a temp heap buffer used.
References LWS_FORMAT.
| LWS_VISIBLE LWS_EXTERN lws_settings_instance_t * lws_settings_init | ( | const lws_settings_ops_t * | so, |
| void * | opaque_plat ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_settings_deinit | ( | lws_settings_instance_t ** | si | ) |