From: Rafal Galka Date: Tue, 7 Jul 2015 09:51:46 +0000 (+0200) Subject: Manual sync of tizen_3.0 branch with tizen_2.4 X-Git-Tag: submit/tizen/20150702.103311^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e03092508545623c126bbcb163d1896efded3dd2;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git Manual sync of tizen_3.0 branch with tizen_2.4 Change-Id: I48070bf05fa83de0db0e802e8015604eee313e0b --- diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 35397111..b0641db2 100755 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -57,7 +57,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_ham_support 0 %else # I586 -%define tizen_feature_ham_support 0 +%define tizen_feature_ham_support 1 %endif %define tizen_feature_location_batch 0 %define tizen_feature_key_manager_support 0 @@ -67,7 +67,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_media_key_support 1 %else # I586 -%define tizen_feature_media_key_support 1 +%define tizen_feature_media_key_support 0 %endif %define tizen_feature_message_port_support 1 %define tizen_feature_messaging_support 1 @@ -82,7 +82,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_notification_support 1 %define tizen_feature_package_support 1 %define tizen_feature_power_support 1 -%define tizen_feature_push_support 0 +%define tizen_feature_push_support 1 %ifarch %{arm} # ARM %define tizen_feature_se_support 1 @@ -146,7 +146,7 @@ Source0: %{name}-%{version}.tar.gz # Badge API is mandatory in Tizen Wearable Profile. %define tizen_feature_badge_support 1 -%define tizen_feature_bluetooth_support 0 +%define tizen_feature_bluetooth_support 1 # Bookmark API is optional in Tizen Wearable Profile. %define tizen_feature_bookmark_support 0 @@ -165,15 +165,15 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_exif_support 1 %define tizen_feature_filesystem_support 1 %define tizen_feature_fm_radio_support 0 -%define tizen_feature_ham_support 0 +%define tizen_feature_ham_support 1 %define tizen_feature_location_batch 0 -%define tizen_feature_media_controller_support 0 +%define tizen_feature_media_controller_support 1 # MediayKey API is optional in Tizen Wearable Profile. # tizen.org/feature/network.bluetooth.audio.media is required for MediayKey API %ifarch %{arm} # ARM -%define tizen_feature_media_key_support 0 +%define tizen_feature_media_key_support 1 %else # I586 %define tizen_feature_media_key_support 0 @@ -189,10 +189,10 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_nfc_emulation_support 0 %define tizen_feature_nfc_support 0 %endif -%define tizen_feature_notification_support 0 -%define tizen_feature_package_support 0 -%define tizen_feature_power_support 0 -%define tizen_feature_push_support 0 +%define tizen_feature_notification_support 1 +%define tizen_feature_package_support 1 +%define tizen_feature_power_support 1 +%define tizen_feature_push_support 1 %if 0%{?model_build_feature_smartcard } %define tizen_feature_se_support 1 %else @@ -238,8 +238,8 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_application_support 1 %define tizen_feature_archive_support 1 %define tizen_feature_badge_support 0 -%define tizen_feature_bluetooth_support 1 -%define tizen_feature_bookmark_support 1 +%define tizen_feature_bluetooth_support 0 +%define tizen_feature_bookmark_support 0 %define tizen_feature_calendar_support 0 %define tizen_feature_callhistory_support 0 %define tizen_feature_contact_support 0 @@ -261,7 +261,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_nfc_support 0 %define tizen_feature_notification_support 0 %define tizen_feature_package_support 1 -%define tizen_feature_power_support 1 +%define tizen_feature_power_support 0 %define tizen_feature_push_support 0 %define tizen_feature_se_support 0 %define tizen_feature_sensor_support 0 @@ -349,7 +349,7 @@ BuildRequires: pkgconfig(alarm-service) %if 0%{?tizen_feature_bookmark_support} BuildRequires: pkgconfig(capi-web-bookmark) -#BuildRequires: pkgconfig(bookmark-adaptor) +BuildRequires: pkgconfig(bookmark-adaptor) %endif %if 0%{?tizen_feature_datacontrol_support} @@ -368,12 +368,14 @@ BuildRequires: pkgconfig(capi-location-manager) %if 0%{?tizen_feature_power_support} BuildRequires: pkgconfig(deviced) +%endif + +%if 0%{?tizen_feature_power_support} BuildRequires: pkgconfig(capi-appfw-application) %endif %if 0%{?tizen_feature_push_support} BuildRequires: pkgconfig(push) -BuildRequires: pkgconfig(libcapi-network-connection) %endif %if 0%{?tizen_feature_key_manager_support} @@ -440,12 +442,11 @@ BuildRequires: pkgconfig(smartcard-service-common) %endif %if 0%{?tizen_feature_message_port_support} -BuildRequires: pkgconfig(message-port) +BuildRequires: pkgconfig(capi-message-port) %endif %if 0%{?tizen_feature_notification_support} BuildRequires: pkgconfig(notification) -BuildRequires: pkgconfig(capi-appfw-app-control) %endif %if 0%{?tizen_feature_sound_support} diff --git a/src/application/application_manager.cc b/src/application/application_manager.cc index 079b1743..7955155e 100755 --- a/src/application/application_manager.cc +++ b/src/application/application_manager.cc @@ -21,7 +21,7 @@ #include #include -//#include +#include #include #include #include @@ -341,14 +341,13 @@ void ApplicationManager::Kill(const picojson::value& args) { LoggerD("Kill async, KILL!!!!!!!!!"); // terminate application - // 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) - //} + 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"); }; @@ -1279,7 +1278,8 @@ void ApplicationManager::StartAppInfoEventListener(picojson::object* out) { } g_application_list_changed_broker.AddApplicationInstance(&instance_); -/* pkgmgr_client_listen_status(pkgmgr_client_handle_, + /* TODO - causes build break on Tizen 3.0 + pkgmgr_client_listen_status(pkgmgr_client_handle_, ApplicationListChangedBroker::ClientStatusListener, &g_application_list_changed_broker);*/ } else { diff --git a/src/application/requested_application_control.cc b/src/application/requested_application_control.cc index 7928ce89..70c0873e 100755 --- a/src/application/requested_application_control.cc +++ b/src/application/requested_application_control.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + #include "requested_application_control.h" #include diff --git a/src/bluetooth/bluetooth_gatt_service.cc b/src/bluetooth/bluetooth_gatt_service.cc index 986ed40a..d4c29e55 100755 --- a/src/bluetooth/bluetooth_gatt_service.cc +++ b/src/bluetooth/bluetooth_gatt_service.cc @@ -366,7 +366,6 @@ void BluetoothGATTService::ReadValue(const picojson::value& args, int ret = bt_gatt_client_read_value(handle, read_value, (void*)user_data); if (BT_ERROR_NONE != ret) { LOGE("Couldn't register callback for read value"); - delete user_data; } ReportSuccess(out); } diff --git a/src/bluetooth/bluetooth_le_device.cc b/src/bluetooth/bluetooth_le_device.cc index 760b8fc1..1bde58eb 100755 --- a/src/bluetooth/bluetooth_le_device.cc +++ b/src/bluetooth/bluetooth_le_device.cc @@ -154,7 +154,7 @@ PlatformResult BluetoothLEDevice::ToJson( le_device->insert( std::make_pair(kDeviceName, picojson::value(std::string(device_name)))); - free(device_name); + g_free(device_name); int power_level = 0; found = false; diff --git a/src/datacontrol/datacontrol_instance.cc b/src/datacontrol/datacontrol_instance.cc index 06736ba9..e0717687 100755 --- a/src/datacontrol/datacontrol_instance.cc +++ b/src/datacontrol/datacontrol_instance.cc @@ -121,7 +121,7 @@ static bool SQLColumnValue(result_set_cursor cursor, int columnIndex, } switch (type) { case DATA_CONTROL_SQL_COLUMN_TYPE_INT64: { - long long int data = 0; + int64_t data = 0; result = data_control_sql_get_int64_data(cursor, columnIndex, &data); if (result != DATA_CONTROL_ERROR_NONE) break; val = picojson::value(static_cast(data)); @@ -322,7 +322,7 @@ static void SQLSelectResponseCallback(int requestId, data_control_h handle, } static void SQLInsertResponseCallback(int requestId, data_control_h handle, - long long int inserted_row_id, + int64_t inserted_row_id, bool providerResult, const char *error, void *user_data) { LoggerD("Enter"); diff --git a/src/download/download_instance.cc b/src/download/download_instance.cc index 62340638..3b496143 100755 --- a/src/download/download_instance.cc +++ b/src/download/download_instance.cc @@ -361,11 +361,10 @@ gboolean DownloadInstance::OnFailed(void* user_data) { instance->ReportError(NotFoundException( "Download ID does not exist in download service module"), out); break; - // TODO(p.kaczmarek3) temporarily removed - not supported by platform - //case DOWNLOAD_ERROR_INVALID_NETWORK_TYPE: - // instance->ReportError(InvalidValuesException( - // "Network bonding is set but network type is not set as ALL"), out); - // break; + case DOWNLOAD_ERROR_INVALID_NETWORK_TYPE: + instance->ReportError(InvalidValuesException( + "Network bonding is set but network type is not set as ALL"), out); + break; case DOWNLOAD_ERROR_NO_DATA: instance->ReportError(NotFoundException( "No data because the set API is not called"), out); diff --git a/src/messageport/messageport.gyp b/src/messageport/messageport.gyp index bd6dc9b4..87e2e78e 100644 --- a/src/messageport/messageport.gyp +++ b/src/messageport/messageport.gyp @@ -21,7 +21,7 @@ 'variables': { 'packages': [ 'vconf', - 'message-port', + 'capi-message-port', 'dlog' ] }, diff --git a/src/messageport/messageport_instance.h b/src/messageport/messageport_instance.h index fc3fec01..c4458d20 100755 --- a/src/messageport/messageport_instance.h +++ b/src/messageport/messageport_instance.h @@ -18,6 +18,7 @@ #define MESSAGEPORT_MESSAGEPORT_INSTANCE_H_ #include +#include #include #include "common/extension.h" diff --git a/src/nfc/nfc_adapter.cc b/src/nfc/nfc_adapter.cc index 140ba5bf..5dbb7bfa 100644 --- a/src/nfc/nfc_adapter.cc +++ b/src/nfc/nfc_adapter.cc @@ -1249,11 +1249,11 @@ PlatformResult NFCAdapter::TagTransceive(int tag_id, const picojson::value& args int ret = nfc_tag_transceive(m_last_tag_handle, buffer, data_array.size(), tagTransceiveCb, (void*) callback_id_pointer); - delete[] buffer; - buffer = nullptr; if (NFC_ERROR_NONE != ret) { delete callback_id_pointer; callback_id_pointer = nullptr; + delete[] buffer; + buffer = nullptr; // for permission related error throw exception if(NFC_ERROR_SECURITY_RESTRICTED == ret || diff --git a/src/notification/notification.gyp b/src/notification/notification.gyp index b78fe2cf..9c219a8c 100755 --- a/src/notification/notification.gyp +++ b/src/notification/notification.gyp @@ -25,7 +25,6 @@ 'variables': { 'packages': [ 'notification', - 'capi-appfw-app-control', 'capi-system-device', ] }, diff --git a/src/notification/notification_manager.cc b/src/notification/notification_manager.cc index 0393f4e9..c45a19fe 100644 --- a/src/notification/notification_manager.cc +++ b/src/notification/notification_manager.cc @@ -72,14 +72,14 @@ PlatformResult NotificationManager::Remove(const picojson::object& args) { PlatformResult NotificationManager::RemoveAll() { LoggerD("Enter"); - int ret = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI); + int ret = notification_delete_all(NOTIFICATION_TYPE_NOTI); if (ret != NOTIFICATION_ERROR_NONE) { LoggerE("Notification remove all failed: %d", ret); return PlatformResult(ErrorCode::UNKNOWN_ERR, "Notification noti remove all failed"); } - ret = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING); + ret = notification_delete_all(NOTIFICATION_TYPE_ONGOING); if (ret != NOTIFICATION_ERROR_NONE) { LoggerE("Notification remove all failed: %d", ret); return PlatformResult(ErrorCode::UNKNOWN_ERR, diff --git a/src/power/power_manager.cc b/src/power/power_manager.cc index 1ef0f578..37ecfc20 100755 --- a/src/power/power_manager.cc +++ b/src/power/power_manager.cc @@ -97,7 +97,7 @@ void PowerManager::OnPlatformStateChangedCB(device_callback_e type, void* value, LoggerE("type is not DISPLAY_STATE"); return; } - display_state_e state = static_cast(*static_cast(value)); + display_state_e state = static_cast(reinterpret_cast(value)); PowerState current = POWER_STATE_SCREEN_OFF; switch (state) { case DISPLAY_STATE_NORMAL : diff --git a/src/push/push.gyp b/src/push/push.gyp index 6ceed423..317c0a69 100644 --- a/src/push/push.gyp +++ b/src/push/push.gyp @@ -28,7 +28,6 @@ 'push', 'capi-appfw-application', 'libpcrecpp', - 'libcapi-network-connection' ] }, }], diff --git a/src/systeminfo/systeminfo-utils.cpp b/src/systeminfo/systeminfo-utils.cpp index 51999bfb..98518019 100644 --- a/src/systeminfo/systeminfo-utils.cpp +++ b/src/systeminfo/systeminfo-utils.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -72,7 +72,7 @@ static void OnDisplayChangedCb(keynode_t* node, void* event_ptr); static void OnDeviceAutoRotationChangedCb(keynode_t* node, void* event_ptr); static void OnDeviceOrientationChangedCb(sensor_t sensor, unsigned int event_type, sensor_data_t *data, void *user_data); -static void OnLocaleChangedCb(runtime_info_key_e key, void* event_ptr); +static void OnLocaleChangedCb(system_settings_key_e key, void* event_ptr); static void OnNetworkChangedCb(connection_type_e type, void* event_ptr); static void OnNetworkValueChangedCb(const char* ipv4_address, const char* ipv6_address, void* event_ptr); @@ -498,7 +498,7 @@ class SystemInfoListeners { void OnDeviceAutoRotationChangedCallback(keynode_t* node, void* event_ptr); void OnDeviceOrientationChangedCallback(sensor_t sensor, unsigned int event_type, sensor_data_t *data, void *user_data); - void OnLocaleChangedCallback(runtime_info_key_e key, void* event_ptr); + void OnLocaleChangedCallback(system_settings_key_e key, void* event_ptr); void OnNetworkChangedCallback(connection_type_e type, void* event_ptr); void OnNetworkValueCallback(const char* ipv4_address, const char* ipv6_address, void* event_ptr); @@ -811,14 +811,14 @@ PlatformResult SystemInfoListeners::RegisterLocaleListener(const SysteminfoUtils SysteminfoInstance& instance) { if (nullptr == m_locale_listener) { - if (RUNTIME_INFO_ERROR_NONE != - runtime_info_set_changed_cb(RUNTIME_INFO_KEY_REGION, + if (SYSTEM_SETTINGS_ERROR_NONE != + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, OnLocaleChangedCb, static_cast(&instance)) ) { LoggerE("Country change callback registration failed"); return PlatformResult(ErrorCode::UNKNOWN_ERR, "Country change callback registration failed"); } - if (RUNTIME_INFO_ERROR_NONE != - runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LANGUAGE, + if (SYSTEM_SETTINGS_ERROR_NONE != + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, OnLocaleChangedCb, static_cast(&instance)) ) { LoggerE("Language change callback registration failed"); return PlatformResult(ErrorCode::UNKNOWN_ERR, "Language change callback registration failed"); @@ -832,12 +832,12 @@ PlatformResult SystemInfoListeners::RegisterLocaleListener(const SysteminfoUtils PlatformResult SystemInfoListeners::UnregisterLocaleListener() { if (nullptr != m_locale_listener) { - if (RUNTIME_INFO_ERROR_NONE != - runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_LANGUAGE) ) { + if (SYSTEM_SETTINGS_ERROR_NONE != + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE) ) { LoggerE("Unregistration of language change callback failed"); } - if (RUNTIME_INFO_ERROR_NONE != - runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_REGION) ) { + if (SYSTEM_SETTINGS_ERROR_NONE != + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY) ) { LoggerE("Unregistration of country change callback failed"); } LoggerD("Removed callback for LOCALE"); @@ -1068,6 +1068,7 @@ PlatformResult SystemInfoListeners::RegisterPeripheralListener(const SysteminfoU CHECK_LISTENER_ERROR(RegisterVconfCallback(VCONFKEY_SYSMAN_HDMI, OnPeripheralChangedCb, instance)) } + LoggerD("Added callback for PERIPHERAL"); m_peripheral_listener = callback; } @@ -1253,7 +1254,7 @@ void SystemInfoListeners::OnDeviceOrientationChangedCallback(sensor_t sensor, un } } -void SystemInfoListeners::OnLocaleChangedCallback(runtime_info_key_e /*key*/, void* event_ptr) +void SystemInfoListeners::OnLocaleChangedCallback(system_settings_key_e /*key*/, void* event_ptr) { if (nullptr != m_locale_listener) { SysteminfoInstance* instance = static_cast(event_ptr); @@ -1479,7 +1480,7 @@ void OnDeviceOrientationChangedCb(sensor_t sensor, unsigned int event_type, system_info_listeners.OnDeviceOrientationChangedCallback(sensor, event_type, data, user_data); } -void OnLocaleChangedCb(runtime_info_key_e key, void* event_ptr) +void OnLocaleChangedCb(system_settings_key_e key, void* event_ptr) { LoggerD(""); system_info_listeners.OnLocaleChangedCallback(key, event_ptr); @@ -1586,10 +1587,10 @@ PlatformResult SystemInfoDeviceCapability::GetValueString(const char *key, std:: return PlatformResult(ErrorCode::NO_ERROR); } -static PlatformResult GetRuntimeInfoString(runtime_info_key_e key, std::string& platform_string) { +static PlatformResult GetRuntimeInfoString(system_settings_key_e key, std::string& platform_string) { char* platform_c_string; - int err = runtime_info_get_value_string(key, &platform_c_string); - if (RUNTIME_INFO_ERROR_NONE == err) { + int err = system_settings_get_value_string(key, &platform_c_string); + if (SYSTEM_SETTINGS_ERROR_NONE == err) { if (nullptr != platform_c_string) { platform_string = platform_c_string; free(platform_c_string); @@ -2011,13 +2012,13 @@ PlatformResult SysteminfoUtils::ReportBuild(picojson::object& out) { PlatformResult SysteminfoUtils::ReportLocale(picojson::object& out) { std::string str_language = ""; - PlatformResult ret = GetRuntimeInfoString(RUNTIME_INFO_KEY_LANGUAGE, str_language); + PlatformResult ret = GetRuntimeInfoString(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, str_language); if (ret.IsError()) { return ret; } std::string str_country = ""; - ret = GetRuntimeInfoString(RUNTIME_INFO_KEY_REGION, str_country); + ret = GetRuntimeInfoString(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, str_country); if (ret.IsError()) { return ret; }