mastodont-c/include/mastodont_nodeinfo.h
nekobit c0ddc1bf5e Add clause
FossilOrigin-Name: 4e8cdf2538b5a6eaf91c61e3b0ae57621d0934f376351c5d3b7b320927eb27d8
2022-11-14 15:36:07 +00:00

43 lines
1 KiB
C

/*
* Licensed under BSD 3-Clause License
*/
#ifndef MASTODONT_NODEINFO_H
#define MASTODONT_NODEINFO_H
#include <mastodont_types.h>
struct mstdnt_nodeinfo_metadata
{
char* version;
};
struct mstdnt_nodeinfo_software
{
char* name;
char* repository;
char* version;
};
struct mstdnt_nodeinfo
{
struct mstdnt_nodeinfo_software* software;
struct mstdnt_nodeinfo_metadata* metadata;
mstdnt_bool open_registrations;
};
int mstdnt_nodeinfo_json(struct mstdnt_nodeinfo* nodeinfo, cJSON* js);
int mstdnt_nodeinfo_json_callback(cJSON* json, void* nodeinfo);
int mstdnt_get_nodeinfo(mastodont_t* api,
struct mstdnt_args* args,
mstdnt_request_cb_t cb_request,
void* cb_args,
char* version,
struct mstdnt_storage* storage,
struct mstdnt_nodeinfo* nodeinfo);
void mstdnt_cleanup_nodeinfo(struct mstdnt_nodeinfo* nodeinfo);
#endif /* MASTODONT_NODEINFO_H */