This repository has been archived on 2024-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
temporary-satori-hole/include/futami.h

26 lines
668 B
C
Raw Permalink Normal View History

2023-12-27 00:35:22 +00:00
#ifndef H_SATORI_FUTAMI
#define H_SATORI_FUTAMI
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#include <json-c/json.h>
#include "curl_helper.h"
#include "macros.h"
typedef struct _sat_futami {
int32_t ping;
size_t serversCount;
char **servers;
} sat_futami, *sat_futami_ptr;
sat_futami_ptr sat_futami_alloc(void);
void sat_futami_free(sat_futami_ptr ctx);
int sat_futami_load_json(sat_futami_ptr ctx, json_object *obj);
int sat_futami_load_json_file(sat_futami_ptr ctx, char *path);
int sat_futami_load_json_string(sat_futami_ptr ctx, char *str);
int sat_futami_load_json_url(sat_futami_ptr ctx, char *url);
#endif // H_SATORI_FUTAMI