2019-03-26 22:04:53 +00:00
|
|
|
#ifndef WF_ADAPTER_IMPL_CREDENTIALS_H
|
|
|
|
#define WF_ADAPTER_IMPL_CREDENTIALS_H
|
|
|
|
|
2020-07-16 20:36:12 +00:00
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stddef.h>
|
|
|
|
#else
|
|
|
|
#include <cstddef>
|
|
|
|
#endif
|
2019-03-26 22:04:53 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2020-07-13 20:41:19 +00:00
|
|
|
struct wf_json_writer;
|
2020-07-16 20:36:12 +00:00
|
|
|
struct wf_json;
|
|
|
|
|
|
|
|
struct wf_credentials_entry
|
|
|
|
{
|
|
|
|
char * key;
|
|
|
|
char * value;
|
|
|
|
};
|
2020-07-13 20:41:19 +00:00
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
struct wf_credentials
|
|
|
|
{
|
|
|
|
char * type;
|
2020-07-16 20:36:12 +00:00
|
|
|
struct wf_credentials_entry * entries;
|
|
|
|
size_t capacity;
|
|
|
|
size_t size;
|
2019-03-26 22:04:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern void wf_impl_credentials_init(
|
|
|
|
struct wf_credentials * credentials,
|
|
|
|
char const * type,
|
2020-07-16 20:36:12 +00:00
|
|
|
struct wf_json const * data);
|
2019-03-26 22:04:53 +00:00
|
|
|
|
2020-06-10 20:42:26 +00:00
|
|
|
extern void wf_impl_credentials_init_default(
|
|
|
|
struct wf_credentials * credentials);
|
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
extern void wf_impl_credentials_cleanup(
|
|
|
|
struct wf_credentials * credentials);
|
|
|
|
|
|
|
|
extern char const * wf_impl_credentials_type(
|
|
|
|
struct wf_credentials const * credentials);
|
|
|
|
|
|
|
|
extern char const * wf_impl_credentials_get(
|
|
|
|
struct wf_credentials const * credentials,
|
|
|
|
char const * key);
|
|
|
|
|
2020-06-10 20:42:26 +00:00
|
|
|
extern void wf_impl_credentials_set_type(
|
|
|
|
struct wf_credentials * credentials,
|
|
|
|
char const * type);
|
|
|
|
|
|
|
|
extern void wf_impl_credentials_add(
|
|
|
|
struct wf_credentials * credentials,
|
|
|
|
char const * key,
|
|
|
|
char const * value);
|
|
|
|
|
2020-07-13 20:41:19 +00:00
|
|
|
extern void
|
|
|
|
wf_impl_credentials_write(
|
|
|
|
struct wf_json_writer * writer,
|
|
|
|
void * data);
|
|
|
|
|
2019-03-26 22:04:53 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|