123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef HIK_HTTPUTIL_H
- #define HIK_HTTPUTIL_H
- #if (defined(WIN32) || defined(WIN64))
- #ifdef HTTPUTIL_EXPORTS
- #define HTTPUTIL_API extern "C" _declspec(dllexport)
- #else
- #define HTTPUTIL_API extern "C" _declspec(dllimport)
- #endif
- #else
- #define HTTPUTIL_API extern "C"
- #endif
- namespace httpUtil
- {
-
-
-
-
- const int HTTPUTIL_ERR_SUCCESS = 0;
- const int HTTPUTIL_ERR_BASE = 10000;
- const int HTTPUTIL_ERR_PARAM = (HTTPUTIL_ERR_BASE + 1);
- const int HTTPUTIL_ERR_ALLOC_SESSION = (HTTPUTIL_ERR_BASE + 2);
- const int HTTPUTIL_ERR_SET_HEADER_FIELD = (HTTPUTIL_ERR_BASE + 3);
- const int HTTPUTIL_ERR_SEND_REQUEST = (HTTPUTIL_ERR_BASE + 4);
- const int HTTPUTIL_ERR_ALLOC_MEM = (HTTPUTIL_ERR_BASE + 5);
- const int HTTPUTIL_ERR_GET_REDIRECT_URL = (HTTPUTIL_ERR_BASE + 6);
- const int HTTPUTIL_ERR_OTHER = (HTTPUTIL_ERR_BASE + 10000);
-
-
-
-
-
-
-
-
- HTTPUTIL_API char* HTTPUTIL_Post(const char* url, const char* body, const char* appkey, const char* secret, int timeout, int* dataLen);
-
-
-
-
-
-
-
- HTTPUTIL_API char* HTTPUTIL_Get(const char* url, const char* appkey, const char* secret, int timeout, int* dataLen);
-
-
- HTTPUTIL_API void HTTPUTIL_Free(char* buffer);
-
-
- HTTPUTIL_API int HTTPUTIL_GetLastStatus();
- }
- #endif
|