* @{
*/
+#include <errno.h>
#include "vconf-buxton-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
+
/**
* @brief Enumeration for uses of vconf_get().
* @since_tizen 2.3
int vconf_exists(const char *keyname);
/**
+ * This function returns result of last api call
+ * @return The result of last api call
+ * @retval #VCONF_OK Successful
+ * @retval #VCONF_ERROR General error
+ * @retval #VCONF_ERROR_FILE_NO_ENT No such key
+ * @retval #VCONF_ERROR_FILE_PERM Permission denied
+ */
+ int vconf_get_ext_errno(void);
+/**
* @}
*/
#include "vconf-buxton.h"
#include "log.h"
-#define VCONF_OK 0
-#define VCONF_ERROR -1
-
/*================= SECTION definition of types =============*/
/*
static GSource *glib_source = NULL;
#endif
+/*
+ * error code for vconf_get_ext_errno()
+ */
+static int g_vconf_errno = 0;
+
#if !defined(NO_MULTITHREADING)
/*
* multithreaded protection
list = keynode->list;
list->cb_received++;
- if (buxton_response_status (resp) != 0)
+ if ((g_vconf_errno = buxton_response_status (resp)) != 0)
{
ERR ("Buxton returned error %d for key %s",
buxton_response_status (resp), keynode->keyname);
list = keynode->list;
list->cb_received++;
- if (buxton_response_status (resp) != 0)
+ if ((g_vconf_errno = buxton_response_status (resp)) != 0)
{
ERR ("Error %d while getting buxton key %s",
buxton_response_status (resp), keynode->keyname);
/*
* check the response status
*/
- if (buxton_response_status (resp) != 0)
+ if ((g_vconf_errno = buxton_response_status (resp)) != 0)
{
ERR ("Error while getting list of names from buxton");
data->cb_status = VCONF_ERROR;
return single.node.value.s;
}
+
+int
+vconf_get_ext_errno (void)
+{
+ INFO("vconf errno: %d", g_vconf_errno);
+ return g_vconf_errno;
+}