Update to use the aul api instead of app-manager
authorSunwook Bae <sunwook45.bae@samsung.com>
Wed, 21 Aug 2013 07:30:13 +0000 (16:30 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Thu, 22 Aug 2013 06:49:51 +0000 (15:49 +0900)
Change-Id: I976ab3deae12bbcf14d5a79e4a4551e2c9a24d3b
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
CMakeLists.txt
message-port.pc.in
packaging/message-port.spec
src/MessagePortProxy.cpp

index 7eedc89..150a797 100755 (executable)
@@ -25,7 +25,7 @@ SET (${this_target}_SOURCE_FILES
        src/MessagePortProxy.cpp
 )
 
-SET(requires "dlog bundle glib-2.0 chromium")
+SET(requires "dlog bundle glib-2.0 aul chromium")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${this_target} REQUIRED ${requires})
@@ -59,7 +59,7 @@ TARGET_LINK_LIBRARIES(${this_target} "-ldlog" )
 TARGET_LINK_LIBRARIES(${this_target} "-lbundle" )
 TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
 TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
+TARGET_LINK_LIBRARIES(${this_target} "-laul" )
 
 SET_TARGET_PROPERTIES(${this_target}
        PROPERTIES
index ec7cdb8..bd7816a 100755 (executable)
@@ -4,7 +4,7 @@
 prefix=@PREFIX@
 exec_prefix=/usr
 libdir=@LIB_INSTALL_DIR@
-includedir=/usr/include/appfw
+includedir=@INCLUDE_INSTALL_DIR@/appfw
 
 Name: @PC_NAME@
 Description: @PACKAGE_DESCRIPTION@
index 36b375e..899608e 100755 (executable)
@@ -10,7 +10,7 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(chromium)
-BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(aul)
 
 # runtime requires
 Requires: chromium
index 24abd93..0ff878d 100644 (file)
@@ -26,7 +26,7 @@
 #include <unistd.h>
 #include <sstream>
 
-#include <app_manager.h>
+#include <aul/aul.h>
 
 #include "message-port.h"
 #include "message-port-messages.h"
@@ -93,18 +93,17 @@ MessagePortProxy::Construct(void)
        __pIpcClient = pIpcClient;
 
        int pid = getpid();
-       char* pAppId = NULL;
-       ret = app_manager_get_app_id(pid, &pAppId);
-       if (ret < 0)
+       char buffer[256] = {0, };
+
+       ret = aul_app_get_appid_bypid(pid, buffer, sizeof(buffer));
+       if (ret != AUL_R_OK)
        {
-               _LOGE("Failed to get_app_id: %d", ret);
+               _LOGE("Failed to get the application ID: %d", ret);
 
                return MESSAGEPORT_ERROR_IO_ERROR;
        }
 
-       __appId = pAppId;
-
-       free(pAppId);
+       __appId = buffer;
 
        return MESSAGEPORT_ERROR_NONE;
 }