From: arya.k Date: Thu, 1 Oct 2015 10:36:32 +0000 (+0530) Subject: [TIZEN] ContainerClient Application. X-Git-Tag: 1.2.0+RC1~965 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5b1da81dca86879e13213089097cfb634007d58;p=platform%2Fupstream%2Fiotivity.git [TIZEN] ContainerClient Application. - Removed container module from RESampleClient Application. Change-Id: I8c0cd3488f4b7c92432dc8d5c56735d0055e032f Signed-off-by: arya.k Reviewed-on: https://gerrit.iotivity.org/gerrit/3367 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi Reviewed-by: Madan Lanka --- diff --git a/service/resource-container/examples/tizen/ContainerClientApp/.cproject b/service/resource-container/examples/tizen/ContainerClientApp/.cproject new file mode 100644 index 0000000..f656f95 --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/.cproject @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/service/resource-container/examples/tizen/ContainerClientApp/.exportMap b/service/resource-container/examples/tizen/ContainerClientApp/.exportMap new file mode 100644 index 0000000..43e310e --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/.exportMap @@ -0,0 +1,4 @@ +{ + global: main; + local: *; +}; diff --git a/service/resource-container/examples/tizen/ContainerClientApp/.project b/service/resource-container/examples/tizen/ContainerClientApp/.project new file mode 100644 index 0000000..1e47cea --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/.project @@ -0,0 +1,43 @@ + + + ContainerClientApp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + org.tizen.nativecore.apichecker.core.builder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + org.tizen.nativecore.apichecker.core.tizenCppNature + + + + 0 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-projectRelativePath-matches-false-false-*/.tpk + + + + diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/edc_resource/re_container_control.edc b/service/resource-container/examples/tizen/ContainerClientApp/edc_resource/container_control.edc similarity index 51% rename from service/resource-encapsulation/examples/tizen/RESampleClientApp/edc_resource/re_container_control.edc rename to service/resource-container/examples/tizen/ContainerClientApp/edc_resource/container_control.edc index e394253..f8b53ab 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/edc_resource/re_container_control.edc +++ b/service/resource-container/examples/tizen/ContainerClientApp/edc_resource/container_control.edc @@ -60,64 +60,3 @@ group } } } - -group -{ - name: "popup_datetime_text"; - parts - { - part - { - name: "pad_l"; - type: SPACER; - scale: 1; - description - { - state: "default" 0.0; - min: POPUP_CONTENT_DEFAULT_PADDING_LEFT_MIN_INC 0; - fixed: 1 0; - rel1.relative: 0.0 0.0; - rel2.relative: 0.0 1.0; - align: 0.0 0.0; - } - } - part - { - name: "pad_r"; - type: SPACER; - scale: 1; - description - { - state: "default" 0.0; - min: POPUP_CONTENT_DEFAULT_PADDING_LEFT_MIN_INC 0; - fixed: 1 0; - rel1.relative: 1.0 0.0; - rel2.relative: 1.0 1.0; - align: 1.0 0.0; - } - } - part - { - name: "elm.swallow.content"; - type: SWALLOW; - scale: 1; - description - { - state: "default" 0.0; - min: 0 POPUP_EDITFIELD_LAYOUT_MINMAX_HEIGHT_INC; - max: -1 POPUP_EDITFIELD_LAYOUT_MINMAX_HEIGHT_INC; - align: 0.5 0.5; - rel1 - { - relative: 1.0 0.0; - to_x: "pad_l"; - } - rel2 - { - relative: 0.0 1.0; - to_x: "pad_r"; - } - } - } - } -} diff --git a/service/resource-container/examples/tizen/ContainerClientApp/inc/clientmain.h b/service/resource-container/examples/tizen/ContainerClientApp/inc/clientmain.h new file mode 100644 index 0000000..e401e65 --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/inc/clientmain.h @@ -0,0 +1,48 @@ +/****************************************************************** + * + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ + +#ifndef CLIENTMAIN_H__ +#define CLIENTMAIN_H__ + +#include +#include +#include +#include +#include + +#include "OCPlatform.h" +#include "OCApi.h" + +using namespace OC; + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "clientmain" + +#if !defined(PACKAGE) +#define PACKAGE "org.tizen.containerclient" +#endif + +#define ELM_DEMO_EDJ "opt/usr/apps/org.tizen.containerclient/res/ui_controls.edj" + +void containerCreateUI(void *data, Evas_Object *obj, void *event_info); + +#endif // CLIENTMAIN_H__ diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/recontainerclient.h b/service/resource-container/examples/tizen/ContainerClientApp/inc/containerclient.h similarity index 85% rename from service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/recontainerclient.h rename to service/resource-container/examples/tizen/ContainerClientApp/inc/containerclient.h index 5ec7c79..05665f8 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/recontainerclient.h +++ b/service/resource-container/examples/tizen/ContainerClientApp/inc/containerclient.h @@ -18,7 +18,7 @@ * ******************************************************************/ -#include "reclientmain.h" +#include "clientmain.h" #include "RCSRemoteResourceObject.h" @@ -28,10 +28,8 @@ #include #include -#ifndef RECONTAINER_H__ -#define RECONTAINER_H__ - -# define LOG_TAG "recontainerclient" +#ifndef CONTAINERCLIENT_H__ +#define CONTAINERCLIENT_H__ using namespace OIC::Service; @@ -39,10 +37,10 @@ void *showContainerAPIs(void *data); void onContainerDiscovered(std::shared_ptr foundResource); -static void find_resource_cb(void *data, Evas_Object *obj, void *event_info); - static void findLight(void *data, Evas_Object *obj, void *event_info); static void findSoftsensor(void *data, Evas_Object *obj, void *event_info); -#endif // RECONTAINER_H__ \ No newline at end of file +static void cancelDiscoverResource(void *data, Evas_Object *obj, void *event_info); + +#endif // CONTAINERCLIENT_H__ diff --git a/service/resource-container/examples/tizen/ContainerClientApp/res/ui_controls.edc b/service/resource-container/examples/tizen/ContainerClientApp/res/ui_controls.edc new file mode 100644 index 0000000..c542f97 --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/res/ui_controls.edc @@ -0,0 +1,25 @@ +/****************************************************************** + * + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ + +collections +{ + base_scale: 1.8; + #include "../edc_resource/container_control.edc" +} \ No newline at end of file diff --git a/service/resource-container/examples/tizen/ContainerClientApp/shared/res/containerclient.png b/service/resource-container/examples/tizen/ContainerClientApp/shared/res/containerclient.png new file mode 100644 index 0000000..9765b1b Binary files /dev/null and b/service/resource-container/examples/tizen/ContainerClientApp/shared/res/containerclient.png differ diff --git a/service/resource-container/examples/tizen/ContainerClientApp/src/clientmain.cpp b/service/resource-container/examples/tizen/ContainerClientApp/src/clientmain.cpp new file mode 100644 index 0000000..d4e6f42 --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/src/clientmain.cpp @@ -0,0 +1,259 @@ +/****************************************************************** + * + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ + +#include "clientmain.h" +#include + +#include "OCPlatform.h" +#include "OCApi.h" + +typedef struct appdata +{ + Evas_Object *win; + Evas_Object *conform; + Evas_Object *layout; + Evas_Object *nf; + Evas_Object *findButton; + Evas_Object *logtext; + Evas_Object *listview; +} appdata_s; + +static void +win_delete_request_cb(void *data , Evas_Object *obj , void *event_info) +{ + ui_app_exit(); +} + +static void +list_selected_cb(void *data, Evas_Object *obj, void *event_info) +{ + Elm_Object_Item *it = (Elm_Object_Item *)event_info; + elm_list_item_selected_set(it, EINA_FALSE); +} + +static Eina_Bool +naviframe_pop_cb(void *data, Elm_Object_Item *it) +{ + ui_app_exit(); + return EINA_FALSE; +} + +static void +create_list_view(appdata_s *ad) +{ + Evas_Object *list; + Evas_Object *btn; + Evas_Object *nf = ad->nf; + Elm_Object_Item *nf_it; + + // List + list = elm_list_add(nf); + elm_list_mode_set(list, ELM_LIST_COMPRESS); + evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL); + + // Main Menu Items Here + + elm_list_item_append(list, "Start Container Client", NULL, NULL, containerCreateUI, nf); + + elm_list_go(list); + + // This button is set for devices which doesn't have H/W back key. + btn = elm_button_add(nf); + elm_object_style_set(btn, "naviframe/end_btn/default"); + nf_it = elm_naviframe_item_push(nf, "Resource Encapsulation", btn, NULL, list, NULL); + elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win); +} + + +static void +create_base_gui(appdata_s *ad) +{ + // Window + ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); + elm_win_conformant_set(ad->win, EINA_TRUE); + elm_win_autodel_set(ad->win, EINA_TRUE); + + if (elm_win_wm_rotation_supported_get(ad->win)) + { + int rots[4] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4); + } + + evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); + + // Conformant + ad->conform = elm_conformant_add(ad->win); + evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win, ad->conform); + evas_object_show(ad->conform); + + // Base Layout + ad->layout = elm_layout_add(ad->conform); + evas_object_size_hint_weight_set(ad->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_layout_theme_set(ad->layout, "layout", "application", "default"); + evas_object_show(ad->layout); + + elm_object_content_set(ad->conform, ad->layout); + + // Naviframe + ad->nf = elm_naviframe_add(ad->layout); + create_list_view(ad); + elm_object_part_content_set(ad->layout, "elm.swallow.content", ad->nf); + eext_object_event_callback_add(ad->nf, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL); + eext_object_event_callback_add(ad->nf, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL); + + // Show window after base gui is set up + evas_object_show(ad->win); +} + +// Configures the OCPlatform +static void +configure_platform() +{ + try + { + PlatformConfig config + { OC::ServiceType::InProc, ModeType::Client, "0.0.0.0", 0, OC::QualityOfService::LowQos }; + + OCPlatform::Configure(config); + + dlog_print(DLOG_INFO, LOG_TAG, "#### Platform configuration done!!!!"); + } + catch (OCException &e) + { + dlog_print(DLOG_ERROR, LOG_TAG, "Exception occured! (%s)", e.what()); + } +} + +static bool +app_create(void *data) +{ + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ + appdata_s *ad = (appdata_s *)data; + + elm_app_base_scale_set(1.8); + + create_base_gui(ad); + + configure_platform(); + + return true; +} + +static void +app_control(app_control_h app_control, void *data) +{ + // Handle the launch request. +} + +static void +app_pause(void *data) +{ + // Take necessary actions when application becomes invisible. +} + +static void +app_resume(void *data) +{ + // Take necessary actions when application becomes visible. +} + +static void +app_terminate(void *data) +{ + // Release all resources. +} + +static void +ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + // APP_EVENT_LANGUAGE_CHANGED + char *locale = NULL; + system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); + elm_language_set(locale); + free(locale); + return; +} + +static void +ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + // APP_EVENT_DEVICE_ORIENTATION_CHANGED + return; +} + +static void +ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + // APP_EVENT_REGION_FORMAT_CHANGED +} + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + // APP_EVENT_LOW_BATTERY +} + +static void +ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + // APP_EVENT_LOW_MEMORY +} + +int +main(int argc, char *argv[]) +{ + appdata_s ad = {0,}; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = {0,}; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, + ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, + ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], + APP_EVENT_DEVICE_ORIENTATION_CHANGED, + ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], + APP_EVENT_LANGUAGE_CHANGED, + ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], + APP_EVENT_REGION_FORMAT_CHANGED, + ui_app_region_changed, &ad); + ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (APP_ERROR_NONE != ret) + { + dlog_print(DLOG_ERROR, LOG_TAG, "app_main() is failed. err = %d", ret); + } + return ret; +} diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/recontainerclient.cpp b/service/resource-container/examples/tizen/ContainerClientApp/src/containerclient.cpp similarity index 66% rename from service/resource-encapsulation/examples/tizen/RESampleClientApp/src/recontainerclient.cpp rename to service/resource-container/examples/tizen/ContainerClientApp/src/containerclient.cpp index 40662a7..b85eb44 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/recontainerclient.cpp +++ b/service/resource-container/examples/tizen/ContainerClientApp/src/containerclient.cpp @@ -18,30 +18,25 @@ * ******************************************************************/ -#include "recontainerclient.h" +#include "containerclient.h" -#include "reclientmain.h" +#include "clientmain.h" #include "RCSDiscoveryManager.h" #include "RCSResourceAttributes.h" #include "RCSAddress.h" #include -#include "mutex" -#include "condition_variable" using namespace std; using namespace OC; using namespace OIC::Service; std::shared_ptr g_containerResource; +std::vector resourceList; +std::unique_ptr discoveryTask; -const std::string resourceTypeLight = "?rt=oic.light.control"; -const std::string resourceTypeSoftsensor = "?rt=oic.softsensor"; -const std::string targetLightUri = OC_RSRVD_WELL_KNOWN_URI + resourceTypeLight; -const std::string targetSoftsensorUri = OC_RSRVD_WELL_KNOWN_URI + resourceTypeSoftsensor; - -std::mutex g_containerMtx; -std::condition_variable g_containerCond; +const std::string resourceTypeLight = "oic.r.light"; +const std::string resourceTypeSoftsensor = "oic.r.sensor"; static Evas_Object *log_entry = NULL; static Evas_Object *listnew = NULL; @@ -65,7 +60,9 @@ static void list_selected_cb(void *data, Evas_Object *obj, void *event_info) static void onDestroy() { - g_containerResource = NULL; + dlog_print(DLOG_INFO, LOG_TAG, "#### Destroy sequence called"); + resourceList.clear(); + g_containerResource = nullptr; } void onContainerDiscovered(std::shared_ptr foundResource) @@ -75,9 +72,7 @@ void onContainerDiscovered(std::shared_ptr foundResourc std::string resourceURI = foundResource->getUri(); std::string hostAddress = foundResource->getAddress(); - dlog_print(DLOG_INFO, LOG_TAG, "#### Resource URI : %s", resourceURI.c_str()); - dlog_print(DLOG_INFO, LOG_TAG, "#### Resource Host : %S", hostAddress.c_str()); - + int resourceSize = resourceList.size() + 1; string logMessage = "Resource Found
"; logMessage = logMessage + "URI: " + resourceURI + "
"; logMessage = logMessage + "Host:" + hostAddress + "
"; @@ -86,10 +81,11 @@ void onContainerDiscovered(std::shared_ptr foundResourc ecore_main_loop_thread_safe_call_sync((void * ( *)(void *))updateContainerLog, &logMessage); + resourceList.push_back(foundResource); + g_containerResource = foundResource; ecore_main_loop_thread_safe_call_sync((void * ( *)(void *))showContainerAPIs, NULL); - g_containerCond.notify_all(); } void *showContainerAPIs(void *data) @@ -99,12 +95,15 @@ void *showContainerAPIs(void *data) int count = eina_list_count(eina_list); if (!count) { - elm_list_item_append(listnew, "1. Find Light resource", NULL, NULL, + elm_list_item_append(listnew, "1. Start Light resource Discovery", NULL, NULL, findLight, NULL); - elm_list_item_append(listnew, "1. Find Softsensor resource", NULL, NULL, + elm_list_item_append(listnew, "2. Start Softsensor resource Discovery", NULL, NULL, findSoftsensor, NULL); + elm_list_item_append(listnew, "3.Stop Discovery", NULL, NULL, + cancelDiscoverResource, NULL); + elm_list_go(listnew); } return NULL; @@ -112,28 +111,74 @@ void *showContainerAPIs(void *data) static void findLight(void *data, Evas_Object *obj, void *event_info) { - dlog_print(DLOG_INFO, LOG_TAG, "#### Wait 2 seconds until discovered"); - - RCSDiscoveryManager::getInstance()->discoverResource(RCSAddress::multicast(), targetLightUri, - &onContainerDiscovered); - - std::unique_lock lck(g_containerMtx); - g_containerCond.wait_for(lck, std::chrono::seconds(2)); - - dlog_print(DLOG_INFO, LOG_TAG, "#### Light Discovery over"); + dlog_print(DLOG_INFO, LOG_TAG, "#### Light discovery started"); + + while (!discoveryTask) + { + try + { + discoveryTask = RCSDiscoveryManager::getInstance()->discoverResourceByType( + RCSAddress::multicast(), resourceTypeLight, &onContainerDiscovered); + } + catch (const RCSPlatformException &e) + { + std::cout << e.what() << std::endl; + } + } + + dlog_print(DLOG_INFO, LOG_TAG, "#### Light Discovery over"); } static void findSoftsensor(void *data, Evas_Object *obj, void *event_info) { - dlog_print(DLOG_INFO, LOG_TAG, "#### Wait 2 seconds until discovered"); + dlog_print(DLOG_INFO, LOG_TAG, "#### SoftSensor discovery started"); + + while (!discoveryTask) + { + try + { + discoveryTask = RCSDiscoveryManager::getInstance()->discoverResourceByType( + RCSAddress::multicast(), resourceTypeSoftsensor, &onContainerDiscovered); + } + catch (const RCSPlatformException &e) + { + std::cout << e.what() << std::endl; + } + } + + dlog_print(DLOG_INFO, LOG_TAG, "#### SoftSensor Discovery over"); +} + +static void cancelDiscoverResource(void *data, Evas_Object *obj, void *event_info) +{ + dlog_print(DLOG_INFO, LOG_TAG, "#### cancelDiscoverResource entry"); + string logMessage = ""; + + if (!discoveryTask) + { + logMessage += "There is no discovery request
"; + } + else + { + discoveryTask->cancel(); - RCSDiscoveryManager::getInstance()->discoverResource(RCSAddress::multicast(), targetSoftsensorUri, - &onContainerDiscovered); + logMessage += "Discovery canceled
"; - std::unique_lock lck(g_containerMtx); - g_containerCond.wait_for(lck, std::chrono::seconds(2)); + int resourceSize = resourceList.size(); + if (!resourceSize) + { + logMessage += "No Resource Discovered
"; + } + else + { + logMessage += std::to_string(resourceSize) + " : Resource Discovered
"; + } - dlog_print(DLOG_INFO, LOG_TAG, "#### Softsensor Discovery over"); + } + + dlog_print(DLOG_INFO, LOG_TAG, "#### %s", logMessage.c_str()); + ecore_main_loop_thread_safe_call_sync((void * ( *)(void *))updateContainerLog, + &logMessage); } static Eina_Bool diff --git a/service/resource-container/examples/tizen/ContainerClientApp/tizen-manifest.xml b/service/resource-container/examples/tizen/ContainerClientApp/tizen-manifest.xml new file mode 100644 index 0000000..df7475e --- /dev/null +++ b/service/resource-container/examples/tizen/ContainerClientApp/tizen-manifest.xml @@ -0,0 +1,13 @@ + + + + + + containerclient.png + + + http://tizen.org/privilege/network.get + http://tizen.org/privilege/internet + + true + diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/.cproject b/service/resource-encapsulation/examples/tizen/RESampleClientApp/.cproject index 810973b..d9d75d7 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/.cproject +++ b/service/resource-encapsulation/examples/tizen/RESampleClientApp/.cproject @@ -241,7 +241,6 @@ - diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/reclientmain.h b/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/reclientmain.h index cc9a5b1..0c947a0 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/reclientmain.h +++ b/service/resource-encapsulation/examples/tizen/RESampleClientApp/inc/reclientmain.h @@ -35,7 +35,7 @@ using namespace OC; #ifdef LOG_TAG #undef LOG_TAG #endif -#define LOG_TAG "reclientmain" +#define LOG_TAG "reclient" #if !defined(PACKAGE) #define PACKAGE "org.tizen.resampleclient" @@ -43,8 +43,6 @@ using namespace OC; #define ELM_DEMO_EDJ "opt/usr/apps/org.tizen.resampleclient/res/ui_controls.edj" -void group_cb(void *data, Evas_Object *obj, void *event_info); - -void containerCreateUI(void *data, Evas_Object *obj, void *event_info); +void client_cb(void *data, Evas_Object *obj, void *event_info); #endif // RECLIENTMAIN_H__ \ No newline at end of file diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/res/ui_controls.edc b/service/resource-encapsulation/examples/tizen/RESampleClientApp/res/ui_controls.edc index 66a5509..7e85384 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/res/ui_controls.edc +++ b/service/resource-encapsulation/examples/tizen/RESampleClientApp/res/ui_controls.edc @@ -22,5 +22,4 @@ collections { base_scale: 1.8; #include "../edc_resource/re_client_control.edc" - #include "../edc_resource/re_container_control.edc" } \ No newline at end of file diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclient.cpp b/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclient.cpp index 7097230..d01f195 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclient.cpp +++ b/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclient.cpp @@ -717,7 +717,7 @@ naviframe_pop_cb(void *data, Elm_Object_Item *it) } // Method to be called when the Group APIs UI Button is selected -void group_cb(void *data, Evas_Object *obj, void *event_info) +void client_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *layout; Evas_Object *scroller; diff --git a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclientmain.cpp b/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclientmain.cpp index 4d3ac6c..dfbbbf5 100644 --- a/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclientmain.cpp +++ b/service/resource-encapsulation/examples/tizen/RESampleClientApp/src/reclientmain.cpp @@ -69,10 +69,6 @@ create_list_view(appdata_s *ad) evas_object_smart_callback_add(list, "selected", list_selected_cb, NULL); // Main Menu Items Here - elm_list_item_append(list, "Resource Client", NULL, NULL, group_cb, nf); - - elm_list_item_append(list, "Resource Container", NULL, NULL, containerCreateUI, nf); - elm_list_go(list); // This button is set for devices which doesn't have H/W back key. @@ -80,6 +76,8 @@ create_list_view(appdata_s *ad) elm_object_style_set(btn, "naviframe/end_btn/default"); nf_it = elm_naviframe_item_push(nf, "Resource Encapsulation", btn, NULL, list, NULL); elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win); + + client_cb(nf, NULL, NULL); }