*
******************************************************************/
+//***************************************************************
+//
+// This file is for internal test only.
+// Do NOT use this file to test CA on Tizen.
+//
+//***************************************************************
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static guint g_test_io_watch_id = 0;
static GError *g_err_Sample = NULL;
-static CALocalConnectivity_t *localWifiEndpoint = NULL;
//Hardcoded coap data for Test
static char coapData[500] =
"{\"oc:\[{href\":\"/a/light\",\"ref\":{\"power\":\"20\",\"state\":\"true\"}}]}";
printf("Invoking start server method\n");
startServer();
}
+ return 0;
}
int16_t interfaceSendUnicastData(CAConnectivityType_t connType)
if (strlen(remoteIPAddress) == 0)
{
printf("Invalid device address\n");
- return;
+ return -1;
}
endpoint.connectivityType = CA_WIFI;
strncpy(endpoint.addressInfo.IP.ipAddress, remoteIPAddress, CA_IPADDR_SIZE);
if (strlen(deviceaddress) == 0)
{
printf("Invlaid device address\n");
- return;
+ return -1;
}
endpoint.connectivityType = CA_EDR;
if (strlen(deviceaddress) == 0)
{
printf("Invlaid device address\n");
- return;
+ return -1;
}
//Get the service uuid from user
if (strlen(uuid) == 0)
{
printf("Invlaid service uuid\n");
- return;
+ return -1;
}
endpoint.connectivityType = CA_LE;
{
tempConnectivityHandlers->handler.sendDataToAll(coapData, strlen(coapData));
}
+ return 0;
}
void interfaceReadData(CAConnectivityType_t connType)
gchar buf[10] = {'\0'};
gsize read = 0;
-
if (g_io_channel_read(channel, buf, 10, &read) != G_IO_ERROR_NONE)
{
printf("g_io_channel_read error!!!\n");