sdb push $PWD/release/binary-$ARCH/SampleMP3.mp3 /home/$EXECUTION_USER/media/Sounds
sdb push $PWD/release/binary-$ARCH/sampleH263.3gp /home/$EXECUTION_USER/media/Videos
sdb push $PWD/release/binary-$ARCH/tbt_push_auth.xml /home/$EXECUTION_USER/media/Others
- sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-client.dat /home/$EXECUTION_USER/media/Others
- sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-server.dat /home/$EXECUTION_USER/media/Others
sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Images/dog_1024_960.gif
sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Sounds/SampleMP3.mp3
sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Videos/sampleH263.3gp
sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/tbt_push_auth.xml
- sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/iotcon-test-svr-db-client.dat
- sdb shell chown $EXECUTION_USER:priv_mediastorage /home/$EXECUTION_USER/media/Others/iotcon-test-svr-db-server.dat
+
+ echo $yellow"Pushing iotcon db files"
+ sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-client.dat /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/
+ sdb push $PWD/release/binary-$ARCH/iotcon-test-svr-db-server.dat /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/
+
+ sdb shell chown $EXECUTION_USER:5000 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat
+ sdb shell chown $EXECUTION_USER:5000 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat
+ sdb shell chmod 777 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat
+ sdb shell chmod 777 /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat
+ sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data
+ sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data
+ sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat
+ sdb shell chsmack -a "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat
+ sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-client.dat
+ sdb shell chsmack -e "User::App::Shared" /home/$EXECUTION_USER/apps_rw/org.tizen.$MOD_NAME/data/iotcon-test-svr-db-server.dat
+
echo ""$reset
fi
sdb root off
else
echo "Entered invalid arguments"
helpusage
-fi
\ No newline at end of file
+fi
#include <Elementary.h>
#include <iotcon.h>
#include <glib.h>
-
+#include <app_control.h>
#include "utils/logger.h"
#include "utils/config.h"
#include "utils/ui-utils.h"
#endif
evas_object_show(this->info_list);
- char db_file_path[256]={'\0',};
+ char db_file_path_server[256]={'\0',};
+ char db_file_path_client[256]={'\0',};
+ char* pPath = NULL;
+ pPath = app_get_data_path();
+ DBG("pPath %s",pPath);
+ if(!pPath)
+ return NULL;
+ snprintf(db_file_path_server, sizeof(db_file_path_server), "%s%s",pPath,"iotcon-test-svr-db-server.dat");
+ DBG("db_file_path_server file set = %s", db_file_path_server);
+ snprintf(db_file_path_client, sizeof(db_file_path_client), "%s%s",pPath,"iotcon-test-svr-db-client.dat");
+ DBG("db_file_path_client file set = %s", db_file_path_client);
+ free(pPath);
if(this->view->tbt_info->apptype == TBT_APP_IOTCON_BASIC_SERVER)
{
int ret;
- snprintf(db_file_path, sizeof(db_file_path), "%s/%s",TBT_LOGGING_DIR,"iotcon-test-svr-db-server.dat");
- DBG("db_file_path file set = %s", db_file_path);
-
- ret = iotcon_initialize(db_file_path);
+ ret = iotcon_initialize(db_file_path_server);
RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_initialize error %s", get_iotcon_error(ret));
ret = iotcon_set_device_name("iotcon-test-basic-server");
Evas_Object *control = add_control_layout(this, this->view->layout);
elm_object_part_content_set(this->view->layout, "iotcon_btn", control);
- snprintf(db_file_path, sizeof(db_file_path), "%s/%s",TBT_LOGGING_DIR,"iotcon-test-svr-db-client.dat");
- DBG("db_file_path file set = %s", db_file_path);
-
int ret;
- ret = iotcon_initialize(db_file_path);
+ ret = iotcon_initialize(db_file_path_client);
RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_initialize error %s", get_iotcon_error(ret));
ret = iotcon_query_create(&this->query);
RETVM_IF(ret != IOTCON_ERROR_NONE, NULL, "iotcon_find_resource error %s", get_iotcon_error(ret));
}
-
- return this;
+ return this;
}