添加播放器的C接口

This commit is contained in:
xiongziliang
2019-12-18 11:45:33 +08:00
parent 239dc309f2
commit 026aa5e75c
5 changed files with 362 additions and 5 deletions

View File

@@ -26,8 +26,6 @@
#include "httpdownloader.h"
#include "Util/logger.h"
#include "Util/TimeTicker.h"
#include "Util/onceToken.h"
#include "Http/HttpDownloader.h"
using namespace std;
using namespace toolkit;
@@ -43,7 +41,7 @@ API_EXPORT void API_CALL mk_http_downloader_release(mk_http_downloader ctx) {
delete obj;
}
API_EXPORT void API_CALL mk_http_downloader_start(mk_http_downloader ctx, const char *url, const char *file, on_download_complete cb, void *user_data) {
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) {
HttpDownloader::Ptr *obj = (HttpDownloader::Ptr *) ctx;
(*obj)->setOnResult([cb, user_data](ErrCode code, const string &errMsg, const string &filePath) {
if (cb) {