#include<stdio.h>
#include"com_api.h"


void mid_cb(void* data){
	if (data != NULL){
		printf("mid_cb: %s RECEIVED \r\n", data); 
	}
}


int main(const int argc, const char **argv)
{
        /*if ((argc > 1) && (strcmp(NODE0, argv[1]) == 0))
                return (node0(argv[2]));

        if ((argc > 1) && (strcmp(NODE1, argv[1]) == 0))
                return (node1(argv[2]));

        fprintf(stderr, "Usage: pair %s|%s <URL> <ARG> ...\n", NODE0, NODE1);
        return 1;*/
        
        kk_ipc_init(IPC_MID2APP, mid_cb);
		//printf("node0 111\r\n");
		for (;;) {
				//printf("node0 222\r\n");
                sleep(5);
				//printf("node0 3333\r\n");
                kk_ipc_send("middleWare data to app!");
				//printf("node0 4444\r\n");
        }
}

