Commit 45fff888 authored by Sandipan Patra's avatar Sandipan Patra Committed by Uze Choi

[Enrollee] API name modification as per IoTivity coding standard

Change-Id: I6c4f7ed6f07eb67ed989a81e5edf59ece29426b7
Signed-off-by: default avatarSandipan Patra <sandipan.p@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7579Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 06f8877c
......@@ -56,7 +56,7 @@ static char gTargetPass[MAXNETCREDLEN];
* @var gEnrolleeStatusCb
* @brief Fucntion pointer holding the callback for intimation of EasySetup Enrollee status callback
*/
static EventCallback gEnrolleeStatusCb = NULL;
static ESEnrolleeEventCallback gEnrolleeStatusCb = NULL;
/**
* @var gIsSecured
......@@ -67,16 +67,16 @@ static bool gIsSecured = false;
//-----------------------------------------------------------------------------
// Private internal function prototypes
//-----------------------------------------------------------------------------
void OnboardingCallback(ESResult esResult);
void ProvisioningCallback(ESResult esResult);
void OnboardingCallbackTargetNet(ESResult esResult);
static bool ValidateParam(OCConnectivityType networkType, const char *ssid, const char *passwd,
EventCallback cb);
void ESOnboardingCallback(ESResult esResult);
void ESProvisioningCallback(ESResult esResult);
void ESOnboardingCallbackTargetNet(ESResult esResult);
static bool ESEnrolleeValidateParam(OCConnectivityType networkType, const char *ssid,
const char *passwd, ESEnrolleeEventCallback cb);
void OnboardingCallback(ESResult esResult)
void ESOnboardingCallback(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "OnboardingCallback with result = %d", esResult);
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESOnboardingCallback with result = %d", esResult);
if(esResult == ES_OK)
{
gEnrolleeStatusCb(esResult, ES_ON_BOARDED_STATE);
......@@ -89,9 +89,9 @@ void OnboardingCallback(ESResult esResult)
}
}
void ProvisioningCallback(ESResult esResult)
void ESProvisioningCallback(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ProvisioningCallback with result = %d", esResult);
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESProvisioningCallback with result = %d", esResult);
if (esResult == ES_RECVTRIGGEROFPROVRES)
{
......@@ -100,7 +100,7 @@ void ProvisioningCallback(ESResult esResult)
OIC_LOG(DEBUG, ES_ENROLLEE_TAG, "Connecting with target network");
// Connecting/onboarding to target network
ConnectToWiFiNetwork(gTargetSsid, gTargetPass, OnboardingCallbackTargetNet);
ConnectToWiFiNetwork(gTargetSsid, gTargetPass, ESOnboardingCallbackTargetNet);
}
else
{
......@@ -110,9 +110,9 @@ void ProvisioningCallback(ESResult esResult)
}
}
void OnboardingCallbackTargetNet(ESResult esResult)
void ESOnboardingCallbackTargetNet(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "OnboardingCallback on target network with result = %d",
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESOnboardingCallback on target network with result = %d",
esResult);
if(esResult == ES_OK)
{
......@@ -128,15 +128,15 @@ void OnboardingCallbackTargetNet(ESResult esResult)
}
}
ESResult InitEasySetup(OCConnectivityType networkType, const char *ssid, const char *passwd,
ESResult ESInitEnrollee(OCConnectivityType networkType, const char *ssid, const char *passwd,
bool isSecured,
EventCallback cb)
ESEnrolleeEventCallback cb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitEasySetup IN");
if(!ValidateParam(networkType,ssid,passwd,cb))
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitEnrollee IN");
if(!ESEnrolleeValidateParam(networkType,ssid,passwd,cb))
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG,
"InitEasySetup::Stopping Easy setup due to invalid parameters");
"ESInitEnrollee::Stopping Easy setup due to invalid parameters");
return ES_ERROR;
}
......@@ -152,18 +152,18 @@ ESResult InitEasySetup(OCConnectivityType networkType, const char *ssid, const c
OIC_LOG(INFO, ES_ENROLLEE_TAG, "received callback");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "onboarding now..");
if(!ESOnboard(ssid, passwd, OnboardingCallback))
if(!ESOnboard(ssid, passwd, ESOnboardingCallback))
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "InitEasySetup::On-boarding failed");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESInitEnrollee::On-boarding failed");
cb(ES_ERROR, ES_INIT_STATE);
return ES_ERROR;
}
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitEasySetup OUT");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitEnrollee OUT");
return ES_OK;
}
ESResult TerminateEasySetup()
ESResult ESTerminateEnrollee()
{
UnRegisterResourceEventCallBack();
......@@ -174,13 +174,13 @@ ESResult TerminateEasySetup()
return ES_ERROR;
}
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "TerminateEasySetup success");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESTerminateEnrollee success");
return ES_OK;
}
ESResult InitProvisioning()
ESResult ESInitProvisioning()
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitProvisioning <<IN>>");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitProvisioning <<IN>>");
if (CreateProvisioningResource(gIsSecured) != OC_STACK_OK)
{
......@@ -188,18 +188,18 @@ ESResult InitProvisioning()
return ES_ERROR;
}
RegisterResourceEventCallBack(ProvisioningCallback);
RegisterResourceEventCallBack(ESProvisioningCallback);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitProvisioning OUT");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitProvisioning <<OUT>>");
return ES_RESOURCECREATED;
}
static bool ValidateParam(OCConnectivityType /*networkType*/, const char *ssid, const char *passwd,
EventCallback cb)
static bool ESEnrolleeValidateParam(OCConnectivityType /*networkType*/, const char *ssid,
const char *passwd, ESEnrolleeEventCallback cb)
{
if (!ssid || !passwd || !cb)
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ValidateParam - Invalid parameters");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESEnrolleeValidateParam - Invalid parameters");
return false;
}
return true;
......
......@@ -60,7 +60,7 @@ bool ESBleOnboarding()
/**
* It will do onboarding based on the user's configuration.
*/
bool ESOnboard(const char * ssid, const char* passwd, NetworkEventCallback cb)
bool ESOnboard(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb)
{
OIC_LOG(DEBUG, ES_ENROLLEE_TAG, "ESOnboard IN");
......
......@@ -58,9 +58,9 @@ OCEntityHandlerResult ProcessPutRequest(OCEntityHandlerRequest *ehRequest, OCRep
OCEntityHandlerResult ProcessPostRequest(OCEntityHandlerRequest *ehRequest, OCRepPayload** payload);
OCRepPayload* constructResponse(OCEntityHandlerRequest *ehRequest);
ResourceEventCallback gNetworkInfoProvEventCb = NULL;
ESEnrolleeResourceEventCallback gNetworkInfoProvEventCb = NULL;
void RegisterResourceEventCallBack(ResourceEventCallback cb)
void RegisterResourceEventCallBack(ESEnrolleeResourceEventCallback cb)
{
gNetworkInfoProvEventCb = cb;
}
......
......@@ -20,7 +20,7 @@
void ESCreateSoftapCallback(int result, const char *ip, const char* mac_addr,
const char* device_name );
NetworkEventCallback gCallback;
ESEnrolleeNetworkEventCallback gCallback;
/**
* It will return Device which is creating Soft AP.
......@@ -76,7 +76,7 @@ void ESCreateSoftapCallback(int result, const char *ip, const char* mac_addr,
/**
* This API will create the softap at enrollee
*/
void ESCreateSoftap(const char * ssid, const char* passwd, NetworkEventCallback cb)
void ESCreateSoftap(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb)
{
gCallback = cb;
......
......@@ -50,7 +50,8 @@ static IPAddress enrolleeIP;
/**
* @var g_retryCounter
* @brief Retry counter for cancelling network retry. Currently network retry is limited to 5 attempts
* @brief Retry counter for cancelling network retry. Currently network retry is
* limited to 5 attempts
*/
static uint16_t g_retryCounter = 0;
......@@ -68,7 +69,8 @@ void printEncryptionType(int thisType);
// this server will NOT be listening on 224.0.1.187 multicast address.
static const char ARDUINO_WIFI_SHIELD_UDP_FW_VER[] = "1.1.0";
ESResult ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback cb)
ESResult ConnectToWiFiNetwork(const char *ssid, const char *pass,
ESEnrolleeNetworkEventCallback cb)
{
char *fwVersion;
int status = WL_IDLE_STATUS;
......
......@@ -49,7 +49,7 @@
*
* @param esResult ESResult provides the current state of the network connection status
*/
typedef void (*NetworkEventCallback)(ESResult esResult);
typedef void (*ESEnrolleeNetworkEventCallback)(ESResult esResult);
typedef struct
{
......@@ -61,7 +61,8 @@ typedef struct
byte mac[6];
} NetworkInfo;
ESResult ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback);
ESResult ConnectToWiFiNetwork(const char *ssid, const char *pass,
ESEnrolleeNetworkEventCallback);
ESResult getCurrentNetworkInfo(OCConnectivityType targetType, NetworkInfo *info);
#endif
......@@ -35,33 +35,34 @@ extern "C" {
#endif // __cplusplus
/*
* Callback function for updating the Enrollee OnBoarding and Provisioning status result to the application
* Callback function for updating the Enrollee OnBoarding and Provisioning status result
* to the application
*
* @param esResult ESResult provides the current state of the Enrollee Device
*/
typedef void (*EventCallback)(ESResult esResult, EnrolleeState enrolleeState);
typedef void (*ESEnrolleeEventCallback)(ESResult esResult, ESEnrolleeState enrolleeState);
/**
* This function Initializes the EasySetup. This API must be called prior to invoking any other API
*
* @param networkType NetworkType on which OnBoarding has to be performed.
* @param ssid SSID of the target SoftAP network to which the Enrollee is connecting.
* @param passwd Password of the target SoftAP network to which the Enrollee is connecting
* @param passwd Password of the target SoftAP network to which the Enrollee is
* connecting
* @param isSecured True if the Enrollee is operating in secured mode.
* @param eventCallback EventCallback for for updating the Enrollee OnBoarding status result to
* the application
* @param eventCallback ESEnrolleeEventCallback for for updating the Enrollee OnBoarding status
* result to the application
* @return ::ES_OK on success, some other value upon failure.
*/
ESResult InitEasySetup(OCConnectivityType networkType, const char *ssid, const char *passwd,
bool isSecured,
EventCallback eventCallback);
ESResult ESInitEnrollee(OCConnectivityType networkType, const char *ssid, const char *passwd,
bool isSecured, ESEnrolleeEventCallback eventCallback);
/**
* This function performs initialization of Provisioning and Network resources needed for EasySetup
* process.
* @return ::ES_OK on success, some other value upon failure.
*/
ESResult InitProvisioning();
ESResult ESInitProvisioning();
/**
* This function performs termination of Provisioning and Network resources.
......@@ -69,7 +70,7 @@ ESResult InitProvisioning();
*
* @return ::ES_OK on success, some other value upon failure.
*/
ESResult TerminateEasySetup();
ESResult ESTerminateEnrollee();
#ifdef __cplusplus
}
......
......@@ -31,7 +31,7 @@
const char *gSsid = "DLNA_LISMORE1";
const char *gPass = "dlna@010203";
char *gIpAddress;
NetworkEventCallback gNetworkEventCb;
ESEnrolleeNetworkEventCallback gNetworkEventCb;
/*
* All the functions defined in this file are stub functions to be implemented by the end user of
......@@ -48,7 +48,8 @@ static void start()
ESActivateWifi();
}
void ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback cb)
void ConnectToWiFiNetwork(const char *ssid, const char *pass,
ESEnrolleeNetworkEventCallback cb)
{
OIC_LOG_V(INFO, LOG_TAG, "ConnectToWiFiNetwork %s %s",ssid,pass);
gPass = pass;
......
......@@ -43,7 +43,7 @@
*
* @param esResult ESResult provides the current state of the network connection status
*/
typedef void (*NetworkEventCallback)(ESResult esResult);
typedef void (*ESEnrolleeNetworkEventCallback)(ESResult esResult);
typedef struct
{
......@@ -56,7 +56,8 @@ typedef struct
//byte mac[6];
} NetworkInfo;
void ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback);
void ConnectToWiFiNetwork(const char *ssid, const char *pass,
ESEnrolleeNetworkEventCallback);
ESResult getCurrentNetworkInfo(OCConnectivityType targetType, NetworkInfo *info);
#endif
......@@ -57,7 +57,7 @@ static char gTargetPass[MAXNETCREDLEN];
* @var gEnrolleeStatusCb
* @brief Fucntion pointer holding the callback for intimation of EasySetup Enrollee status callback
*/
static EventCallback gEnrolleeStatusCb = NULL;
static ESEnrolleeEventCallback gEnrolleeStatusCb = NULL;
/**
* @var gIsSecured
......@@ -65,9 +65,9 @@ static EventCallback gEnrolleeStatusCb = NULL;
*/
static bool gIsSecured = false;
void OnboardingCallback(ESResult esResult)
void ESOnboardingCallback(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "OnboardingCallback with result = %d", esResult);
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESOnboardingCallback with result = %d", esResult);
if(esResult == ES_OK)
{
gEnrolleeStatusCb(esResult, ES_ON_BOARDED_STATE);
......@@ -80,9 +80,9 @@ void OnboardingCallback(ESResult esResult)
}
}
void ProvisioningCallback(ESResult esResult)
void ESProvisioningCallback(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ProvisioningCallback with result = %d", esResult);
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESProvisioningCallback with result = %d", esResult);
if (esResult == ES_RECVTRIGGEROFPROVRES)
{
......@@ -91,7 +91,7 @@ void ProvisioningCallback(ESResult esResult)
OIC_LOG(DEBUG, ES_ENROLLEE_TAG, "Connecting with target network");
// Connecting/onboarding to target network
ConnectToWiFiNetwork(gTargetSsid, gTargetPass, OnboardingCallbackTargetNet);
ConnectToWiFiNetwork(gTargetSsid, gTargetPass, ESOnboardingCallbackTargetNet);
}
else
{
......@@ -101,9 +101,9 @@ void ProvisioningCallback(ESResult esResult)
}
}
void OnboardingCallbackTargetNet(ESResult esResult)
void ESOnboardingCallbackTargetNet(ESResult esResult)
{
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "OnboardingCallback on target network with result = %d",
OIC_LOG_V(DEBUG, ES_ENROLLEE_TAG, "ESOnboardingCallback on target network with result = %d",
esResult);
if(esResult == ES_OK)
{
......@@ -119,15 +119,15 @@ void OnboardingCallbackTargetNet(ESResult esResult)
}
}
ESResult InitEasySetup(OCConnectivityType networkType, const char *ssid, const char *passwd,
ESResult ESInitEnrollee(OCConnectivityType networkType, const char *ssid, const char *passwd,
bool isSecured,
EventCallback cb)
ESEnrolleeEventCallback cb)
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitEasySetup IN");
if(!ValidateParam(networkType,ssid,passwd,cb))
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitEnrollee IN");
if(!ESEnrolleeValidateParam(networkType,ssid,passwd,cb))
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG,
"InitEasySetup::Stopping Easy setup due to invalid parameters");
"ESInitEnrollee::Stopping Easy setup due to invalid parameters");
return ES_ERROR;
}
......@@ -143,18 +143,18 @@ ESResult InitEasySetup(OCConnectivityType networkType, const char *ssid, const c
OIC_LOG(INFO, ES_ENROLLEE_TAG, "received callback");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "onboarding now..");
if(!ESOnboard(ssid, passwd, OnboardingCallback))
if(!ESOnboard(ssid, passwd, ESOnboardingCallback))
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "InitEasySetup::On-boarding failed");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESInitEnrollee::On-boarding failed");
cb(ES_ERROR, ES_INIT_STATE);
return ES_ERROR;
}
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitEasySetup OUT");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitEnrollee OUT");
return ES_OK;
}
ESResult TerminateEasySetup()
ESResult ESTerminateEnrollee()
{
UnRegisterResourceEventCallBack();
......@@ -165,13 +165,13 @@ ESResult TerminateEasySetup()
return ES_ERROR;
}
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "TerminateEasySetup success");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESTerminateEnrollee success");
return ES_OK;
}
ESResult InitProvisioning()
ESResult ESInitProvisioning()
{
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitProvisioning <<IN>>");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitProvisioning <<IN>>");
if (CreateProvisioningResource(gIsSecured) != OC_STACK_OK)
{
......@@ -179,18 +179,18 @@ ESResult InitProvisioning()
return ES_ERROR;
}
RegisterResourceEventCallBack(ProvisioningCallback);
RegisterResourceEventCallBack(ESProvisioningCallback);
OIC_LOG(INFO, ES_ENROLLEE_TAG, "InitProvisioning OUT");
OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESInitProvisioning <<OUT>>");
return ES_RESOURCECREATED;
}
static bool ValidateParam(OCConnectivityType networkType, const char *ssid, const char *passwd,
EventCallback cb)
static bool ESEnrolleeValidateParam(OCConnectivityType networkType, const char *ssid,
const char *passwd, ESEnrolleeEventCallback cb)
{
if (!ssid || !passwd || !cb)
{
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ValidateParam - Invalid parameters");
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESEnrolleeValidateParam - Invalid parameters");
return false;
}
return true;
......
......@@ -38,26 +38,26 @@ extern "C" {
// Private internal callback function prototypes for Easy setup [Enrollee]
//-----------------------------------------------------------------------------
/*
/*
* Callback for on boarding
*/
void OnboardingCallback(ESResult esResult);
void ESOnboardingCallback(ESResult esResult);
/*
/*
* Callback for provisioning
*/
void ProvisioningCallback(ESResult SSSS);
void ESProvisioningCallback(ESResult SSSS);
/*
/*
* Callback for on boarding target Network
*/
void OnboardingCallbackTargetNet(ESResult esResult);
void ESOnboardingCallbackTargetNet(ESResult esResult);
/*
* Function for validating the parameter for InitEasySetup API
/*
* Function for validating the parameter for ESInitEnrollee API
*/
static bool ValidateParam(OCConnectivityType networkType, const char *ssid, const char *passwd,
EventCallback cb);
static bool ESEnrolleeValidateParam(OCConnectivityType networkType, const char *ssid,
const char *passwd, ESEnrolleeEventCallback cb);
#ifdef __cplusplus
}
......
......@@ -60,7 +60,7 @@ bool ESBleOnboarding()
/**
* It will do onboarding based on the user's configuration.
*/
bool ESOnboard(const char * ssid, const char* passwd, NetworkEventCallback cb)
bool ESOnboard(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb)
{
OIC_LOG(DEBUG, ES_ENROLLEE_TAG, "ESOnboard IN");
......
......@@ -32,18 +32,21 @@ extern "C" {
* @file
*
* This file contains APIs to on-board ( connect ) Enrollee device into Ad-hoc network
* @Note : Some of the APIs of this file need to be modified by the OEM according to the device configuration
* @Note : Some of the APIs of this file need to be modified by the OEM according to the
* device configuration
*/
/**
* This function on-board Enrollee device onto ad-hoc network.
* @param ssid SSID of the target SoftAP network to which the Enrollee is connecting.
* @param passwd Password of the target SoftAP network to which the Enrollee is connecting.
* @param NetworkEventCallback Callback function for result update
* @param ssid SSID of the target SoftAP network to which the Enrollee
* is connecting.
* @param passwd Password of the target SoftAP network to which the
* Enrollee is connecting.
* @param ESEnrolleeNetworkEventCallback Callback function for result update
* @return ::True, if on-boarding is successful.
*/
bool ESOnboard(const char * ssid, const char* passwd, NetworkEventCallback cb);
bool ESOnboard(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb);
/**
* This function verify if the on-boarding is through SoftAP.
......
......@@ -58,9 +58,9 @@ OCEntityHandlerResult ProcessPutRequest(OCEntityHandlerRequest *ehRequest, OCRep
OCEntityHandlerResult ProcessPostRequest(OCEntityHandlerRequest *ehRequest, OCRepPayload** payload);
OCRepPayload* constructResponse(OCEntityHandlerRequest *ehRequest);
ResourceEventCallback gNetworkInfoProvEventCb = NULL;
ESEnrolleeResourceEventCallback gNetworkInfoProvEventCb = NULL;
void RegisterResourceEventCallBack(ResourceEventCallback cb)
void RegisterResourceEventCallBack(ESEnrolleeResourceEventCallback cb)
{
gNetworkInfoProvEventCb = cb;
}
......
......@@ -34,7 +34,7 @@
extern "C" {
#endif
typedef void (*ResourceEventCallback)(ESResult);
typedef void (*ESEnrolleeResourceEventCallback)(ESResult);
/* Structure to represent a Light resource */
typedef struct PROVRESOURCE
......@@ -61,7 +61,7 @@ OCStackResult CreateProvisioningResource(bool isSecured);
OCStackResult DeleteProvisioningResource();
void GetTargetNetworkInfoFromProvResource(char *, char *);
void RegisterResourceEventCallBack(ResourceEventCallback);
void RegisterResourceEventCallBack(ESEnrolleeResourceEventCallback);
void UnRegisterResourceEventCallBack(void);
#ifdef __cplusplus
......
......@@ -20,7 +20,7 @@
void ESCreateSoftapCallback(int result, const char *ip, const char* mac_addr,
const char* device_name );
NetworkEventCallback gCallback;
ESEnrolleeNetworkEventCallback gCallback;
/**
* It will return Device which is creating Soft AP.
......@@ -76,7 +76,7 @@ void ESCreateSoftapCallback(int result, const char *ip, const char* mac_addr,
/**
* This API will create the softap at enrollee
*/
void ESCreateSoftap(const char * ssid, const char* passwd, NetworkEventCallback cb)
void ESCreateSoftap(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb)
{
gCallback = cb;
......
......@@ -33,7 +33,8 @@ extern "C" {
* @file
*
* This file contains platform agnostic API for creation of Soft AP
* @Note : Some of the APIs of this file need to be modified by the OEM according to the device configuration
* @Note : Some of the APIs of this file need to be modified by the OEM according to the device
* configuration
*/
/**
......@@ -64,12 +65,14 @@ DeviceRole ESSoftapHost();
/**
* This function Initializes the EasySetup. This API must be called prior to invoking any other API
*
* @param ssid SSID of the target SoftAP network to which the Enrollee is connecting.
* @param passwd Password of the target SoftAP network to which the Enrollee is connecting
* @param NetworkEventCallback Callback function for result update
* @param ssid SSID of the target SoftAP network to which the Enrollee is
* connecting.
* @param passwd Password of the target SoftAP network to which the Enrollee is
* connecting
* @param ESEnrolleeNetworkEventCallback Callback function for result update
* @return ::void.
*/
void ESCreateSoftap(const char * ssid, const char* passwd, NetworkEventCallback cb);
void ESCreateSoftap(const char * ssid, const char* passwd, ESEnrolleeNetworkEventCallback cb);
#ifdef __cplusplus
......
......@@ -33,7 +33,7 @@ const char *gSsid = "DLNA_LISMORE1";
const char *gPass = "dlna@010203";
char *gIpAddress = NULL;
wifi_ap_h connectedWifi;
NetworkEventCallback gNetworkEventCb;
ESEnrolleeNetworkEventCallback gNetworkEventCb;
static void ESActivateWifi();
static const char*
......@@ -152,7 +152,8 @@ static void start()
ESActivateWifi();
}
void ConnectToWiFiNetwork(const char *ssid, const char *pass, NetworkEventCallback cb)
void ConnectToWiFiNetwork(const char *ssid, const char *pass,
ESEnrolleeNetworkEventCallback cb)