diff --git a/src/Makefile.am b/src/Makefile.am index 53561714..c4832dab 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ libckpool_la_LIBADD = @LIBS@ bin_PROGRAMS = ckpool ckpmsg notifier ckpool_SOURCES = ckpool.c ckpool.h generator.c generator.h bitcoin.c bitcoin.h \ stratifier.c stratifier.h connector.c connector.h uthash.h \ - utlist.h api.c api.h + utlist.h ckpool_LDADD = libckpool.la @JANSSON_LIBS@ ckpmsg_SOURCES = ckpmsg.c diff --git a/src/ckpool.c b/src/ckpool.c index 153126a2..6178b225 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -32,7 +32,6 @@ #include "generator.h" #include "stratifier.h" #include "connector.h" -#include "api.h" ckpool_t *global_ckp; diff --git a/src/ckpool.h b/src/ckpool.h index 0829d36c..f2afd133 100644 --- a/src/ckpool.h +++ b/src/ckpool.h @@ -324,4 +324,18 @@ bool json_get_bool(bool *store, const json_t *val, const char *res); bool json_getdel_int(int *store, json_t *val, const char *res); bool json_getdel_int64(int64_t *store, json_t *val, const char *res); + +/* API Placeholders for future API implementation */ +typedef struct apimsg apimsg_t; + +struct apimsg { + char *buf; + int sockd; +}; + +static inline void ckpool_api(ckpool_t __maybe_unused *ckp, apimsg_t __maybe_unused *apimsg) {}; +static inline json_t *json_encode_errormsg(json_error_t __maybe_unused *err_val) { return NULL; }; +static inline json_t *json_errormsg(const char __maybe_unused *fmt, ...) { return NULL; }; +static inline void send_api_response(json_t __maybe_unused *val, const int __maybe_unused sockd) {}; + #endif /* CKPOOL_H */ diff --git a/src/generator.c b/src/generator.c index b9d42a15..65b82da6 100644 --- a/src/generator.c +++ b/src/generator.c @@ -21,7 +21,6 @@ #include "bitcoin.h" #include "uthash.h" #include "utlist.h" -#include "api.h" struct notify_instance { /* Hash table data */ diff --git a/src/stratifier.c b/src/stratifier.c index 24d96fa0..011cefc9 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -27,7 +27,6 @@ #include "stratifier.h" #include "uthash.h" #include "utlist.h" -#include "api.h" #define MIN1 60 #define MIN5 300