添加pusher接口

整理代码
This commit is contained in:
xiongziliang
2019-12-18 14:43:32 +08:00
parent ee4659a185
commit ef7e937808
10 changed files with 62 additions and 25 deletions

View File

@@ -37,11 +37,13 @@ API_EXPORT mk_http_downloader API_CALL mk_http_downloader_create() {
}
API_EXPORT void API_CALL mk_http_downloader_release(mk_http_downloader ctx) {
assert(ctx);
HttpDownloader::Ptr *obj = (HttpDownloader::Ptr *) ctx;
delete obj;
}
API_EXPORT void API_CALL mk_http_downloader_start(mk_http_downloader ctx, const char *url, const char *file, on_mk_download_complete cb, void *user_data) {
assert(ctx && url && file);
HttpDownloader::Ptr *obj = (HttpDownloader::Ptr *) ctx;
(*obj)->setOnResult([cb, user_data](ErrCode code, const string &errMsg, const string &filePath) {
if (cb) {