2020-06-17 14:51:08 +00:00
|
|
|
#ifndef WFP_IMPL_CREDENTIALS_H
|
|
|
|
#define WFP_IMPL_CREDENTIALS_H
|
2020-02-25 21:05:48 +00:00
|
|
|
|
2020-06-16 21:39:45 +00:00
|
|
|
#include "webfuse_provider/credentials.h"
|
2020-07-10 21:12:35 +00:00
|
|
|
#include "webfuse_provider/impl/jsonrpc/proxy_intern.h"
|
2020-07-10 22:44:50 +00:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stddef.h>
|
|
|
|
#else
|
|
|
|
#include <cstddef>
|
|
|
|
#endif
|
2020-02-25 21:05:48 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2020-07-10 21:12:35 +00:00
|
|
|
struct wfp_json_writer;
|
|
|
|
|
2020-07-10 22:44:50 +00:00
|
|
|
struct wfp_credentials_entry
|
|
|
|
{
|
|
|
|
char * key;
|
|
|
|
char * value;
|
|
|
|
};
|
|
|
|
|
2020-02-25 21:05:48 +00:00
|
|
|
struct wfp_credentials
|
|
|
|
{
|
|
|
|
char * type;
|
2020-07-10 22:44:50 +00:00
|
|
|
struct wfp_credentials_entry * entries;
|
|
|
|
size_t size;
|
|
|
|
size_t capacity;
|
2020-02-25 21:05:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern void wfp_impl_credentials_init(
|
|
|
|
struct wfp_credentials * credentials);
|
|
|
|
|
|
|
|
extern void wfp_impl_credentials_cleanup(
|
|
|
|
struct wfp_credentials * credentials);
|
|
|
|
|
|
|
|
extern void wfp_impl_credentials_set_type(
|
|
|
|
struct wfp_credentials * credentials,
|
|
|
|
char const * type);
|
|
|
|
|
|
|
|
extern void wfp_impl_credentials_add(
|
|
|
|
struct wfp_credentials * credentials,
|
|
|
|
char const * key,
|
|
|
|
char const * value);
|
|
|
|
|
2020-07-10 21:12:35 +00:00
|
|
|
extern void
|
|
|
|
wfp_impl_credentials_write(
|
|
|
|
struct wfp_json_writer * writer,
|
|
|
|
void * data);
|
2020-03-01 12:42:46 +00:00
|
|
|
|
2020-07-10 21:12:35 +00:00
|
|
|
extern char const *
|
|
|
|
wfp_impl_credentials_get_type(
|
2020-03-01 12:42:46 +00:00
|
|
|
struct wfp_credentials * credentials);
|
2020-02-25 21:05:48 +00:00
|
|
|
|
2020-07-10 21:12:35 +00:00
|
|
|
|
2020-02-25 21:05:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|