[FEATURE] Osp: total remove
[platform/core/system/swap-probe.git] / include / dahelper.h
index e764aee..feceba5 100755 (executable)
@@ -3,17 +3,17 @@
  *
  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: 
+ * Contact:
  *
  * Jaewon Lim <jaewon81.lim@samsung.com>
  * Woojin Jung <woojin2.jung@samsung.com>
  * Juyoung Kim <j0.kim@samsung.com>
- * 
+ *
  * This library is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the
  * Free Software Foundation; either version 2.1 of the License, or (at your option)
  * any later version.
- * 
+ *
  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
@@ -25,7 +25,7 @@
  *
  * Contributors:
  * - S-Core Co., Ltd
- * 
+ *
  */
 
 #ifndef _DAHELPER_H_
@@ -42,6 +42,8 @@
 extern "C"{
 #endif
 
+extern int app_efl_main_flg;
+
 #define MAX_PATH_LENGTH                256
 #define MAX_STACK_DEPTH                128
 #define TRIM_STACK_DEPTH       2
@@ -69,7 +71,6 @@ extern "C"{
 #define SCREENSHOT_LOCK()                                                                              \
        do {                                                                                                            \
                int old;                                                                                                \
-               LOG("screenshot_lock : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                old = gTraceInfo.screenshot.state;                                              \
                gTraceInfo.screenshot.state = -1;                                               \
@@ -82,7 +83,6 @@ extern "C"{
 
 #define SCREENSHOT_UNLOCK()                                                                            \
        do {                                                                                                            \
-               LOG("screenshot_unlock : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                if(gTraceInfo.screenshot.state < 0)                                             \
                        gTraceInfo.screenshot.state = 1;                                        \
@@ -92,7 +92,6 @@ extern "C"{
 #define SCREENSHOT_SET()                                                                               \
        do {                                                                                                            \
                int old;                                                                                                \
-               LOG("screenshot_set : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                old = gTraceInfo.screenshot.state;                                              \
                if(gTraceInfo.screenshot.state >= 0)                                    \
@@ -106,7 +105,6 @@ extern "C"{
 
 #define SCREENSHOT_UNSET()                                                                             \
        do {                                                                                                            \
-               LOG("screenshot_unset : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                if(gTraceInfo.screenshot.state >= 0)                                    \
                        gTraceInfo.screenshot.state = 0;                                        \
@@ -116,7 +114,6 @@ extern "C"{
 #define SCREENSHOT_DONE()                                                                              \
        do {                                                                                                            \
                int old;                                                                                                \
-               LOG("screenshot_done : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                old = gTraceInfo.screenshot.state;                                              \
                if(gTraceInfo.screenshot.state == 1)                                    \
@@ -130,7 +127,6 @@ extern "C"{
 #define SCREENSHOT_TIMEOUT()                                                                   \
        do {                                                                                                            \
                int old;                                                                                                \
-               LOG("screenshot_timeout : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
                pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex));   \
                old = gTraceInfo.screenshot.state;                                              \
                if(gTraceInfo.screenshot.state == 2)                                    \
@@ -149,15 +145,15 @@ typedef enum
        LIBC = 0,
        LIBPTHREAD = 1,
        LIBELEMENTARY = 2,
-       LIBOSP_UIFW = 3,
-       LIBOSP_APPFW = 4,
-       LIBOSP_WEB = 5,
-       LIBECORE_INPUT_EVAS = 6,
-       LIBDAEMON = 7,
-       LIBCAPI_APPFW_APPLICATION = 8
+       LIBECORE_INPUT_EVAS = 3,
+       LIBDAEMON = 4,
+       LIBCAPI_APPFW_APPLICATION = 5,
+       LIBGLES20 = 6,
+       LIBEGL = 7,
+       LIBSELF = 8
 } ORIGINAL_LIBRARY;
 
-extern char *lib_string[NUM_ORIGINAL_LIBRARY];
+extern const char *lib_string[NUM_ORIGINAL_LIBRARY];
 extern void *lib_handle[NUM_ORIGINAL_LIBRARY];
 
 // type definition for global variable
@@ -176,7 +172,7 @@ typedef struct
 typedef struct
 {
        char appName[128];
-       unsigned int startTime;
+       uint64_t startTime;
 } __appInfo;
 
 typedef struct
@@ -201,7 +197,7 @@ typedef struct
        int                                     stateTouch;
        int                                     init_complete;
        int                                     custom_chart_callback_count;
-       unsigned long           optionflag;
+       uint64_t                optionflag;
 } __traceInfo;
 
 extern __traceInfo gTraceInfo;
@@ -215,6 +211,8 @@ int __profil(int mode);
 
 //wchar_t* -> char*
 void WcharToChar(char* pstrDest, const wchar_t* pwstrSrc);
+char *absolutize_filepath(char buf[PATH_MAX], const char *fname);
+void application_exit();
 
 // screen capture functions
 int initialize_screencapture();