Commit e0305e50 authored by Jihun Ha's avatar Jihun Ha Committed by Uze Choi

Add server ID property in cloud server resource

Server ID property in cloud server resource is added.

Change-Id: I830a39655e269aa157ca4d6c301d594c1ca13c63
Signed-off-by: default avatarJihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9453Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 5ca344b5
......@@ -39,28 +39,6 @@
// Private variables
//-----------------------------------------------------------------------------
/**
* @var gTargetSsid
* @brief Target SSID of the Soft Access point to which the device has to connect
*/
// static char gTargetSsid[MAXSSIDLEN];
/**
* @var gTargetPass
* @brief Password of the target access point to which the device has to connect
*/
// static char gTargetPass[MAXNETCREDLEN];
/**
* @var gEnrolleeStatusCb
* @brief Fucntion pointer holding the callback for intimation of EasySetup Enrollee status callback
*/
// static ESEnrolleeEventCallback gEnrolleeStatusCb = NULL;
/**
* @var gIsSecured
* @brief Variable to check if secure mode is enabled or not.
*/
static bool gIsSecured = false;
static ESProvisioningCallbacks gESProvisioningCb;
......
......@@ -348,6 +348,14 @@ void updateCloudResource(OCRepPayload* input)
OIC_LOG_V(INFO, ES_RH_TAG, "gCloudResource.ciServer %s", gCloudResource.ciServer);
}
char *serverID = NULL;
if (OCRepPayloadGetPropString(input, OC_RSRVD_ES_SERVERID, &serverID))
{
OICStrcpy(gCloudResource.serverID, sizeof(gCloudResource.serverID), serverID);
OICStrcpy(gCloudData.serverID, sizeof(gCloudData.serverID), serverID);
OIC_LOG_V(INFO, ES_RH_TAG, "gCloudResource.serverID %s", gCloudResource.serverID);
}
if(authCode || authProvider || ciServer)
{
OIC_LOG(INFO, ES_RH_TAG, "Send CloudRsrc Callback To ES");
......@@ -439,6 +447,7 @@ OCRepPayload* constructResponseOfCloud()
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_AUTHCODE, gCloudResource.authCode);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_AUTHPROVIDER, gCloudResource.authProvider);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_CISERVER, gCloudResource.ciServer);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_SERVERID, gCloudResource.serverID);
return payload;
}
......
......@@ -64,6 +64,7 @@ typedef struct
char authCode[OIC_STRING_MAX_VALUE];
char authProvider[OIC_STRING_MAX_VALUE];
char ciServer[OIC_STRING_MAX_VALUE];
char serverID[OIC_STRING_MAX_VALUE];
} CloudResource;
typedef struct
......
......@@ -53,7 +53,8 @@ extern "C"
#define OC_RSRVD_ES_ENCTYPE "wet"
#define OC_RSRVD_ES_AUTHCODE "ac"
#define OC_RSRVD_ES_AUTHPROVIDER "apn"
#define OC_RSRVD_ES_CISERVER "cisurl"
#define OC_RSRVD_ES_CISERVER "cis"
#define OC_RSRVD_ES_SERVERID "sid"
#define OC_RSRVD_ES_DEVNAME "dn"
#define OC_RSRVD_ES_LANGUAGE "lang"
#define OC_RSRVD_ES_COUNTRY "ctry"
......@@ -153,6 +154,7 @@ typedef struct
char authCode[OIC_STRING_MAX_VALUE];
char authProvider[OIC_STRING_MAX_VALUE];
char ciServer[OIC_STRING_MAX_VALUE];
char serverID[OIC_STRING_MAX_VALUE];
} ESCloudProvData;
typedef struct
......
......@@ -50,7 +50,8 @@ using namespace std;
#define OC_RSRVD_ES_ENCTYPE "wet"
#define OC_RSRVD_ES_AUTHCODE "ac"
#define OC_RSRVD_ES_AUTHPROVIDER "apn"
#define OC_RSRVD_ES_CISERVER "cisurl"
#define OC_RSRVD_ES_CISERVER "cis"
#define OC_RSRVD_ES_SERVERID "sid"
#define OC_RSRVD_ES_DEVNAME "dn"
#define OC_RSRVD_ES_LANGUAGE "lang"
#define OC_RSRVD_ES_COUNTRY "ctry"
......
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