OpenWrt_Luci_Lua/1_8.sip_push/nebula_sdk/main.c
2015-06-13 23:06:56 +08:00

29 lines
467 B
C

#include <stdio.h>
#include "nebula_sdk.h"
void msg_cb(const char* data, int len)
{
printf("karldbg %s %s\n", __func__, data);
}
int main(int argc, const char *argv[])
{
const char* app_name[] = {"com.meizu.router",};
NebulaMsgCallback cb = msg_cb;
NebulaInit("R10WZOANC5400EE", "https://p.meizu.com", "/tmp");
NebulaSubScribe(1, app_name);
NebulaRegister(eNebulaMsg_Push, cb);
NebulaStart();
while(1) {
sleep(1);
}
return 0;
}