2022-05-10 06:43:27 +00:00
|
|
|
//
|
|
|
|
// Created by xajhu on 2021/7/1 0001.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef DAEMON_AGENT_NETWORD_INET_MISC_H
|
|
|
|
#define DAEMON_AGENT_NETWORD_INET_MISC_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int inet_api_init(void);
|
|
|
|
|
2022-12-02 06:42:15 +00:00
|
|
|
typedef void (*on_http_response)(void *pData,
|
|
|
|
unsigned int size,
|
|
|
|
const char *pReqUrl,
|
|
|
|
const char *pDlPath,
|
|
|
|
const char *pTaskUuid,
|
|
|
|
int iFinished,
|
|
|
|
void *pUserData);
|
|
|
|
typedef void (*on_progress_changed)(const char *pReqUrl,
|
|
|
|
const char *pTaskUuid,
|
|
|
|
unsigned char uPercent,
|
|
|
|
void *pUserData);
|
2022-05-10 06:43:27 +00:00
|
|
|
|
2022-12-02 06:42:15 +00:00
|
|
|
const char *inet_download_file_async(const char *pURL,
|
|
|
|
const char *pPath,
|
|
|
|
on_http_response onRespCb,
|
|
|
|
on_progress_changed onProgressCb,
|
|
|
|
void *pData);
|
2022-05-10 06:43:27 +00:00
|
|
|
|
2022-12-13 09:14:19 +00:00
|
|
|
const char *inet_http_post_async(const char *pURL, const char *pPost, on_http_response onRespCb, void *pData);
|
|
|
|
|
|
|
|
int inet_cancel_dl(const char *pTaskUuid);
|
2022-05-10 06:43:27 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2022-12-02 06:42:15 +00:00
|
|
|
#endif //DAEMON_AGENT_NETWORD_INET_MISC_H
|