diff --git a/xbmc/utils/WebServer.h b/xbmc/utils/WebServer.h index edd3b46..9183011 100644 --- a/xbmc/utils/WebServer.h +++ b/xbmc/utils/WebServer.h @@ -56,16 +56,25 @@ public: private: static int AskForAuthentication (struct MHD_Connection *connection); static bool IsAuthenticated (CWebServer *server, struct MHD_Connection *connection); + +#if (MHD_VERSION > 0x00040000) static int AnswerToConnection (void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls); +#else //libmicrohttpd <= 0.4.0 + static int AnswerToConnection (void *cls, struct MHD_Connection *connection, + const char *url, const char *method, + const char *version, const char *upload_data, + unsigned int *upload_data_size, void **con_cls); +#endif -#if (MHD_VERSION >= 0x00040001) +#if (MHD_VERSION >= 0x00040000) static int ContentReaderCallback (void *cls, uint64_t pos, char *buf, int max); -#else //libmicrohttpd < 0.4.0 +#else // libmicrohttpd < 0.4.0 static int ContentReaderCallback (void *cls, size_t pos, char *buf, int max); #endif + static void ContentReaderFreeCallback (void *cls); static int JSONRPC(CWebServer *server, struct MHD_Connection *connection, const char *upload_data, size_t *upload_data_size); static int HttpApi(struct MHD_Connection *connection);