OpenWrt_Luci_Lua/1_8.sip_push/nebula_sdk/nebula_sdk.h

57 lines
1.6 KiB
C
Raw Normal View History

2015-06-13 14:34:38 +00:00
#ifndef NEBULA_SDK_H
#define NEBULA_SDK_H
typedef enum {
eNebulaMsg_Push, /// 推送 (路由器只需关心这一类消息)
eNebulaMsg_Presence, /// Presence
eNebulaMsg_Sms, /// 网络短信
eNebulaMsg_Mms, /// 网络彩信
eNebulaMsg_Max,
} NebulaMsgType;
#ifdef __cplusplus
extern "C" {
#endif
/** 初始化网络连接
* @device_tag: (IMEI)
* @verify_pwd: (SN)
* @host: , : https://p.meizu.com (结尾不要带"/", 前面要加上https)
* @file: /, ,
* @return: , 0; -1, errno中.
* @, -1.
*/
int NebulaInit(const char* device_tag, const char* host, const char* file);
/** 设置订阅列表
*
*
*/
void NebulaSubScribe(int count, const char** app_name);
/** 消息处理回调函数
* @app: App名
* @msg:
*/
typedef void (*NebulaMsgCallback)(const char* app, const char* msg);
/** 注册消息处理回调函数
* @type:
* @cb:
* @return:
* @, .
*/
NebulaMsgCallback NebulaRegister(NebulaMsgType type, NebulaMsgCallback cb);
/** 启动
*
*/
int NebulaStart();
#ifdef __cplusplus
}
#endif
#endif //NEBULA_SDK_H