Added API for SSOList in SC Easysetup 89/191489/1
authoragrkush <kush.agrawal@samsung.com>
Wed, 17 Oct 2018 07:50:51 +0000 (13:20 +0530)
committerAmit KS <amit.s12@samsung.com>
Wed, 17 Oct 2018 11:37:03 +0000 (17:07 +0530)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/330
(cherry picked from commit ee54128ab52b613734213d16cdbaebb0c9c1c409)

Change-Id: I5841fd01f0fd831bf8b7269db1fd305746ab9437
Signed-off-by: agrkush <kush.agrawal@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
service/easy-setup/enrollee/inc/samsung/sc_easysetup.h
service/easy-setup/enrollee/src/samsung/sc_easysetup.c
service/easy-setup/sampleapp/enrollee/linux-samsung/sc_enrollee.c

index fc4a42a..18bd0f0 100644 (file)
@@ -168,5 +168,6 @@ ESResult SetSCNetConnectionState(NETCONNECTION_STATE netConnectionState);
 ESResult SetSCPnPPin(const char *pnp);
 
 ESResult SetESVersionInfo(const char *esVersionInfo);
+ESResult SetSSOList(const char *ssoList);
 
 #endif /* EASYSETUPX_ENROLLEE_H__ */
index ac883f0..70d22b5 100755 (executable)
@@ -238,6 +238,16 @@ ESResult SetESVersionInfo(const char *esProtocolVersion)
     return ES_ERROR;
 }
 
+ESResult SetSSOList(const char *ssoList)
+{
+    if(ssoList != NULL)
+    {
+        OICStrcpy(g_SCProperties.ssoList, sizeof(g_SCProperties.ssoList), ssoList);
+        return ES_OK;
+    }
+    return ES_ERROR;
+}
+
 void ReadUserdataCb(OCRepPayload* payload, char* resourceType, void** userdata)
 {
     OIC_LOG(INFO, SC_ENROLLEE_TAG, "ReadUserdataCb IN");
index 0713cc9..67e2c99 100644 (file)
@@ -225,6 +225,9 @@ void SetDeviceInfo()
     if(SetSCProperties(&g_SCProperties) == ES_ERROR)
         printf("SetSCProperties Error\n");
 
+    if(SetSSOList( "[{\"AvailableCount\" : \"1\", \"RegisteredCount\" : \"3\", \"AccountList\" : {\"aaa@samsung.com\", \"bbb@samsung.com\",\"ccc@samsung.com\"} }] ")== ES_ERROR)
+        printf("SetSSOList Error\n");
+
     printf("SetDeviceInfo OUT\n");
 }