[Build] Tizen 3.0 mobile - re-enable features
authorRafal Galka <r.galka@samsung.com>
Fri, 12 Jun 2015 08:52:08 +0000 (10:52 +0200)
committerRafal Galka <r.galka@samsung.com>
Fri, 12 Jun 2015 08:52:08 +0000 (10:52 +0200)
Change-Id: I646a67bc061038a5a022c1c603f0dbac168b7879

packaging/webapi-plugins.spec
src/application/application_manager.cc
src/application/requested_application_control.cc
src/notification/notification.gyp
src/notification/notification_manager.cc
src/notification/status_notification.cc
src/systeminfo/systeminfo-utils.cpp

index d651006..d12d2d4 100755 (executable)
@@ -30,7 +30,7 @@ Source0:    %{name}-%{version}.tar.gz
 %define tizen_feature_badge_support               1
 %ifarch %{arm}
 # ARM
-%define tizen_feature_bluetooth_support           0
+%define tizen_feature_bluetooth_support           1
 %else
 # I586
 %define tizen_feature_bluetooth_support           0
@@ -54,10 +54,10 @@ 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    0
+%define tizen_feature_media_controller_support    1
 %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           1
@@ -67,14 +67,14 @@ Source0:    %{name}-%{version}.tar.gz
 
 %if 0%{?model_build_feature_nfc}
 %define tizen_feature_nfc_emulation_support       0
-%define tizen_feature_nfc_support                 0
+%define tizen_feature_nfc_support                 1
 %else
 %define tizen_feature_nfc_emulation_support       0
 %define tizen_feature_nfc_support                 0
 %endif
-%define tizen_feature_notification_support        0
+%define tizen_feature_notification_support        1
 %define tizen_feature_package_support             1
-%define tizen_feature_power_support               0
+%define tizen_feature_power_support               1
 %define tizen_feature_push_support                0
 %ifarch %{arm}
 # ARM
@@ -433,6 +433,7 @@ BuildRequires: pkgconfig(message-port)
 
 %if 0%{?tizen_feature_notification_support}
 BuildRequires: pkgconfig(notification)
+BuildRequires: pkgconfig(capi-appfw-app-control)
 %endif
 
 %if 0%{?tizen_feature_sound_support}
index b671443..409e4e7 100755 (executable)
@@ -514,29 +514,28 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) {
       }
     }
 
-    // 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;
-    //  }
-    //}
+    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 bb51d9f..7928ce8 100755 (executable)
  *    See the License for the specific language governing permissions and
  *    limitations under the License.
  */
+
 #include "requested_application_control.h"
 
 #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 9c219a8..b78fe2c 100755 (executable)
@@ -25,6 +25,7 @@
           'variables': {
             'packages': [
               'notification',
+              'capi-appfw-app-control',
               'capi-system-device',
             ]
           },
index c45a19f..97c7b7c 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <app_control_internal.h>
 #include <device/led.h>
-#include <notification_internal.h>
 
 #include "common/converter.h"
 #include "common/logger.h"
@@ -72,14 +71,14 @@ PlatformResult NotificationManager::Remove(const picojson::object& args) {
 
 PlatformResult NotificationManager::RemoveAll() {
   LoggerD("Enter");
-  int ret = notification_delete_all(NOTIFICATION_TYPE_NOTI);
+  int ret = notification_delete_all_by_type(NULL, 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(NOTIFICATION_TYPE_ONGOING);
+  ret = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
   if (ret != NOTIFICATION_ERROR_NONE) {
     LoggerE("Notification remove all failed: %d", ret);
     return PlatformResult(ErrorCode::UNKNOWN_ERR,
index c523a27..c971366 100644 (file)
@@ -17,7 +17,6 @@
 #include "notification/status_notification.h"
 
 #include <notification.h>
-#include <notification_internal.h>
 #include <app_control_internal.h>
 
 #include "common/converter.h"
index d0f4ebe..46d1a32 100644 (file)
@@ -1081,30 +1081,28 @@ PlatformResult SystemInfoListeners::UnregisterMemoryListener()
 PlatformResult SystemInfoListeners::RegisterCameraFlashListener(const SysteminfoUtilsCallback& callback,
                                                            SysteminfoInstance& instance)
 {
-  // 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;
-  //}
+  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()
 {
-  // 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;
-  //}
+  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);
 }