mastodont-c/include/mastodont_nodeinfo.h
nekobit 1bb9dafe39 Remove bloat
FossilOrigin-Name: f1def5fc963f9b5be6fdc11b12615815662405568b3ff991317983ad1a747523
2022-11-14 14:18:05 +00:00

43 lines
1 KiB
C

/*
* Licensed under BSD 2-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 */