From 69b40f54f2d036cf7c8853e0beed5f9f09888054 Mon Sep 17 00:00:00 2001 From: Ickhee Woo Date: Thu, 17 Sep 2015 15:25:17 +0900 Subject: [PATCH] fixed upper/lower cases typo for consistency. Change-Id: Idfae79b4bdff6c5844d130ad4d617cc505078a21 Signed-off-by: Ickhee Woo --- org.tizen.sampledescriptions/html/index.htm | 4 +- .../html/mobile_n/sd_mn.htm | 6 +- .../html/mobile_n/syncadapterapp_sd_mn.htm | 99 +++++++++++----------- .../html/mobile_n/syncadapterserviceapp_sd_mn.htm | 26 +++--- org.tizen.sampledescriptions/index.xml | 4 +- 5 files changed, 69 insertions(+), 70 deletions(-) diff --git a/org.tizen.sampledescriptions/html/index.htm b/org.tizen.sampledescriptions/html/index.htm index d650a54..3993e38 100644 --- a/org.tizen.sampledescriptions/html/index.htm +++ b/org.tizen.sampledescriptions/html/index.htm @@ -121,8 +121,8 @@
  • Simple Homescreen
  • Sketch
  • Stopwatch
  • -
  • Syncadapter UI App
  • -
  • Syncadapter Service App
  • +
  • Sync Adapter App
  • +
  • Sync Adapter Service App
  • System Info
  • Taskmanager
  • UI Components
  • diff --git a/org.tizen.sampledescriptions/html/mobile_n/sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/sd_mn.htm index 212d27b..61cbc4e 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/sd_mn.htm +++ b/org.tizen.sampledescriptions/html/mobile_n/sd_mn.htm @@ -188,12 +188,12 @@ Demonstrates how you can implement a complex view using recursive composition of the standard EFL UI components and containers in a component hierarchy. - Sync adapter UI App + Sync Adapter App Demonstrates how you can add different sync requests to sync manager for scheduling of data synchronization tasks - Sync adapter Service App - Demonstrates how sync callbacks are to be implemented to handle sync requests from Sync adapter UI app + Sync Adapter Service App + Demonstrates how sync callbacks are to be implemented to handle sync requests from sync adapter UI app System Info diff --git a/org.tizen.sampledescriptions/html/mobile_n/syncadapterapp_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/syncadapterapp_sd_mn.htm index 8bdfbdb..9c7eb77 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/syncadapterapp_sd_mn.htm +++ b/org.tizen.sampledescriptions/html/mobile_n/syncadapterapp_sd_mn.htm @@ -11,7 +11,7 @@ - Sync Adapter Sample Overview + Sync Adapter App Sample Overview @@ -24,16 +24,16 @@

    Mobile native

    -

    Sync Adapter Sample Overview

    +

    Sync Adapter App Sample Overview

    The application opens with the Sync Adapter App screen, which displays a list of sync manager features.

    The following figure illustrates the home screen of the application.

    -

    Figure: Sync adapter home screen view

    -

    Sync adapter home screen view +

    Figure: Sync Adapter App home screen view

    +

    sync adapter home screen view

    @@ -60,17 +60,17 @@
  • http://tizen.org/privilege/contact.read
  • -
  • Launch the service app which acts as a sync adapter to this UI app. The service app must be built and included along with Sync adapter UI app into the package. +
  • Launch the Sync Adapter Service App which acts as a sync adapter to this UI application. The service application must be built and included along with Sync Adapter App into the package. Please refer Sync Adapter Service App for reference.
    -#define SYNC_ADAPTER_APP_ID "org.tizen.syncadapterserviceapp"
    +#define SYNC_ADAPTER_SERVICE_APP_ID "org.tizen.syncadapterserviceapp"
     
     static void
     create_sync_main_menu(appdata_s *ad)
     {
     	app_control_h app_control;
    -	int ret = app_control_create(&app_control);
    -	ret = app_control_set_app_id(app_control, SYNC_ADAPTER_APP_ID);
    +	int ret = app_control_create(&app_control);
    +	ret = app_control_set_app_id(app_control, SYNC_ADAPTER_SERVICE_APP_ID);
     
     	app_control_send_launch_request(app_control, NULL, NULL);
     	...
    @@ -88,7 +88,7 @@ create_account()
     	sa_account_id = 10;
     	account_h account;
     
    -	int ret = account_create(&account);
    +	int ret = account_create(&account);
     	LOGI("account_create = %d", ret);
     
     	ret = account_set_user_name(account, "dummy_user");
    @@ -103,7 +103,7 @@ create_account()
     	ret = account_set_sync_support(account, ACCOUNT_SYNC_STATUS_IDLE);
     	LOGI("account_set_sync_support = %d", ret);
     
    -	ret = account_insert_to_db(account, &sa_account_id);
    +	ret = account_insert_to_db(account, &sa_account_id);
     	LOGI("Account id is = %d", sa_account_id);
     	account_destroy(account);
     
    @@ -118,7 +118,7 @@ create_account()
     
     

    Request On Demand Sync

      -
    1. To perform On Demand sync select On Demand sync from home screen view. Click on Sync button which will trigger corresponding sync manager API as shown below. +
    2. To perform On Demand Sync select On Demand Sync from home screen view. Click on Sync button which will trigger corresponding sync manager API as shown below.
       static void
       cb_add_on_demand_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
      @@ -129,14 +129,14 @@ cb_add_on_demand_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       	account_query_account_by_user_name(query_account_cb, "dummy_user", NULL);
       
       	account_h account;
      -	account_create(&account);
      -	account_query_account_by_account_id(sa_account_id, &account);
      +	account_create(&account);
      +	account_query_account_by_account_id(sa_account_id, &account);
       
       	bundle *extra = bundle_create();
       	bundle_add_str(extra, "URL", "http://android-developers.blogspot.com/atom.xml");
      -	viewData->account_id = sa_account_id;
      +	viewData->account_id = sa_account_id;
       
      -	int ret = sync_manager_on_demand_sync_job(account, "OnDemand", SYNC_OPTION_NO_RETRY, extra, &on_demand_sync_job_id);
      +	int ret = sync_manager_on_demand_sync_job(account, "OnDemand", SYNC_OPTION_NO_RETRY, extra, &on_demand_sync_job_id);
       	if (ret != SYNC_ERROR_NONE)
       		LOGE("Sync manager failed with error code %d", ret);
       	else
      @@ -148,27 +148,27 @@ cb_add_on_demand_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       }
    3. -
    4. When the sync manager schedules sync job for this request, sync callbacks in sync adapter service app will be invoked. The sync adapter service app will download the titles from the URL parameter sent along with the API and writes it into a database. -Upon completion of sync job, service app will communicate the same to Sync adapter UI app using app_control. +
    5. When the sync manager schedules a sync job for this request, sync callback functions in Sync Adapter Service App will be invoked. The Sync Adapter Service App will download the titles from the URL parameter sent along with the API and writes it into a database. +Upon completion of the sync job, the service application will communicate the same to Sync Adapter App by using app_control.
       static void
       app_control(app_control_h app_control, void *data)
       {
       	char *operation;
      -	int ret = app_control_get_operation(app_control, &operation);
      +	int ret = app_control_get_operation(app_control, &operation);
       	if (ret != APP_CONTROL_ERROR_NONE) {
       		LOGE("failed to get operation");
       		return;
       	}
       
      -	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/sync_complete")) {
      +	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/sync_complete")) {
       		LOGE("Sync completed by service app. Loading ..");
       
       		char* collist[5];
       		collist[0] = "TITLE";
       
       		int req_id;
      -		int result = data_control_sql_select_with_page(sql_provider, collist, 1, NULL, "TITLE DESC", 1, 5, &req_id);
      +		int result = data_control_sql_select_with_page(sql_provider, collist, 1, NULL, "TITLE DESC", 1, 5, &req_id);
       		if (result != DATA_CONTROL_ERROR_NONE)
       			LOGE("data_control_sql_select() is failed: ");
       		return;
      @@ -220,7 +220,7 @@ static void select_response_cb(int request_id, data_control_h provider, result_s
       			char word[1024] = {0};
       			char word_desc[1024] = {0};
       			int count = 0;
      -			while (data_control_sql_step_next(enumerator) == DATA_CONTROL_ERROR_NONE && ++count < 10) {
      +			while (data_control_sql_step_next(enumerator) == DATA_CONTROL_ERROR_NONE && ++count < 10) {
       				memset(word, 0, 1024);
       				memset(word_desc, 0, 1024);
       				data_control_sql_get_column_name(enumerator, 0, col_name);
      @@ -242,34 +242,34 @@ static void select_response_cb(int request_id, data_control_h provider, result_s
       
    -

    Periodic sync

    +

    Periodic Sync

    Figure: Periodic Sync

    Periodic Sync Periodic sync

    Request Periodic Sync

      -
    1. To perform Periodic sync select Periodic sync from home screen view. Click on Sync button which will trigger corresponding sync manager API as shown below. +
    2. To perform Periodic Sync select Periodic Sync from home screen view. Click on Sync button which will trigger corresponding sync manager API as shown below.
       static void
       cb_add_periodic_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       {
       	LOGI("Request periodic sync");
       	viewdata_s* viewData = pData;
      -	elm_object_text_set(viewData->syncBtn, "Wait for 30 Min");
      -	evas_object_smart_callback_del(viewData->syncBtn, "clicked", cb_add_periodic_sync);
      +	elm_object_text_set(viewData->syncBtn, "Wait for 30 Min");
      +	evas_object_smart_callback_del(viewData->syncBtn, "clicked", cb_add_periodic_sync);
       
       	account_query_account_by_user_name(query_account_cb, "dummy_user", NULL);
       
       	account_h account;
      -	account_create(&account);
      -	account_query_account_by_account_id(sa_account_id, &account);
      +	account_create(&account);
      +	account_query_account_by_account_id(sa_account_id, &account);
       
       	bundle *extra = bundle_create();
       	bundle_add_str(extra, "URL", "http://android-developers.blogspot.com/atom.xml");
       
      -	viewData->account_id = sa_account_id;
      +	viewData->account_id = sa_account_id;
       	int job_id;
      -	int ret = sync_manager_add_periodic_sync_job(account, "Periodic", SYNC_PERIOD_INTERVAL_30MIN, SYNC_OPTION_EXPEDITED, extra, &periodic_sync_job_id);
      +	int ret = sync_manager_add_periodic_sync_job(account, "Periodic", SYNC_PERIOD_INTERVAL_30MIN, SYNC_OPTION_EXPEDITED, extra, &periodic_sync_job_id);
       	if (ret == SYNC_ERROR_NONE)
       		LOGI("sync manager added periodic sync job id %d", ret, periodic_sync_job_id);
       	else
      @@ -281,27 +281,27 @@ cb_add_periodic_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       }
    3. -
    4. When the sync manager schedules sync job for this request, sync callbacks in sync adapter service app will be invoked periodically. The sync adapter service app will download the titles from the URL parameter sent along with the API and writes it into a database. -Upon completion of sync job, service app will communicate the same to Sync adapter UI app using app_control. +
    5. When the sync manager schedules a sync job for this request, sync callback functions in Sync Adapter Service App will be invoked periodically. The Sync Adapter Service App will download the titles from the URL parameter sent along with the API and writes it into a database. +Upon completion of the sync job, the service application will communicate the same to Sync Adapter App by using app_control.
       static void
       app_control(app_control_h app_control, void *data)
       {
       	char *operation;
      -	int ret = app_control_get_operation(app_control, &operation);
      +	int ret = app_control_get_operation(app_control, &operation);
       	if (ret != APP_CONTROL_ERROR_NONE) {
       		LOGE("failed to get operation");
       		return;
       	}
       
      -	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/sync_complete")) {
      +	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/sync_complete")) {
       		LOGE("Sync completed by service app. Loading ..");
       
       		char* collist[5];
       		collist[0] = "TITLE";
       
       		int req_id;
      -		int result = data_control_sql_select_with_page(sql_provider, collist, 1, NULL, "TITLE DESC", 1, 5, &req_id);
      +		int result = data_control_sql_select_with_page(sql_provider, collist, 1, NULL, "TITLE DESC", 1, 5, &req_id);
       		if (result != DATA_CONTROL_ERROR_NONE)
       			LOGE("data_control_sql_select() is failed: ");
       		return;
      @@ -353,7 +353,7 @@ static void select_response_cb(int request_id, data_control_h provider, result_s
       			char word[1024] = {0};
       			char word_desc[1024] = {0};
       			int count = 0;
      -			while (data_control_sql_step_next(enumerator) == DATA_CONTROL_ERROR_NONE && ++count < 10) {
      +			while (data_control_sql_step_next(enumerator) == DATA_CONTROL_ERROR_NONE && ++count < 10) {
       				memset(word, 0, 1024);
       				memset(word_desc, 0, 1024);
       				data_control_sql_get_column_name(enumerator, 0, col_name);
      @@ -375,13 +375,13 @@ static void select_response_cb(int request_id, data_control_h provider, result_s
       
    -

    Data Change sync

    +

    Data Change Sync

    Figure: Data Change Sync

    Data Change Sync

    -

    Request Data change Sync

    +

    Request Data Change Sync

      -
    1. To perform data change sync select Data Change sync from home screen view. Click on ContactSync button which will trigger corresponding sync manager API as shown below. +
    2. To perform Data Change Sync select Data Change Sync from home screen view. Click on ContactSync button which will trigger corresponding sync manager API as shown below.
       static void
       cb_add_data_change_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
      @@ -392,13 +392,13 @@ cb_add_data_change_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       	account_query_account_by_user_name(query_account_cb, "dummy_user", NULL);
       
       	account_h account;
      -	account_create(&account);
      -	account_query_account_by_account_id(sa_account_id, &account);
      +	account_create(&account);
      +	account_query_account_by_account_id(sa_account_id, &account);
       
       	bundle *extra = bundle_create();
       	bundle_add_str(extra, "URL", "http://posttestserver.com/post.php?dir=MyContacts");
      -	viewData->account_id = sa_account_id;
      -	int ret = sync_manager_add_data_change_sync_job(account, SYNC_SUPPORTS_CAPABILITY_CONTACT, SYNC_OPTION_NONE, extra, &data_change_sync_job_id);
      +	viewData->account_id = sa_account_id;
      +	int ret = sync_manager_add_data_change_sync_job(account, SYNC_SUPPORTS_CAPABILITY_CONTACT, SYNC_OPTION_NONE, extra, &data_change_sync_job_id);
       	if (ret == SYNC_ERROR_NONE)
       		LOGI("sync manager added data change sync job id %d", ret, data_change_sync_job_id);
       	else
      @@ -410,9 +410,8 @@ cb_add_data_change_sync(void* pData, Evas_Object* pObj, void* pEvent_info)
       }
    3. -
    4. The sync manager stores the data change sync request. Whenever there is a change in contacts db of the device sync manager schedules sync job for contacts data. Sync callbacks in sync adapter service app will be invoked accordingly. -The sync adapter service app will upload the contact details to the server given along with the request. Upon completion of upload sync job, service app will communicate the same to Sync adapter UI app using app_control. -The Sync adapter UI app will show a popup to notify the user about the status. +
    5. The sync manager stores the data change sync request. Whenever there is a change in contacts db of the device, sync manager schedules a sync job for contacts data. Sync callback functions in Sync Adapter Service App will be invoked accordingly. +The Sync Adapter Service App will upload the contact details to the server given along with the request. Upon completion of the upload sync job, the service application will communicate the same to Sync Adapter App by using app_control. Also, the Sync Adapter App will show a popup to notify the user about the status.
       
       static void
      @@ -420,7 +419,7 @@ app_control(app_control_h app_control, void *data)
       {
       	...
       	...
      -	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/upload_sync_complete")) {
      +	if (operation && !strcmp(operation, "http://tizen.org/appcontrol/operation/upload_sync_complete")) {
       		LOGE("upload sync");
       		Evas_Object *popup;
       		Evas_Object *win = NF;
      @@ -444,8 +443,8 @@ app_control(app_control_h app_control, void *data)
       

      Figure: Get all sync jobs

      Get all sync jobs

      -

      Request get sync jobs

      -
    6. To query the sync jobs requested by the application select Get all sync jobs from home screen view. The corresponding sync manager API will be called as shown below. +

      Request to get sync jobs

      +
    7. To query the sync jobs requested by the Sync Adapter App, select Get all sync jobs from home screen view. The corresponding sync manager API will be called as shown below.
       bool
       sync_adapter_sample_foreach_sync_job_cb(account_h account, const char *sync_job_name, const char *sync_capability, int sync_job_id, bundle* sync_job_user_data, void *user_data)
      @@ -489,7 +488,7 @@ on_get_all_sync_jobs_cb(void *data, Evas_Object *obj, void *event_info)
       

      Remove all sync jobs

      Request to remove all sync jobs

      -
    8. To remove all the sync jobs requested by the application select Remove all sync jobs from home screen view. The corresponding sync manager API will be called as shown below. +
    9. To remove all the sync jobs requested by the Sync Adapter App, select Remove all sync jobs from home screen view. The corresponding sync manager API will be called as shown below.
       void
       on_remove_all_sync_jobs_cb(void *data, Evas_Object *obj, void *event_info)
      diff --git a/org.tizen.sampledescriptions/html/mobile_n/syncadapterserviceapp_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/syncadapterserviceapp_sd_mn.htm
      index bbad7a9..31fce8e 100644
      --- a/org.tizen.sampledescriptions/html/mobile_n/syncadapterserviceapp_sd_mn.htm
      +++ b/org.tizen.sampledescriptions/html/mobile_n/syncadapterserviceapp_sd_mn.htm
      @@ -11,7 +11,7 @@
       	
       	
       
      -	Sync Adapter Service Sample Overview
      +	Sync Adapter Service App Sample Overview
       
       
       
      @@ -25,7 +25,7 @@
       
       
       

      Sync Adapter Service Sample Overview

      -

      The service application acts as a sync adapter to Sync Adapter UI App. The service app handles all sync requets from Sync Adapter UI App.

      +

      The Sync Adapter Service App acts as a sync adapter to Sync Adapter App. The service application handles all sync requests from Sync Adapter App.

      Prerequisites

        @@ -43,7 +43,7 @@
      1. http://tizen.org/privilege/contact.read
      2. -
      3. Register the service application as a sync adapter by passiong the sync callbacks to the following Sync adapter API. +
      4. Register the service application as a sync adapter by passiong the sync callback functions to the following sync adapter API.
         bool service_app_create(void *data)
         {
        @@ -89,9 +89,9 @@ int create_database()
         

      Start Sync

      -

      Handle start sync

      -
    10. Whenever sync manager schedules a sync job for Sync Adapter UI app, the following callback method will be tirgger to perform sync job. -The sample service application will download the content from server and communicates to Sync Adapter UI app using app_control. +

      Handle Start Sync

      +
    11. Whenever sync manager schedules a sync job for Sync Adapter App, the following callback function will be tirgger to perform the sync job. +The Sync Adapter Service App will download the content from server and communicates to Sync Adapter App by using app_control.
       static bool handleStartSync(account_h account, const char *sync_job_name, const char *sync_capability, bundle *sync_job_user_data)
       {
      @@ -108,7 +108,7 @@ static bool handleStartSync(account_h account, const char *sync_job_name, const
       	if (account)
       	{
       		int id;
      -		account_get_account_id(account, &id);
      +		account_get_account_id(account, &id);
       		LOGI("account [%d] ", id);
       	}
       	else
      @@ -120,11 +120,11 @@ static bool handleStartSync(account_h account, const char *sync_job_name, const
       	}
       
       	app_control_h app_control;
      -	int ret = app_control_create(&app_control);
      +	int ret = app_control_create(&app_control);
       	ret = app_control_set_app_id(app_control, "org.tizen.syncadapterapp");
       
       	char* pURL = NULL;
      -	ret = bundle_get_str(sync_job_user_data, "URL", &pURL);
      +	ret = bundle_get_str(sync_job_user_data, "URL", &pURL);
       	if (pURL != NULL)
       	{
       		if (is_data_sync_cb)
      @@ -148,14 +148,14 @@ static bool handleStartSync(account_h account, const char *sync_job_name, const
       
    12. -

      Cancel sync

      -

      Handle Cancel sync

      -
    13. This callback method is a notification to inform sync adapter service app to safely cancel ongoing sync job (if any). +

      Cancel Sync

      +

      Handle Cancel Sync

      +
    14. This callback function is a notification to inform Sync Adapter Service App to safely cancel ongoing sync job (if any).
       static void handleStopSync(account_h account, const char* capability)
       {
       	int id;
      -	account_get_account_id(account, &id);
      +	account_get_account_id(account, &id);
       	LOGI("details %d, %s ", id, capability);
       	LOGI("HandleStopSync called in client");
       }
      diff --git a/org.tizen.sampledescriptions/index.xml b/org.tizen.sampledescriptions/index.xml index 46a836a..4a3f516 100644 --- a/org.tizen.sampledescriptions/index.xml +++ b/org.tizen.sampledescriptions/index.xml @@ -93,8 +93,8 @@ - - + + -- 2.7.4