}
}
+/**
+* @function IotconGetSvrDBPath
+* @description Gets path to initialize iotcon
+* @parameter[OUT] path
+* @return NA
+*/
+int IotconGetSvrDBPath(char **path)
+{
+ char file_path[PATH_MAX] = {0};
+ char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+ const char *svr_db_file = "svr_db.dat";
+
+ if (false == GetValueForTCTSetting("DEVICE_USER_30", pszValue, API_NAMESPACE)) {
+ PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+ return -1;
+ }
+
+ PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_USER_30' Values Received = %s\\n",
+ __LINE__, API_NAMESPACE, pszValue);
+
+ snprintf(file_path, sizeof(file_path), "%s/apps_rw/native-iotcon-itc/data/%s", pszValue,
+ svr_db_file);
+
+ *path = strdup(file_path);
+
+ return 0;
+}
+
/** @} */ //end of ctc-platform-permission
char* InputmethodGetError(int nRet);
void EflUtilDeleteWindow(void *pData, Evas_Object *pstWindow, void *pEvent);
bool EflUtilCreateNotificationWindow(Evas_Object **pstWindow);
+int IotconGetSvrDBPath(char **path);
#ifdef MOBILE //Starts MOBILE
char* ContextHistoryGetError(int nRet);
#endif //MOBILE //End MOBILE
{
START_TEST;
int nRet = 0;
-
+ char *pSvrDBPath;
+
if ( !TCTCheckSystemInfoFeatureSupported(IOTCON_FEATURE, API_NAMESPACE) )
{
return 0;
}
- nRet = iotcon_initialize();
- PRINT_RESULT_ERROR_NONE(TIZEN_ERROR_PERMISSION_DENIED, nRet, "iotcon_initialize", IotConGetError(nRet),iotcon_deinitialize(),IOTCON_ERROR_NONE);
+ IotconGetSvrDBPath(&pSvrDBPath);
+ nRet = iotcon_initialize(pSvrDBPath);
+ free(pSvrDBPath);
+ PRINT_RESULT(TIZEN_ERROR_PERMISSION_DENIED, nRet, "iotcon_initialize", IotConGetError(nRet));
- iotcon_deinitialize();
+ iotcon_deinitialize();
return 0;
}