summaryrefslogtreecommitdiff
path: root/include/setting-accessibility-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/setting-accessibility-debug.h')
-rw-r--r--include/setting-accessibility-debug.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/include/setting-accessibility-debug.h b/include/setting-accessibility-debug.h
new file mode 100644
index 0000000..8e3d752
--- /dev/null
+++ b/include/setting-accessibility-debug.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010 Samsung Electronics, Inc.
+ * All rights reserved.
+ *
+ * This software is a confidential and proprietary information
+ * of Samsung Electronics, Inc. ("Confidential Information"). You
+ * shall not disclose such Confidential Information and shall use
+ * it only in accordance with the terms of the license agreement
+ * you entered into with Samsung Electronics.
+ */
+#define _DLOG_USED
+#ifdef _DLOG_USED
+
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#define LOG_TAG "W-ACCESSIBILITY-SETTING"
+#endif
+
+#define DBG(fmt , args...) \
+ do { \
+ LOGD("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
+ } while (0)
+
+#define INFO(fmt , args...) \
+ do { \
+ LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
+ } while (0)
+
+#define WARN(fmt , args...) \
+ do { \
+ LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
+ } while (0)
+
+#define ERR(fmt , args...) \
+ do { \
+ LOGI("[%s : %d] "fmt"", __func__, __LINE__, ##args); \
+ } while (0)
+
+
+#define __FREE(del, arg) do { \
+ if (arg) { \
+ del((void *)(arg)); /*cast any argument to (void*) to avoid build warring*/\
+ arg = NULL; \
+ } \
+ } while (0);
+
+#define FREE(arg) __FREE(free, arg)
+
+#define access_retvm_if(expr, val, fmt, arg...) do { \
+ if (expr) { \
+ ERR(fmt, ##arg); \
+ return (val); \
+ } \
+ } while (0);
+
+#define access_retm_if(expr, fmt, arg...) do { \
+ if (expr) { \
+ ERR(fmt, ##arg); \
+ return; \
+ } \
+ } while (0);
+
+#define access_retv_if(expr, val) do { \
+ if (expr) { \
+ ERR("(%s)", #expr); \
+ return (val); \
+ } \
+} while (0)
+
+#define access_ret_if(expr) do { \
+ if (expr) { \
+ ERR("(%s)", #expr); \
+ return ; \
+ } \
+} while (0)
+
+#endif