+++ /dev/null
-/*
- * 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__ */
#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);
* limitations under the License.
*/
-#include <dlog.h>
-#include "dbg.h"
#include <AppCommon.h>
#include "def.h"
#include "source_mgr.h"
#include "menu_view.h"
+SET_TAG("source-list");
+
static Evas_Object *_add_win(const char *name)
{
Evas_Object *win;
#include <stdio.h>
#include <string.h>
-#include "dbg.h"
#include <AppCommon.h>
#include "external.h"
#include "SourceInfo.h"
#include <aul.h>
#include <stdlib.h>
#include <string.h>
-#include "dbg.h"
#include <AppCommon.h>
#include "external.h"
* limitations under the License.
*/
-#include "dbg.h"
#include <AppCommon.h>
#include "external.h"
#include "source_mgr.h"
* limitations under the License.
*/
-#include "dbg.h"
#include <AppCommon.h>
#include "aul.h"
#include "usb.h"
{
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);
{
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);
{
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);
*/
#include <aul.h>
-#include "dbg.h"
#include <AppCommon.h>
#include "source_mgr.h"
#include "util.h"
*/
#include <aul.h>
-#include "dbg.h"
#include <AppCommon.h>
#include "source_mgr.h"
#include "util.h"
{
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);
{
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) {
*/
#include "def.h"
-#include "dbg.h"
#include <AppCommon.h>
#include "external.h"
#include "source_mgr.h"