2 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __MENU_DAEMON_UTIL_H__
18 #define __MENU_DAEMON_UTIL_H__
24 #define APP_TRAY_PKG_NAME "org.tizen.app-tray"
25 #define MENU_SCREEN_PKG_NAME "org.tizen.menu-screen"
26 #define PROVIDER_PKG_NAME "org.tizen.data-provider-master"
27 #define CLUSTER_HOME_PKG_NAME "org.tizen.cluster-home"
28 #define EASY_HOME_PKG_NAME "org.tizen.easy-home"
29 #define EASY_APPS_PKG_NAME "org.tizen.easy-apps"
31 #ifdef TIZEN_PROFILE_COMMON
32 #define HOMESCREEN_PKG_NAME MENU_SCREEN_PKG_NAME
34 #define HOMESCREEN_PKG_NAME "org.tizen.homescreen-efl"
37 #define TASKMGR_PKG_NAME "org.tizen.task-mgr"
38 #define DEFAULT_TASKMGR_PKG_NAME "org.tizen.taskmgr"
39 #define CONF_PATH_NUMBER 1024
41 #define BUF_SIZE_16 16
42 #define BUF_SIZE_32 32
43 #define BUF_SIZE_128 128
44 #define BUF_SIZE_256 256
45 #define BUF_SIZE_512 512
46 #define BUF_SIZE_1024 1024
51 #define LOG_TAG "STARTER"
56 #define _W(fmt, arg...) LOGW("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
60 #define _D(fmt, arg...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
64 #define _I(fmt, arg...) LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
68 #define _E(fmt, arg...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
71 #if !defined(_SECURE_W)
72 #define _SECURE_W(fmt, arg...) SECURE_LOGW("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
75 #if !defined(_SECURE_D)
76 #define _SECURE_D(fmt, arg...) SECURE_LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
79 #if !defined(_SECURE_I)
80 #define _SECURE_I(fmt, arg...) SECURE_LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
83 #if !defined(_SECURE_E)
84 #define _SECURE_E(fmt, arg...) SECURE_LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##arg)
87 #define retv_if(expr, val) do { \
89 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
94 #define ret_if(expr) do { \
96 _E("(%s) -> %s() return", #expr, __FUNCTION__); \
101 #define goto_if(expr, val) do { \
103 _E("(%s) -> goto", #expr); \
108 #define break_if(expr) { \
110 _E("(%s) -> break", #expr); \
115 #define continue_if(expr) { \
117 _E("(%s) -> continue", #expr); \
122 #define PRINT_TIME(str) do { \
124 gettimeofday(&tv, NULL); \
125 _D("[%s:%d] %s TIME=%u.%u", __func__, __LINE__, str, (int)tv.tv_sec, (int)tv.tv_usec); \
128 #define _F(fmt, arg...) do { \
130 fp = fopen("/var/log/starter.log", "a+");\
131 if (NULL == fp) break;\
132 fprintf(fp, "[%s:%d] "fmt"\n", __func__, __LINE__, ##arg); \
137 #define _(str) dgettext(PACKAGE, str)
141 #define S_(str) dgettext("sys_string", str)
145 #endif /* __MENU_DAEMON_UTIL_H__ */