power: replace pmapi to libdeviced to lock power state 63/60163/1 accepted/tizen/ivi/20160225.080545 accepted/tizen/mobile/20160225.080452 accepted/tizen/tv/20160225.080510 accepted/tizen/wearable/20160225.080525 submit/tizen/20160224.050452
authorTaeyoung Kim <ty317.kim@samsung.com>
Wed, 24 Feb 2016 01:53:57 +0000 (10:53 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Wed, 24 Feb 2016 01:54:57 +0000 (10:54 +0900)
- pmapi is not supported anymore and libdeviced supports
  the same operation. Thus the apis are replaced and
  the dependency for deviced is added

Change-Id: I44700d25f464b16b124d8bb36accf6f0736122b6
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
configure.ac
packaging/media-server.spec
src/scanner-v2/media-scanner-extract-v2.c
src/scanner-v2/media-scanner-scan-v2.c
src/scanner-v2/media-scanner-v2.c
src/scanner/media-scanner-scan.c

index 5354794..46b55e5 100755 (executable)
@@ -74,7 +74,7 @@ PKG_CHECK_MODULES(AUL, aul)
 AC_SUBST(AUL_CFLAGS)
 AC_SUBST(AUL_LIBS)
 
-PKG_CHECK_MODULES(LIBPMCONTROL, pmapi)
+PKG_CHECK_MODULES(LIBPMCONTROL, deviced)
 AC_SUBST(LIBPMCONTROL_CFLAGS)
 AC_SUBST(LIBPMCONTROL_LIBS)
 
index d24150c..6b21980 100755 (executable)
@@ -16,7 +16,7 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(aul)
-BuildRequires:  pkgconfig(pmapi)
+BuildRequires:  pkgconfig(deviced)
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(db-util)
index 8e872d1..c83d3ea 100755 (executable)
@@ -31,7 +31,6 @@
 #include <dirent.h>
 #include <errno.h>
 #include <malloc.h>
-#include <pmapi.h>
 #include <vconf.h>
 
 #include "media-util.h"
index 6c5f7a6..501564f 100755 (executable)
@@ -33,7 +33,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <malloc.h>
-#include <pmapi.h>
+#include <dd-display.h>
 #include <vconf.h>
 
 #include "media-util.h"
@@ -173,12 +173,12 @@ static int __msc_set_power_mode(ms_db_status_type_t status)
 
        switch (status) {
        case MS_DB_UPDATING:
-               err = pm_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
+               err = display_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
                if (err != 0)
                        res = MS_MEDIA_ERR_INTERNAL;
                break;
        case MS_DB_UPDATED:
-               err = pm_unlock_state(LCD_OFF, STAY_CUR_STATE);
+               err = display_unlock_state(LCD_OFF, PM_RESET_TIMER);
                if (err != 0)
                        res = MS_MEDIA_ERR_INTERNAL;
                break;
index 4823204..5a1e424 100755 (executable)
@@ -24,7 +24,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <pmapi.h>
+#include <dd-display.h>
 
 #include "media-common-utils.h"
 #include "media-common-external-storage.h"
@@ -136,7 +136,7 @@ int main(int argc, char **argv)
 
        msc_get_power_status(&power_off_status);
        if (power_off_status) {
-               pm_unlock_state(LCD_OFF, STAY_CUR_STATE);
+               display_unlock_state(LCD_OFF, PM_RESET_TIMER);
        }
 
        msc_deinit_extract_thread();
index e86aaa5..06c72fc 100755 (executable)
@@ -24,7 +24,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <malloc.h>
-#include <pmapi.h>
+#include <dd-display.h>
 #include <vconf.h>
 #include <grp.h>
 #include <pwd.h>
@@ -129,12 +129,12 @@ static int __msc_set_power_mode(ms_db_status_type_t status)
 
        switch (status) {
        case MS_DB_UPDATING:
-               err = pm_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
+               err = display_lock_state(LCD_OFF, STAY_CUR_STATE, 0);
                if (err != 0)
                        res = MS_MEDIA_ERR_INTERNAL;
                break;
        case MS_DB_UPDATED:
-               err = pm_unlock_state(LCD_OFF, STAY_CUR_STATE);
+               err = display_unlock_state(LCD_OFF, PM_RESET_TIMER);
                if (err != 0)
                        res = MS_MEDIA_ERR_INTERNAL;
                break;