remove capi-appfw-app-manager dependency
authorYoung Ik Cho <youngik.cho@samsung.com>
Wed, 17 Jul 2013 06:54:32 +0000 (15:54 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Wed, 24 Jul 2013 04:04:21 +0000 (13:04 +0900)
Change-Id: I1d488dc26e777d60721beae217a5cebeaa634c55
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
packaging/osp-appfw.spec
src/CMakeLists.txt
src/app/FApp_AppManagerImpl.cpp
src/app/FApp_Aul.cpp
src/app/FApp_NotificationManagerImpl.cpp
src/io/FIo_MessagePortProxy.cpp
src/server/CMakeLists.txt
src/server/app/FApp_AulServer.cpp
src/system-server/CMakeLists.txt

index bad99f1..651b9ed 100755 (executable)
@@ -10,8 +10,6 @@ License:    Apache License, Version 2.0 or Flora
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(capi-appfw-application)
-BuildRequires:  pkgconfig(capi-appfw-app-manager)
-BuildRequires:  pkgconfig(capi-appfw-package-manager)
 BuildRequires:  pkgconfig(capi-content-mime-type)
 BuildRequires:  pkgconfig(capi-network-serial)
 BuildRequires:  pkgconfig(capi-system-device)
@@ -19,7 +17,6 @@ BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(capi-system-power)
 BuildRequires:  pkgconfig(capi-system-runtime-info)
 BuildRequires:  pkgconfig(capi-system-system-settings)
-BuildRequires:  pkgconfig(capi-system-media-key)
 BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires: pkgconfig(capi-telephony-sim)
 BuildRequires: pkgconfig(capi-network-tethering)
@@ -51,11 +48,10 @@ BuildRequires:      pkgconfig(edbus)
 BuildRequires: pkgconfig(efreet)
 BuildRequires: pkgconfig(ethumb)
 BuildRequires:  pkgconfig(icu-i18n)
-BuildRequires:  pkgconfig(libcurl)
 BuildRequires:  pkgconfig(libpcre)
 BuildRequires:  pkgconfig(libssl)
 BuildRequires:  pkgconfig(libsoup-2.4)
-BuildRequires:  pkgconfig(libwbxml2)
+BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(message-port)
 BuildRequires:  pkgconfig(minizip)
 BuildRequires:  pkgconfig(notification)
@@ -77,8 +73,7 @@ BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(security-server)
 
 # runtime requires
-Requires: capi-appfw-app-manager  
-Requires: capi-appfw-application  
+Requires: capi-appfw-application
 Requires: capi-appfw-package-manager
 Requires: capi-content-mime-type
 Requires: capi-network-serial
@@ -104,7 +99,6 @@ Group:      TO_BE/FILLED_IN
 Requires:   %{name} = %{version}-%{release}
 Requires: boost-devel
 Requires: pkgconfig(pkgmgr-info)
-Requires: pkgconfig(capi-appfw-app-manager)
 
 %description devel
 The  App Framework library of OSP (DEV)
@@ -113,7 +107,6 @@ The  App Framework library of OSP (DEV)
 Summary:    osp app framework internel (Internal)
 Group:      TO_BE/FILLED_IN
 Requires:   %{name} = %{version}-%{release}
-Requires: pkgconfig(capi-appfw-app-manager)
 
 %description internal-devel
 The App Framework library of OSP (Internal-DEV)
@@ -208,4 +201,3 @@ chmod 444 /opt/usr/etc/clocale.list
 %{_libdir}/osp/debug/libosp-appfw.so*
 %{_libdir}/osp-server/debug/libosp-appfw-server.so*
 %{_libdir}/osp-server/debug/libosp-system-server.so*
-
index e136c33..eb88010 100755 (executable)
@@ -16,10 +16,9 @@ pkg_check_modules(pkgs REQUIRED
        haptic
        heynoti
        icu-i18n
-       libcurl
        libpcre
        libsoup-2.4
-       libwbxml2
+       libxml-2.0
        message-port
        minizip
        notification
@@ -31,23 +30,19 @@ pkg_check_modules(pkgs REQUIRED
        vconf
        zlib
        tapi
-       capi-appfw-app-manager
        capi-appfw-application
-       capi-appfw-package-manager
        capi-content-mime-type
        capi-network-serial
        capi-system-runtime-info
        capi-system-device
        capi-system-power
        capi-system-system-settings
-       capi-system-media-key
-       capi-network-bluetooth
        capi-system-info
        security-server
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -Wall -Wno-unused")
 ENDFOREACH(flag)
 
 
index d5f6bc9..840ed38 100755 (executable)
@@ -26,7 +26,6 @@
 
 #include <aul/aul.h>
 #include <bundle.h>
-#include <app_manager.h>
 
 #include <FBaseInteger.h>
 #include <FBaseObject.h>
index 98bc8fb..8523a63 100644 (file)
@@ -29,7 +29,6 @@
 #include <aul.h>
 #include <bundle.h>
 #include <appsvc/appsvc.h>
-#include <app_manager.h>
 #include <heynoti.h>
 
 #include <FBaseObject.h>
@@ -144,10 +143,9 @@ _Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode)
 bool
 _Aul::IsRunning(const String& appId)
 {
-       bool isRunning = false;
-       std::unique_ptr<char[]> pSlpPackageName(_StringConverter::CopyToCharArrayN(appId));
+       std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(appId));
 
-       app_manager_is_running(pSlpPackageName.get(), &isRunning);
+       const bool isRunning = (aul_app_is_running(pPackageId.get()) > 0);
 
        SysLog(NID_APP, "'%ls' %s running now.", appId.GetPointer(), (isRunning) ? "is" : "is NOT");
        return isRunning;
index 8d65b25..8ea0ca1 100644 (file)
  */
 
 #include <unique_ptr.h>
+
 #include <appsvc/appsvc.h>
 #include <bundle.h>
 #include <notification/notification.h>
 #include <appfw/app.h>
-#include <appfw/app_manager.h>
 #include <appfw/app_ui_notification.h>
 
 #include <FBaseSysLog.h>
@@ -248,8 +248,7 @@ _NotificationManagerImpl::NotifyImpl(const AppId& appId, const String& messageTe
        String iconPath;
        char* pMsg = null;
        char* pIcon = null;
-       char* pDefaultIconPath = NULL;
-       char* pName = NULL;
+       char* pName = null;
        ui_notification_h core = NULL;
        char buffer[256];
        bundle* pKb = NULL;
@@ -279,24 +278,35 @@ _NotificationManagerImpl::NotifyImpl(const AppId& appId, const String& messageTe
                snprintf(buffer, 256, "%ls", appId.GetPointer());
 
                pPackageAppInfo = _PackageManagerImpl::GetInstance()->GetPackageAppInfoN(appId);
-               iconPath = _PackageAppInfoImpl::GetInstance(pPackageAppInfo)->GetAppNotificationIconPath();
-
-               if (!iconPath.IsEmpty() && File::IsFileExist(iconPath))
+               if (pPackageAppInfo)
                {
-                       pIcon = _StringConverter::CopyToCharArrayN(iconPath);
-                       r = ConvertNotificationResult(ui_notification_set_icon(core, pIcon));
-                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set icon failed.", GetErrorMessage(r));
+                       iconPath = pPackageAppInfo->GetAppNotificationIconPath();
+
+                       if (!iconPath.IsEmpty() && File::IsFileExist(iconPath))
+                       {
+                               pIcon = _StringConverter::CopyToCharArrayN(iconPath);
+                               r = ConvertNotificationResult(ui_notification_set_icon(core, pIcon));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set icon failed.", GetErrorMessage(r));
+                       }
+                       else
+                       {
+                               iconPath = pPackageAppInfo->GetAppMenuIconPath();
+                               pIcon = _StringConverter::CopyToCharArrayN(iconPath);
+                               r = ConvertNotificationResult(ui_notification_set_icon(core, pIcon));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set icon path  failed.", GetErrorMessage(r));
+                       }
+
+                       const String& displayName = pPackageAppInfo->GetAppDisplayName();
+                       pName = _StringConverter::CopyToCharArrayN(displayName);
+
+                       r = ConvertNotificationResult(ui_notification_set_title(core, pName));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set title failed.", GetErrorMessage(r));
                }
                else
                {
-                       app_manager_get_app_icon_path(buffer, &pDefaultIconPath);
-                       r = ConvertNotificationResult(ui_notification_set_icon(core, pDefaultIconPath));
-                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set icon path  failed.", GetErrorMessage(r));
+                       SysLog(NID_APP, "No packageInfo found for %ls", appId.GetPointer());
                }
 
-               app_manager_get_app_name(buffer, &pName);
-               r = ConvertNotificationResult(ui_notification_set_title(core, pName));
-               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set title failed.", GetErrorMessage(r));
 
                r = arg.Construct(launchArguments);
                SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -324,18 +334,12 @@ CATCH:
        delete pPackageAppInfo;
        delete[] pMsg;
        delete[] pIcon;
-       if (pDefaultIconPath)
-       {
-               free(pDefaultIconPath);
-       }
+       delete[] pName;
+       
        if (core)
        {
                ui_notification_destroy(core);
        }
-       if (pName)
-       {
-               free(pName);
-       }
        service_destroy(svc);
        return r;
 }
index 244cf39..2ba140e 100644 (file)
@@ -24,8 +24,6 @@
 #include <typeinfo>
 #include <unique_ptr.h>
 
-#include <package_manager.h>
-
 #include <message-port.h>
 
 #include <FBaseSysLog.h>
index 874b813..6a1df8c 100644 (file)
@@ -27,7 +27,6 @@ pkg_check_modules(server_pkgs REQUIRED
        glib-2.0
        heynoti
        pkgmgr-info
-       capi-appfw-app-manager
 )
 
 FOREACH(flag ${server_pkgs_CFLAGS})
@@ -35,7 +34,7 @@ FOREACH(flag ${server_pkgs_CFLAGS})
 ENDFOREACH(flag)
 
 ## SET EXTRA COMPILER FLAGS
-SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -fPIC -Wall)
+SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -fPIC -Wall -Wno-unused")
 
 ## SET C COMPILER FLAGS
 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
index 267a974..e983e4c 100755 (executable)
@@ -29,7 +29,6 @@
 #include <aul.h>
 #include <bundle.h>
 #include <appsvc/appsvc.h>
-#include <app_manager.h>
 #include <heynoti.h>
 
 #include <FBaseObject.h>
@@ -136,16 +135,15 @@ bool
 _AulServer::IsRunning(const AppId& appId, const String& exeName)
 {
        char slpPackageName[MAX_SLP_PACKAGE_ID] = {0, };
-       bool isRunning = false;
 
        _PackageManagerImpl* pPackageManagerImpl = _PackageManagerImpl::GetInstance();
        SysTryReturn(NID_APP, pPackageManagerImpl != null, false, E_INVALID_STATE, "[E_INVALID_STATE] Invalid package instance.");
 
        pPackageManagerImpl->GetPackageName(appId, &exeName, slpPackageName, MAX_SLP_PACKAGE_ID);
 
-       app_manager_is_running(slpPackageName, &isRunning);
+       const bool isRunning = (aul_app_is_running(slpPackageName) > 0);
 
-       SysLog(NID_APP, "'%s' %s running now.", slpPackageName, (isRunning == true) ? "is" : "is NOT");
+       SysLog(NID_APP, "'%s' %s running now.", slpPackageName, (isRunning) ? "is" : "is NOT");
 
        return isRunning;
 }
@@ -153,10 +151,9 @@ _AulServer::IsRunning(const AppId& appId, const String& exeName)
 bool
 _AulServer::IsRunning(const String& packageName)
 {
-       bool isRunning = false;
-       std::unique_ptr<char[]> pSlpPackageName(_StringConverter::CopyToCharArrayN(packageName));
+       std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageName));
 
-       app_manager_is_running(pSlpPackageName.get(), &isRunning);
+       const bool isRunning = (aul_app_is_running(pPackageId.get()) > 0);
 
        SysLog(NID_APP, "'%ls' %s running now.", packageName.GetPointer(), (isRunning) ? "is" : "is NOT");
        return isRunning;
index 8876279..e3ef90c 100644 (file)
@@ -38,7 +38,6 @@ pkg_check_modules(system_pkgs REQUIRED
        capi-network-tethering
        capi-system-device
        capi-system-info
-       capi-system-media-key
        capi-system-runtime-info
        capi-system-system-settings
        capi-telephony-sim
@@ -58,7 +57,7 @@ FOREACH(flag ${system_pkgs_CFLAGS})
 ENDFOREACH(flag)
 
 ## SET EXTRA COMPILER FLAGS
-SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -fPIC -Wall)
+SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -fPIC -Wall -Wno-unused")
 
 ## SET C COMPILER FLAGS
 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")