dbg.h file is removed. 32/38432/1 accepted/tizen/tv/20150421.232950 submit/tizen/20150421.213311
authorKim Youngjin <yj21c.kim@samsung.com>
Mon, 20 Apr 2015 23:35:08 +0000 (08:35 +0900)
committerKim Youngjin <yj21c.kim@samsung.com>
Mon, 20 Apr 2015 23:36:04 +0000 (08:36 +0900)
Change-Id: I937d7e4721f260d54655956757b3798d2a2c5eb8
Signed-off-by: Kim Youngjin <yj21c.kim@samsung.com>
include/common/dbg.h [deleted file]
include/util/util.h
src/main.cpp
src/mgr/SourceInfo.cpp
src/mgr/external.cpp
src/mgr/source_mgr.cpp
src/mgr/usb.cpp
src/util/util.cpp
src/view/allsource_view.cpp
src/view/menu_view.cpp
src/view/plugged_layout.cpp

diff --git a/include/common/dbg.h b/include/common/dbg.h
deleted file mode 100644 (file)
index 740d1c2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DBG_H__
-#define __DBG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "source-list"
-
-#include <dlog.h>
-
-#ifndef _ERR
-#define _ERR(fmt, args...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-#ifndef _DBG
-#define _DBG(fmt, args...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-#ifndef _INFO
-#define _INFO(fmt, args...) LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##args)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __DBG_H__ */
index 814e7ac..99f57a6 100644 (file)
 #define __UTIL_H__
 
 #include <Elementary.h>
-#include "dbg.h"
-
-#define UTIL_CHECK_RETURN_VAL(expr, val) { \
-               if (expr == NULL) { \
-                       _ERR("Invalid data, Returning value"); \
-                       return val; \
-               } \
-       }
-
-#define UTIL_CHECK_RETURN_NULL(expr) { \
-               if (expr == NULL) { \
-                       _ERR("Invalid data, Returning NULL"); \
-                       return NULL; \
-               } \
-       }
-
-#define UTIL_FREE(ptr) { \
-               if (ptr != NULL) { \
-                       free(ptr); \
-                       ptr = NULL; \
-               } \
-       }
+#include <MacroDefine.h>
 
 Evas_Object *util_add_layout(Evas_Object *parent, const char *group);
 Evas_Object *util_add_grid(Evas_Object *parent, int w, int h);
index e88bf68..cfeac56 100644 (file)
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-#include <dlog.h>
-#include "dbg.h"
 #include <AppCommon.h>
 #include "def.h"
 #include "source_mgr.h"
@@ -23,6 +21,8 @@
 #include "menu_view.h"
 
 
+SET_TAG("source-list");
+
 static Evas_Object *_add_win(const char *name)
 {
        Evas_Object *win;
index 1a441d3..c44b799 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "dbg.h"
 #include <AppCommon.h>
 #include "external.h"
 #include "SourceInfo.h"
index e28d955..2772583 100644 (file)
@@ -17,7 +17,6 @@
 #include <aul.h>
 #include <stdlib.h>
 #include <string.h>
-#include "dbg.h"
 #include <AppCommon.h>
 #include "external.h"
 
index ef5002c..3120ffb 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "dbg.h"
 #include <AppCommon.h>
 #include "external.h"
 #include "source_mgr.h"
index 969f94a..1b4e3fb 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "dbg.h"
 #include <AppCommon.h>
 #include "aul.h"
 #include "usb.h"
index 20e4d5d..887f85d 100644 (file)
@@ -25,11 +25,12 @@ Evas_Object *util_add_btn(Evas_Object *parent, const char *group)
 {
        Evas_Object *btn;
 
-       UTIL_CHECK_RETURN_NULL(parent);
-       UTIL_CHECK_RETURN_NULL(group);
+       if (!parent || !group)
+               return NULL;
 
        btn = elm_button_add(parent);
-       UTIL_CHECK_RETURN_NULL(btn);
+       if (!btn)
+               return NULL;
 
        elm_object_style_set(btn, group);
 
@@ -43,11 +44,12 @@ Evas_Object *util_add_layout(Evas_Object *parent, const char *group)
 {
        Evas_Object *layout;
 
-       UTIL_CHECK_RETURN_NULL(parent);
-       UTIL_CHECK_RETURN_NULL(group);
+       if (!parent || !group)
+               return NULL;
 
        layout = elm_layout_add(parent);
-       UTIL_CHECK_RETURN_NULL(layout);
+       if (!layout)
+               return NULL;
 
        elm_layout_file_set(layout, EDJ_FILE, group);
 
@@ -61,10 +63,12 @@ Evas_Object *util_add_grid(Evas_Object *parent, int w, int h)
 {
        Evas_Object *grid;
 
-       UTIL_CHECK_RETURN_NULL(parent);
+       if (!parent)
+               return NULL;
 
        grid = elm_gengrid_add(parent);
-       UTIL_CHECK_RETURN_NULL(grid);
+       if (!grid)
+               return NULL;
 
        elm_scroller_bounce_set(grid, EINA_FALSE, EINA_FALSE);
        elm_gengrid_horizontal_set(grid, EINA_FALSE);
index b71edfe..85c0a7c 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <aul.h>
-#include "dbg.h"
 #include <AppCommon.h>
 #include "source_mgr.h"
 #include "util.h"
index 300f643..fadb81c 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <aul.h>
-#include "dbg.h"
 #include <AppCommon.h>
 #include "source_mgr.h"
 #include "util.h"
@@ -59,10 +58,12 @@ Evas_Object *CMenuView::m_AddLayout(Evas_Object *win)
 {
        Evas_Object *base;
 
-       UTIL_CHECK_RETURN_NULL(win);
+       if (!win)
+               return NULL;
 
        base = util_add_layout(win, GRP_MENU);
-       UTIL_CHECK_RETURN_NULL(base);
+       if (!base)
+               return NULL;
 
        evas_object_show(base);
 
@@ -76,9 +77,8 @@ Evas_Object *CMenuView::m_AddBtn(Evas_Object *parent,
 {
        Evas_Object *btn;
 
-       UTIL_CHECK_RETURN_NULL(parent);
-       UTIL_CHECK_RETURN_NULL(style);
-       UTIL_CHECK_RETURN_NULL(str);
+       if (!parent || !style || !str)
+               return NULL;
 
        btn = elm_button_add(parent);
        if (!btn) {
index e490e2d..191aa35 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include "def.h"
-#include "dbg.h"
 #include <AppCommon.h>
 #include "external.h"
 #include "source_mgr.h"