From 33edd106cf8dc97c7e9ab1c1bb4d4836f7e3361c Mon Sep 17 00:00:00 2001 From: Rafal Galka Date: Thu, 21 May 2015 14:02:49 +0200 Subject: [PATCH] [Build] Tizen 3.0 mobile [Info] http://168.219.209.56/jira/browse/XWALK-253 http://168.219.209.56/confluence/display/WRT/Common+WebAPI+for+Tizen+3.0 Change-Id: I83f02667c23e00a5b9c41e605614c10af5fcc328 --- packaging/webapi-plugins.spec | 28 +++---- src/application/application_manager.cc | 62 ++++++++------- .../requested_application_control.cc | 2 +- src/systeminfo/systeminfo-utils.cpp | 78 ++++++++++--------- 4 files changed, 89 insertions(+), 81 deletions(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index aee769aa..6c9b3452 100755 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -26,18 +26,18 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_badge_support 1 %ifarch %{arm} # ARM -%define tizen_feature_bluetooth_support 1 +%define tizen_feature_bluetooth_support 0 %else # I586 %define tizen_feature_bluetooth_support 0 %endif -%define tizen_feature_bookmark_support 1 +%define tizen_feature_bookmark_support 0 %define tizen_feature_calendar_support 1 -%define tizen_feature_contact_support 1 +%define tizen_feature_contact_support 0 %define tizen_feature_content_support 1 %define tizen_feature_datacontrol_support 1 %define tizen_feature_datasync_support 0 -%define tizen_feature_download_support 1 +%define tizen_feature_download_support 0 %define tizen_feature_exif_support 1 %define tizen_feature_filesystem_support 1 %ifarch %{arm} @@ -56,30 +56,30 @@ Source0: %{name}-%{version}.tar.gz %endif %define tizen_feature_location_batch 0 %define tizen_feature_key_manager_support 1 -%define tizen_feature_media_controller_support 1 +%define tizen_feature_media_controller_support 0 %ifarch %{arm} # ARM -%define tizen_feature_media_key_support 1 +%define tizen_feature_media_key_support 0 %else # I586 %define tizen_feature_media_key_support 0 %endif -%define tizen_feature_message_port_support 1 +%define tizen_feature_message_port_support 0 %define tizen_feature_messaging_support 1 %ifarch %{arm} # ARM %define tizen_feature_nfc_emulation_support 0 -%define tizen_feature_nfc_support 1 +%define tizen_feature_nfc_support 0 %else # I586 %define tizen_feature_nfc_emulation_support 0 %define tizen_feature_nfc_support 0 %endif -%define tizen_feature_notification_support 1 +%define tizen_feature_notification_support 0 %define tizen_feature_package_support 1 %define tizen_feature_power_support 1 -%define tizen_feature_push_support 1 +%define tizen_feature_push_support 0 %ifarch %{arm} # ARM %define tizen_feature_se_support 1 @@ -90,7 +90,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_sensor_support 1 %define tizen_feature_sound_support 1 %define tizen_feature_system_info_support 1 -%define tizen_feature_system_setting_support 1 +%define tizen_feature_system_setting_support 0 %ifarch %{arm} # ARM %define tizen_feature_telephony_support 1 @@ -114,7 +114,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_tvwindow_support 0 %if 0%{?tizen_feature_telephony_support} -%define tizen_feature_callhistory_support 1 +%define tizen_feature_callhistory_support 0 %define tizen_feature_nbs_support 1 %else %define tizen_feature_callhistory_support 0 @@ -310,7 +310,7 @@ BuildRequires: pkgconfig(capi-appfw-app-manager) BuildRequires: pkgconfig(capi-appfw-package-manager) BuildRequires: pkgconfig(capi-content-media-content) BuildRequires: pkgconfig(capi-media-metadata-extractor) -BuildRequires: pkgconfig(capi-security-privilege-manager) +#BuildRequires: pkgconfig(capi-security-privilege-manager) %if 0%{?tizen_feature_account_support} BuildRequires: pkgconfig(accounts-svc) @@ -444,7 +444,7 @@ Tizen Web APIs implemented. %build export GYP_GENERATORS='ninja' -GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=ACE" +GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=CYNARA" GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=x11" # feature flags diff --git a/src/application/application_manager.cc b/src/application/application_manager.cc index 01760321..1edc8024 100644 --- a/src/application/application_manager.cc +++ b/src/application/application_manager.cc @@ -9,7 +9,7 @@ #include #include -#include +//#include #include #include #include @@ -325,13 +325,14 @@ void ApplicationManager::Kill(const picojson::value& args) { LoggerD("Kill async, KILL!!!!!!!!!"); // terminate application - ret = app_manager_terminate_app(app_context); - - if (APP_MANAGER_ERROR_NONE != ret) { - LoggerE("Failed to terminate application."); - result = PlatformResult(ErrorCode::UNKNOWN_ERR, "Failed to terminate application."); - CHECK_RESULT(result, response, handler) - } + // TODO(r.galka) temporarily removed - not supported by platform + //ret = app_manager_terminate_app(app_context); + // + //if (APP_MANAGER_ERROR_NONE != ret) { + // LoggerE("Failed to terminate application."); + // result = PlatformResult(ErrorCode::UNKNOWN_ERR, "Failed to terminate application."); + // CHECK_RESULT(result, response, handler) + //} LoggerD("Kill async, end, waiting for notification"); }; @@ -497,28 +498,29 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) { } } - if (!launch_mode_str.empty()) { - app_control_launch_mode_e launch_mode; - - if ("SINGLE" == launch_mode_str) { - launch_mode = APP_CONTROL_LAUNCH_MODE_SINGLE; - } else if ("GROUP" == launch_mode_str) { - launch_mode = APP_CONTROL_LAUNCH_MODE_GROUP; - } else { - LoggerE("Invalid parameter passed."); - ReportError(PlatformResult(ErrorCode::INVALID_VALUES_ERR, "Invalid parameter passed."), - &response->get()); - return; - } - - int ret = app_control_set_launch_mode(app_control_ptr.get(), launch_mode); - if (APP_CONTROL_ERROR_NONE != ret) { - LoggerE("Setting launch mode failed."); - ReportError(PlatformResult(ErrorCode::NOT_FOUND_ERR, "Setting launch mode failed."), - &response->get()); - return; - } - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (!launch_mode_str.empty()) { + // app_control_launch_mode_e launch_mode; + // + // if ("SINGLE" == launch_mode_str) { + // launch_mode = APP_CONTROL_LAUNCH_MODE_SINGLE; + // } else if ("GROUP" == launch_mode_str) { + // launch_mode = APP_CONTROL_LAUNCH_MODE_GROUP; + // } else { + // LoggerE("Invalid parameter passed."); + // ReportError(PlatformResult(ErrorCode::INVALID_VALUES_ERR, "Invalid parameter passed."), + // &response->get()); + // return; + // } + // + // int ret = app_control_set_launch_mode(app_control_ptr.get(), launch_mode); + // if (APP_CONTROL_ERROR_NONE != ret) { + // LoggerE("Setting launch mode failed."); + // ReportError(PlatformResult(ErrorCode::NOT_FOUND_ERR, "Setting launch mode failed."), + // &response->get()); + // return; + // } + //} app_control_reply_cb callback = nullptr; struct ReplayCallbackData { diff --git a/src/application/requested_application_control.cc b/src/application/requested_application_control.cc index 9b9d4340..673df8fd 100644 --- a/src/application/requested_application_control.cc +++ b/src/application/requested_application_control.cc @@ -7,7 +7,7 @@ #include #include #include -#include +//#include #include "common/logger.h" #include "application/application_utils.h" diff --git a/src/systeminfo/systeminfo-utils.cpp b/src/systeminfo/systeminfo-utils.cpp index b176aec7..361154ca 100644 --- a/src/systeminfo/systeminfo-utils.cpp +++ b/src/systeminfo/systeminfo-utils.cpp @@ -983,10 +983,11 @@ PlatformResult SystemInfoListeners::RegisterPeripheralListener(const SysteminfoU CHECK_LISTENER_ERROR(RegisterVconfCallback(VCONFKEY_SYSMAN_HDMI, OnPeripheralChangedCb, instance)) } - if (-1 != vconf_get_int(VCONFKEY_POPSYNC_ACTIVATED_KEY, &value)) { - CHECK_LISTENER_ERROR(RegisterVconfCallback(VCONFKEY_POPSYNC_ACTIVATED_KEY, - OnPeripheralChangedCb, instance)) - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (-1 != vconf_get_int(VCONFKEY_POPSYNC_ACTIVATED_KEY, &value)) { + // CHECK_LISTENER_ERROR(RegisterVconfCallback(VCONFKEY_POPSYNC_ACTIVATED_KEY, + // OnPeripheralChangedCb, instance)) + //} LoggerD("Added callback for PERIPHERAL"); m_peripheral_listener = callback; } @@ -1006,10 +1007,11 @@ PlatformResult SystemInfoListeners::UnregisterPeripheralListener() CHECK_LISTENER_ERROR(UnregisterVconfCallback(VCONFKEY_SYSMAN_HDMI, OnPeripheralChangedCb)) } - if (-1 != vconf_get_int(VCONFKEY_POPSYNC_ACTIVATED_KEY, &value)) { - CHECK_LISTENER_ERROR(UnregisterVconfCallback(VCONFKEY_POPSYNC_ACTIVATED_KEY, - OnPeripheralChangedCb)) - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (-1 != vconf_get_int(VCONFKEY_POPSYNC_ACTIVATED_KEY, &value)) { + // CHECK_LISTENER_ERROR(UnregisterVconfCallback(VCONFKEY_POPSYNC_ACTIVATED_KEY, + // OnPeripheralChangedCb)) + //} LoggerD("Removed callback for PERIPHERAL"); m_peripheral_listener = nullptr; } @@ -1048,28 +1050,30 @@ PlatformResult SystemInfoListeners::UnregisterMemoryListener() PlatformResult SystemInfoListeners::RegisterCameraFlashListener(const SysteminfoUtilsCallback& callback, SysteminfoInstance& instance) { - if (nullptr == m_camera_flash_listener) { - if (DEVICE_ERROR_NONE != device_add_callback(DEVICE_CALLBACK_FLASH_BRIGHTNESS, - OnBrightnessChangedCb, static_cast(&instance))) { - return PlatformResult(ErrorCode::UNKNOWN_ERR); - } - m_camera_flash_listener = callback; - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (nullptr == m_camera_flash_listener) { + // if (DEVICE_ERROR_NONE != device_add_callback(DEVICE_CALLBACK_FLASH_BRIGHTNESS, + // OnBrightnessChangedCb, static_cast(&instance))) { + // return PlatformResult(ErrorCode::UNKNOWN_ERR); + // } + // m_camera_flash_listener = callback; + //} return PlatformResult(ErrorCode::NO_ERROR); } PlatformResult SystemInfoListeners::UnregisterCameraFlashListener() { - if (nullptr != m_camera_flash_listener) { - PlatformResult ret = PlatformResult(ErrorCode::NO_ERROR); - int value = 0; - if (DEVICE_ERROR_NONE != device_remove_callback(DEVICE_CALLBACK_FLASH_BRIGHTNESS, - OnBrightnessChangedCb)) { - return PlatformResult(ErrorCode::UNKNOWN_ERR); - } - LoggerD("Removed callback for camera_flash"); - m_camera_flash_listener = nullptr; - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (nullptr != m_camera_flash_listener) { + // PlatformResult ret = PlatformResult(ErrorCode::NO_ERROR); + // int value = 0; + // if (DEVICE_ERROR_NONE != device_remove_callback(DEVICE_CALLBACK_FLASH_BRIGHTNESS, + // OnBrightnessChangedCb)) { + // return PlatformResult(ErrorCode::UNKNOWN_ERR); + // } + // LoggerD("Removed callback for camera_flash"); + // m_camera_flash_listener = nullptr; + //} return PlatformResult(ErrorCode::NO_ERROR); } @@ -1431,9 +1435,10 @@ void OnMemoryChangedCb(keynode_t* node, void* event_ptr) void OnBrightnessChangedCb(device_callback_e type, void* value, void* user_data) { LoggerD(""); - if (type == DEVICE_CALLBACK_FLASH_BRIGHTNESS) { - system_info_listeners.OnBrightnessChangedCallback(type, value, user_data); - } + // TODO(r.galka) temporarily removed - not supported by platform + //if (type == DEVICE_CALLBACK_FLASH_BRIGHTNESS) { + // system_info_listeners.OnBrightnessChangedCallback(type, value, user_data); + //} } /////////////////////////// SysteminfoUtils //////////////////////////////// @@ -2405,14 +2410,15 @@ PlatformResult SysteminfoUtils::ReportPeripheral(picojson::object& out) { } } - int popsync_status = 0; - ret = GetVconfInt(VCONFKEY_POPSYNC_ACTIVATED_KEY, popsync_status); - if (ret.IsSuccess()) { - if (1 == popsync_status) { - out.insert(std::make_pair(kVideoOutputString, picojson::value(true))); - return PlatformResult(ErrorCode::NO_ERROR); - } - } + // TODO(r.galka) temporarily removed - not supported by platform + //int popsync_status = 0; + //ret = GetVconfInt(VCONFKEY_POPSYNC_ACTIVATED_KEY, popsync_status); + //if (ret.IsSuccess()) { + // if (1 == popsync_status) { + // out.insert(std::make_pair(kVideoOutputString, picojson::value(true))); + // return PlatformResult(ErrorCode::NO_ERROR); + // } + //} out.insert(std::make_pair(kVideoOutputString, picojson::value(false))); return PlatformResult(ErrorCode::NO_ERROR); -- 2.34.1