vconf-compat: add vconf_get_ext_errno 82/44082/1
authorSuchang Woo <suchang.woo@samsung.com>
Thu, 16 Jul 2015 13:06:57 +0000 (22:06 +0900)
committerSuchang Woo <suchang.woo@samsung.com>
Thu, 16 Jul 2015 13:06:57 +0000 (22:06 +0900)
Change-Id: I1b04c6c3d8e785df6eb319e90aa34967c2253530
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
vconf-compat/vconf.c
vconf-compat/vconf.h
vconf-compat/vconf.sym

index 198c5fb..a99cd72 100644 (file)
@@ -726,3 +726,8 @@ EXPORT int vconf_get_dbl(const char *key, double *dblval)
        return 0;
 }
 
+int vconf_get_ext_errno(void)
+{
+       return errno * -1;
+}
+
index c43d345..45a4156 100644 (file)
 #ifndef __VCONF_H__
 #define __VCONF_H__
 
+#include <errno.h>
+
 #include "vconf-keys.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#define VCONF_OK 0
+#define VCONF_ERROR -1
+#define VCONF_ERROR_FILE_NO_ENT -ENOENT
+#define VCONF_ERROR_FILE_PERM -EPERM
+
 enum vconf_t {
        VCONF_TYPE_NONE = 0, /**< Vconf none type for Error detection */
        VCONF_TYPE_STRING = 40, /**< Vconf string type */
@@ -212,6 +219,14 @@ char *vconf_get_str(const char *key);
  */
 int vconf_get_dbl(const char *key, double *dblval);
 
+/**
+ * Get an error code of the last API call
+ *
+ * @return error code
+ * @deprecated use buxton APIs
+ */
+int vconf_get_ext_errno(void);
+
 #ifdef __cplusplus
 }
 #endif
index a76ac2e..7f81f43 100644 (file)
@@ -16,6 +16,7 @@ VCONF_BUXTON_1.0 {
                vconf_get_bool;
                vconf_get_str;
                vconf_get_dbl;
+               vconf_get_ext_errno;
        local:
                *;
 };