[Build] Tizen 3.0 mobile
authorRafal Galka <r.galka@samsung.com>
Thu, 21 May 2015 12:02:49 +0000 (14:02 +0200)
committerRafal Galka <r.galka@samsung.com>
Thu, 21 May 2015 12:02:49 +0000 (14:02 +0200)
[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
src/application/application_manager.cc
src/application/requested_application_control.cc
src/systeminfo/systeminfo-utils.cpp

index aee769aac623ea8842f2edb36f2d2bf05615e081..6c9b3452dd8080d9538cb70aac268ab3e9b3d540 100755 (executable)
@@ -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
index 01760321a7302483d0195d9d40b941b5ff17d59f..1edc80240815a8ea74d15188e3f28b9be854e629 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <app_info.h>
 #include <app_manager.h>
-#include <app_manager_extension.h>
+//#include <app_manager_extension.h>
 #include <aul.h>
 #include <package_manager.h>
 #include <pkgmgr-info.h>
@@ -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<picojson::object>());
-        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<picojson::object>());
-        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<picojson::object>());
+    //    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<picojson::object>());
+    //    return;
+    //  }
+    //}
 
     app_control_reply_cb callback = nullptr;
     struct ReplayCallbackData {
index 9b9d4340dd87e2d9b4a9417aaf321468c3039355..673df8fdb18bafc4c005eef9aaa39b0de737d88a 100644 (file)
@@ -7,7 +7,7 @@
 #include <app_manager.h>
 #include <app_control_internal.h>
 #include <bundle.h>
-#include <bundle_internal.h>
+//#include <bundle_internal.h>
 
 #include "common/logger.h"
 #include "application/application_utils.h"
index b176aec70ce8ef7ba455dd1c40a76a7bf431295c..361154ca9c521280b4034d12ac49d31ba2a622d7 100644 (file)
@@ -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<void*>(&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<void*>(&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);