26 lines
668 B
C
26 lines
668 B
C
|
#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
|