*
* @since_tizen 5.0
*/
-#ifndef TIZEN_ERROR_COMP
-#define TIZEN_ERROR_COMP -0x02F50000 /**< Base error code */
+#ifndef TIZEN_ERROR_MDG
+#define TIZEN_ERROR_MDG -0x02F50000 /**< Base error code */
#endif
/**
MDG_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
MDG_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
MDG_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- MDG_ERROR_COMM_ERROR = TIZEN_ERROR_COMP | 0x01, /**< communication error */
- MDG_ERROR_RX = TIZEN_ERROR_COMP | 0x02, /**< RX error */
- MDG_ERROR_TX = TIZEN_ERROR_COMP | 0x03, /**< TX error */
- MDG_ERROR_OPERATION_FAILED = TIZEN_ERROR_COMP | 0x04, /**< Operation Failed */
- MDG_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_COMP | 0x05, /**< Operation now in progress */
- MDG_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_COMP | 0x06, /**< Already initilized */
- MDG_ERROR_NO_DATA = TIZEN_ERROR_COMP | 0x07, /**< No Data */
- MDG_ERROR_NOT_STARTED = TIZEN_ERROR_COMP | 0x08, /**< Not Started */
+ MDG_ERROR_NO_DATA = TIZEN_ERROR_MDG | 0x01, /**< Data not exists */
+ MDG_ERROR_OPERATION_FAILED = TIZEN_ERROR_MDG | 0x02, /**< operation failed */
+ MDG_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_MDG | 0x03, /**< Request already registered */
+ MDG_ERROR_IN_PROGRESS = TIZEN_ERROR_MDG | 0x04,/**< operation is in progress */
+ MDG_ERROR_COMM_ERROR = TIZEN_ERROR_MDG | 0x05, /**< communication error */
+ MDG_ERROR_RX = TIZEN_ERROR_MDG | 0x06, /**< RX error */
+ MDG_ERROR_TX = TIZEN_ERROR_MDG | 0x07, /**< TX error */
+ MDG_ERROR_PLUGIN_FAIL = TIZEN_ERROR_MDG | 0x08, /**< Plugin failed */
+ MDG_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_MDG | 0x09, /**< Already in progress */
+ MDG_ERROR_NOT_STARTED = TIZEN_ERROR_MDG | 0x0A, /**< Not Started */
+ MDG_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_MDG | 0x0B, /**< Already initilized */
MDG_ERROR_UNKNOWN = -999,
+
} mdg_error_e;
/**
/* LCOV_EXCL_START */
if (*count > 0) {
GVariantIter *iter = NULL, *iter_row = NULL;
- GVariant *key_value;
+ GVariant *key_value = NULL;
const gchar *key;
guint i = 0;
#include <gio/gio.h>
#include <stdlib.h>
-#include <dlog.h>
#include <mdg.h>
#include <mdg_util.h>
#include <mdg_dbus.h>
CASE_TO_STR(MDG_ERROR_OUT_OF_MEMORY)
CASE_TO_STR(MDG_ERROR_PERMISSION_DENIED)
CASE_TO_STR(MDG_ERROR_NOT_SUPPORTED)
- CASE_TO_STR(MDG_ERROR_COMM_ERROR)
+ CASE_TO_STR(MDG_ERROR_OPERATION_FAILED)
+ CASE_TO_STR(MDG_ERROR_ALREADY_REGISTERED)
+ CASE_TO_STR(MDG_ERROR_IN_PROGRESS)
CASE_TO_STR(MDG_ERROR_RX)
CASE_TO_STR(MDG_ERROR_TX)
- CASE_TO_STR(MDG_ERROR_OPERATION_FAILED)
+ CASE_TO_STR(MDG_ERROR_PLUGIN_FAIL)
CASE_TO_STR(MDG_ERROR_ALREADY_IN_PROGRESS)
- CASE_TO_STR(MDG_ERROR_ALREADY_INITIALIZED)
- CASE_TO_STR(MDG_ERROR_NO_DATA)
CASE_TO_STR(MDG_ERROR_NOT_STARTED)
- CASE_TO_STR(MDG_ERROR_UNKNOWN)
+ CASE_TO_STR(MDG_ERROR_ALREADY_INITIALIZED)
default :
- return "MDG_ERROR_GENERAL";
+ return "MDG_ERROR_UNKNOWN";
}
}
#define NOTUSED(var) (var = var) /**< It is used to avoid generating build warning */
-#define TIZEN_ERROR_COMP 0 /**< Same one */
+#ifndef TIZEN_ERROR_MDG
+#define TIZEN_ERROR_MDG -0x02F50000 /**< Base error code */
+#endif
/**
* @brief Error codes for mdg-manager.
MDGD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
MDGD_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
MDGD_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- MDGD_ERROR_COMM_ERROR = TIZEN_ERROR_COMP | 0x01, /**< communication error */
- MDGD_ERROR_RX = TIZEN_ERROR_COMP | 0x02, /**< RX error */
- MDGD_ERROR_TX = TIZEN_ERROR_COMP | 0x03, /**< TX error */
- MDGD_ERROR_PLUGIN_FAIL = TIZEN_ERROR_COMP | 0x04, /**< Plugin failed */
- MDGD_ERROR_OPERATION_FAILED = TIZEN_ERROR_COMP | 0x05, /**< Operation Failed */
- MDGD_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_COMP | 0x06, /**< Already initilized */
- MDGD_ERROR_UNKNOWN = -999,
+ MDGD_ERROR_NO_DATA = TIZEN_ERROR_MDG | 0x01, /**< Data not exists */
+ MDGD_ERROR_OPERATION_FAILED = TIZEN_ERROR_MDG | 0x02, /**< operation failed */
+ MDGD_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_MDG | 0x03, /**< Request already registered */
+ MDGD_ERROR_IN_PROGRESS = TIZEN_ERROR_MDG | 0x04,/**< operation is in progress */
+ MDGD_ERROR_COMM_ERROR = TIZEN_ERROR_MDG | 0x05, /**< communication error */
+ MDGD_ERROR_RX = TIZEN_ERROR_MDG | 0x06, /**< RX error */
+ MDGD_ERROR_TX = TIZEN_ERROR_MDG | 0x07, /**< TX error */
+ MDGD_ERROR_PLUGIN_FAIL = TIZEN_ERROR_MDG | 0x08, /**< Plugin failed */
+ MDGD_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_MDG | 0x09, /**< Already in progress */
+ MDGD_ERROR_NOT_STARTED = TIZEN_ERROR_MDG | 0x0A, /**< Not Started */
+ MDGD_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_MDG | 0x0B, /**< Already initilized */
+ MDGD_ERROR_UNKNOWN = -999
} mdgd_error_e;
/**
return "MDGD_ERROR_PERMISSION_DENIED";
case MDGD_ERROR_NOT_SUPPORTED:
return "MDGD_ERROR_NOT_SUPPORTED";
+ case MDGD_ERROR_NO_DATA:
+ return "MDGD_ERROR_NO_DATA";
+ case MDGD_ERROR_OPERATION_FAILED:
+ return "MDGD_ERROR_OPERATION_FAILED";
+ case MDGD_ERROR_ALREADY_REGISTERED:
+ return "MDGD_ERROR_ALREADY_REGISTERED";
+ case MDGD_ERROR_IN_PROGRESS:
+ return "MDGD_ERROR_IN_PROGRESS";
case MDGD_ERROR_COMM_ERROR:
return "MDGD_ERROR_COMM_ERROR";
case MDGD_ERROR_RX:
return "MDGD_ERROR_RX";
case MDGD_ERROR_TX:
- return "MDGD_ERROR_RX";
+ return "MDGD_ERROR_TX";
case MDGD_ERROR_PLUGIN_FAIL:
return "MDGD_ERROR_PLUGIN_FAIL";
- case MDGD_ERROR_OPERATION_FAILED:
- return "MDGD_ERROR_OPERATION_FAILED";
+ case MDGD_ERROR_ALREADY_IN_PROGRESS:
+ return "MDGD_ERROR_ALREADY_IN_PROGRESS";
+ case MDGD_ERROR_ALREADY_INITIALIZED:
+ return "MDG_ERROR_ALREADY_INITIALIZED";
default:
return "UNKNOWN";
}
#include <gio/gio.h>
#include <tizen.h>
+#ifndef TIZEN_ERROR_MDG
+#define TIZEN_ERROR_MDG -0x02F50000 /**< Base error code */
+#endif
+
/**< Internal error code with d2ds daemon. It should be matched with API side */
typedef enum {
- MA_ERROR_NONE = 0, /**< Successful */
- MA_ERROR_IO_ERROR, /**< I/O error */
- MA_ERROR_NO_DATA, /**< Data not exists */
- MA_ERROR_OUT_OF_MEMORY, /**< out of memory */
- MA_ERROR_OPERATION_FAILED, /**< operation failed */
- MA_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- MA_ERROR_ALREADY_REGISTERED, /**< Request already registered */
- MA_ERROR_IN_PROGRESS /**< operation is in progress */
+ MA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ MA_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ MA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ MA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ MA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ MA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+ MA_ERROR_NO_DATA = TIZEN_ERROR_MDG | 0x01, /**< Data not exists */
+ MA_ERROR_OPERATION_FAILED = TIZEN_ERROR_MDG | 0x02, /**< operation failed */
+ MA_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_MDG | 0x03, /**< Request already registered */
+ MA_ERROR_IN_PROGRESS = TIZEN_ERROR_MDG | 0x04,/**< operation is in progress */
+ MA_ERROR_COMM_ERROR = TIZEN_ERROR_MDG | 0x05, /**< communication error */
+ MA_ERROR_RX = TIZEN_ERROR_MDG | 0x06, /**< RX error */
+ MA_ERROR_TX = TIZEN_ERROR_MDG | 0x07, /**< TX error */
+ MA_ERROR_PLUGIN_FAIL = TIZEN_ERROR_MDG | 0x08, /**< Plugin failed */
+ MA_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_MDG | 0x09, /**< Already in progress */
+ MA_ERROR_NOT_STARTED = TIZEN_ERROR_MDG | 0x0A, /**< Not Started */
+ MA_ERROR_ALREADY_INITIALIZED = TIZEN_ERROR_MDG | 0x0B, /**< Already initilized */
+ MA_ERROR_UNKNOWN = -999,
} ma_error_e;
/**< d2d-subowner service structure */