*
* 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
*
* Contributors:
* - S-Core Co., Ltd
- *
+ *
*/
#ifndef _DAHELPER_H_
extern "C"{
#endif
+extern int app_efl_main_flg;
+
#define MAX_PATH_LENGTH 256
#define MAX_STACK_DEPTH 128
#define TRIM_STACK_DEPTH 2
#define SNAPSHOT_WAIT_TIME_MAX 10000
*/
-#define TS_NONE 0x00000000
-#define TS_PROBE 0x00000001
-#define TS_INIT 0x00000002
-#define TS_FINIT 0x00000004
-#define TS_ENTER_PROBE_BLOCK 0x00000008
-#define TS_SET_PROBE_POINT 0x00000010
-#define TS_PRINT_LOG 0x00000020
-#define TS_PRINT_SAMPLE_LOG 0x00000040
-#define TS_APPEND_TYPE_LOG 0x00000080
-#define TS_BACKTRACE 0x00000100
-#define TS_HASHFUNC 0x00000200
-#define TS_PROFIL_THREAD 0x00000400
-#define TS_PROFIL_COUNT 0x00000800
-#define TS_DETECT_TOUCH 0x00001000
-#define TS_REGIST_SCREEN_CHANGE 0x00002000
-#define TS_POSSIBLE_CAPTURE 0x00004000
-#define TS_RECV_THREAD 0x00008000
-#define TS_CUSTOM_CHART_THREAD 0x00010000
-#define TRACE_STATE_SET(value) ((gSTrace) |= (value))
-#define TRACE_STATE_UNSET(value) ((gSTrace) &= (~value))
-
#define ENABLE_INTERNAL_MALLOC 0x0001
#define ENABLE_SNAPSHOT 0x0002
#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; \
#define SCREENSHOT_UNLOCK() \
do { \
- LOG("screenshot_unlock : %d, %s\n", gTraceInfo.screenshot.state, __func__); \
pthread_mutex_lock(&(gTraceInfo.screenshot.ssMutex)); \
- gTraceInfo.screenshot.state = 1; \
+ if(gTraceInfo.screenshot.state < 0) \
+ gTraceInfo.screenshot.state = 1; \
pthread_mutex_unlock(&(gTraceInfo.screenshot.ssMutex)); \
} while(0)
#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) \
#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; \
#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) \
#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) \
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
typedef struct
{
char appName[128];
- unsigned int startTime;
+ uint64_t startTime;
} __appInfo;
typedef struct
int stateTouch;
int init_complete;
int custom_chart_callback_count;
- unsigned long optionflag;
+ uint64_t optionflag;
} __traceInfo;
-extern __thread unsigned long gSTrace;
extern __traceInfo gTraceInfo;
int get_map_address(void* symbol, void** map_start, void** map_end);
//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();
int initialize_event();
int finalize_event();
int getOrientation();
-void orientationEnabled();
void on_orientation_changed(int angle, bool capi);
int remove_indir(const char* dirname);