Commit 0327af59 authored by Jay Sharma's avatar Jay Sharma Committed by Uze Choi

[IOT-2034] Updating Enrollee sample app for Tizen

Change-Id: I06468c436db5a883f747772841413a1afef9d23a
Signed-off-by: default avatarHarish Kumar Marappa <h.marappa@samsung.com>
Signed-off-by: default avatarJay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18921Reviewed-by: default avatarJihun Ha <jihun.ha@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 415e986b
......@@ -45,7 +45,11 @@ static pthread_t gThreadHandle = 0;
* It contains Server's Identity and the PSK credentials
* of other devices which the server trusts
*/
#ifdef MULTIPLE_OWNER
static char CRED_FILE[] = "oic_svr_db_server_MOT.dat";
#else
static char CRED_FILE[] = "oic_svr_db_server.dat";
#endif
OCPersistentStorage ps;
......@@ -70,6 +74,25 @@ void PrintMenu()
cout << "========================" << endl;
}
void ConnectRequestCbInApp(ESConnectRequest *connectRequest)
{
cout << "ConnectRequestCbInApp IN" << endl;
if(connectRequest == NULL)
{
cout << "connectRequest is NULL" << endl;
return ;
}
for(int i = 0 ; i < connectRequest->numRequest ; ++i)
{
cout << "connect : " << connectRequest->connect[i] << endl;
}
cout << "ConnectRequestCbInApp OUT" << endl;
PrintMenu();
}
void WiFiConfProvCbInApp(ESWiFiConfData *eventData)
{
cout << "WiFiConfProvCbInApp IN" << endl;
......@@ -116,6 +139,7 @@ void DevConfProvCbInApp(ESDevConfData *eventData)
cout << "Language : " << eventData->language << endl;
cout << "Country : " << eventData->country << endl;
cout << "DevConfProvCbInApp OUT" << endl;
PrintMenu();
}
......@@ -131,13 +155,17 @@ void CoapCloudConfProvCbInApp(ESCoapCloudConfData *eventData)
}
cout << "AuthCode : " << eventData->authCode << endl;
cout << "AcessToken : " << eventData->accessToken << endl;
cout << "AcessTokenType : "<< eventData->accessTokenType << endl;
cout << "AuthProvider : " << eventData->authProvider << endl;
cout << "CI Server : " << eventData->ciServer << endl;
cout << "CoapCloudConfProvCbInApp OUT" << endl;
PrintMenu();
}
ESProvisioningCallbacks gCallbacks = {
.ConnectRequestCb = &ConnectRequestCbInApp,
.WiFiConfProvCb = &WiFiConfProvCbInApp,
.DevConfProvCb = &DevConfProvCbInApp,
.CoapCloudConfProvCb = &CoapCloudConfProvCbInApp
......@@ -157,7 +185,7 @@ FILE* server_fopen(const char *path, const char *mode)
void EnableSecurity()
{
printf("Inside EnableSecurity API..\n");
cout << "Inside EnableSecurity API.." << endl;
gIsSecured = true;
......@@ -225,13 +253,14 @@ void SetDeviceInfo()
{{WIFI_11G, WIFI_11N, WIFI_11AC, WiFi_EOF}, WIFI_5G}, {"Tizen Device"}
};
// Set user properties if needed
// Set device properties
if(ESSetDeviceProperty(&deviceProperty) == ES_ERROR)
{
cout << "ESSetDeviceProperty Error" << endl;
}
// Set user properties if needed
cout << "SetDeviceInfo OUT" << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment