You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
# include "xsubcore_global.h"
# include "ISubCoreCallback.h"
class XSUBCORE_EXPORT XSubCore {
XSubCore ( ) ;
public :
static XSubCore * getInstance ( ) ;
~ XSubCore ( ) ;
// 初始化, 成功返回true
bool init ( const char * protocolName , ISubCoreCallback * callback = nullptr ) ;
// 释放资源
void release ( ) ;
// Http请求
bool getByHttp ( const char * id , const char * baseUrl , const char * token , const char * params ) ;
bool postByHttp ( const char * id , const char * baseUrl , const char * token , const char * jsonData ) ;
// 开始任务
bool beginTask ( unsigned int taskId , const char * path ) ;
// 执行任务步骤
bool execTask ( ) ;
// 结束任务
void endTask ( ) ;
// 任务事件检测
void onTaskEventCheck ( const char * name , const char * value , const char * value2 = nullptr ) ;
private :
static XSubCore instance ;
} ;