-I/usr/include/e_dbus-1 \
-I/usr/include/dbus-1.0 \
-I/usr/lib/dbus-1.0/include
-INC_TIZEN = $(INC_COMMON) #-I/usr/include/vconf -I/usr/include/pixman-1
-INC_OSP = $(INC_COMMON) -I/usr/include/osp
+INC_CAPI = $(INC_COMMON) #-I/usr/include/vconf -I/usr/include/pixman-1
+INC_TIZEN = $(INC_COMMON) -I/usr/include/osp
COMMON_SRCS = ./helper/libdaprobe.c \
./helper/dahelper.c \
./probe_file/da_io_posix.c \
./probe_file/da_io_stdc.c
-TIZEN_SRCS =$(COMMON_SRCS) \
+CAPI_SRCS =$(COMMON_SRCS) \
./helper/addr-capi.c \
- ./probe_tizenapi/tizen_appfw.c \
- ./probe_ui/tizen_capture.c
+ ./probe_capi/capi_appfw.c \
+ ./probe_ui/capi_capture.c
-OSP_SRCS = $(COMMON_SRCS) \
+TIZEN_SRCS = $(COMMON_SRCS) \
./helper/addr-tizen.c \
./probe_memory/libdanew.cpp \
- ./probe_badaapi/bada_file.cpp \
- ./probe_badaapi/bada_thread.cpp \
- ./probe_badaapi/bada_lifecycle.cpp \
- ./probe_badaapi/bada_sync.cpp \
- ./probe_badaapi/osp_controls.cpp \
- ./probe_badaapi/osp_constructor.cpp \
+ ./probe_tizenapi/tizen_file.cpp \
+ ./probe_tizenapi/tizen_thread.cpp \
+ ./probe_tizenapi/tizen_lifecycle.cpp \
+ ./probe_tizenapi/tizen_sync.cpp \
+ ./probe_tizenapi/tizen_controls.cpp \
+ ./probe_tizenapi/tizen_constructor.cpp \
./probe_event/gesture.cpp \
- ./probe_ui/osp_capture.cpp \
- ./probe_ui/osp_scenemanager.cpp \
- ./probe_ui/osp_frameani.cpp \
- ./probe_ui/osp_display.cpp \
- ./probe_graphics/da_gles20.cpp
+ ./probe_graphics/da_gles20.cpp \
+ ./probe_ui/tizen_capture.cpp \
+ ./probe_ui/tizen_scenemanager.cpp \
+ ./probe_ui/tizen_frameani.cpp \
+ ./probe_ui/tizen_display.cpp
DUMMY_SRCS = ./custom_chart/da_chart_dummy.c
+CAPI_TARGET = da_probe_osp.so
TIZEN_TARGET = da_probe_tizen.so
-OSP_TARGET = da_probe_osp.so
DUMMY_TARGET = libdaprobe.so
COMMON_FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined
-TIZEN_FLAGS = $(COMMON_FLAGS)
-OSP_FLAGS = $(COMMON_FLAGS) -DOSPAPP
+CAPI_FLAGS = $(COMMON_FLAGS)
+TIZEN_FLAGS = $(COMMON_FLAGS) -DOSPAPP
LIBDIR_COMMON =
-LIBDIR_TIZEN = $(LIBDIR_COMMON)
-LIBDIR_OSP = $(LIBDIR_COMMON) -L/usr/lib/osp
+LIBDIR_CAPI = $(LIBDIR_COMMON)
+LIBDIR_TIZEN = $(LIBDIR_COMMON) -L/usr/lib/osp
COMMON_LDFLAGS = -ldl -lpthread -lrt -lecore -levas -lecore_input -leina -lecore_x -lcapi-system-runtime-info -lcapi-appfw-application -lX11 -lXext
-TIZEN_LDFLAGS = $(COMMON_LDFLAGS)
-OSP_LDFLAGS = $(COMMON_LDFLAGS) -lstdc++ -losp-uifw -losp-appfw
+CAPI_LDFLAGS = $(COMMON_LDFLAGS)
+TIZEN_LDFLAGS = $(COMMON_LDFLAGS) -lstdc++ -losp-uifw -losp-appfw
DUMMY_LDFLAGS =
-all: $(TIZEN_TARGET) $(OSP_TARGET) $(DUMMY_TARGET)
+all: $(CAPI_TARGET) $(TIZEN_TARGET) $(DUMMY_TARGET)
+capi: $(CAPI_TARGET)
tizen: $(TIZEN_TARGET)
-osp: $(OSP_TARGET)
dummy: $(DUMMY_TARGET)
headers:
cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header.awk > include/api_id_mapping.h
cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header_list.awk > include/api_id_list.h
+$(CAPI_TARGET): $(CAPI_SRCS)
+ $(CC) $(INC_CAPI) $(CAPI_FLAGS) $(LIBDIR_CAPI) -o $@ $(CAPI_SRCS) $(CAPI_LDFLAGS)
+
$(TIZEN_TARGET): $(TIZEN_SRCS)
$(CC) $(INC_TIZEN) $(TIZEN_FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
-$(OSP_TARGET): $(OSP_SRCS)
- $(CC) $(INC_OSP) $(OSP_FLAGS) $(LIBDIR_OSP) -o $@ $(OSP_SRCS) $(OSP_LDFLAGS)
-
$(DUMMY_TARGET): $(DUMMY_SRCS)
- $(CC) $(INC_OSP) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
-
+ $(CC) $(INC_TIZEN) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
install:
[ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
- install $(OSP_TARGET) $(DUMMY_TARGET) $(DESTDIR)/$(INSTALLDIR)/
+ install $(TIZEN_TARGET) $(DUMMY_TARGET) $(DESTDIR)/$(INSTALLDIR)/
clean:
rm -f *.so *.o
#include "binproto.h"
#define APP_INSTALL_PATH "/opt/apps"
-#define OSP_APP_POSTFIX ".exe"
+#define TISEN_APP_POSTFIX ".exe"
#define UDS_NAME "/tmp/da.socket"
#define TIMERFD_INTERVAL 100000000 // 0.1 sec
}
else // user binary
{
-#ifdef OSPAPP
- substr = strstr(tracestring, OSP_APP_POSTFIX);
+#ifdef TISENAPP
+ substr = strstr(tracestring, TISEN_APP_POSTFIX);
if(substr == NULL)
return 1;
#endif
if(thread_type == THREAD_PTHREAD) { \
BUF_PTR = pack_int64(BUF_PTR, thread_id); \
BUF_PTR = pack_int64(BUF_PTR, 0); \
- } else if(thread_type == THREAD_OSPTHREAD_WORKER \
- || thread_type == THREAD_OSPTHREAD_EVENTDRIVEN) { \
+ } else if(thread_type == THREAD_TIZENTHREAD_WORKER \
+ || thread_type == THREAD_TIZENTHREAD_EVENTDRIVEN) { \
BUF_PTR = pack_int64(BUF_PTR, 0); \
BUF_PTR = pack_int64(BUF_PTR, thread_id); \
} else { \
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#ifndef __BADA_PROBE_H__
-#define __BADA_PROBE_H__
-
-#include <string.h>
-#include <dlfcn.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GET_REAL_FUNC_OSP(FUNCNAME, LIBNAME, FUNCTIONPOINTER) \
- do { \
- if(!FUNCTIONPOINTER) { \
- probeBlockStart(); \
- if(lib_handle[LIBNAME] == NULL) { \
- lib_handle[LIBNAME] = dlopen(lib_string[LIBNAME], RTLD_LAZY); \
- if(lib_handle[LIBNAME] == NULL) { \
- char perror_msg[PERROR_MSG_MAX]; \
- sprintf(perror_msg, "dlopen failed : %s", lib_string[LIBNAME]); \
- perror(perror_msg); \
- exit(0); \
- } \
- } \
- void* funcp = dlsym(lib_handle[LIBNAME], #FUNCNAME); \
- if(funcp == NULL || dlerror() != NULL) { \
- perror("dlsym failed : " #FUNCNAME); \
- exit(0); \
- } \
- memcpy(&FUNCTIONPOINTER, &funcp, sizeof(void*)); \
- probeBlockEnd(); \
- } \
- } while(0)
-
-#define GET_REAL_FUNC_TIZEN(FUNCNAME, LIBNAME, FUNCTIONPOINTER) GET_REAL_FUNC_OSP(FUNCNAME, LIBNAME, FUNCTIONPOINTER) \
-
-#define PRE_PROBEBLOCK_OSP(FILTER) \
- do { \
- if((blockresult = preBlockBegin(CALLER_ADDRESS, FILTER, _sopt)) != 0) { \
- setProbePoint(&probeInfo); \
- preBlockEnd(); \
- } \
- } while(0)
-
-extern int SceneManagerUsed;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
#define USERFUNC_EXIT 1
#define THREAD_PTHREAD 0
-#define THREAD_OSPTHREAD_WORKER 1
-#define THREAD_OSPTHREAD_EVENTDRIVEN 2
+#define THREAD_TIZENTHREAD_WORKER 1
+#define THREAD_TIZENTHREAD_EVENTDRIVEN 2
#define THREAD_API_NEW 0
#define THREAD_API_START 1
#define THREAD_API_INTERNAL_STOP 7
#define THREAD_API_OTHER 8
-#define SYNC_OSP_MUTEX 0
-#define SYNC_OSP_MONITOR 1
-#define SYNC_OSP_SEMAPHORE 2
+#define SYNC_TIZEN_MUTEX 0
+#define SYNC_TIZEN_MONITOR 1
+#define SYNC_TIZEN_SEMAPHORE 2
#define SYNC_PTHREAD_MUTEX 3
#define SYNC_PTHREAD_COND_VARIABLE 4
#define SYNC_PTHREAD_RWLOCK 5
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef __BADA_PROBE_H__
+#define __BADA_PROBE_H__
+
+#include <string.h>
+#include <dlfcn.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GET_REAL_FUNC_TISEN(FUNCNAME, LIBNAME, FUNCTIONPOINTER) \
+ do { \
+ if(!FUNCTIONPOINTER) { \
+ probeBlockStart(); \
+ if(lib_handle[LIBNAME] == NULL) { \
+ lib_handle[LIBNAME] = dlopen(lib_string[LIBNAME], RTLD_LAZY); \
+ if(lib_handle[LIBNAME] == NULL) { \
+ char perror_msg[PERROR_MSG_MAX]; \
+ sprintf(perror_msg, "dlopen failed : %s", lib_string[LIBNAME]); \
+ perror(perror_msg); \
+ exit(0); \
+ } \
+ } \
+ void* funcp = dlsym(lib_handle[LIBNAME], #FUNCNAME); \
+ if(funcp == NULL || dlerror() != NULL) { \
+ perror("dlsym failed : " #FUNCNAME); \
+ exit(0); \
+ } \
+ memcpy(&FUNCTIONPOINTER, &funcp, sizeof(void*)); \
+ probeBlockEnd(); \
+ } \
+ } while(0)
+
+#define GET_REAL_FUNC_TIZEN(FUNCNAME, LIBNAME, FUNCTIONPOINTER) GET_REAL_FUNC_TISEN(FUNCNAME, LIBNAME, FUNCTIONPOINTER) \
+
+#define PRE_PROBEBLOCK_TISEN(FILTER) \
+ do { \
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, FILTER, _sopt)) != 0) { \
+ setProbePoint(&probeInfo); \
+ preBlockEnd(); \
+ } \
+ } while(0)
+
+extern int SceneManagerUsed;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
%files
%manifest swap-probe.manifest
%defattr(-,root,root,-)
-%{_prefix}/lib/da_probe_osp.so
+%{_prefix}/lib/da_probe_tizen.so
%{_prefix}/lib/libdaprobe.so
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <FIo.h>
-#include "daprobe.h"
-#include "probeinfo.h"
-#include "dahelper.h"
-
-#include "binproto.h"
-
-static enum DaOptions _sopt = OPT_FILE;
-
-namespace Tizen {
-namespace Io {
-
-result File::Construct(const Tizen::Base::String& filePath,
- const Tizen::Base::String& openMode, bool createParentDirectories) {
- typedef result (File::*methodType)(const Tizen::Base::String& filePath,
- const Tizen::Base::String& openMode, bool createParentDirectories);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp_path[50];
- char temp_mode[50];
- FileAttributes attr;
- long long size = 0L;
-
- if (!Constructp) {
- probeBlockStart();
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_b");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Constructp)(filePath, openMode, createParentDirectories);
-
- if(postBlockBegin(blockresult)) {
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp_path,filePath.GetPointer());
- WcharToChar(temp_mode,openMode.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode__bool_createParentDirectories_,
- "ssd", temp_path, temp_mode, createParentDirectories);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Construct(const Tizen::Base::String& filePath,
- const Tizen::Base::String& openMode) {
- typedef result (File::*methodType)(const Tizen::Base::String& filePath,
- const Tizen::Base::String& openMode);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp_path[50];
- char temp_mode[50];
- FileAttributes attr;
- long long size = 0L;
-
- if(!Constructp) {
- probeBlockStart();
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_");
-
- if(tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Constructp)(filePath, openMode);
-
- if(postBlockBegin(blockresult)) {
- WcharToChar(temp_path,filePath.GetPointer());
- WcharToChar(temp_mode,openMode.GetPointer());
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode_,
- "ss", temp_path, temp_mode);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Construct(const Tizen::Base::String& filePath,
- const char *pOpenMode) {
- typedef result (File::*methodType)(const Tizen::Base::String& filePath,
- const char *pOpenMode);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if(!Constructp) {
- probeBlockStart();
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKc");
-
- if(tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Constructp)(filePath, pOpenMode);
-
- if(postBlockBegin(blockresult)) {
-
- WcharToChar(temp,filePath.GetPointer());
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode_,
- "sp", temp, pOpenMode);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Construct(const Tizen::Base::String& filePath,
- const char *pOpenMode,
- const Tizen::Base::ByteBuffer& secretKey) {
- typedef result (File::*methodType)(const Tizen::Base::String& filePath,
- const char *pOpenMode,
- const Tizen::Base::ByteBuffer& secretKey);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if(!Constructp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKcRKNS2_10ByteBufferE");
-
- if(tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Constructp)(filePath, pOpenMode, secretKey);
-
- if(postBlockBegin(blockresult)) {
- WcharToChar(temp,filePath.GetPointer());
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode__const_Tizen__Base__ByteBuffer__secretKey_,
- "sp", temp, pOpenMode);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Flush(void) {
- typedef result (File::*methodType)(void);
- static methodType Flushp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if (!Flushp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5FlushEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Flush");
- exit(0);
- }
-
- memcpy(&Flushp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Flushp)();
-
- if(postBlockBegin(blockresult)) {
- WcharToChar(temp,this->GetName().GetPointer());
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Flush_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-Tizen::Base::String File::GetName(void) const{
- typedef Tizen::Base::String (File::*methodType)(void) const;
- static methodType GetNamep = 0;
- Tizen::Base::String ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if (!GetNamep) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File7GetNameEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::GetName");
- exit(0);
- }
-
- memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*GetNamep)();
- result res = GetLastResult();
-
- if(postBlockBegin(blockresult)) {
- WcharToChar(temp,ret.GetPointer());
- if (E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_Tizen__Base__String_File__GetName_void__const,
- "", 0);
- PACK_COMMON_END(ret.GetPointer(), res, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Read(Tizen::Base::String& buffer) {
- typedef result (File::*methodType)(Tizen::Base::String & buffer);
- static methodType Readp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- int nRead = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Readp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File4ReadERNS_4Base6StringE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Read");
- exit(0);
- }
-
- memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Read_Tizen__Base__String__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Readp)(buffer);
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
- nRead = buffer.GetLength();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Read_Tizen__Base__String__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Read(Tizen::Base::ByteBuffer& buffer) {
- typedef result (File::*methodType)(Tizen::Base::ByteBuffer & buffer);
- static methodType Readp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- int nRead = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Readp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File4ReadERNS_4Base10ByteBufferE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Read");
- exit(0);
- }
-
- memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Readp)(buffer);
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
- buffer.GetInt(nRead);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-int File::Read(void *buffer, int length) {
- typedef int (File::*methodType)(void *buffer, int length);
- static methodType Readp = 0;
- int ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- int nRead = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Readp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File4ReadEPvi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Read");
- exit(0);
- }
-
- memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- nRead = Tell();
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_int_File__Read_void__buffer__int_length_,
- "xd", (unsigned long)buffer, length);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Readp)(buffer, length);
- result res = GetLastResult();
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
- nRead = Tell() - nRead;
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_int_File__Read_void__buffer__int_length_,
- "xd", (unsigned long)buffer, length);
- PACK_COMMON_END(ret, res, blockresult);
- PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Seek(FileSeekPosition position, long offset) {
- typedef result (File::*methodType)(FileSeekPosition position, long offset);
- static methodType Seekp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- char temp_pos[50];
- FileAttributes attr;
- long long size;
-
- if (!Seekp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT,
- "_ZN5Tizen2Io4File4SeekENS0_16FileSeekPositionEl");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Seek");
- exit(0);
- }
-
- memcpy(&Seekp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Seekp)(position, offset);
-
- if(postBlockBegin(blockresult)) {
-
- if(FILESEEKPOSITION_BEGIN == position)
- strcpy(temp_pos, "FILESEEKPOSITION_BEGIN");
- else if(FILESEEKPOSITION_CURRENT == position)
- strcpy(temp_pos, "FILESEEKPOSITION_CURRENT");
- else if(FILESEEKPOSITION_END == position)
- strcpy(temp_pos, "FILESEEKPOSITION_END");
- else
-
- sprintf(temp_pos, "%d", position);
-
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Seek_FileSeekPosition_position__long_offset_,
- "sx", temp_pos, offset);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-int File::Tell(void) const {
- typedef int (File::*methodType)(void) const;
- static methodType Tellp = 0;
- int ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if (!Tellp) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File4TellEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Tell");
- exit(0);
- }
-
- memcpy(&Tellp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Tellp)();
- result res = GetLastResult();
-
- if(postBlockBegin(blockresult)) {
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp,this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_int_File__Tell_void__const,
- "", 0);
- PACK_COMMON_END(ret, res, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Truncate(int length) {
- typedef result (File::*methodType)(int length);
- static methodType Truncatep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- FileAttributes attr;
- long long size = 0L;
-
- if (!Truncatep) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File8TruncateEi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Truncate");
- exit(0);
- }
-
- memcpy(&Truncatep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
-
- ret = (this->*Truncatep)(length);
-
- if(postBlockBegin(blockresult)) {
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp,this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Truncate_int_length_,
- "d", length);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Write(const void *buffer, int length) {
- typedef result (File::*methodType)(const void *buffer, int length);
- static methodType Writep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- int nWritten = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Writep) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteEPKvi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Write");
- exit(0);
- }
-
- memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- nWritten = Tell();
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_void__buffer__int_length_,
- "xd", (unsigned long)buffer, length);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Writep)(buffer, length);
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp, this->GetName().GetPointer());
- nWritten = Tell() - nWritten;
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_void__buffer__int_length_,
- "xd", (unsigned long)buffer, length);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Write(const Tizen::Base::ByteBuffer& buffer) {
- typedef result (File::*methodType)(const Tizen::Base::ByteBuffer& buffer);
- static methodType Writep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp[50];
- int nWritten = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Writep) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base10ByteBufferE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Write");
- exit(0);
- }
-
- memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- nWritten = Tell();
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp,this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Writep)(buffer);
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp,this->GetName().GetPointer());
- nWritten = Tell() - nWritten;
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
- "x", (unsigned long)&buffer);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-
- return ret;
-}
-
-result File::Write(const Tizen::Base::String& buffer) {
- typedef result (File::*methodType)(const Tizen::Base::String& buffer);
- static methodType Writep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- char temp_buf[50];
- char temp_path[50];
- int nWritten = 0;
- FileAttributes attr;
- long long size = 0L;
-
- if (!Writep) {
- probeBlockStart();
-
- void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base6StringE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::Write");
- exit(0);
- }
-
- memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- nWritten = Tell();
- WcharToChar(temp_buf, buffer.GetPointer());
- if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- size = attr.GetFileSize();
- WcharToChar(temp_path, this->GetName().GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
- "s", temp_buf);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp_path);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
-
- ret = (this->*Writep)(buffer);
-
- if(postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
- WcharToChar(temp_buf,buffer.GetPointer());
- WcharToChar(temp_path,this->GetName().GetPointer());
- nWritten = Tell() - nWritten;
- if(E_SUCCESS == File::GetAttributes(this->GetName(),attr))
- size = attr.GetFileSize();
- nWritten = Tell() - nWritten;
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
- "s", temp_buf);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp_path);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-File::~File(void) {
- typedef void (File::*methodType)();
- static methodType FileDp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- // FileAttributes attr;
- long long size = 0L;
-
- if (!FileDp) {
- probeBlockStart();
-
- tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4FileD1Ev");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Io::File::~File");
- exit(0);
- }
-
- memcpy(&FileDp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-// error occur if File class was failed to contruct
- // if (ret == E_SUCCESS &&
- // E_SUCCESS == File::GetAttributes(this->GetName(), attr))
- // size = attr.GetFileSize();
- preBlockEnd();
- }
-
- (this->*FileDp)();
-
- if(postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
- API_ID_File___File_void_,
- "", 0);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_RESOURCE(0, (unsigned long)this, FD_API_CLOSE, size, "");
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
-}
-
-
-// static methods
-//static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
-// const Tizen::Base::String &secureFilePath) {
-// typedef result (File::*methodType)(
-// const Tizen::Base::String &plainFilePath,
-// const Tizen::Base::String &secureFilePath);
-// static methodType ConvertToSecureFilep = 0;
-//
-//}
-//static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
-// const Tizen::Base::String &secureFilePath,
-// const Tizen::Base::ByteBuffer& key) {
-// typedef result (File::*methodType)(
-// const Tizen::Base::String &plainFilePath,
-// const Tizen::Base::String &secureFilePath,
-// const Tizen::Base::ByteBuffer& key);
-// static methodType ConvertToSecureFilep = 0;
-//
-//}
-//static result File::Copy(const Tizen::Base::String& srcFilePath,
-// const Tizen::Base::String& destFilePath, bool failIfExist) {
-// typedef result (File::*methodType)(const Tizen::Base::String& srcFilePath,
-// const Tizen::Base::String& destFilePath, bool failIfExist);
-// static methodType Copyp = 0;
-//
-//}
-//static result File::GetAttributes(const Tizen::Base::String& filePath,
-// FileAttributes& attribute) {
-// typedef result (File::*methodType)(const Tizen::Base::String& filePath,
-// FileAttributes& attribute);
-// static methodType GetAttributesp = 0;
-//
-//}
-//static const Tizen::Base::String File::GetFileExtension(
-// const Tizen::Base::String& filePath) {
-// typedef const Tizen::Base::String (File::*methodType)(
-// const Tizen::Base::String& filePath);
-// static methodType GetFileExtensionp = 0;
-//
-//}
-//const Tizen::Base::String File::GetFileName(
-// const Tizen::Base::String& filePath) {
-// typedef const Tizen::Base::String (File::*methodType)(
-// const Tizen::Base::String& filePath);
-// static methodType GetFileNamep = 0;
-// Tizen::Base::String ret;
-//
-// if (!GetFileNamep) {
-// probeBlockStart();
-// void *tmpPtr = dlsym(RTLD_NEXT,
-// "_ZN5Tizen2Io4File11GetFileNameERKNS_4Base6StringE");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Tizen::Io::File::GetFileName");
-// exit(0);
-// }
-//
-// memcpy(&GetFileNamep, &tmpPtr, sizeof(tmpPtr));
-// probeBlockEnd();
-// }
-// ret = (File::(*GetFileNamep))(filePath);
-//
-//return ret;
-//}
-//static bool File::IsEncrypted(const Tizen::Base::String &filePath) {
-// typedef bool (File::*methodType)(const Tizen::Base::String &filePath);
-// static methodType IsEncryptedp = 0;
-//
-//}
-//static bool File::IsFileExist(const Tizen::Base::String& filePath) {
-// typedef bool (File::*methodType)(const Tizen::Base::String& filePath);
-// static methodType IsFileExistp = 0;
-//
-//}
-//static result File::Move(const Tizen::Base::String& oldFilePath,
-// const Tizen::Base::String& newFilePath) {
-// typedef result (File::*methodType)(const Tizen::Base::String& oldFilePath,
-// const Tizen::Base::String& newFilePath);
-// static methodType Movep = 0;
-//
-//}
-//static result File::Remove(const Tizen::Base::String& filePath) {
-// typedef result (File::*methodType)(const Tizen::Base::String& filePath);
-// static methodType Removep = 0;
-//
-//}
-
-}
-}
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <app.h>
-#include <Ecore.h>
-#include <FApp.h>
-#include <FBase.h>
-
-#include "daprobe.h"
-#include "dahelper.h"
-#include "probeinfo.h"
-#include "osp_probe.h"
-
-#include "binproto.h"
-extern "C"
-{
-Ecore_Event_Handler* register_orientation_event_listener();
-void unregister_orientation_event_listener(Ecore_Event_Handler* handler);
-}
-
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-
-namespace Tizen { namespace App
-{
-
-//class _IAppImpl
-//{
-// virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation) = 0;
-//};
-
-class _AppImpl
-{
- static void OnTerminate(void* user_data);
-// static void OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data);
-};
-
-class _UiAppImpl
-// : public Tizen::Base::Object
-// , public _IAppImpl
-{
- void OnBackground(void);
- void OnForeground(void);
-// virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation);
-};
-
-class _AppInfo
-{
- static void SetAppState(AppState appstate);
-};
-
-result UiApp::Execute(UiAppInstanceFactory pUiAppFactory,
- const IList* pArguments)
-{
- typedef result (*methodType)(UiAppInstanceFactory pFactory, const IList* pArgs);
- static methodType uiapp_executep;
- probeInfo_t probeInfo;
- int __attribute__((unused)) ret;
- Ecore_Event_Handler* handler;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp7ExecuteEPFPS1_vEPKNS_4Base10Collection5IListE,
- LIBOSP_UIFW, uiapp_executep);
-
- probeBlockStart();
- handler = register_orientation_event_listener();
- if(gTraceInfo.exec_map.map_start == NULL)
- {
- get_map_address(CALLER_ADDRESS, &(gTraceInfo.exec_map.map_start),
- &(gTraceInfo.exec_map.map_end));
- }
- setProbePoint(&probeInfo);
- probeBlockEnd();
-
- ret = uiapp_executep(pUiAppFactory, pArguments);
-
- probeBlockStart();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
- API_ID_result_UiApp__Execute_UiAppInstanceFactory_pUiAppFactory__const_IList__pArguments_,
- "pp", pUiAppFactory, pArguments);
- PACK_COMMON_END(ret, 0, 0);
- FLUSH_LOCAL_BUF();
-
- unregister_orientation_event_listener(handler);
- probeBlockEnd();
-
- return ret;
-}
-
-void _AppImpl::OnTerminate(void* user_data)
-{
- typedef void (*methodType)(void*);
- static methodType appimpl_onterminatep;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppImpl11OnTerminateEPv, LIBOSP_APPFW, appimpl_onterminatep);
-
- probeBlockStart();
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
- API_ID_void__AppImpl__OnTerminate_void__user_data_,
- "p", user_data);
- PACK_COMMON_END(0, 0, 0);
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- appimpl_onterminatep(user_data);
-}
-/*
-void _AppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data)
-{
- typedef void (*methodType)(app_device_orientation_e, void*);
- static methodType appimpl_ondeviceorientationchangedp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppImpl26OnDeviceOrientationChangedE24app_device_orientation_ePv,
- LIBOSP_APPFW, appimpl_ondeviceorientationchangedp);
-
- probeBlockStart();
- on_orientation_changed((int)orientation, false);
- probeBlockEnd();
-
- appimpl_ondeviceorientationchangedp(orientation, user_data);
-}
-*/
-void _AppInfo::SetAppState(AppState appState)
-{
- typedef void (*methodType)(AppState appstate);
- static methodType appinfo_setappstatep;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App8_AppInfo11SetAppStateENS0_8AppStateE, LIBOSP_APPFW, appinfo_setappstatep);
-
- probeBlockStart();
- if(appState == RUNNING)
- {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
- API_ID_void__AppInfo__SetAppState_AppState_appState_,
- "p", appState);
- PACK_COMMON_END(0, 0, 0);
- FLUSH_LOCAL_BUF();
- }
- probeBlockEnd();
-
- appinfo_setappstatep(appState);
-}
-
-void _UiAppImpl::OnBackground(void)
-{
- typedef void (_UiAppImpl::*methodType)(void);
- static methodType uiappimpl_onbackgroundp;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnBackgroundEv, LIBOSP_UIFW, uiappimpl_onbackgroundp);
-
- probeBlockStart();
- SCREENSHOT_LOCK();
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
- API_ID_void__UiAppImpl__OnBackground_void_,
- "", 0);
- PACK_COMMON_END(0, 0, 0);
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- (this->*uiappimpl_onbackgroundp)();
-}
-
-void _UiAppImpl::OnForeground(void)
-{
- typedef void (_UiAppImpl::*methodType)(void);
- static methodType uiappimpl_onforegroundp;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App10_UiAppImpl12OnForegroundEv, LIBOSP_UIFW, uiappimpl_onforegroundp);
-
- probeBlockStart();
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
- API_ID_void__UiAppImpl__OnForeground_void_,
- "", 0);
- PACK_COMMON_END(0, 0, 0);
- FLUSH_LOCAL_BUF();
-
- SCREENSHOT_UNLOCK();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-
- (this->*uiappimpl_onforegroundp)();
-}
-
-/*
-void _UiAppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation)
-{
- typedef void (*methodType)(_UiAppImpl* th, app_device_orientation_e orientation);
- static methodType uiappimpl_ondeviceorientationchangedp;
-
- GET_REAL_FUNC_OSP(_ZThn4_N5Tizen3App10_UiAppImpl26OnDeviceOrientationChangedE24app_device_orientation_e,
- LIBOSP_UIFW, uiappimpl_ondeviceorientationchangedp);
-
- probeBlockStart();
- on_orientation_changed((int)orientation, false);
- probeBlockEnd();
-
- uiappimpl_ondeviceorientationchangedp(static_cast<_UiAppImpl*>(dynamic_cast<_IAppImpl*>(this)), orientation);
-}
-*/
-} } // end of namespace
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Woojin Jung <woojin2.jung@samsung.com>
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <FBase.h>
-#include <string.h>
-#include "daprobe.h"
-#include "probeinfo.h"
-#include "dahelper.h"
-
-#include "binproto.h"
-
-static enum DaOptions _sopt = OPT_THREAD;
-
-namespace Tizen {
-namespace Base {
-namespace Runtime {
-
-result Mutex::Create(void) {
- typedef result
- (Mutex::*methodType)(void);
- static methodType Createp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Createp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
- exit(0);
- }
-
- memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Createp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__Create_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Mutex::Create(const Tizen::Base::String& name) {
- typedef result
- (Mutex::*methodType)(const Tizen::Base::String& name);
- static methodType Createp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Createp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateERKNS0_6StringE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
- exit(0);
- }
-
- memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Createp)(name);
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, name.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__Create_const_Tizen__Base__String__name_,
- "s", temp);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Mutex::Release(void) {
- typedef result
- (Mutex::*methodType)(void);
- static methodType Releasep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Releasep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7ReleaseEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Mutex::Release");
- exit(0);
- }
-
- memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Releasep)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__Release_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_RELEASE);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Mutex::Acquire(void) {
- typedef result
- (Mutex::*methodType)(void);
- static methodType Acquirep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Acquirep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7AcquireEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Mutex::Acquire");
- exit(0);
- }
-
- memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__Acquire_void_,
- "", 0);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_ACQUIRE_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- ret = (this->*Acquirep)();
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__Acquire_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_ACQUIRE_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Mutex::TryToAcquire(void) {
- typedef result
- (Mutex::*methodType)(void);
- static methodType TryToAcquirep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!TryToAcquirep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex12TryToAcquireEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Mutex::TryToAcquire");
- exit(0);
- }
-
- memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*TryToAcquirep)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Mutex__TryToAcquire_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MUTEX, SYNC_API_TRY_ACQUIRE);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-
-result Semaphore::Create(int count) {
- typedef result
- (Semaphore::*methodType)(int count);
- static methodType Createp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Createp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateEi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
- exit(0);
- }
-
- memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Createp)(count);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__Create_int_count_,
- "d", count);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Semaphore::Create(const Tizen::Base::String& name, int count) {
- typedef result
- (Semaphore::*methodType)(const Tizen::Base::String& name, int count);
- static methodType Createp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Createp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateERKNS0_6StringEi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
- exit(0);
- }
-
- memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Createp)(name, count);
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, name.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__Create_const_Tizen__Base__String__name__int_count_,
- "sd", temp, count);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-
-}
-
-result Semaphore::Acquire(long timeout) {
- typedef result
- (Semaphore::*methodType)(long timeout);
- static methodType Acquirep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Acquirep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7AcquireEl");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Acquire");
- exit(0);
- }
-
- memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__Acquire_long_timeout_,
- "x", timeout);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_ACQUIRE_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- ret = (this->*Acquirep)(timeout);
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__Acquire_long_timeout_,
- "x", timeout);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_ACQUIRE_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Semaphore::TryToAcquire(void) {
- typedef result
- (Semaphore::*methodType)(void);
- static methodType TryToAcquirep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!TryToAcquirep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore12TryToAcquireEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Semaphore::TryToAcquire");
- exit(0);
- }
-
- memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*TryToAcquirep)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__TryToAcquire_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_TRY_ACQUIRE);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Semaphore::Release(void) {
- typedef result
- (Semaphore::*methodType)(void);
- static methodType Releasep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Releasep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7ReleaseEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Release");
- exit(0);
- }
-
- memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Releasep)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Semaphore__Release_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_SEMAPHORE, SYNC_API_RELEASE);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-
-result Monitor::Construct(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9ConstructEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Construct_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Monitor::Enter(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType Enterp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Enterp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor5EnterEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::Enter");
- exit(0);
- }
-
- memcpy(&Enterp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Enter_void_,
- "", 0);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_ACQUIRE_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- ret = (this->*Enterp)();
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Enter_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_ACQUIRE_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Monitor::Exit(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType Exitp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Exitp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4ExitEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::Exit");
- exit(0);
- }
-
- memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Exitp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Exit_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_RELEASE);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Monitor::Wait(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType Waitp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Waitp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4WaitEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::Wait");
- exit(0);
- }
-
- memcpy(&Waitp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Wait_void_,
- "", 0);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_COND_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- ret = (this->*Waitp)();
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Wait_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_COND_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Monitor::Notify(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType Notifyp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Notifyp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor6NotifyEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::Notify");
- exit(0);
- }
-
- memcpy(&Notifyp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Notifyp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__Notify_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_NOTIFY);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Monitor::NotifyAll(void) {
- typedef result
- (Monitor::*methodType)(void);
- static methodType NotifyAllp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!NotifyAllp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9NotifyAllEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Monitor::NotifyAll");
- exit(0);
- }
-
- memcpy(&NotifyAllp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*NotifyAllp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
- API_ID_result_Monitor__NotifyAll_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_SYNC((unsigned int) this, SYNC_OSP_MONITOR, SYNC_API_NOTIFY_ALL);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-}
-}
-}
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (Thread::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Woojin Jung <woojin2.jung@samsung.com>
- * Yeongtaik Byeon <yeongtaik.byeon@samsung.com>
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <FBase.h>
-#include "daprobe.h"
-#include "probeinfo.h"
-#include "dahelper.h"
-
-#include "binproto.h"
-
-static enum DaOptions _sopt = OPT_THREAD;
-
-namespace Tizen {
-namespace Base {
-namespace Runtime {
-
-class _ThreadImpl {
-//public:
-// virtual result Stop(void);
-protected:
-// virtual result Finalize(void);
- const Thread* GetThread(void) const;
-private:
- static void* ThreadProc(void* pParam);
-//protected:
-// Thread* _pThread;
-};
-//const Thread*
-//_ThreadImpl::GetThread(void) const
-//{
-// typedef const Thread*
-// (_ThreadImpl::*methodType)(void) const;
-// static methodType GetThreadp = 0;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = false;
-// void *tmpPtr;
-//
-// if (!GetThreadp) {
-// probeBlockStart();
-// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-// if (lib_handle == NULL) {
-// perror("dlopen failed : libosp-appfw.so");
-// exit(0);
-// }
-// tmpPtr = dlsym(lib_handle, "_ZNK5Tizen4Base7Runtime11_ThreadImpl9GetThreadEv");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::GetThreadp");
-// exit(0);
-// }
-//
-// memcpy(&GetThreadp, &tmpPtr, sizeof(tmpPtr));
-//
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-// //
-// const Thread* ret = (this->*GetThreadp)();
-// result res = GetLastResult();
-// //
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "_ThreadImpl::GetThread", probeInfo.currentTime,
-// probeInfo.pID, probeInfo.tID);
-//
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,0x%x",ret);
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-// log.length += sprintf(log.data + log.length,
-// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", res,blockresult,
-// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-// return ret;
-//}
-
-void*
-_ThreadImpl::ThreadProc(void* params) {
- typedef void*
- (*methodType)(void*);
- static methodType ThreadProcp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = false;
- void *tmpPtr;
-
- if (!ThreadProcp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime11_ThreadImpl10ThreadProcEPv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::ThreadProc");
- exit(0);
- }
-
- memcpy(&ThreadProcp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- _ThreadImpl* pSelf =(_ThreadImpl*)params;
- const Thread* pThread = NULL;
- if(pSelf != null){
- pThread = pSelf->GetThread();
- }
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_void___ThreadImpl__ThreadProc_void__params_,
- "p", params);
- PACK_COMMON_END((unsigned int)pSelf, 0, blockresult);
- PACK_THREAD((unsigned int)pThread, THREAD_OSPTHREAD_WORKER, THREAD_API_INTERNAL_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- // all probe should be reachable inside thread start_routine (user implemented Thread::Run)
- probingEnd();
- (ThreadProcp)(params);
- probingStart();
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- _ThreadImpl* pSelf =(_ThreadImpl*)params;
- const Thread* pThread = NULL;
- if(pSelf != null){
- pThread = pSelf->GetThread();
- }
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_void___ThreadImpl__ThreadProc_void__params_,
- "p", params);
- PACK_COMMON_END((unsigned int)pSelf, 0, blockresult);
- PACK_THREAD((unsigned int)pThread, THREAD_OSPTHREAD_WORKER, THREAD_API_INTERNAL_STOP);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return null;
-}
-//result _ThreadImpl::Stop(void) {
-// typedef result
-// (_ThreadImpl::*methodType)(void);
-// static methodType Stopp = 0;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = true;
-// void *tmpPtr;
-//
-// if (!Stopp) {
-// probeBlockStart();
-// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-// if (lib_handle == NULL) {
-// perror("dlopen failed : libosp-appfw.so");
-// exit(0);
-// }
-// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime11_ThreadImpl4StopEv");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::Stopp");
-// exit(0);
-// }
-//
-// memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
-//
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-// //
-// result ret= (this->*Stopp)();
-// //
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "_ThreadImpl::Stop", probeInfo.currentTime,
-// probeInfo.pID, probeInfo.tID);
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-// log.length += sprintf(log.data + log.length,
-// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", ret, blockresult,
-// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_CLOSE);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-// return ret;
-//}
-//
-//result _ThreadImpl::Finalize(void) {
-// typedef result
-// (_ThreadImpl::*methodType)(void);
-// static methodType Finalizep = 0;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = false;
-// void *tmpPtr;
-//
-// if (!Finalizep) {
-// probeBlockStart();
-// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-// if (lib_handle == NULL) {
-// perror("dlopen failed : libosp-appfw.so");
-// exit(0);
-// }
-// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime11_ThreadImpl8FinalizeEv");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::Finalizep");
-// exit(0);
-// }
-//
-// memcpy(&Finalizep, &tmpPtr, sizeof(tmpPtr));
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-// //
-// result ret= (this->*Finalizep)();
-// //
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "_ThreadImpl::Finalize", probeInfo.currentTime,
-// probeInfo.pID, probeInfo.tID);
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-// log.length += sprintf(log.data + log.length,
-// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", ret, blockresult,
-// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_CLOSE);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-// return ret;
-//}
-//Thread::Thread(void) {
-// typedef void (Thread::*methodType)();
-// static methodType Threadp = 0;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = true;
-// void *tmpPtr;
-//
-// if (!Threadp) {
-// probeBlockStart();
-//
-// tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen4Base7Runtime6ThreadC1Ev");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data,"dlsym failed : Tizen::Base::Runtime::Thread::Thread");
-// perror("dlsym failed : Tizen::Base::Runtime::Thread::Thread");
-// printLog(&log, MSG_MSG);
-// return;
-// }
-//
-// memcpy(&Threadp, &tmpPtr, sizeof(tmpPtr));
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-////
-// (this->*Threadp)();
-////
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "Thread::Thread", probeInfo.currentTime,
-// probeInfo.pID, probeInfo.tID);
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,");
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-//
-// log.length += sprintf(log.data + log.length,
-// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
-// (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OPEN);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-//}
-//
-//Thread::~Thread(void) {
-// typedef void (Thread::*methodType)();
-// static methodType ThreadDp = 0;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = true;
-// void *tmpPtr;
-//
-// if (!ThreadDp) {
-// probeBlockStart();
-//
-// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-// if (lib_handle == NULL) {
-// perror("dlopen failed : libosp-appfw.so");
-// exit(0);
-// }
-// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6ThreadD0Ev");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Tizen::Base::Runtime::Thread::~Thread");
-// exit(0);
-// }
-//
-// memcpy(&ThreadDp, &tmpPtr, sizeof(tmpPtr));
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-////
-// (this->*ThreadDp)();
-////
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "Thread::~Thread", probeInfo.currentTime,
-// probeInfo.pID, probeInfo.tID);
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,");
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-//
-// log.length += sprintf(log.data + log.length,
-// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
-// (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_CLOSE);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-//}
-result Thread::Sleep(long milliSeconds) {
- typedef result
- (*methodType)(long);
- static methodType Sleepp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Sleepp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5SleepEl");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Sleep");
- exit(0);
- }
-
- memcpy(&Sleepp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- Thread *currentThread;
- currentThread = GetCurrentThread();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Sleep_long_milliSeconds_,
- "x", milliSeconds);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_THREAD((unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- result ret = (Sleepp)(milliSeconds);
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- Thread *currentThread;
- currentThread = GetCurrentThread();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Yield_void_,
- "x", milliSeconds);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-Thread* Thread::GetCurrentThread(void) {
- typedef Thread*
- (*methodType)(void);
- static methodType GetCurrentThreadp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!GetCurrentThreadp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread16GetCurrentThreadEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::GetCurrentThread");
- exit(0);
- }
-
- memcpy(&GetCurrentThreadp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- Thread *currentThread = (GetCurrentThreadp)();
- result res = GetLastResult();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_Thread__Thread__GetCurrentThread_void_,
- "", 0);
- PACK_COMMON_END((unsigned int)currentThread, res, blockresult);
- PACK_THREAD((unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return currentThread;
-}
-
-result Thread::Yield(void) {
- typedef result
- (*methodType)(void);
- static methodType Yieldp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Yieldp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5YieldEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Yield");
- exit(0);
- }
-
- memcpy(&Yieldp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- result ret = (Yieldp)();
- //
- if (postBlockBegin(blockresult)) {
- Thread *currentThread;
- currentThread = GetCurrentThread();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Yield_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Thread::Exit(int exitCode) {
- typedef result
- (*methodType)(int exitCode);
- static methodType Exitp = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Exitp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4ExitEi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Exit");
- exit(0);
- }
-
- memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
-
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- Thread *currentThread;
- currentThread = GetCurrentThread();
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Exit_int_exitCode_,
- "d", exitCode);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_THREAD((unsigned int)currentThread, THREAD_OSPTHREAD_WORKER, THREAD_API_EXIT);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- result ret = (Exitp)(exitCode);
- //
- return ret;
-}
-
-result Thread::Construct(ThreadType threadType, long stackSize,
- ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(ThreadType threadType, long stackSize,
- ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructENS1_10ThreadTypeElNS1_14ThreadPriorityE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(threadType, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_ThreadType_threadType__long_stackSize__ThreadPriority_priority_,
- "dxd", threadType, stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Construct(long stackSize, ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(long stackSize, ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructElNS1_14ThreadPriorityE");
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_long_stackSize__ThreadPriority_priority_,
- "xd", stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Construct(const Tizen::Base::String &name, long stackSize,
- ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(const Tizen::Base::String &name, long stackSize,
- ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(name, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_const_Tizen__Base__String__name__long_stackSize__ThreadPriority_priority_,
- "sxd", temp, stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Construct(const Tizen::Base::String &name, ThreadType threadType,
- long stackSize, ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(const Tizen::Base::String &name, ThreadType threadType,
- long stackSize, ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
-
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringENS1_10ThreadTypeElNS1_14ThreadPriorityE");
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(name, threadType, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, name.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_const_Tizen__Base__String__name__ThreadType_threadType__long_stackSize__ThreadPriority_priority_,
- "sdxd", temp, threadType, stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Construct(IRunnable &target, long stackSize,
- ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(IRunnable &target, long stackSize,
- ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructERNS1_9IRunnableElNS1_14ThreadPriorityE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(target, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_IRunnable__target__long_stackSize__ThreadPriority_priority_,
- "xxd", (unsigned int) &target, stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Construct(const Tizen::Base::String &name, IRunnable &target,
- long stackSize, ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(const Tizen::Base::String &name, IRunnable &target,
- long stackSize, ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringERNS1_9IRunnableElNS1_14ThreadPriorityE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(name, target, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, name.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Construct_const_Tizen__Base__String__name__IRunnable__target__long_stackSize__ThreadPriority_priority_,
- "sxxd", temp, (unsigned int) &target, stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Thread::GetExitCode(int &exitCode) const {
- typedef result
- (Thread::*methodType)(int &exitCode) const;
- static methodType GetExitCodep = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-// int exitOld = exitCode;
-
- if (!GetExitCodep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
- "_ZNK5Tizen4Base7Runtime6Thread11GetExitCodeERi");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::GetExitCode");
- exit(0);
- }
-
- memcpy(&GetExitCodep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*GetExitCodep)(exitCode);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__GetExitCode_int__exitCode__const,
- "d", exitCode);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-const Tizen::Base::String & Thread::GetName(void) const {
- typedef const Tizen::Base::String &
- (Thread::*methodType)(void) const;
- static methodType GetNamep = 0;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!GetNamep) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZNK5Tizen4Base7Runtime6Thread7GetNameEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::GetName");
- exit(0);
- }
-
- memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- const Tizen::Base::String& ret = (this->*GetNamep)();
- result res = GetLastResult();
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, ret.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_const_Tizen__Base__String___Thread__GetName_void__const,
- "", 0);
- PACK_COMMON_END(ret.GetPointer(), res, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result Thread::Join(void) {
- typedef result
- (Thread::*methodType)(void);
- static methodType Joinp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Joinp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4JoinEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Join");
- exit(0);
- }
-
- memcpy(&Joinp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Join_void_,
- "", 0);
- PACK_COMMON_END(0, 0, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_START);
- FLUSH_LOCAL_BUF();
-
- preBlockEnd();
- }
- //
- ret = (this->*Joinp)();
- //
- if (postBlockBegin(blockresult)) {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Join_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_WAIT_END);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-//Tizen::Base::Object * Thread::Run(void) {
-// typedef Tizen::Base::Object * (Thread::*methodType)(void);
-// static methodType Runp = 0;
-// Tizen::Base::Object * ret;
-// probeInfo_t probeInfo;
-// log_t log;
-// int blockresult;
-// bool bfiltering = true;
-// void *tmpPtr;
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "call Thread::Run");
-// printLog(&log, MSG_MSG);
-// return null;
-// if (!Runp) {
-// probeBlockStart();
-// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
-// if (lib_handle == NULL) {
-// perror("dlopen failed : libosp-appfw.so");
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "dlopen failed :libosp-appfw.so");
-// printLog(&log, MSG_MSG);
-// return null;
-// }
-// tmpPtr =
-// dlsym(
-// RTLD_NEXT,
-// "_ZN5Tizen4Base7Runtime6Thread3RunEv");
-//
-// if (tmpPtr == NULL || dlerror() != NULL) {
-// perror("dlsym failed : Thread::Run");
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "dlsym failed : Thread::Run");
-// printLog(&log, MSG_MSG);
-// return null;
-// }
-//
-// memcpy(&Runp, &tmpPtr, sizeof(tmpPtr));
-// probeBlockEnd();
-// }
-//
-// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
-// setProbePoint(&probeInfo);
-// preBlockEnd();
-// }
-// //
-// ret = (this->*Runp)();
-// //
-// if (postBlockBegin(blockresult)) {
-// log.type = 0;
-// log.length = 0;
-// log.data[0] = '\0';
-// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
-// probeInfo.eventIndex, "Thread::Run",
-// probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
-// //Input,ret
-// log.length += sprintf(log.data + log.length, "`,`,0x%x",(unsigned int)ret;
-// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
-//
-//
-// log.length += sprintf(log.data + log.length,
-// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
-// (unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_OTHER);
-// //callstack
-// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
-// getBacktraceString(&log, 4096 - log.length - 17);
-// log.length += sprintf(log.data + log.length, "`,callstack_end");
-//
-// printLog(&log, MSG_LOG);
-// postBlockEnd();
-// }
-// return ret;
-//}
-
-result Thread::Start(void) {
- typedef result (Thread::*methodType)(void);
- static methodType Startp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Startp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5StartEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Start");
- exit(0);
- }
-
- memcpy(&Startp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Startp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Start_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_START);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-result Thread::Stop(void) {
- typedef result (Thread::*methodType)(void);
- static methodType Stopp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Stopp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4StopEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::Thread::Stop");
- exit(0);
- }
-
- memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Stopp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_Thread__Stop_void_,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_WORKER, THREAD_API_STOP);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result EventDrivenThread::Construct(long stackSize, ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(long stackSize, ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructElNS1_14ThreadPriorityE");
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::EventDrivenThread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_EventDrivenThread__Construct_long_stackSize__ThreadPriority_priority_,
- "xd", stackSize, priority);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-result EventDrivenThread::Construct(const Tizen::Base::String &name, long stackSize,
- ThreadPriority priority) {
- typedef result
- (Thread::*methodType)(const Tizen::Base::String &name, long stackSize,
- ThreadPriority priority);
- static methodType Constructp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
- char temp[50];
-
- if (!Constructp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr =
- dlsym(
- lib_handle[LIBOSP_APPFW],
- "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::EventDrivenThread::Construct");
- exit(0);
- }
-
- memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Constructp)(name, stackSize, priority);
- //
- if (postBlockBegin(blockresult)) {
-
- WcharToChar(temp, name.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_EventDrivenThread__Construct_const_Tizen__Base__String__name__long_stackSize__ThreadPriority_priority_,
- "sx", temp, stackSize);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_NEW);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-
-}
-
-result EventDrivenThread::Quit() {
- typedef result (Thread::*methodType)(void);
- static methodType Quitp = 0;
- result ret;
- probeInfo_t probeInfo;
- int blockresult;
- bool bfiltering = true;
- void *tmpPtr;
-
- if (!Quitp) {
- probeBlockStart();
- if(lib_handle[LIBOSP_APPFW] == NULL) {
- lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
- if (lib_handle[LIBOSP_APPFW] == NULL) {
- perror("dlopen failed : libosp-appfw.so");
- exit(0);
- }
- }
- tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime17EventDrivenThread4QuitEv");
-
- if (tmpPtr == NULL || dlerror() != NULL) {
- perror("dlsym failed : Tizen::Base::Runtime::EventThread::Quit");
- exit(0);
- }
-
- memcpy(&Quitp, &tmpPtr, sizeof(tmpPtr));
- probeBlockEnd();
- }
-
- if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
- setProbePoint(&probeInfo);
- preBlockEnd();
- }
- //
- ret = (this->*Quitp)();
- //
- if (postBlockBegin(blockresult)) {
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
- API_ID_result_EventDrivenThread__Quit__,
- "", 0);
- PACK_COMMON_END(ret, ret, blockresult);
- PACK_THREAD((unsigned int) this, THREAD_OSPTHREAD_EVENTDRIVEN, THREAD_API_STOP);
- FLUSH_LOCAL_BUF();
-
- postBlockEnd();
- }
- return ret;
-}
-
-}
-}
-}
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#include "daprobe.h"
-#include "dahelper.h"
-#include "dacollection.h"
-#include "osp_probe.h"
-
-namespace Tizen { namespace Ui {
-
-class Control
-{
- Control(void);
- ~Control(void);
-};
-
-class CustomControlBase
-{
- CustomControlBase(void);
-};
-
-class Container
-{
- Container(void);
-};
-
-class Window
-{
- Window(void);
-};
-
-Control::Control(void)
-{
- typedef void (Control::*methodType)(void);
- static methodType control_controlp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlC2Ev, LIBOSP_UIFW, control_controlp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Control");
- probeBlockEnd();
-
- (this->*control_controlp)();
-}
-
-Control::~Control(void)
-{
- typedef void (Control::*methodType)(void);
- static methodType control__controlvoidp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7ControlD2Ev, LIBOSP_UIFW, control__controlvoidp);
-
- probeBlockStart();
- del_object_hash(static_cast<void*>(this));
- probeBlockEnd();
-
- (this->*control__controlvoidp)();
-}
-
-CustomControlBase::CustomControlBase(void)
-{
- typedef void (CustomControlBase::*methodType)(void);
- static methodType customcontrolbase_customcontrolbasep;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui17CustomControlBaseC2Ev, LIBOSP_UIFW, customcontrolbase_customcontrolbasep);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "CustomControlBase");
- probeBlockEnd();
-
- (this->*customcontrolbase_customcontrolbasep)();
-}
-
-Container::Container(void)
-{
- typedef void (Container::*methodType)(void);
- static methodType container_containerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9ContainerC2Ev, LIBOSP_UIFW, container_containerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Container");
- probeBlockEnd();
-
- (this->*container_containerp)();
-}
-
-Window::Window(void)
-{
- typedef void (Window::*methodType)(void);
- static methodType window_windowp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6WindowC2Ev, LIBOSP_UIFW, window_windowp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Window");
- probeBlockEnd();
-
- (this->*window_windowp)();
-}
-
-namespace Controls {
-
-class Animation
-{
- Animation(void);
-};
-
-class Button
-{
- Button(void);
-};
-
-class CheckButton
-{
- CheckButton(void);
-};
-
-class ColorPicker
-{
- ColorPicker(void);
-};
-
-class CustomList
-{
- CustomList(void);
-};
-
-class EditArea
-{
- EditArea(void);
-};
-
-class EditDate
-{
- EditDate(void);
-};
-
-class EditField
-{
- EditField(void);
-};
-
-class EditTime
-{
- EditTime(void);
-};
-
-class ExpandableEditArea
-{
- ExpandableEditArea(void);
-};
-
-class ExpandableList
-{
- ExpandableList(void);
-};
-
-class Footer
-{
- Footer(void);
-};
-
-class Gallery
-{
- Gallery(void);
-};
-
-class GroupedList
-{
- GroupedList(void);
-};
-
-class GroupedListView
-{
- GroupedListView(void);
-};
-
-class Header
-{
- Header(void);
-};
-
-class IconList
-{
- IconList(void);
-};
-
-class IconListView
-{
- IconListView(void);
-};
-
-class Label
-{
- Label(void);
-};
-
-class List
-{
- List(void);
-};
-
-class ListView
-{
- ListView(void);
-};
-
-class Progress
-{
- Progress(void);
-};
-
-class RadioGroup
-{
- RadioGroup(void);
-};
-
-class SearchBar
-{
- SearchBar(void);
-};
-
-class SlidableGroupedList
-{
- SlidableGroupedList(void);
-};
-
-class SlidableList
-{
- SlidableList(void);
-};
-
-class Slider
-{
- Slider(void);
-};
-
-class SplitPanel
-{
- SplitPanel(void);
-};
-
-class Tab
-{
- Tab(void);
-};
-
-class TabBar
-{
- TabBar(void);
-};
-
-class TextBox
-{
- TextBox(void);
-};
-
-class Form
-{
- Form(void);
-};
-
-class GroupedTableView
-{
- GroupedTableView(void);
-};
-
-class Panel
-{
- Panel(void);
-};
-
-class OverlayPanel
-{
- OverlayPanel(void);
-};
-
-class ScrollPanel
-{
- ScrollPanel(void);
-};
-
-class SectionTableView
-{
- SectionTableView(void);
-};
-
-class TableView
-{
- TableView(void);
-};
-
-class TableViewItemBase
-{
- TableViewItemBase(void);
-};
-
-class TableViewContextItem
-{
- TableViewContextItem(void);
-};
-
-class TableViewGroupItem
-{
- TableViewGroupItem(void);
-};
-
-class TableViewItem
-{
- TableViewItem(void);
-};
-
-class TableViewSimpleGroupItem
-{
- TableViewSimpleGroupItem(void);
-};
-
-class TableViewSimpleItem
-{
- TableViewSimpleItem(void);
-};
-
-class ContextMenu
-{
- ContextMenu(void);
-};
-
-class DatePicker
-{
- DatePicker(void);
-};
-
-class DateTimePicker
-{
- DateTimePicker(void);
-};
-
-class Frame
-{
- Frame(void);
-};
-
-class Keypad
-{
- Keypad(void);
-};
-
-class MessageBox
-{
- MessageBox(void);
-};
-
-class OptionMenu
-{
- OptionMenu(void);
-};
-
-class Popup
-{
- Popup(void);
-};
-
-class TimePicker
-{
- TimePicker(void);
-};
-
-Animation::Animation(void)
-{
- typedef void (Animation::*methodType)(void);
- static methodType animation_animationp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9AnimationC2Ev, LIBOSP_UIFW, animation_animationp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Animation");
- probeBlockEnd();
-
- (this->*animation_animationp)();
-}
-
-Button::Button(void)
-{
- typedef void (Button::*methodType)(void);
- static methodType button_buttonp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6ButtonC2Ev, LIBOSP_UIFW, button_buttonp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Button");
- probeBlockEnd();
-
- (this->*button_buttonp)();
-}
-
-CheckButton::CheckButton(void)
-{
- typedef void (CheckButton::*methodType)(void);
- static methodType checkbutton_checkbuttonp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11CheckButtonC2Ev, LIBOSP_UIFW, checkbutton_checkbuttonp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "CheckButton");
- probeBlockEnd();
-
- (this->*checkbutton_checkbuttonp)();
-}
-
-ColorPicker::ColorPicker(void)
-{
- typedef void (ColorPicker::*methodType)(void);
- static methodType colorpicker_colorpickerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ColorPickerC2Ev, LIBOSP_UIFW, colorpicker_colorpickerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ColorPicker");
- probeBlockEnd();
-
- (this->*colorpicker_colorpickerp)();
-}
-
-CustomList::CustomList(void)
-{
- typedef void (CustomList::*methodType)(void);
- static methodType customlist_customlistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10CustomListC2Ev, LIBOSP_UIFW, customlist_customlistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "CustomList");
- probeBlockEnd();
-
- (this->*customlist_customlistp)();
-}
-
-EditArea::EditArea(void)
-{
- typedef void (EditArea::*methodType)(void);
- static methodType editarea_editareap;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditAreaC2Ev, LIBOSP_UIFW, editarea_editareap);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "EditArea");
- probeBlockEnd();
-
- (this->*editarea_editareap)();
-}
-
-EditDate::EditDate(void)
-{
- typedef void (EditDate::*methodType)(void);
- static methodType editdate_editdatep;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditDateC2Ev, LIBOSP_UIFW, editdate_editdatep);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "EditDate");
- probeBlockEnd();
-
- (this->*editdate_editdatep)();
-}
-
-EditField::EditField(void)
-{
- typedef void (EditField::*methodType)(void);
- static methodType editfield_editfieldp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9EditFieldC2Ev, LIBOSP_UIFW, editfield_editfieldp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "EditField");
- probeBlockEnd();
-
- (this->*editfield_editfieldp)();
-}
-
-EditTime::EditTime(void)
-{
- typedef void (EditTime::*methodType)(void);
- static methodType edittime_edittimep;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8EditTimeC2Ev, LIBOSP_UIFW, edittime_edittimep);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "EditTime");
- probeBlockEnd();
-
- (this->*edittime_edittimep)();
-}
-
-ExpandableEditArea::ExpandableEditArea(void)
-{
- typedef void (ExpandableEditArea::*methodType)(void);
- static methodType expandableeditarea_expandableeditareap;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18ExpandableEditAreaC2Ev, LIBOSP_UIFW, expandableeditarea_expandableeditareap);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ExpandableEditArea");
- probeBlockEnd();
-
- (this->*expandableeditarea_expandableeditareap)();
-}
-
-ExpandableList::ExpandableList(void)
-{
- typedef void (ExpandableList::*methodType)(void);
- static methodType expandablelist_expandablelistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14ExpandableListC2Ev, LIBOSP_UIFW, expandablelist_expandablelistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ExpandableList");
- probeBlockEnd();
-
- (this->*expandablelist_expandablelistp)();
-}
-
-Footer::Footer(void)
-{
- typedef void (Footer::*methodType)(void);
- static methodType footer_footerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6FooterC2Ev, LIBOSP_UIFW, footer_footerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Footer");
- probeBlockEnd();
-
- (this->*footer_footerp)();
-}
-
-Gallery::Gallery(void)
-{
- typedef void (Gallery::*methodType)(void);
- static methodType gallery_galleryp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7GalleryC2Ev, LIBOSP_UIFW, gallery_galleryp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Gallery");
- probeBlockEnd();
-
- (this->*gallery_galleryp)();
-}
-
-GroupedList::GroupedList(void)
-{
- typedef void (GroupedList::*methodType)(void);
- static methodType groupedlist_groupedlistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11GroupedListC2Ev, LIBOSP_UIFW, groupedlist_groupedlistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "GroupedList");
- probeBlockEnd();
-
- (this->*groupedlist_groupedlistp)();
-}
-
-GroupedListView::GroupedListView(void)
-{
- typedef void (GroupedListView::*methodType)(void);
- static methodType groupedlistview_groupedlistviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls15GroupedListViewC2Ev, LIBOSP_UIFW, groupedlistview_groupedlistviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "GroupedListView");
- probeBlockEnd();
-
- (this->*groupedlistview_groupedlistviewp)();
-}
-
-Header::Header(void)
-{
- typedef void (Header::*methodType)(void);
- static methodType header_headerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6HeaderC2Ev, LIBOSP_UIFW, header_headerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Header");
- probeBlockEnd();
-
- (this->*header_headerp)();
-}
-
-IconList::IconList(void)
-{
- typedef void (IconList::*methodType)(void);
- static methodType iconlist_iconlistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8IconListC2Ev, LIBOSP_UIFW, iconlist_iconlistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "IconList");
- probeBlockEnd();
-
- (this->*iconlist_iconlistp)();
-}
-
-IconListView::IconListView(void)
-{
- typedef void (IconListView::*methodType)(void);
- static methodType iconlistview_iconlistviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12IconListViewC2Ev, LIBOSP_UIFW, iconlistview_iconlistviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "IconListView");
- probeBlockEnd();
-
- (this->*iconlistview_iconlistviewp)();
-}
-
-Label::Label(void)
-{
- typedef void (Label::*methodType)(void);
- static methodType label_labelp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5LabelC2Ev, LIBOSP_UIFW, label_labelp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Label");
- probeBlockEnd();
-
- (this->*label_labelp)();
-}
-
-List::List(void)
-{
- typedef void (List::*methodType)(void);
- static methodType list_listp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4ListC2Ev, LIBOSP_UIFW, list_listp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "List");
- probeBlockEnd();
-
- (this->*list_listp)();
-}
-
-ListView::ListView(void)
-{
- typedef void (ListView::*methodType)(void);
- static methodType listview_listviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ListViewC2Ev, LIBOSP_UIFW, listview_listviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ListView");
- probeBlockEnd();
-
- (this->*listview_listviewp)();
-}
-
-Progress::Progress(void)
-{
- typedef void (Progress::*methodType)(void);
- static methodType progress_progressp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls8ProgressC2Ev, LIBOSP_UIFW, progress_progressp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Progress");
- probeBlockEnd();
-
- (this->*progress_progressp)();
-}
-
-RadioGroup::RadioGroup(void)
-{
- typedef void (RadioGroup::*methodType)(void);
- static methodType radiogroup_radiogroupp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10RadioGroupC2Ev, LIBOSP_UIFW, radiogroup_radiogroupp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "RadioGroup");
- probeBlockEnd();
-
- (this->*radiogroup_radiogroupp)();
-}
-
-SearchBar::SearchBar(void)
-{
- typedef void (SearchBar::*methodType)(void);
- static methodType searchbar_searchbarp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9SearchBarC2Ev, LIBOSP_UIFW, searchbar_searchbarp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "SearchBar");
- probeBlockEnd();
-
- (this->*searchbar_searchbarp)();
-}
-
-SlidableGroupedList::SlidableGroupedList(void)
-{
- typedef void (SlidableGroupedList::*methodType)(void);
- static methodType slidablegroupedlist_slidablegroupedlistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19SlidableGroupedListC2Ev, LIBOSP_UIFW, slidablegroupedlist_slidablegroupedlistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "SlidableGroupedList");
- probeBlockEnd();
-
- (this->*slidablegroupedlist_slidablegroupedlistp)();
-}
-
-SlidableList::SlidableList(void)
-{
- typedef void (SlidableList::*methodType)(void);
- static methodType slidablelist_slidablelistp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12SlidableListC2Ev, LIBOSP_UIFW, slidablelist_slidablelistp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "SlidableList");
- probeBlockEnd();
-
- (this->*slidablelist_slidablelistp)();
-}
-
-Slider::Slider(void)
-{
- typedef void (Slider::*methodType)(void);
- static methodType slider_sliderp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6SliderC2Ev, LIBOSP_UIFW, slider_sliderp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Slider");
- probeBlockEnd();
-
- (this->*slider_sliderp)();
-}
-
-SplitPanel::SplitPanel(void)
-{
- typedef void (SplitPanel::*methodType)(void);
- static methodType splitpanel_splitpanelp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10SplitPanelC2Ev, LIBOSP_UIFW, splitpanel_splitpanelp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "SplitPanel");
- probeBlockEnd();
-
- (this->*splitpanel_splitpanelp)();
-}
-
-Tab::Tab(void)
-{
- typedef void (Tab::*methodType)(void);
- static methodType tab_tabp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls3TabC2Ev, LIBOSP_UIFW, tab_tabp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Tab");
- probeBlockEnd();
-
- (this->*tab_tabp)();
-}
-
-TabBar::TabBar(void)
-{
- typedef void (TabBar::*methodType)(void);
- static methodType tabbar_tabbarp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6TabBarC2Ev, LIBOSP_UIFW, tabbar_tabbarp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TabBar");
- probeBlockEnd();
-
- (this->*tabbar_tabbarp)();
-}
-
-TextBox::TextBox(void)
-{
- typedef void (TextBox::*methodType)(void);
- static methodType textbox_textboxp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls7TextBoxC2Ev, LIBOSP_UIFW, textbox_textboxp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TextBox");
- probeBlockEnd();
-
- (this->*textbox_textboxp)();
-}
-
-Form::Form(void)
-{
- typedef void (Form::*methodType)(void);
- static methodType form_formp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls4FormC2Ev, LIBOSP_UIFW, form_formp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Form");
- probeBlockEnd();
-
- (this->*form_formp)();
-}
-
-GroupedTableView::GroupedTableView(void)
-{
- typedef void (GroupedTableView::*methodType)(void);
- static methodType groupedtableview_groupedtableviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16GroupedTableViewC2Ev, LIBOSP_UIFW, groupedtableview_groupedtableviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "GroupedTableView");
- probeBlockEnd();
-
- (this->*groupedtableview_groupedtableviewp)();
-}
-
-Panel::Panel(void)
-{
- typedef void (Panel::*methodType)(void);
- static methodType panel_panelp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PanelC2Ev, LIBOSP_UIFW, panel_panelp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Panel");
- probeBlockEnd();
-
- (this->*panel_panelp)();
-}
-
-OverlayPanel::OverlayPanel(void)
-{
- typedef void (OverlayPanel::*methodType)(void);
- static methodType overlaypanel_overlaypanelp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls12OverlayPanelC2Ev, LIBOSP_UIFW, overlaypanel_overlaypanelp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "OverlayPanel");
- probeBlockEnd();
-
- (this->*overlaypanel_overlaypanelp)();
-}
-
-ScrollPanel::ScrollPanel(void)
-{
- typedef void (ScrollPanel::*methodType)(void);
- static methodType scrollpanel_scrollpanelp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ScrollPanelC2Ev, LIBOSP_UIFW, scrollpanel_scrollpanelp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ScrollPanel");
- probeBlockEnd();
-
- (this->*scrollpanel_scrollpanelp)();
-}
-
-SectionTableView::SectionTableView(void)
-{
- typedef void (SectionTableView::*methodType)(void);
- static methodType sectiontableview_sectiontableviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls16SectionTableViewC2Ev, LIBOSP_UIFW, sectiontableview_sectiontableviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "SectionTableView");
- probeBlockEnd();
-
- (this->*sectiontableview_sectiontableviewp)();
-}
-
-TableView::TableView(void)
-{
- typedef void (TableView::*methodType)(void);
- static methodType tableview_tableviewp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls9TableViewC2Ev, LIBOSP_UIFW, tableview_tableviewp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableView");
- probeBlockEnd();
-
- (this->*tableview_tableviewp)();
-}
-
-TableViewItemBase::TableViewItemBase(void)
-{
- typedef void (TableViewItemBase::*methodType)(void);
- static methodType tableviewitembase_tableviewitembasep;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls17TableViewItemBaseC2Ev, LIBOSP_UIFW, tableviewitembase_tableviewitembasep);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewItemBase");
- probeBlockEnd();
-
- (this->*tableviewitembase_tableviewitembasep)();
-}
-
-TableViewContextItem::TableViewContextItem(void)
-{
- typedef void (TableViewContextItem::*methodType)(void);
- static methodType tableviewcontextitem_tableviewcontextitemp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls20TableViewContextItemC2Ev, LIBOSP_UIFW, tableviewcontextitem_tableviewcontextitemp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewContextItem");
- probeBlockEnd();
-
- (this->*tableviewcontextitem_tableviewcontextitemp)();
-}
-
-TableViewGroupItem::TableViewGroupItem(void)
-{
- typedef void (TableViewGroupItem::*methodType)(void);
- static methodType tableviewgroupitem_tableviewgroupitemp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls18TableViewGroupItemC2Ev, LIBOSP_UIFW, tableviewgroupitem_tableviewgroupitemp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewGroupItem");
- probeBlockEnd();
-
- (this->*tableviewgroupitem_tableviewgroupitemp)();
-}
-
-TableViewItem::TableViewItem(void)
-{
- typedef void (TableViewItem::*methodType)(void);
- static methodType tableviewitem_tableviewitemp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls13TableViewItemC2Ev, LIBOSP_UIFW, tableviewitem_tableviewitemp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewItem");
- probeBlockEnd();
-
- (this->*tableviewitem_tableviewitemp)();
-}
-
-TableViewSimpleGroupItem::TableViewSimpleGroupItem(void)
-{
- typedef void (TableViewSimpleGroupItem::*methodType)(void);
- static methodType tableviewsimplegroupitem_tableviewsimplegroupitemp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls24TableViewSimpleGroupItemC2Ev, LIBOSP_UIFW, tableviewsimplegroupitem_tableviewsimplegroupitemp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewSimpleGroupItem");
- probeBlockEnd();
-
- (this->*tableviewsimplegroupitem_tableviewsimplegroupitemp)();
-}
-
-TableViewSimpleItem::TableViewSimpleItem(void)
-{
- typedef void (TableViewSimpleItem::*methodType)(void);
- static methodType tableviewsimpleitem_tableviewsimpleitemp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls19TableViewSimpleItemC2Ev, LIBOSP_UIFW, tableviewsimpleitem_tableviewsimpleitemp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TableViewSimpleItem");
- probeBlockEnd();
-
- (this->*tableviewsimpleitem_tableviewsimpleitemp)();
-}
-
-ContextMenu::ContextMenu(void)
-{
- typedef void (ContextMenu::*methodType)(void);
- static methodType contextmenu_contextmenup;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls11ContextMenuC2Ev, LIBOSP_UIFW, contextmenu_contextmenup);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "ContextMenu");
- probeBlockEnd();
-
- (this->*contextmenu_contextmenup)();
-}
-
-DatePicker::DatePicker(void)
-{
- typedef void (DatePicker::*methodType)(void);
- static methodType datepicker_datepickerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10DatePickerC2Ev, LIBOSP_UIFW, datepicker_datepickerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "DatePicker");
- probeBlockEnd();
-
- (this->*datepicker_datepickerp)();
-}
-
-DateTimePicker::DateTimePicker(void)
-{
- typedef void (DateTimePicker::*methodType)(void);
- static methodType datetimepicker_datetimepickerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls14DateTimePickerC2Ev, LIBOSP_UIFW, datetimepicker_datetimepickerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "DateTimePicker");
- probeBlockEnd();
-
- (this->*datetimepicker_datetimepickerp)();
-}
-
-Frame::Frame(void)
-{
- typedef void (Frame::*methodType)(void);
- static methodType frame_framep;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5FrameC2Ev, LIBOSP_UIFW, frame_framep);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Frame");
- probeBlockEnd();
-
- (this->*frame_framep)();
-}
-
-Keypad::Keypad(void)
-{
- typedef void (Keypad::*methodType)(void);
- static methodType keypad_keypadp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls6KeypadC2Ev, LIBOSP_UIFW, keypad_keypadp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Keypad");
- probeBlockEnd();
-
- (this->*keypad_keypadp)();
-}
-
-MessageBox::MessageBox(void)
-{
- typedef void (MessageBox::*methodType)(void);
- static methodType messagebox_messageboxp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10MessageBoxC2Ev, LIBOSP_UIFW, messagebox_messageboxp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "MessageBox");
- probeBlockEnd();
-
- (this->*messagebox_messageboxp)();
-}
-
-OptionMenu::OptionMenu(void)
-{
- typedef void (OptionMenu::*methodType)(void);
- static methodType optionmenu_optionmenup;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10OptionMenuC2Ev, LIBOSP_UIFW, optionmenu_optionmenup);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "OptionMenu");
- probeBlockEnd();
-
- (this->*optionmenu_optionmenup)();
-}
-
-Popup::Popup(void)
-{
- typedef void (Popup::*methodType)(void);
- static methodType popup_popupp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5PopupC2Ev, LIBOSP_UIFW, popup_popupp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Popup");
- probeBlockEnd();
-
- (this->*popup_popupp)();
-}
-
-TimePicker::TimePicker(void)
-{
- typedef void (TimePicker::*methodType)(void);
- static methodType timepicker_timepickerp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls10TimePickerC2Ev, LIBOSP_UIFW, timepicker_timepickerp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "TimePicker");
- probeBlockEnd();
-
- (this->*timepicker_timepickerp)();
-}
-
-} // end of namespace Tizen::Ui::Controls
-
-} } // end of namespace Tizen::Ui
-
-
-namespace Tizen { namespace Web { namespace Controls {
-
-class Web
-{
- Web(void);
-};
-
-Web::Web(void)
-{
- typedef void (Web::*methodType)(void);
- static methodType web_webp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3Web8Controls3WebC2Ev, LIBOSP_WEB, web_webp);
-
- probeBlockStart();
- add_object_hash_type((void*)this, "Web");
- probeBlockEnd();
-
- (this->*web_webp)();
-}
-
-} } } // end of namespace Tizen::Web::Controls
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <typeinfo>
-#include <FApp.h>
-#include <FUi.h>
-
-#include "daprobe.h"
-#include "dacollection.h"
-#include "dahelper.h"
-#include "osp_probe.h"
-
-#include "binproto.h"
-
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Animations;
-
-extern IFrameAnimatorEventListener& GetFrameAnimatorEventListener();
-
-bool IsRegisteredFrameAnimatorEventListener = false;
-
-namespace Tizen { namespace App {
-
-result UiApp::AddFrame(const Tizen::Ui::Controls::Frame& frame)
-{
- typedef result (UiApp::*methodType)(const Tizen::Ui::Controls::Frame& frame);
- static methodType uiapp_addframep;
- probeInfo_t probeInfo;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp8AddFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_addframep);
-
- ret = (this->*uiapp_addframep)(frame);
-
- probeBlockStart();
- if(ret == E_SUCCESS)
- {
- frame.IsInTouchMode();
-
- if(isOptionEnabled(OPT_UI))
- {
- Control* parent = NULL;
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_UiApp__AddFrame_const_Tizen__Ui__Controls__Frame__frame_,
- "p", &frame);
- PACK_COMMON_END(ret, 0, 0);
- PACK_UICONTROL(parent);
- PACK_UICONTROL(&frame);
- FLUSH_LOCAL_BUF();
- }
- }
- probeBlockEnd();
-
- return ret;
-}
-
-result UiApp::RemoveFrame(const Tizen::Ui::Controls::Frame &frame)
-{
- typedef result (UiApp::*methodType)(const Tizen::Ui::Controls::Frame& frame);
- static methodType uiapp_removeframep;
- probeInfo_t probeInfo;
- result ret;
- bool bOption;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen3App5UiApp11RemoveFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_removeframep);
-
- probeBlockStart();
-
- PREPARE_LOCAL_BUF();
-
- frame.IsInTouchMode();
-
- if((bOption = isOptionEnabled(OPT_UI)))
- {
- Control* parent = NULL;
- setProbePoint(&probeInfo);
-
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_UiApp__RemoveFrame_const_Tizen__Ui__Controls__Frame__frame_,
- "p", &frame);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(parent);
- PACK_UICONTROL(&frame);
- }
- probeBlockEnd();
-
- ret = (this->*uiapp_removeframep)(frame);
-
- probeBlockStart();
-
- if(bOption)
- {
- PACK_RETURN_END(ret);
- }
-
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- return ret;
-}
-
-} } // end of namespce Tizen::App
-
-
-namespace Tizen { namespace Ui {
-
-bool Control::IsInTouchMode(void) const
-{
- typedef bool (Control::*methodType)(void) const;
- static methodType control_isintouchmodep;
-
- GET_REAL_FUNC_OSP(_ZNK5Tizen2Ui7Control13IsInTouchModeEv, LIBOSP_UIFW, control_isintouchmodep);
-
- probeBlockStart();
- add_object_hash_class((void*)(this), typeid(*this).name());
- probeBlockEnd();
-
- return (this->*control_isintouchmodep)();
-}
-
-void Control::SetName(const Tizen::Base::String &name)
-{
- typedef void (Control::*methodType)(const Tizen::Base::String &name);
- static methodType control_setnamep;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7Control7SetNameERKNS_4Base6StringE, LIBOSP_UIFW, control_setnamep);
-
- (this->*control_setnamep)(name);
-
- probeBlockStart();
- IsInTouchMode();
-
- if(isOptionEnabled(OPT_UI))
- {
- Control* parent = NULL;
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_void_Control__SetName_const_Tizen__Base__String__name_,
- "p", &name);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(parent);
- FLUSH_LOCAL_BUF();
- }
- probeBlockEnd();
-}
-
-result Container::AddControl(const Control &control)
-{
- typedef result (Container::*methodType)(const Control &control);
- static methodType container_addcontrolp;
- probeInfo_t probeInfo;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container10AddControlERKNS0_7ControlE, LIBOSP_UIFW, container_addcontrolp);
-
- probeBlockStart();
- if(unlikely(IsRegisteredFrameAnimatorEventListener == false))
- {
- char *type = NULL, *classname = NULL;
- if(likely(find_object_hash((void*)this, &type, &classname) == 1)) // there is entry in object hash
- {
- if(strcmp(type, "Frame") == 0)
- {
- FrameAnimator* fa = ((Frame*)this)->GetFrameAnimator();
- if(fa != NULL)
- {
- fa->AddFrameAnimatorEventListener(GetFrameAnimatorEventListener());
- IsRegisteredFrameAnimatorEventListener = true;
- }
- else // frame is not yet constructed
- {
- }
- }
- }
- }
- probeBlockEnd();
-
- ret = (this->*container_addcontrolp)(control);
-
- probeBlockStart();
- if(ret == E_SUCCESS)
- {
- IsInTouchMode();
- control.IsInTouchMode();
-
- if(isOptionEnabled(OPT_UI))
- {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_Container__AddControl_const_Control__control_,
- "p", &control);
- PACK_COMMON_END(ret, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(&control);
- FLUSH_LOCAL_BUF();
- }
- }
- probeBlockEnd();
-
- return ret;
-}
-
-result Container::AddControl(Control* control)
-{
- typedef result (Container::*methodType)(Control* control);
- static methodType container_addcontrolp;
- probeInfo_t probeInfo;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container10AddControlEPNS0_7ControlE, LIBOSP_UIFW, container_addcontrolp);
-
- probeBlockStart();
- if(unlikely(IsRegisteredFrameAnimatorEventListener == false))
- {
- char *type = NULL, *classname = NULL;
- if(likely(find_object_hash((void*)this, &type, &classname) == 1)) // there is entry in object hash
- {
- if(strcmp(type, "Frame") == 0)
- {
- FrameAnimator* fa = ((Frame*)this)->GetFrameAnimator();
- if(fa != NULL)
- {
- fa->AddFrameAnimatorEventListener(GetFrameAnimatorEventListener());
- IsRegisteredFrameAnimatorEventListener = true;
- }
- else // frame is not yet constructed
- {
- }
- }
- }
- }
- probeBlockEnd();
-
- ret = (this->*container_addcontrolp)(control);
-
- probeBlockStart();
- if(ret == E_SUCCESS)
- {
- IsInTouchMode();
- control->IsInTouchMode();
-
- if(isOptionEnabled(OPT_UI))
- {
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_Container__AddControl_Control__control_,
- "p", control);
- PACK_COMMON_END(ret, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(control);
- FLUSH_LOCAL_BUF();
- }
- }
- probeBlockEnd();
-
- return ret;
-}
-
-result Container::RemoveControl(const Control &control)
-{
- typedef result (Container::*methodType)(const Control &control);
- static methodType container_removecontrolp;
- probeInfo_t probeInfo;
- result ret;
- bool bOption;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlERKNS0_7ControlE, LIBOSP_UIFW, container_removecontrolp);
-
- probeBlockStart();
-
- PREPARE_LOCAL_BUF();
-
- control.IsInTouchMode();
-
- if((bOption = isOptionEnabled(OPT_UI)))
- {
- setProbePoint(&probeInfo);
-
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_Container__RemoveControl_const_Control__control_,
- "p", &control);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(&control);
- }
- probeBlockEnd();
-
- ret = (this->*container_removecontrolp)(control);
-
- probeBlockStart();
-
- if(bOption)
- {
- PACK_RETURN_END(ret);
- }
-
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- return ret;
-}
-
-result Container::RemoveControl(Control* control)
-{
- typedef result (Container::*methodType)(Control* control);
- static methodType container_removecontrolp;
- probeInfo_t probeInfo;
- result ret;
- bool bOption;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlEPNS0_7ControlE, LIBOSP_UIFW, container_removecontrolp);
-
- probeBlockStart();
-
- PREPARE_LOCAL_BUF();
-
- control->IsInTouchMode();
-
- if((bOption = isOptionEnabled(OPT_UI)))
- {
- setProbePoint(&probeInfo);
-
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_Container__RemoveControl_Control__control_,
- "p", control);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(control);
- }
- probeBlockEnd();
-
- ret = (this->*container_removecontrolp)(control);
-
- probeBlockStart();
-
- if(bOption)
- {
- PACK_RETURN_END(ret);
- }
-
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- return ret;
-}
-
-result Container::RemoveControl(int index)
-{
- typedef result (Container::*methodType)(int index);
- static methodType container_removecontrolip;
- probeInfo_t probeInfo;
- result ret;
- bool bOption;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container13RemoveControlEi, LIBOSP_UIFW, container_removecontrolip);
-
- probeBlockStart();
-
- PREPARE_LOCAL_BUF();
-
- Control* pcontrol = GetControl(index);
- pcontrol->IsInTouchMode();
-
- if((bOption = isOptionEnabled(OPT_UI)))
- {
- setProbePoint(&probeInfo);
-
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_result_Container__RemoveControl_int_index_,
- "d", index);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(pcontrol);
- }
- probeBlockEnd();
-
- ret = (this->*container_removecontrolip)(index);
-
- probeBlockStart();
-
- if(bOption)
- {
- PACK_RETURN_END(ret);
- }
-
- FLUSH_LOCAL_BUF();
-
- probeBlockEnd();
-
- return ret;
-}
-
-void Container::RemoveAllControls(void)
-{
- typedef void (Container::*methodType)(void);
- static methodType container_removeallcontrolp;
- probeInfo_t probeInfo;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui9Container17RemoveAllControlsEv, LIBOSP_UIFW, container_removeallcontrolp);
-
- probeBlockStart();
- if(isOptionEnabled(OPT_UI))
- {
- Control* pcontrol = NULL;
- setProbePoint(&probeInfo);
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
- API_ID_void_Container__RemoveAllControls_void_,
- "", 0);
- PACK_COMMON_END(0, 0, 0);
- PACK_UICONTROL(this);
- PACK_UICONTROL(pcontrol);
- FLUSH_LOCAL_BUF();
- }
- probeBlockEnd();
-
- (this->*container_removeallcontrolp)();
-}
-
-} } // end of namespace Tizen::Ui
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <app.h>
+#include <Ecore.h>
+#include "daprobe.h"
+#include "dahelper.h"
+#include "probeinfo.h"
+#include "binproto.h"
+
+Ecore_Event_Handler* register_orientation_event_listener();
+void unregister_orientation_event_listener(Ecore_Event_Handler* handler);
+
+app_event_callback_s gAppCallback;
+
+#define PACK_ORIGINAL_APPFWCYCLE(API_ID, RVAL, INPUTFORMAT, ...) \
+ newerrno = errno; \
+ do { \
+ if(postBlockBegin(blockresult)) { \
+ PREPARE_LOCAL_BUF(); \
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE, API_ID, INPUTFORMAT, __VA_ARGS__); \
+ PACK_COMMON_END(RVAL, newerrno, blockresult); \
+ FLUSH_LOCAL_BUF(); \
+ postBlockEnd(); \
+ } \
+ } while(0); \
+ errno = (newerrno != 0) ? newerrno : olderrno
+
+static enum DaOptions _sopt = OPT_ALWAYSON;
+
+static bool _dalc_app_create(void* user_data)
+{
+ bool bret;
+ DECLARE_VARIABLE_STANDARD;
+
+ bfiltering = false;
+ PRE_PROBEBLOCK();
+
+ bret = gAppCallback.create(user_data);
+
+ PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_create, bret, "p", user_data);
+
+ return bret;
+}
+
+static void _dalc_app_terminate(void* user_data)
+{
+ DECLARE_VARIABLE_STANDARD;
+
+ bfiltering = false;
+ PRE_PROBEBLOCK();
+
+ gAppCallback.terminate(user_data);
+
+ PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_terminate, 0, "p", user_data);
+}
+
+static void _dalc_app_pause(void* user_data)
+{
+ DECLARE_VARIABLE_STANDARD;
+
+ bfiltering = false;
+ PRE_PROBEBLOCK();
+
+ gAppCallback.pause(user_data);
+
+ PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_pause, 0, "p", user_data);
+}
+
+static void _dalc_app_resume(void* user_data)
+{
+ DECLARE_VARIABLE_STANDARD;
+
+ bfiltering = false;
+ PRE_PROBEBLOCK();
+
+ gAppCallback.resume(user_data);
+
+ PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_resume, 0, "p", user_data);
+}
+
+static void _dalc_app_service(service_h service, void* user_data)
+{
+ DECLARE_VARIABLE_STANDARD;
+
+ bfiltering = false;
+ PRE_PROBEBLOCK();
+
+ gAppCallback.service(service, user_data);
+
+ PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_service, 0, "dp", (unsigned int)service, user_data);
+}
+
+static void _dalc_app_deviceorientationchanged(app_device_orientation_e orientation, void* user_data)
+{
+ on_orientation_changed((int)orientation, true);
+
+ if(gAppCallback.device_orientation)
+ gAppCallback.device_orientation(orientation, user_data);
+}
+
+int app_efl_main(int *argc, char ***argv, app_event_callback_s *callback, void *user_data)
+{
+ static int (*app_efl_mainp)(int* argc, char*** argv, app_event_callback_s* callback, void* user_data);
+ Ecore_Event_Handler* handler;
+ int ret;
+
+ GET_REAL_FUNC(app_efl_main, LIBCAPI_APPFW_APPLICATION);
+
+ probeBlockStart();
+ handler = register_orientation_event_listener();
+ gAppCallback.create = callback->create;
+ gAppCallback.terminate = callback->terminate;
+ gAppCallback.pause = callback->pause;
+ gAppCallback.resume = callback->resume;
+ gAppCallback.service = callback->service;
+ gAppCallback.device_orientation = callback->device_orientation;
+
+ if(callback->create)
+ callback->create = _dalc_app_create;
+ if(callback->terminate)
+ callback->terminate = _dalc_app_terminate;
+ if(callback->pause)
+ callback->pause = _dalc_app_pause;
+ if(callback->resume)
+ callback->resume = _dalc_app_resume;
+ if(callback->service)
+ callback->service = _dalc_app_service;
+ callback->device_orientation = _dalc_app_deviceorientationchanged;
+ probeBlockEnd();
+
+ ret = app_efl_mainp(argc, argv, callback, user_data);
+
+ probeBlockStart();
+ unregister_orientation_event_listener(handler);
+ callback->create = gAppCallback.create;
+ callback->terminate = gAppCallback.terminate;
+ callback->pause = gAppCallback.pause;
+ callback->resume = gAppCallback.resume;
+ callback->service = gAppCallback.service;
+ callback->device_orientation = gAppCallback.device_orientation;
+ probeBlockEnd();
+
+ return ret;
+}
+
#include "daprobe.h"
#include "dahelper.h"
#include "probeinfo.h"
-#include "osp_probe.h"
+#include "tizen_probe.h"
#include "dacollection.h"
#include "da_event.h"
#include "gesture.h"
static methodType addflickgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui25TouchFlickGestureDetector28AddFlickGestureEventListenerERNS0_31ITouchFlickGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui25TouchFlickGestureDetector28AddFlickGestureEventListenerERNS0_31ITouchFlickGestureEventListenerE,
LIBOSP_UIFW, addflickgestureeventlistenerp);
probeBlockStart();
static methodType addlongpressgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui29TouchLongPressGestureDetector32AddLongPressGestureEventListenerERNS0_35ITouchLongPressGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui29TouchLongPressGestureDetector32AddLongPressGestureEventListenerERNS0_35ITouchLongPressGestureEventListenerE,
LIBOSP_UIFW, addlongpressgestureeventlistenerp);
probeBlockStart();
static methodType addpanninggestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui27TouchPanningGestureDetector30AddPanningGestureEventListenerERNS0_33ITouchPanningGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui27TouchPanningGestureDetector30AddPanningGestureEventListenerERNS0_33ITouchPanningGestureEventListenerE,
LIBOSP_UIFW, addpanninggestureeventlistenerp);
probeBlockStart();
static methodType addpinchgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui25TouchPinchGestureDetector28AddPinchGestureEventListenerERNS0_31ITouchPinchGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui25TouchPinchGestureDetector28AddPinchGestureEventListenerERNS0_31ITouchPinchGestureEventListenerE,
LIBOSP_UIFW, addpinchgestureeventlistenerp);
probeBlockStart();
static methodType addrotationgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui28TouchRotationGestureDetector31AddRotationGestureEventListenerERNS0_34ITouchRotationGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui28TouchRotationGestureDetector31AddRotationGestureEventListenerERNS0_34ITouchRotationGestureEventListenerE,
LIBOSP_UIFW, addrotationgestureeventlistenerp);
probeBlockStart();
static methodType addtapgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui23TouchTapGestureDetector26AddTapGestureEventListenerERNS0_29ITouchTapGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui23TouchTapGestureDetector26AddTapGestureEventListenerERNS0_29ITouchTapGestureEventListenerE,
LIBOSP_UIFW, addtapgestureeventlistenerp);
probeBlockStart();
static methodType addgestureeventlistenerp;
result iret;
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui20TouchGestureDetector23AddGestureEventListenerERNS0_26ITouchGestureEventListenerE,
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui20TouchGestureDetector23AddGestureEventListenerERNS0_26ITouchGestureEventListenerE,
LIBOSP_UIFW, addgestureeventlistenerp);
probeBlockStart();
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <app.h>
-#include <Ecore.h>
-#include "daprobe.h"
-#include "dahelper.h"
-#include "probeinfo.h"
-#include "binproto.h"
-
-Ecore_Event_Handler* register_orientation_event_listener();
-void unregister_orientation_event_listener(Ecore_Event_Handler* handler);
-
-app_event_callback_s gAppCallback;
-
-#define PACK_ORIGINAL_APPFWCYCLE(API_ID, RVAL, INPUTFORMAT, ...) \
- newerrno = errno; \
- do { \
- if(postBlockBegin(blockresult)) { \
- PREPARE_LOCAL_BUF(); \
- PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE, API_ID, INPUTFORMAT, __VA_ARGS__); \
- PACK_COMMON_END(RVAL, newerrno, blockresult); \
- FLUSH_LOCAL_BUF(); \
- postBlockEnd(); \
- } \
- } while(0); \
- errno = (newerrno != 0) ? newerrno : olderrno
-
-static enum DaOptions _sopt = OPT_ALWAYSON;
-
-static bool _dalc_app_create(void* user_data)
-{
- bool bret;
- DECLARE_VARIABLE_STANDARD;
-
- bfiltering = false;
- PRE_PROBEBLOCK();
-
- bret = gAppCallback.create(user_data);
-
- PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_create, bret, "p", user_data);
-
- return bret;
-}
-
-static void _dalc_app_terminate(void* user_data)
-{
- DECLARE_VARIABLE_STANDARD;
-
- bfiltering = false;
- PRE_PROBEBLOCK();
-
- gAppCallback.terminate(user_data);
-
- PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_terminate, 0, "p", user_data);
-}
-
-static void _dalc_app_pause(void* user_data)
-{
- DECLARE_VARIABLE_STANDARD;
-
- bfiltering = false;
- PRE_PROBEBLOCK();
-
- gAppCallback.pause(user_data);
-
- PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_pause, 0, "p", user_data);
-}
-
-static void _dalc_app_resume(void* user_data)
-{
- DECLARE_VARIABLE_STANDARD;
-
- bfiltering = false;
- PRE_PROBEBLOCK();
-
- gAppCallback.resume(user_data);
-
- PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_resume, 0, "p", user_data);
-}
-
-static void _dalc_app_service(service_h service, void* user_data)
-{
- DECLARE_VARIABLE_STANDARD;
-
- bfiltering = false;
- PRE_PROBEBLOCK();
-
- gAppCallback.service(service, user_data);
-
- PACK_ORIGINAL_APPFWCYCLE(API_ID__dalc_app_service, 0, "dp", (unsigned int)service, user_data);
-}
-
-static void _dalc_app_deviceorientationchanged(app_device_orientation_e orientation, void* user_data)
-{
- on_orientation_changed((int)orientation, true);
-
- if(gAppCallback.device_orientation)
- gAppCallback.device_orientation(orientation, user_data);
-}
-
-int app_efl_main(int *argc, char ***argv, app_event_callback_s *callback, void *user_data)
-{
- static int (*app_efl_mainp)(int* argc, char*** argv, app_event_callback_s* callback, void* user_data);
- Ecore_Event_Handler* handler;
- int ret;
-
- GET_REAL_FUNC(app_efl_main, LIBCAPI_APPFW_APPLICATION);
-
- probeBlockStart();
- handler = register_orientation_event_listener();
- gAppCallback.create = callback->create;
- gAppCallback.terminate = callback->terminate;
- gAppCallback.pause = callback->pause;
- gAppCallback.resume = callback->resume;
- gAppCallback.service = callback->service;
- gAppCallback.device_orientation = callback->device_orientation;
-
- if(callback->create)
- callback->create = _dalc_app_create;
- if(callback->terminate)
- callback->terminate = _dalc_app_terminate;
- if(callback->pause)
- callback->pause = _dalc_app_pause;
- if(callback->resume)
- callback->resume = _dalc_app_resume;
- if(callback->service)
- callback->service = _dalc_app_service;
- callback->device_orientation = _dalc_app_deviceorientationchanged;
- probeBlockEnd();
-
- ret = app_efl_mainp(argc, argv, callback, user_data);
-
- probeBlockStart();
- unregister_orientation_event_listener(handler);
- callback->create = gAppCallback.create;
- callback->terminate = gAppCallback.terminate;
- callback->pause = gAppCallback.pause;
- callback->resume = gAppCallback.resume;
- callback->service = gAppCallback.service;
- callback->device_orientation = gAppCallback.device_orientation;
- probeBlockEnd();
-
- return ret;
-}
-
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include "daprobe.h"
+#include "dahelper.h"
+#include "dacollection.h"
+#include "tizen_probe.h"
+
+namespace Tizen { namespace Ui {
+
+class Control
+{
+ Control(void);
+ ~Control(void);
+};
+
+class CustomControlBase
+{
+ CustomControlBase(void);
+};
+
+class Container
+{
+ Container(void);
+};
+
+class Window
+{
+ Window(void);
+};
+
+Control::Control(void)
+{
+ typedef void (Control::*methodType)(void);
+ static methodType control_controlp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui7ControlC2Ev, LIBOSP_UIFW, control_controlp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Control");
+ probeBlockEnd();
+
+ (this->*control_controlp)();
+}
+
+Control::~Control(void)
+{
+ typedef void (Control::*methodType)(void);
+ static methodType control__controlvoidp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui7ControlD2Ev, LIBOSP_UIFW, control__controlvoidp);
+
+ probeBlockStart();
+ del_object_hash(static_cast<void*>(this));
+ probeBlockEnd();
+
+ (this->*control__controlvoidp)();
+}
+
+CustomControlBase::CustomControlBase(void)
+{
+ typedef void (CustomControlBase::*methodType)(void);
+ static methodType customcontrolbase_customcontrolbasep;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui17CustomControlBaseC2Ev, LIBOSP_UIFW, customcontrolbase_customcontrolbasep);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "CustomControlBase");
+ probeBlockEnd();
+
+ (this->*customcontrolbase_customcontrolbasep)();
+}
+
+Container::Container(void)
+{
+ typedef void (Container::*methodType)(void);
+ static methodType container_containerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9ContainerC2Ev, LIBOSP_UIFW, container_containerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Container");
+ probeBlockEnd();
+
+ (this->*container_containerp)();
+}
+
+Window::Window(void)
+{
+ typedef void (Window::*methodType)(void);
+ static methodType window_windowp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui6WindowC2Ev, LIBOSP_UIFW, window_windowp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Window");
+ probeBlockEnd();
+
+ (this->*window_windowp)();
+}
+
+namespace Controls {
+
+class Animation
+{
+ Animation(void);
+};
+
+class Button
+{
+ Button(void);
+};
+
+class CheckButton
+{
+ CheckButton(void);
+};
+
+class ColorPicker
+{
+ ColorPicker(void);
+};
+
+class CustomList
+{
+ CustomList(void);
+};
+
+class EditArea
+{
+ EditArea(void);
+};
+
+class EditDate
+{
+ EditDate(void);
+};
+
+class EditField
+{
+ EditField(void);
+};
+
+class EditTime
+{
+ EditTime(void);
+};
+
+class ExpandableEditArea
+{
+ ExpandableEditArea(void);
+};
+
+class ExpandableList
+{
+ ExpandableList(void);
+};
+
+class Footer
+{
+ Footer(void);
+};
+
+class Gallery
+{
+ Gallery(void);
+};
+
+class GroupedList
+{
+ GroupedList(void);
+};
+
+class GroupedListView
+{
+ GroupedListView(void);
+};
+
+class Header
+{
+ Header(void);
+};
+
+class IconList
+{
+ IconList(void);
+};
+
+class IconListView
+{
+ IconListView(void);
+};
+
+class Label
+{
+ Label(void);
+};
+
+class List
+{
+ List(void);
+};
+
+class ListView
+{
+ ListView(void);
+};
+
+class Progress
+{
+ Progress(void);
+};
+
+class RadioGroup
+{
+ RadioGroup(void);
+};
+
+class SearchBar
+{
+ SearchBar(void);
+};
+
+class SlidableGroupedList
+{
+ SlidableGroupedList(void);
+};
+
+class SlidableList
+{
+ SlidableList(void);
+};
+
+class Slider
+{
+ Slider(void);
+};
+
+class SplitPanel
+{
+ SplitPanel(void);
+};
+
+class Tab
+{
+ Tab(void);
+};
+
+class TabBar
+{
+ TabBar(void);
+};
+
+class TextBox
+{
+ TextBox(void);
+};
+
+class Form
+{
+ Form(void);
+};
+
+class GroupedTableView
+{
+ GroupedTableView(void);
+};
+
+class Panel
+{
+ Panel(void);
+};
+
+class OverlayPanel
+{
+ OverlayPanel(void);
+};
+
+class ScrollPanel
+{
+ ScrollPanel(void);
+};
+
+class SectionTableView
+{
+ SectionTableView(void);
+};
+
+class TableView
+{
+ TableView(void);
+};
+
+class TableViewItemBase
+{
+ TableViewItemBase(void);
+};
+
+class TableViewContextItem
+{
+ TableViewContextItem(void);
+};
+
+class TableViewGroupItem
+{
+ TableViewGroupItem(void);
+};
+
+class TableViewItem
+{
+ TableViewItem(void);
+};
+
+class TableViewSimpleGroupItem
+{
+ TableViewSimpleGroupItem(void);
+};
+
+class TableViewSimpleItem
+{
+ TableViewSimpleItem(void);
+};
+
+class ContextMenu
+{
+ ContextMenu(void);
+};
+
+class DatePicker
+{
+ DatePicker(void);
+};
+
+class DateTimePicker
+{
+ DateTimePicker(void);
+};
+
+class Frame
+{
+ Frame(void);
+};
+
+class Keypad
+{
+ Keypad(void);
+};
+
+class MessageBox
+{
+ MessageBox(void);
+};
+
+class OptionMenu
+{
+ OptionMenu(void);
+};
+
+class Popup
+{
+ Popup(void);
+};
+
+class TimePicker
+{
+ TimePicker(void);
+};
+
+Animation::Animation(void)
+{
+ typedef void (Animation::*methodType)(void);
+ static methodType animation_animationp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls9AnimationC2Ev, LIBOSP_UIFW, animation_animationp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Animation");
+ probeBlockEnd();
+
+ (this->*animation_animationp)();
+}
+
+Button::Button(void)
+{
+ typedef void (Button::*methodType)(void);
+ static methodType button_buttonp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6ButtonC2Ev, LIBOSP_UIFW, button_buttonp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Button");
+ probeBlockEnd();
+
+ (this->*button_buttonp)();
+}
+
+CheckButton::CheckButton(void)
+{
+ typedef void (CheckButton::*methodType)(void);
+ static methodType checkbutton_checkbuttonp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls11CheckButtonC2Ev, LIBOSP_UIFW, checkbutton_checkbuttonp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "CheckButton");
+ probeBlockEnd();
+
+ (this->*checkbutton_checkbuttonp)();
+}
+
+ColorPicker::ColorPicker(void)
+{
+ typedef void (ColorPicker::*methodType)(void);
+ static methodType colorpicker_colorpickerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls11ColorPickerC2Ev, LIBOSP_UIFW, colorpicker_colorpickerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ColorPicker");
+ probeBlockEnd();
+
+ (this->*colorpicker_colorpickerp)();
+}
+
+CustomList::CustomList(void)
+{
+ typedef void (CustomList::*methodType)(void);
+ static methodType customlist_customlistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10CustomListC2Ev, LIBOSP_UIFW, customlist_customlistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "CustomList");
+ probeBlockEnd();
+
+ (this->*customlist_customlistp)();
+}
+
+EditArea::EditArea(void)
+{
+ typedef void (EditArea::*methodType)(void);
+ static methodType editarea_editareap;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8EditAreaC2Ev, LIBOSP_UIFW, editarea_editareap);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "EditArea");
+ probeBlockEnd();
+
+ (this->*editarea_editareap)();
+}
+
+EditDate::EditDate(void)
+{
+ typedef void (EditDate::*methodType)(void);
+ static methodType editdate_editdatep;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8EditDateC2Ev, LIBOSP_UIFW, editdate_editdatep);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "EditDate");
+ probeBlockEnd();
+
+ (this->*editdate_editdatep)();
+}
+
+EditField::EditField(void)
+{
+ typedef void (EditField::*methodType)(void);
+ static methodType editfield_editfieldp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls9EditFieldC2Ev, LIBOSP_UIFW, editfield_editfieldp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "EditField");
+ probeBlockEnd();
+
+ (this->*editfield_editfieldp)();
+}
+
+EditTime::EditTime(void)
+{
+ typedef void (EditTime::*methodType)(void);
+ static methodType edittime_edittimep;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8EditTimeC2Ev, LIBOSP_UIFW, edittime_edittimep);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "EditTime");
+ probeBlockEnd();
+
+ (this->*edittime_edittimep)();
+}
+
+ExpandableEditArea::ExpandableEditArea(void)
+{
+ typedef void (ExpandableEditArea::*methodType)(void);
+ static methodType expandableeditarea_expandableeditareap;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls18ExpandableEditAreaC2Ev, LIBOSP_UIFW, expandableeditarea_expandableeditareap);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ExpandableEditArea");
+ probeBlockEnd();
+
+ (this->*expandableeditarea_expandableeditareap)();
+}
+
+ExpandableList::ExpandableList(void)
+{
+ typedef void (ExpandableList::*methodType)(void);
+ static methodType expandablelist_expandablelistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls14ExpandableListC2Ev, LIBOSP_UIFW, expandablelist_expandablelistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ExpandableList");
+ probeBlockEnd();
+
+ (this->*expandablelist_expandablelistp)();
+}
+
+Footer::Footer(void)
+{
+ typedef void (Footer::*methodType)(void);
+ static methodType footer_footerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6FooterC2Ev, LIBOSP_UIFW, footer_footerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Footer");
+ probeBlockEnd();
+
+ (this->*footer_footerp)();
+}
+
+Gallery::Gallery(void)
+{
+ typedef void (Gallery::*methodType)(void);
+ static methodType gallery_galleryp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls7GalleryC2Ev, LIBOSP_UIFW, gallery_galleryp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Gallery");
+ probeBlockEnd();
+
+ (this->*gallery_galleryp)();
+}
+
+GroupedList::GroupedList(void)
+{
+ typedef void (GroupedList::*methodType)(void);
+ static methodType groupedlist_groupedlistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls11GroupedListC2Ev, LIBOSP_UIFW, groupedlist_groupedlistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "GroupedList");
+ probeBlockEnd();
+
+ (this->*groupedlist_groupedlistp)();
+}
+
+GroupedListView::GroupedListView(void)
+{
+ typedef void (GroupedListView::*methodType)(void);
+ static methodType groupedlistview_groupedlistviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls15GroupedListViewC2Ev, LIBOSP_UIFW, groupedlistview_groupedlistviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "GroupedListView");
+ probeBlockEnd();
+
+ (this->*groupedlistview_groupedlistviewp)();
+}
+
+Header::Header(void)
+{
+ typedef void (Header::*methodType)(void);
+ static methodType header_headerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6HeaderC2Ev, LIBOSP_UIFW, header_headerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Header");
+ probeBlockEnd();
+
+ (this->*header_headerp)();
+}
+
+IconList::IconList(void)
+{
+ typedef void (IconList::*methodType)(void);
+ static methodType iconlist_iconlistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8IconListC2Ev, LIBOSP_UIFW, iconlist_iconlistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "IconList");
+ probeBlockEnd();
+
+ (this->*iconlist_iconlistp)();
+}
+
+IconListView::IconListView(void)
+{
+ typedef void (IconListView::*methodType)(void);
+ static methodType iconlistview_iconlistviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls12IconListViewC2Ev, LIBOSP_UIFW, iconlistview_iconlistviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "IconListView");
+ probeBlockEnd();
+
+ (this->*iconlistview_iconlistviewp)();
+}
+
+Label::Label(void)
+{
+ typedef void (Label::*methodType)(void);
+ static methodType label_labelp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5LabelC2Ev, LIBOSP_UIFW, label_labelp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Label");
+ probeBlockEnd();
+
+ (this->*label_labelp)();
+}
+
+List::List(void)
+{
+ typedef void (List::*methodType)(void);
+ static methodType list_listp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls4ListC2Ev, LIBOSP_UIFW, list_listp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "List");
+ probeBlockEnd();
+
+ (this->*list_listp)();
+}
+
+ListView::ListView(void)
+{
+ typedef void (ListView::*methodType)(void);
+ static methodType listview_listviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8ListViewC2Ev, LIBOSP_UIFW, listview_listviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ListView");
+ probeBlockEnd();
+
+ (this->*listview_listviewp)();
+}
+
+Progress::Progress(void)
+{
+ typedef void (Progress::*methodType)(void);
+ static methodType progress_progressp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls8ProgressC2Ev, LIBOSP_UIFW, progress_progressp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Progress");
+ probeBlockEnd();
+
+ (this->*progress_progressp)();
+}
+
+RadioGroup::RadioGroup(void)
+{
+ typedef void (RadioGroup::*methodType)(void);
+ static methodType radiogroup_radiogroupp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10RadioGroupC2Ev, LIBOSP_UIFW, radiogroup_radiogroupp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "RadioGroup");
+ probeBlockEnd();
+
+ (this->*radiogroup_radiogroupp)();
+}
+
+SearchBar::SearchBar(void)
+{
+ typedef void (SearchBar::*methodType)(void);
+ static methodType searchbar_searchbarp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls9SearchBarC2Ev, LIBOSP_UIFW, searchbar_searchbarp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "SearchBar");
+ probeBlockEnd();
+
+ (this->*searchbar_searchbarp)();
+}
+
+SlidableGroupedList::SlidableGroupedList(void)
+{
+ typedef void (SlidableGroupedList::*methodType)(void);
+ static methodType slidablegroupedlist_slidablegroupedlistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls19SlidableGroupedListC2Ev, LIBOSP_UIFW, slidablegroupedlist_slidablegroupedlistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "SlidableGroupedList");
+ probeBlockEnd();
+
+ (this->*slidablegroupedlist_slidablegroupedlistp)();
+}
+
+SlidableList::SlidableList(void)
+{
+ typedef void (SlidableList::*methodType)(void);
+ static methodType slidablelist_slidablelistp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls12SlidableListC2Ev, LIBOSP_UIFW, slidablelist_slidablelistp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "SlidableList");
+ probeBlockEnd();
+
+ (this->*slidablelist_slidablelistp)();
+}
+
+Slider::Slider(void)
+{
+ typedef void (Slider::*methodType)(void);
+ static methodType slider_sliderp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6SliderC2Ev, LIBOSP_UIFW, slider_sliderp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Slider");
+ probeBlockEnd();
+
+ (this->*slider_sliderp)();
+}
+
+SplitPanel::SplitPanel(void)
+{
+ typedef void (SplitPanel::*methodType)(void);
+ static methodType splitpanel_splitpanelp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10SplitPanelC2Ev, LIBOSP_UIFW, splitpanel_splitpanelp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "SplitPanel");
+ probeBlockEnd();
+
+ (this->*splitpanel_splitpanelp)();
+}
+
+Tab::Tab(void)
+{
+ typedef void (Tab::*methodType)(void);
+ static methodType tab_tabp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls3TabC2Ev, LIBOSP_UIFW, tab_tabp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Tab");
+ probeBlockEnd();
+
+ (this->*tab_tabp)();
+}
+
+TabBar::TabBar(void)
+{
+ typedef void (TabBar::*methodType)(void);
+ static methodType tabbar_tabbarp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6TabBarC2Ev, LIBOSP_UIFW, tabbar_tabbarp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TabBar");
+ probeBlockEnd();
+
+ (this->*tabbar_tabbarp)();
+}
+
+TextBox::TextBox(void)
+{
+ typedef void (TextBox::*methodType)(void);
+ static methodType textbox_textboxp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls7TextBoxC2Ev, LIBOSP_UIFW, textbox_textboxp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TextBox");
+ probeBlockEnd();
+
+ (this->*textbox_textboxp)();
+}
+
+Form::Form(void)
+{
+ typedef void (Form::*methodType)(void);
+ static methodType form_formp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls4FormC2Ev, LIBOSP_UIFW, form_formp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Form");
+ probeBlockEnd();
+
+ (this->*form_formp)();
+}
+
+GroupedTableView::GroupedTableView(void)
+{
+ typedef void (GroupedTableView::*methodType)(void);
+ static methodType groupedtableview_groupedtableviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls16GroupedTableViewC2Ev, LIBOSP_UIFW, groupedtableview_groupedtableviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "GroupedTableView");
+ probeBlockEnd();
+
+ (this->*groupedtableview_groupedtableviewp)();
+}
+
+Panel::Panel(void)
+{
+ typedef void (Panel::*methodType)(void);
+ static methodType panel_panelp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5PanelC2Ev, LIBOSP_UIFW, panel_panelp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Panel");
+ probeBlockEnd();
+
+ (this->*panel_panelp)();
+}
+
+OverlayPanel::OverlayPanel(void)
+{
+ typedef void (OverlayPanel::*methodType)(void);
+ static methodType overlaypanel_overlaypanelp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls12OverlayPanelC2Ev, LIBOSP_UIFW, overlaypanel_overlaypanelp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "OverlayPanel");
+ probeBlockEnd();
+
+ (this->*overlaypanel_overlaypanelp)();
+}
+
+ScrollPanel::ScrollPanel(void)
+{
+ typedef void (ScrollPanel::*methodType)(void);
+ static methodType scrollpanel_scrollpanelp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls11ScrollPanelC2Ev, LIBOSP_UIFW, scrollpanel_scrollpanelp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ScrollPanel");
+ probeBlockEnd();
+
+ (this->*scrollpanel_scrollpanelp)();
+}
+
+SectionTableView::SectionTableView(void)
+{
+ typedef void (SectionTableView::*methodType)(void);
+ static methodType sectiontableview_sectiontableviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls16SectionTableViewC2Ev, LIBOSP_UIFW, sectiontableview_sectiontableviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "SectionTableView");
+ probeBlockEnd();
+
+ (this->*sectiontableview_sectiontableviewp)();
+}
+
+TableView::TableView(void)
+{
+ typedef void (TableView::*methodType)(void);
+ static methodType tableview_tableviewp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls9TableViewC2Ev, LIBOSP_UIFW, tableview_tableviewp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableView");
+ probeBlockEnd();
+
+ (this->*tableview_tableviewp)();
+}
+
+TableViewItemBase::TableViewItemBase(void)
+{
+ typedef void (TableViewItemBase::*methodType)(void);
+ static methodType tableviewitembase_tableviewitembasep;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls17TableViewItemBaseC2Ev, LIBOSP_UIFW, tableviewitembase_tableviewitembasep);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewItemBase");
+ probeBlockEnd();
+
+ (this->*tableviewitembase_tableviewitembasep)();
+}
+
+TableViewContextItem::TableViewContextItem(void)
+{
+ typedef void (TableViewContextItem::*methodType)(void);
+ static methodType tableviewcontextitem_tableviewcontextitemp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls20TableViewContextItemC2Ev, LIBOSP_UIFW, tableviewcontextitem_tableviewcontextitemp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewContextItem");
+ probeBlockEnd();
+
+ (this->*tableviewcontextitem_tableviewcontextitemp)();
+}
+
+TableViewGroupItem::TableViewGroupItem(void)
+{
+ typedef void (TableViewGroupItem::*methodType)(void);
+ static methodType tableviewgroupitem_tableviewgroupitemp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls18TableViewGroupItemC2Ev, LIBOSP_UIFW, tableviewgroupitem_tableviewgroupitemp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewGroupItem");
+ probeBlockEnd();
+
+ (this->*tableviewgroupitem_tableviewgroupitemp)();
+}
+
+TableViewItem::TableViewItem(void)
+{
+ typedef void (TableViewItem::*methodType)(void);
+ static methodType tableviewitem_tableviewitemp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls13TableViewItemC2Ev, LIBOSP_UIFW, tableviewitem_tableviewitemp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewItem");
+ probeBlockEnd();
+
+ (this->*tableviewitem_tableviewitemp)();
+}
+
+TableViewSimpleGroupItem::TableViewSimpleGroupItem(void)
+{
+ typedef void (TableViewSimpleGroupItem::*methodType)(void);
+ static methodType tableviewsimplegroupitem_tableviewsimplegroupitemp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls24TableViewSimpleGroupItemC2Ev, LIBOSP_UIFW, tableviewsimplegroupitem_tableviewsimplegroupitemp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewSimpleGroupItem");
+ probeBlockEnd();
+
+ (this->*tableviewsimplegroupitem_tableviewsimplegroupitemp)();
+}
+
+TableViewSimpleItem::TableViewSimpleItem(void)
+{
+ typedef void (TableViewSimpleItem::*methodType)(void);
+ static methodType tableviewsimpleitem_tableviewsimpleitemp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls19TableViewSimpleItemC2Ev, LIBOSP_UIFW, tableviewsimpleitem_tableviewsimpleitemp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TableViewSimpleItem");
+ probeBlockEnd();
+
+ (this->*tableviewsimpleitem_tableviewsimpleitemp)();
+}
+
+ContextMenu::ContextMenu(void)
+{
+ typedef void (ContextMenu::*methodType)(void);
+ static methodType contextmenu_contextmenup;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls11ContextMenuC2Ev, LIBOSP_UIFW, contextmenu_contextmenup);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "ContextMenu");
+ probeBlockEnd();
+
+ (this->*contextmenu_contextmenup)();
+}
+
+DatePicker::DatePicker(void)
+{
+ typedef void (DatePicker::*methodType)(void);
+ static methodType datepicker_datepickerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10DatePickerC2Ev, LIBOSP_UIFW, datepicker_datepickerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "DatePicker");
+ probeBlockEnd();
+
+ (this->*datepicker_datepickerp)();
+}
+
+DateTimePicker::DateTimePicker(void)
+{
+ typedef void (DateTimePicker::*methodType)(void);
+ static methodType datetimepicker_datetimepickerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls14DateTimePickerC2Ev, LIBOSP_UIFW, datetimepicker_datetimepickerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "DateTimePicker");
+ probeBlockEnd();
+
+ (this->*datetimepicker_datetimepickerp)();
+}
+
+Frame::Frame(void)
+{
+ typedef void (Frame::*methodType)(void);
+ static methodType frame_framep;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5FrameC2Ev, LIBOSP_UIFW, frame_framep);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Frame");
+ probeBlockEnd();
+
+ (this->*frame_framep)();
+}
+
+Keypad::Keypad(void)
+{
+ typedef void (Keypad::*methodType)(void);
+ static methodType keypad_keypadp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls6KeypadC2Ev, LIBOSP_UIFW, keypad_keypadp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Keypad");
+ probeBlockEnd();
+
+ (this->*keypad_keypadp)();
+}
+
+MessageBox::MessageBox(void)
+{
+ typedef void (MessageBox::*methodType)(void);
+ static methodType messagebox_messageboxp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10MessageBoxC2Ev, LIBOSP_UIFW, messagebox_messageboxp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "MessageBox");
+ probeBlockEnd();
+
+ (this->*messagebox_messageboxp)();
+}
+
+OptionMenu::OptionMenu(void)
+{
+ typedef void (OptionMenu::*methodType)(void);
+ static methodType optionmenu_optionmenup;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10OptionMenuC2Ev, LIBOSP_UIFW, optionmenu_optionmenup);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "OptionMenu");
+ probeBlockEnd();
+
+ (this->*optionmenu_optionmenup)();
+}
+
+Popup::Popup(void)
+{
+ typedef void (Popup::*methodType)(void);
+ static methodType popup_popupp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5PopupC2Ev, LIBOSP_UIFW, popup_popupp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Popup");
+ probeBlockEnd();
+
+ (this->*popup_popupp)();
+}
+
+TimePicker::TimePicker(void)
+{
+ typedef void (TimePicker::*methodType)(void);
+ static methodType timepicker_timepickerp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls10TimePickerC2Ev, LIBOSP_UIFW, timepicker_timepickerp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "TimePicker");
+ probeBlockEnd();
+
+ (this->*timepicker_timepickerp)();
+}
+
+} // end of namespace Tizen::Ui::Controls
+
+} } // end of namespace Tizen::Ui
+
+
+namespace Tizen { namespace Web { namespace Controls {
+
+class Web
+{
+ Web(void);
+};
+
+Web::Web(void)
+{
+ typedef void (Web::*methodType)(void);
+ static methodType web_webp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3Web8Controls3WebC2Ev, LIBOSP_WEB, web_webp);
+
+ probeBlockStart();
+ add_object_hash_type((void*)this, "Web");
+ probeBlockEnd();
+
+ (this->*web_webp)();
+}
+
+} } } // end of namespace Tizen::Web::Controls
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <typeinfo>
+#include <FApp.h>
+#include <FUi.h>
+
+#include "daprobe.h"
+#include "dacollection.h"
+#include "dahelper.h"
+#include "tizen_probe.h"
+
+#include "binproto.h"
+
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Animations;
+
+extern IFrameAnimatorEventListener& GetFrameAnimatorEventListener();
+
+bool IsRegisteredFrameAnimatorEventListener = false;
+
+namespace Tizen { namespace App {
+
+result UiApp::AddFrame(const Tizen::Ui::Controls::Frame& frame)
+{
+ typedef result (UiApp::*methodType)(const Tizen::Ui::Controls::Frame& frame);
+ static methodType uiapp_addframep;
+ probeInfo_t probeInfo;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App5UiApp8AddFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_addframep);
+
+ ret = (this->*uiapp_addframep)(frame);
+
+ probeBlockStart();
+ if(ret == E_SUCCESS)
+ {
+ frame.IsInTouchMode();
+
+ if(isOptionEnabled(OPT_UI))
+ {
+ Control* parent = NULL;
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_UiApp__AddFrame_const_Tizen__Ui__Controls__Frame__frame_,
+ "p", &frame);
+ PACK_COMMON_END(ret, 0, 0);
+ PACK_UICONTROL(parent);
+ PACK_UICONTROL(&frame);
+ FLUSH_LOCAL_BUF();
+ }
+ }
+ probeBlockEnd();
+
+ return ret;
+}
+
+result UiApp::RemoveFrame(const Tizen::Ui::Controls::Frame &frame)
+{
+ typedef result (UiApp::*methodType)(const Tizen::Ui::Controls::Frame& frame);
+ static methodType uiapp_removeframep;
+ probeInfo_t probeInfo;
+ result ret;
+ bool bOption;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App5UiApp11RemoveFrameERKNS_2Ui8Controls5FrameE, LIBOSP_UIFW, uiapp_removeframep);
+
+ probeBlockStart();
+
+ PREPARE_LOCAL_BUF();
+
+ frame.IsInTouchMode();
+
+ if((bOption = isOptionEnabled(OPT_UI)))
+ {
+ Control* parent = NULL;
+ setProbePoint(&probeInfo);
+
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_UiApp__RemoveFrame_const_Tizen__Ui__Controls__Frame__frame_,
+ "p", &frame);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(parent);
+ PACK_UICONTROL(&frame);
+ }
+ probeBlockEnd();
+
+ ret = (this->*uiapp_removeframep)(frame);
+
+ probeBlockStart();
+
+ if(bOption)
+ {
+ PACK_RETURN_END(ret);
+ }
+
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ return ret;
+}
+
+} } // end of namespce Tizen::App
+
+
+namespace Tizen { namespace Ui {
+
+bool Control::IsInTouchMode(void) const
+{
+ typedef bool (Control::*methodType)(void) const;
+ static methodType control_isintouchmodep;
+
+ GET_REAL_FUNC_TIZEN(_ZNK5Tizen2Ui7Control13IsInTouchModeEv, LIBOSP_UIFW, control_isintouchmodep);
+
+ probeBlockStart();
+ add_object_hash_class((void*)(this), typeid(*this).name());
+ probeBlockEnd();
+
+ return (this->*control_isintouchmodep)();
+}
+
+void Control::SetName(const Tizen::Base::String &name)
+{
+ typedef void (Control::*methodType)(const Tizen::Base::String &name);
+ static methodType control_setnamep;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui7Control7SetNameERKNS_4Base6StringE, LIBOSP_UIFW, control_setnamep);
+
+ (this->*control_setnamep)(name);
+
+ probeBlockStart();
+ IsInTouchMode();
+
+ if(isOptionEnabled(OPT_UI))
+ {
+ Control* parent = NULL;
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_void_Control__SetName_const_Tizen__Base__String__name_,
+ "p", &name);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(parent);
+ FLUSH_LOCAL_BUF();
+ }
+ probeBlockEnd();
+}
+
+result Container::AddControl(const Control &control)
+{
+ typedef result (Container::*methodType)(const Control &control);
+ static methodType container_addcontrolp;
+ probeInfo_t probeInfo;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container10AddControlERKNS0_7ControlE, LIBOSP_UIFW, container_addcontrolp);
+
+ probeBlockStart();
+ if(unlikely(IsRegisteredFrameAnimatorEventListener == false))
+ {
+ char *type = NULL, *classname = NULL;
+ if(likely(find_object_hash((void*)this, &type, &classname) == 1)) // there is entry in object hash
+ {
+ if(strcmp(type, "Frame") == 0)
+ {
+ FrameAnimator* fa = ((Frame*)this)->GetFrameAnimator();
+ if(fa != NULL)
+ {
+ fa->AddFrameAnimatorEventListener(GetFrameAnimatorEventListener());
+ IsRegisteredFrameAnimatorEventListener = true;
+ }
+ else // frame is not yet constructed
+ {
+ }
+ }
+ }
+ }
+ probeBlockEnd();
+
+ ret = (this->*container_addcontrolp)(control);
+
+ probeBlockStart();
+ if(ret == E_SUCCESS)
+ {
+ IsInTouchMode();
+ control.IsInTouchMode();
+
+ if(isOptionEnabled(OPT_UI))
+ {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_Container__AddControl_const_Control__control_,
+ "p", &control);
+ PACK_COMMON_END(ret, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(&control);
+ FLUSH_LOCAL_BUF();
+ }
+ }
+ probeBlockEnd();
+
+ return ret;
+}
+
+result Container::AddControl(Control* control)
+{
+ typedef result (Container::*methodType)(Control* control);
+ static methodType container_addcontrolp;
+ probeInfo_t probeInfo;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container10AddControlEPNS0_7ControlE, LIBOSP_UIFW, container_addcontrolp);
+
+ probeBlockStart();
+ if(unlikely(IsRegisteredFrameAnimatorEventListener == false))
+ {
+ char *type = NULL, *classname = NULL;
+ if(likely(find_object_hash((void*)this, &type, &classname) == 1)) // there is entry in object hash
+ {
+ if(strcmp(type, "Frame") == 0)
+ {
+ FrameAnimator* fa = ((Frame*)this)->GetFrameAnimator();
+ if(fa != NULL)
+ {
+ fa->AddFrameAnimatorEventListener(GetFrameAnimatorEventListener());
+ IsRegisteredFrameAnimatorEventListener = true;
+ }
+ else // frame is not yet constructed
+ {
+ }
+ }
+ }
+ }
+ probeBlockEnd();
+
+ ret = (this->*container_addcontrolp)(control);
+
+ probeBlockStart();
+ if(ret == E_SUCCESS)
+ {
+ IsInTouchMode();
+ control->IsInTouchMode();
+
+ if(isOptionEnabled(OPT_UI))
+ {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_Container__AddControl_Control__control_,
+ "p", control);
+ PACK_COMMON_END(ret, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(control);
+ FLUSH_LOCAL_BUF();
+ }
+ }
+ probeBlockEnd();
+
+ return ret;
+}
+
+result Container::RemoveControl(const Control &control)
+{
+ typedef result (Container::*methodType)(const Control &control);
+ static methodType container_removecontrolp;
+ probeInfo_t probeInfo;
+ result ret;
+ bool bOption;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container13RemoveControlERKNS0_7ControlE, LIBOSP_UIFW, container_removecontrolp);
+
+ probeBlockStart();
+
+ PREPARE_LOCAL_BUF();
+
+ control.IsInTouchMode();
+
+ if((bOption = isOptionEnabled(OPT_UI)))
+ {
+ setProbePoint(&probeInfo);
+
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_Container__RemoveControl_const_Control__control_,
+ "p", &control);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(&control);
+ }
+ probeBlockEnd();
+
+ ret = (this->*container_removecontrolp)(control);
+
+ probeBlockStart();
+
+ if(bOption)
+ {
+ PACK_RETURN_END(ret);
+ }
+
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ return ret;
+}
+
+result Container::RemoveControl(Control* control)
+{
+ typedef result (Container::*methodType)(Control* control);
+ static methodType container_removecontrolp;
+ probeInfo_t probeInfo;
+ result ret;
+ bool bOption;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container13RemoveControlEPNS0_7ControlE, LIBOSP_UIFW, container_removecontrolp);
+
+ probeBlockStart();
+
+ PREPARE_LOCAL_BUF();
+
+ control->IsInTouchMode();
+
+ if((bOption = isOptionEnabled(OPT_UI)))
+ {
+ setProbePoint(&probeInfo);
+
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_Container__RemoveControl_Control__control_,
+ "p", control);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(control);
+ }
+ probeBlockEnd();
+
+ ret = (this->*container_removecontrolp)(control);
+
+ probeBlockStart();
+
+ if(bOption)
+ {
+ PACK_RETURN_END(ret);
+ }
+
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ return ret;
+}
+
+result Container::RemoveControl(int index)
+{
+ typedef result (Container::*methodType)(int index);
+ static methodType container_removecontrolip;
+ probeInfo_t probeInfo;
+ result ret;
+ bool bOption;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container13RemoveControlEi, LIBOSP_UIFW, container_removecontrolip);
+
+ probeBlockStart();
+
+ PREPARE_LOCAL_BUF();
+
+ Control* pcontrol = GetControl(index);
+ pcontrol->IsInTouchMode();
+
+ if((bOption = isOptionEnabled(OPT_UI)))
+ {
+ setProbePoint(&probeInfo);
+
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_result_Container__RemoveControl_int_index_,
+ "d", index);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(pcontrol);
+ }
+ probeBlockEnd();
+
+ ret = (this->*container_removecontrolip)(index);
+
+ probeBlockStart();
+
+ if(bOption)
+ {
+ PACK_RETURN_END(ret);
+ }
+
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ return ret;
+}
+
+void Container::RemoveAllControls(void)
+{
+ typedef void (Container::*methodType)(void);
+ static methodType container_removeallcontrolp;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui9Container17RemoveAllControlsEv, LIBOSP_UIFW, container_removeallcontrolp);
+
+ probeBlockStart();
+ if(isOptionEnabled(OPT_UI))
+ {
+ Control* pcontrol = NULL;
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_UICONTROL,
+ API_ID_void_Container__RemoveAllControls_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_UICONTROL(this);
+ PACK_UICONTROL(pcontrol);
+ FLUSH_LOCAL_BUF();
+ }
+ probeBlockEnd();
+
+ (this->*container_removeallcontrolp)();
+}
+
+} } // end of namespace Tizen::Ui
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <FIo.h>
+#include "daprobe.h"
+#include "probeinfo.h"
+#include "dahelper.h"
+
+#include "binproto.h"
+
+static enum DaOptions _sopt = OPT_FILE;
+
+namespace Tizen {
+namespace Io {
+
+result File::Construct(const Tizen::Base::String& filePath,
+ const Tizen::Base::String& openMode, bool createParentDirectories) {
+ typedef result (File::*methodType)(const Tizen::Base::String& filePath,
+ const Tizen::Base::String& openMode, bool createParentDirectories);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp_path[50];
+ char temp_mode[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Constructp) {
+ probeBlockStart();
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_b");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Constructp)(filePath, openMode, createParentDirectories);
+
+ if(postBlockBegin(blockresult)) {
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp_path,filePath.GetPointer());
+ WcharToChar(temp_mode,openMode.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode__bool_createParentDirectories_,
+ "ssd", temp_path, temp_mode, createParentDirectories);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Construct(const Tizen::Base::String& filePath,
+ const Tizen::Base::String& openMode) {
+ typedef result (File::*methodType)(const Tizen::Base::String& filePath,
+ const Tizen::Base::String& openMode);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp_path[50];
+ char temp_mode[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if(!Constructp) {
+ probeBlockStart();
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_");
+
+ if(tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Constructp)(filePath, openMode);
+
+ if(postBlockBegin(blockresult)) {
+ WcharToChar(temp_path,filePath.GetPointer());
+ WcharToChar(temp_mode,openMode.GetPointer());
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode_,
+ "ss", temp_path, temp_mode);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp_path);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Construct(const Tizen::Base::String& filePath,
+ const char *pOpenMode) {
+ typedef result (File::*methodType)(const Tizen::Base::String& filePath,
+ const char *pOpenMode);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if(!Constructp) {
+ probeBlockStart();
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKc");
+
+ if(tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Constructp)(filePath, pOpenMode);
+
+ if(postBlockBegin(blockresult)) {
+
+ WcharToChar(temp,filePath.GetPointer());
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode_,
+ "sp", temp, pOpenMode);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Construct(const Tizen::Base::String& filePath,
+ const char *pOpenMode,
+ const Tizen::Base::ByteBuffer& secretKey) {
+ typedef result (File::*methodType)(const Tizen::Base::String& filePath,
+ const char *pOpenMode,
+ const Tizen::Base::ByteBuffer& secretKey);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if(!Constructp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKcRKNS2_10ByteBufferE");
+
+ if(tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Constructp)(filePath, pOpenMode, secretKey);
+
+ if(postBlockBegin(blockresult)) {
+ WcharToChar(temp,filePath.GetPointer());
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode__const_Tizen__Base__ByteBuffer__secretKey_,
+ "sp", temp, pOpenMode);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OPEN, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Flush(void) {
+ typedef result (File::*methodType)(void);
+ static methodType Flushp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Flushp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5FlushEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Flush");
+ exit(0);
+ }
+
+ memcpy(&Flushp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Flushp)();
+
+ if(postBlockBegin(blockresult)) {
+ WcharToChar(temp,this->GetName().GetPointer());
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Flush_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+Tizen::Base::String File::GetName(void) const{
+ typedef Tizen::Base::String (File::*methodType)(void) const;
+ static methodType GetNamep = 0;
+ Tizen::Base::String ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!GetNamep) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File7GetNameEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::GetName");
+ exit(0);
+ }
+
+ memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*GetNamep)();
+ result res = GetLastResult();
+
+ if(postBlockBegin(blockresult)) {
+ WcharToChar(temp,ret.GetPointer());
+ if (E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_Tizen__Base__String_File__GetName_void__const,
+ "", 0);
+ PACK_COMMON_END(ret.GetPointer(), res, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Read(Tizen::Base::String& buffer) {
+ typedef result (File::*methodType)(Tizen::Base::String & buffer);
+ static methodType Readp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ int nRead = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Readp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File4ReadERNS_4Base6StringE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Read");
+ exit(0);
+ }
+
+ memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Read_Tizen__Base__String__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Readp)(buffer);
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+ nRead = buffer.GetLength();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Read_Tizen__Base__String__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Read(Tizen::Base::ByteBuffer& buffer) {
+ typedef result (File::*methodType)(Tizen::Base::ByteBuffer & buffer);
+ static methodType Readp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ int nRead = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Readp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File4ReadERNS_4Base10ByteBufferE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Read");
+ exit(0);
+ }
+
+ memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Readp)(buffer);
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+ buffer.GetInt(nRead);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+int File::Read(void *buffer, int length) {
+ typedef int (File::*methodType)(void *buffer, int length);
+ static methodType Readp = 0;
+ int ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ int nRead = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Readp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File4ReadEPvi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Read");
+ exit(0);
+ }
+
+ memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ nRead = Tell();
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_int_File__Read_void__buffer__int_length_,
+ "xd", (unsigned long)buffer, length);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_READ_START, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Readp)(buffer, length);
+ result res = GetLastResult();
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+ nRead = Tell() - nRead;
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_int_File__Read_void__buffer__int_length_,
+ "xd", (unsigned long)buffer, length);
+ PACK_COMMON_END(ret, res, blockresult);
+ PACK_RESOURCE(nRead, (unsigned long)this, FD_API_READ_END, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Seek(FileSeekPosition position, long offset) {
+ typedef result (File::*methodType)(FileSeekPosition position, long offset);
+ static methodType Seekp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ char temp_pos[50];
+ FileAttributes attr;
+ long long size;
+
+ if (!Seekp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT,
+ "_ZN5Tizen2Io4File4SeekENS0_16FileSeekPositionEl");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Seek");
+ exit(0);
+ }
+
+ memcpy(&Seekp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Seekp)(position, offset);
+
+ if(postBlockBegin(blockresult)) {
+
+ if(FILESEEKPOSITION_BEGIN == position)
+ strcpy(temp_pos, "FILESEEKPOSITION_BEGIN");
+ else if(FILESEEKPOSITION_CURRENT == position)
+ strcpy(temp_pos, "FILESEEKPOSITION_CURRENT");
+ else if(FILESEEKPOSITION_END == position)
+ strcpy(temp_pos, "FILESEEKPOSITION_END");
+ else
+
+ sprintf(temp_pos, "%d", position);
+
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Seek_FileSeekPosition_position__long_offset_,
+ "sx", temp_pos, offset);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+int File::Tell(void) const {
+ typedef int (File::*methodType)(void) const;
+ static methodType Tellp = 0;
+ int ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Tellp) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File4TellEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Tell");
+ exit(0);
+ }
+
+ memcpy(&Tellp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Tellp)();
+ result res = GetLastResult();
+
+ if(postBlockBegin(blockresult)) {
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp,this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_int_File__Tell_void__const,
+ "", 0);
+ PACK_COMMON_END(ret, res, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Truncate(int length) {
+ typedef result (File::*methodType)(int length);
+ static methodType Truncatep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Truncatep) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File8TruncateEi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Truncate");
+ exit(0);
+ }
+
+ memcpy(&Truncatep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+
+ ret = (this->*Truncatep)(length);
+
+ if(postBlockBegin(blockresult)) {
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp,this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Truncate_int_length_,
+ "d", length);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_OTHER, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Write(const void *buffer, int length) {
+ typedef result (File::*methodType)(const void *buffer, int length);
+ static methodType Writep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ int nWritten = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Writep) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteEPKvi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Write");
+ exit(0);
+ }
+
+ memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ nWritten = Tell();
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_void__buffer__int_length_,
+ "xd", (unsigned long)buffer, length);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Writep)(buffer, length);
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp, this->GetName().GetPointer());
+ nWritten = Tell() - nWritten;
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_void__buffer__int_length_,
+ "xd", (unsigned long)buffer, length);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Write(const Tizen::Base::ByteBuffer& buffer) {
+ typedef result (File::*methodType)(const Tizen::Base::ByteBuffer& buffer);
+ static methodType Writep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp[50];
+ int nWritten = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Writep) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base10ByteBufferE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Write");
+ exit(0);
+ }
+
+ memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ nWritten = Tell();
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp,this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Writep)(buffer);
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp,this->GetName().GetPointer());
+ nWritten = Tell() - nWritten;
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
+ "x", (unsigned long)&buffer);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+
+ return ret;
+}
+
+result File::Write(const Tizen::Base::String& buffer) {
+ typedef result (File::*methodType)(const Tizen::Base::String& buffer);
+ static methodType Writep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ char temp_buf[50];
+ char temp_path[50];
+ int nWritten = 0;
+ FileAttributes attr;
+ long long size = 0L;
+
+ if (!Writep) {
+ probeBlockStart();
+
+ void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base6StringE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::Write");
+ exit(0);
+ }
+
+ memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ nWritten = Tell();
+ WcharToChar(temp_buf, buffer.GetPointer());
+ if(E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ size = attr.GetFileSize();
+ WcharToChar(temp_path, this->GetName().GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
+ "s", temp_buf);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_WRITE_START, size, temp_path);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+
+ ret = (this->*Writep)(buffer);
+
+ if(postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+ WcharToChar(temp_buf,buffer.GetPointer());
+ WcharToChar(temp_path,this->GetName().GetPointer());
+ nWritten = Tell() - nWritten;
+ if(E_SUCCESS == File::GetAttributes(this->GetName(),attr))
+ size = attr.GetFileSize();
+ nWritten = Tell() - nWritten;
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
+ "s", temp_buf);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_RESOURCE(nWritten, (unsigned long)this, FD_API_WRITE_END, size, temp_path);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+File::~File(void) {
+ typedef void (File::*methodType)();
+ static methodType FileDp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ // FileAttributes attr;
+ long long size = 0L;
+
+ if (!FileDp) {
+ probeBlockStart();
+
+ tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4FileD1Ev");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Io::File::~File");
+ exit(0);
+ }
+
+ memcpy(&FileDp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+// error occur if File class was failed to contruct
+ // if (ret == E_SUCCESS &&
+ // E_SUCCESS == File::GetAttributes(this->GetName(), attr))
+ // size = attr.GetFileSize();
+ preBlockEnd();
+ }
+
+ (this->*FileDp)();
+
+ if(postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
+ API_ID_File___File_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_RESOURCE(0, (unsigned long)this, FD_API_CLOSE, size, "");
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+}
+
+
+// static methods
+//static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
+// const Tizen::Base::String &secureFilePath) {
+// typedef result (File::*methodType)(
+// const Tizen::Base::String &plainFilePath,
+// const Tizen::Base::String &secureFilePath);
+// static methodType ConvertToSecureFilep = 0;
+//
+//}
+//static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
+// const Tizen::Base::String &secureFilePath,
+// const Tizen::Base::ByteBuffer& key) {
+// typedef result (File::*methodType)(
+// const Tizen::Base::String &plainFilePath,
+// const Tizen::Base::String &secureFilePath,
+// const Tizen::Base::ByteBuffer& key);
+// static methodType ConvertToSecureFilep = 0;
+//
+//}
+//static result File::Copy(const Tizen::Base::String& srcFilePath,
+// const Tizen::Base::String& destFilePath, bool failIfExist) {
+// typedef result (File::*methodType)(const Tizen::Base::String& srcFilePath,
+// const Tizen::Base::String& destFilePath, bool failIfExist);
+// static methodType Copyp = 0;
+//
+//}
+//static result File::GetAttributes(const Tizen::Base::String& filePath,
+// FileAttributes& attribute) {
+// typedef result (File::*methodType)(const Tizen::Base::String& filePath,
+// FileAttributes& attribute);
+// static methodType GetAttributesp = 0;
+//
+//}
+//static const Tizen::Base::String File::GetFileExtension(
+// const Tizen::Base::String& filePath) {
+// typedef const Tizen::Base::String (File::*methodType)(
+// const Tizen::Base::String& filePath);
+// static methodType GetFileExtensionp = 0;
+//
+//}
+//const Tizen::Base::String File::GetFileName(
+// const Tizen::Base::String& filePath) {
+// typedef const Tizen::Base::String (File::*methodType)(
+// const Tizen::Base::String& filePath);
+// static methodType GetFileNamep = 0;
+// Tizen::Base::String ret;
+//
+// if (!GetFileNamep) {
+// probeBlockStart();
+// void *tmpPtr = dlsym(RTLD_NEXT,
+// "_ZN5Tizen2Io4File11GetFileNameERKNS_4Base6StringE");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Tizen::Io::File::GetFileName");
+// exit(0);
+// }
+//
+// memcpy(&GetFileNamep, &tmpPtr, sizeof(tmpPtr));
+// probeBlockEnd();
+// }
+// ret = (File::(*GetFileNamep))(filePath);
+//
+//return ret;
+//}
+//static bool File::IsEncrypted(const Tizen::Base::String &filePath) {
+// typedef bool (File::*methodType)(const Tizen::Base::String &filePath);
+// static methodType IsEncryptedp = 0;
+//
+//}
+//static bool File::IsFileExist(const Tizen::Base::String& filePath) {
+// typedef bool (File::*methodType)(const Tizen::Base::String& filePath);
+// static methodType IsFileExistp = 0;
+//
+//}
+//static result File::Move(const Tizen::Base::String& oldFilePath,
+// const Tizen::Base::String& newFilePath) {
+// typedef result (File::*methodType)(const Tizen::Base::String& oldFilePath,
+// const Tizen::Base::String& newFilePath);
+// static methodType Movep = 0;
+//
+//}
+//static result File::Remove(const Tizen::Base::String& filePath) {
+// typedef result (File::*methodType)(const Tizen::Base::String& filePath);
+// static methodType Removep = 0;
+//
+//}
+
+}
+}
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <app.h>
+#include <Ecore.h>
+#include <FApp.h>
+#include <FBase.h>
+
+#include "daprobe.h"
+#include "dahelper.h"
+#include "probeinfo.h"
+#include "tizen_probe.h"
+
+#include "binproto.h"
+extern "C"
+{
+Ecore_Event_Handler* register_orientation_event_listener();
+void unregister_orientation_event_listener(Ecore_Event_Handler* handler);
+}
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+namespace Tizen { namespace App
+{
+
+//class _IAppImpl
+//{
+// virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation) = 0;
+//};
+
+class _AppImpl
+{
+ static void OnTerminate(void* user_data);
+// static void OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data);
+};
+
+class _UiAppImpl
+// : public Tizen::Base::Object
+// , public _IAppImpl
+{
+ void OnBackground(void);
+ void OnForeground(void);
+// virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation);
+};
+
+class _AppInfo
+{
+ static void SetAppState(AppState appstate);
+};
+
+result UiApp::Execute(UiAppInstanceFactory pUiAppFactory,
+ const IList* pArguments)
+{
+ typedef result (*methodType)(UiAppInstanceFactory pFactory, const IList* pArgs);
+ static methodType uiapp_executep;
+ probeInfo_t probeInfo;
+ int __attribute__((unused)) ret;
+ Ecore_Event_Handler* handler;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App5UiApp7ExecuteEPFPS1_vEPKNS_4Base10Collection5IListE,
+ LIBOSP_UIFW, uiapp_executep);
+
+ probeBlockStart();
+ handler = register_orientation_event_listener();
+ if(gTraceInfo.exec_map.map_start == NULL)
+ {
+ get_map_address(CALLER_ADDRESS, &(gTraceInfo.exec_map.map_start),
+ &(gTraceInfo.exec_map.map_end));
+ }
+ setProbePoint(&probeInfo);
+ probeBlockEnd();
+
+ ret = uiapp_executep(pUiAppFactory, pArguments);
+
+ probeBlockStart();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
+ API_ID_result_UiApp__Execute_UiAppInstanceFactory_pUiAppFactory__const_IList__pArguments_,
+ "pp", pUiAppFactory, pArguments);
+ PACK_COMMON_END(ret, 0, 0);
+ FLUSH_LOCAL_BUF();
+
+ unregister_orientation_event_listener(handler);
+ probeBlockEnd();
+
+ return ret;
+}
+
+void _AppImpl::OnTerminate(void* user_data)
+{
+ typedef void (*methodType)(void*);
+ static methodType appimpl_onterminatep;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App8_AppImpl11OnTerminateEPv, LIBOSP_APPFW, appimpl_onterminatep);
+
+ probeBlockStart();
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
+ API_ID_void__AppImpl__OnTerminate_void__user_data_,
+ "p", user_data);
+ PACK_COMMON_END(0, 0, 0);
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ appimpl_onterminatep(user_data);
+}
+/*
+void _AppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data)
+{
+ typedef void (*methodType)(app_device_orientation_e, void*);
+ static methodType appimpl_ondeviceorientationchangedp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App8_AppImpl26OnDeviceOrientationChangedE24app_device_orientation_ePv,
+ LIBOSP_APPFW, appimpl_ondeviceorientationchangedp);
+
+ probeBlockStart();
+ on_orientation_changed((int)orientation, false);
+ probeBlockEnd();
+
+ appimpl_ondeviceorientationchangedp(orientation, user_data);
+}
+*/
+void _AppInfo::SetAppState(AppState appState)
+{
+ typedef void (*methodType)(AppState appstate);
+ static methodType appinfo_setappstatep;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App8_AppInfo11SetAppStateENS0_8AppStateE, LIBOSP_APPFW, appinfo_setappstatep);
+
+ probeBlockStart();
+ if(appState == RUNNING)
+ {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
+ API_ID_void__AppInfo__SetAppState_AppState_appState_,
+ "p", appState);
+ PACK_COMMON_END(0, 0, 0);
+ FLUSH_LOCAL_BUF();
+ }
+ probeBlockEnd();
+
+ appinfo_setappstatep(appState);
+}
+
+void _UiAppImpl::OnBackground(void)
+{
+ typedef void (_UiAppImpl::*methodType)(void);
+ static methodType uiappimpl_onbackgroundp;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App10_UiAppImpl12OnBackgroundEv, LIBOSP_UIFW, uiappimpl_onbackgroundp);
+
+ probeBlockStart();
+ SCREENSHOT_LOCK();
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
+ API_ID_void__UiAppImpl__OnBackground_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, 0);
+ FLUSH_LOCAL_BUF();
+
+ probeBlockEnd();
+
+ (this->*uiappimpl_onbackgroundp)();
+}
+
+void _UiAppImpl::OnForeground(void)
+{
+ typedef void (_UiAppImpl::*methodType)(void);
+ static methodType uiappimpl_onforegroundp;
+ probeInfo_t probeInfo;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen3App10_UiAppImpl12OnForegroundEv, LIBOSP_UIFW, uiappimpl_onforegroundp);
+
+ probeBlockStart();
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_LIFECYCLE,
+ API_ID_void__UiAppImpl__OnForeground_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, 0);
+ FLUSH_LOCAL_BUF();
+
+ SCREENSHOT_UNLOCK();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ (this->*uiappimpl_onforegroundp)();
+}
+
+/*
+void _UiAppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation)
+{
+ typedef void (*methodType)(_UiAppImpl* th, app_device_orientation_e orientation);
+ static methodType uiappimpl_ondeviceorientationchangedp;
+
+ GET_REAL_FUNC_TIZEN(_ZThn4_N5Tizen3App10_UiAppImpl26OnDeviceOrientationChangedE24app_device_orientation_e,
+ LIBOSP_UIFW, uiappimpl_ondeviceorientationchangedp);
+
+ probeBlockStart();
+ on_orientation_changed((int)orientation, false);
+ probeBlockEnd();
+
+ uiappimpl_ondeviceorientationchangedp(static_cast<_UiAppImpl*>(dynamic_cast<_IAppImpl*>(this)), orientation);
+}
+*/
+} } // end of namespace
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <FBase.h>
+#include <string.h>
+#include "daprobe.h"
+#include "probeinfo.h"
+#include "dahelper.h"
+
+#include "binproto.h"
+
+static enum DaOptions _sopt = OPT_THREAD;
+
+namespace Tizen {
+namespace Base {
+namespace Runtime {
+
+result Mutex::Create(void) {
+ typedef result
+ (Mutex::*methodType)(void);
+ static methodType Createp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Createp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
+ exit(0);
+ }
+
+ memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Createp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__Create_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Mutex::Create(const Tizen::Base::String& name) {
+ typedef result
+ (Mutex::*methodType)(const Tizen::Base::String& name);
+ static methodType Createp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Createp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex6CreateERKNS0_6StringE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Mutex::Create");
+ exit(0);
+ }
+
+ memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Createp)(name);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, name.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__Create_const_Tizen__Base__String__name_,
+ "s", temp);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Mutex::Release(void) {
+ typedef result
+ (Mutex::*methodType)(void);
+ static methodType Releasep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Releasep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7ReleaseEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Mutex::Release");
+ exit(0);
+ }
+
+ memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Releasep)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__Release_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_RELEASE);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Mutex::Acquire(void) {
+ typedef result
+ (Mutex::*methodType)(void);
+ static methodType Acquirep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Acquirep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex7AcquireEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Mutex::Acquire");
+ exit(0);
+ }
+
+ memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__Acquire_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_ACQUIRE_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Acquirep)();
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__Acquire_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_ACQUIRE_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Mutex::TryToAcquire(void) {
+ typedef result
+ (Mutex::*methodType)(void);
+ static methodType TryToAcquirep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!TryToAcquirep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime5Mutex12TryToAcquireEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Mutex::TryToAcquire");
+ exit(0);
+ }
+
+ memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*TryToAcquirep)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Mutex__TryToAcquire_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MUTEX, SYNC_API_TRY_ACQUIRE);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+
+result Semaphore::Create(int count) {
+ typedef result
+ (Semaphore::*methodType)(int count);
+ static methodType Createp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Createp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateEi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
+ exit(0);
+ }
+
+ memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Createp)(count);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__Create_int_count_,
+ "d", count);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Semaphore::Create(const Tizen::Base::String& name, int count) {
+ typedef result
+ (Semaphore::*methodType)(const Tizen::Base::String& name, int count);
+ static methodType Createp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Createp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore6CreateERKNS0_6StringEi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Create");
+ exit(0);
+ }
+
+ memcpy(&Createp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Createp)(name, count);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, name.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__Create_const_Tizen__Base__String__name__int_count_,
+ "sd", temp, count);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+
+}
+
+result Semaphore::Acquire(long timeout) {
+ typedef result
+ (Semaphore::*methodType)(long timeout);
+ static methodType Acquirep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Acquirep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7AcquireEl");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Acquire");
+ exit(0);
+ }
+
+ memcpy(&Acquirep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__Acquire_long_timeout_,
+ "x", timeout);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_ACQUIRE_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Acquirep)(timeout);
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__Acquire_long_timeout_,
+ "x", timeout);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_ACQUIRE_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Semaphore::TryToAcquire(void) {
+ typedef result
+ (Semaphore::*methodType)(void);
+ static methodType TryToAcquirep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!TryToAcquirep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore12TryToAcquireEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Semaphore::TryToAcquire");
+ exit(0);
+ }
+
+ memcpy(&TryToAcquirep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*TryToAcquirep)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__TryToAcquire_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_TRY_ACQUIRE);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Semaphore::Release(void) {
+ typedef result
+ (Semaphore::*methodType)(void);
+ static methodType Releasep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Releasep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime9Semaphore7ReleaseEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Semaphore::Release");
+ exit(0);
+ }
+
+ memcpy(&Releasep, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Releasep)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Semaphore__Release_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_SEMAPHORE, SYNC_API_RELEASE);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+
+result Monitor::Construct(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9ConstructEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Construct_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Monitor::Enter(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType Enterp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Enterp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor5EnterEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::Enter");
+ exit(0);
+ }
+
+ memcpy(&Enterp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Enter_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_ACQUIRE_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Enterp)();
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Enter_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_ACQUIRE_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Monitor::Exit(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType Exitp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Exitp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4ExitEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::Exit");
+ exit(0);
+ }
+
+ memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Exitp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Exit_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_RELEASE);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Monitor::Wait(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType Waitp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Waitp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor4WaitEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::Wait");
+ exit(0);
+ }
+
+ memcpy(&Waitp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Wait_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_COND_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Waitp)();
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Wait_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_COND_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Monitor::Notify(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType Notifyp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Notifyp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor6NotifyEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::Notify");
+ exit(0);
+ }
+
+ memcpy(&Notifyp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Notifyp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__Notify_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_NOTIFY);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Monitor::NotifyAll(void) {
+ typedef result
+ (Monitor::*methodType)(void);
+ static methodType NotifyAllp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!NotifyAllp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime7Monitor9NotifyAllEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Monitor::NotifyAll");
+ exit(0);
+ }
+
+ memcpy(&NotifyAllp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*NotifyAllp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SYNC,
+ API_ID_result_Monitor__NotifyAll_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_SYNC((unsigned int) this, SYNC_TIZEN_MONITOR, SYNC_API_NOTIFY_ALL);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+}
+}
+}
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (Thread::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Yeongtaik Byeon <yeongtaik.byeon@samsung.com>
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <FBase.h>
+#include "daprobe.h"
+#include "probeinfo.h"
+#include "dahelper.h"
+
+#include "binproto.h"
+
+static enum DaOptions _sopt = OPT_THREAD;
+
+namespace Tizen {
+namespace Base {
+namespace Runtime {
+
+class _ThreadImpl {
+//public:
+// virtual result Stop(void);
+protected:
+// virtual result Finalize(void);
+ const Thread* GetThread(void) const;
+private:
+ static void* ThreadProc(void* pParam);
+//protected:
+// Thread* _pThread;
+};
+//const Thread*
+//_ThreadImpl::GetThread(void) const
+//{
+// typedef const Thread*
+// (_ThreadImpl::*methodType)(void) const;
+// static methodType GetThreadp = 0;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = false;
+// void *tmpPtr;
+//
+// if (!GetThreadp) {
+// probeBlockStart();
+// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
+// if (lib_handle == NULL) {
+// perror("dlopen failed : libosp-appfw.so");
+// exit(0);
+// }
+// tmpPtr = dlsym(lib_handle, "_ZNK5Tizen4Base7Runtime11_ThreadImpl9GetThreadEv");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::GetThreadp");
+// exit(0);
+// }
+//
+// memcpy(&GetThreadp, &tmpPtr, sizeof(tmpPtr));
+//
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+// //
+// const Thread* ret = (this->*GetThreadp)();
+// result res = GetLastResult();
+// //
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "_ThreadImpl::GetThread", probeInfo.currentTime,
+// probeInfo.pID, probeInfo.tID);
+//
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,0x%x",ret);
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+// log.length += sprintf(log.data + log.length,
+// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", res,blockresult,
+// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+// return ret;
+//}
+
+void*
+_ThreadImpl::ThreadProc(void* params) {
+ typedef void*
+ (*methodType)(void*);
+ static methodType ThreadProcp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = false;
+ void *tmpPtr;
+
+ if (!ThreadProcp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime11_ThreadImpl10ThreadProcEPv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::ThreadProc");
+ exit(0);
+ }
+
+ memcpy(&ThreadProcp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ _ThreadImpl* pSelf =(_ThreadImpl*)params;
+ const Thread* pThread = NULL;
+ if(pSelf != null){
+ pThread = pSelf->GetThread();
+ }
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_void___ThreadImpl__ThreadProc_void__params_,
+ "p", params);
+ PACK_COMMON_END((unsigned int)pSelf, 0, blockresult);
+ PACK_THREAD((unsigned int)pThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_INTERNAL_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ // all probe should be reachable inside thread start_routine (user implemented Thread::Run)
+ probingEnd();
+ (ThreadProcp)(params);
+ probingStart();
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ _ThreadImpl* pSelf =(_ThreadImpl*)params;
+ const Thread* pThread = NULL;
+ if(pSelf != null){
+ pThread = pSelf->GetThread();
+ }
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_void___ThreadImpl__ThreadProc_void__params_,
+ "p", params);
+ PACK_COMMON_END((unsigned int)pSelf, 0, blockresult);
+ PACK_THREAD((unsigned int)pThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_INTERNAL_STOP);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return null;
+}
+//result _ThreadImpl::Stop(void) {
+// typedef result
+// (_ThreadImpl::*methodType)(void);
+// static methodType Stopp = 0;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = true;
+// void *tmpPtr;
+//
+// if (!Stopp) {
+// probeBlockStart();
+// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
+// if (lib_handle == NULL) {
+// perror("dlopen failed : libosp-appfw.so");
+// exit(0);
+// }
+// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime11_ThreadImpl4StopEv");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::Stopp");
+// exit(0);
+// }
+//
+// memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
+//
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+// //
+// result ret= (this->*Stopp)();
+// //
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "_ThreadImpl::Stop", probeInfo.currentTime,
+// probeInfo.pID, probeInfo.tID);
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+// log.length += sprintf(log.data + log.length,
+// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", ret, blockresult,
+// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_CLOSE);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+// return ret;
+//}
+//
+//result _ThreadImpl::Finalize(void) {
+// typedef result
+// (_ThreadImpl::*methodType)(void);
+// static methodType Finalizep = 0;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = false;
+// void *tmpPtr;
+//
+// if (!Finalizep) {
+// probeBlockStart();
+// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
+// if (lib_handle == NULL) {
+// perror("dlopen failed : libosp-appfw.so");
+// exit(0);
+// }
+// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime11_ThreadImpl8FinalizeEv");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Tizen::Base::Runtime::_ThreadImpl::Finalizep");
+// exit(0);
+// }
+//
+// memcpy(&Finalizep, &tmpPtr, sizeof(tmpPtr));
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+// //
+// result ret= (this->*Finalizep)();
+// //
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "_ThreadImpl::Finalize", probeInfo.currentTime,
+// probeInfo.pID, probeInfo.tID);
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,%ld", ret);
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+// log.length += sprintf(log.data + log.length,
+// "`,0`,%ld`,%d`,0`,%u`,0x%x`,%d`,%d`,`,", ret, blockresult,
+// (unsigned int)CALLER_ADDRESS, (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_CLOSE);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+// return ret;
+//}
+//Thread::Thread(void) {
+// typedef void (Thread::*methodType)();
+// static methodType Threadp = 0;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = true;
+// void *tmpPtr;
+//
+// if (!Threadp) {
+// probeBlockStart();
+//
+// tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen4Base7Runtime6ThreadC1Ev");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data,"dlsym failed : Tizen::Base::Runtime::Thread::Thread");
+// perror("dlsym failed : Tizen::Base::Runtime::Thread::Thread");
+// printLog(&log, MSG_MSG);
+// return;
+// }
+//
+// memcpy(&Threadp, &tmpPtr, sizeof(tmpPtr));
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+////
+// (this->*Threadp)();
+////
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "Thread::Thread", probeInfo.currentTime,
+// probeInfo.pID, probeInfo.tID);
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,");
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+//
+// log.length += sprintf(log.data + log.length,
+// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
+// (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_OPEN);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+//}
+//
+//Thread::~Thread(void) {
+// typedef void (Thread::*methodType)();
+// static methodType ThreadDp = 0;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = true;
+// void *tmpPtr;
+//
+// if (!ThreadDp) {
+// probeBlockStart();
+//
+// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
+// if (lib_handle == NULL) {
+// perror("dlopen failed : libosp-appfw.so");
+// exit(0);
+// }
+// tmpPtr = dlsym(lib_handle, "_ZN5Tizen4Base7Runtime6ThreadD0Ev");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Tizen::Base::Runtime::Thread::~Thread");
+// exit(0);
+// }
+//
+// memcpy(&ThreadDp, &tmpPtr, sizeof(tmpPtr));
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+////
+// (this->*ThreadDp)();
+////
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "Thread::~Thread", probeInfo.currentTime,
+// probeInfo.pID, probeInfo.tID);
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,");
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+//
+// log.length += sprintf(log.data + log.length,
+// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
+// (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_CLOSE);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+//}
+result Thread::Sleep(long milliSeconds) {
+ typedef result
+ (*methodType)(long);
+ static methodType Sleepp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Sleepp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5SleepEl");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Sleep");
+ exit(0);
+ }
+
+ memcpy(&Sleepp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ Thread *currentThread;
+ currentThread = GetCurrentThread();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Sleep_long_milliSeconds_,
+ "x", milliSeconds);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_THREAD((unsigned int)currentThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ result ret = (Sleepp)(milliSeconds);
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ Thread *currentThread;
+ currentThread = GetCurrentThread();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Yield_void_,
+ "x", milliSeconds);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int)currentThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+Thread* Thread::GetCurrentThread(void) {
+ typedef Thread*
+ (*methodType)(void);
+ static methodType GetCurrentThreadp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!GetCurrentThreadp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread16GetCurrentThreadEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::GetCurrentThread");
+ exit(0);
+ }
+
+ memcpy(&GetCurrentThreadp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ Thread *currentThread = (GetCurrentThreadp)();
+ result res = GetLastResult();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_Thread__Thread__GetCurrentThread_void_,
+ "", 0);
+ PACK_COMMON_END((unsigned int)currentThread, res, blockresult);
+ PACK_THREAD((unsigned int)currentThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return currentThread;
+}
+
+result Thread::Yield(void) {
+ typedef result
+ (*methodType)(void);
+ static methodType Yieldp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Yieldp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5YieldEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Yield");
+ exit(0);
+ }
+
+ memcpy(&Yieldp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ result ret = (Yieldp)();
+ //
+ if (postBlockBegin(blockresult)) {
+ Thread *currentThread;
+ currentThread = GetCurrentThread();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Yield_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int)currentThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Thread::Exit(int exitCode) {
+ typedef result
+ (*methodType)(int exitCode);
+ static methodType Exitp = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Exitp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4ExitEi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Exit");
+ exit(0);
+ }
+
+ memcpy(&Exitp, &tmpPtr, sizeof(tmpPtr));
+
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ Thread *currentThread;
+ currentThread = GetCurrentThread();
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Exit_int_exitCode_,
+ "d", exitCode);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_THREAD((unsigned int)currentThread, THREAD_TIZENTHREAD_WORKER, THREAD_API_EXIT);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ result ret = (Exitp)(exitCode);
+ //
+ return ret;
+}
+
+result Thread::Construct(ThreadType threadType, long stackSize,
+ ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(ThreadType threadType, long stackSize,
+ ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructENS1_10ThreadTypeElNS1_14ThreadPriorityE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(threadType, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_ThreadType_threadType__long_stackSize__ThreadPriority_priority_,
+ "dxd", threadType, stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Construct(long stackSize, ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(long stackSize, ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructElNS1_14ThreadPriorityE");
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_long_stackSize__ThreadPriority_priority_,
+ "xd", stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Construct(const Tizen::Base::String &name, long stackSize,
+ ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(const Tizen::Base::String &name, long stackSize,
+ ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(name, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_const_Tizen__Base__String__name__long_stackSize__ThreadPriority_priority_,
+ "sxd", temp, stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Construct(const Tizen::Base::String &name, ThreadType threadType,
+ long stackSize, ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(const Tizen::Base::String &name, ThreadType threadType,
+ long stackSize, ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringENS1_10ThreadTypeElNS1_14ThreadPriorityE");
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(name, threadType, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, name.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_const_Tizen__Base__String__name__ThreadType_threadType__long_stackSize__ThreadPriority_priority_,
+ "sdxd", temp, threadType, stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Construct(IRunnable &target, long stackSize,
+ ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(IRunnable &target, long stackSize,
+ ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructERNS1_9IRunnableElNS1_14ThreadPriorityE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(target, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_IRunnable__target__long_stackSize__ThreadPriority_priority_,
+ "xxd", (unsigned int) &target, stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Construct(const Tizen::Base::String &name, IRunnable &target,
+ long stackSize, ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(const Tizen::Base::String &name, IRunnable &target,
+ long stackSize, ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime6Thread9ConstructERKNS0_6StringERNS1_9IRunnableElNS1_14ThreadPriorityE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(name, target, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, name.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Construct_const_Tizen__Base__String__name__IRunnable__target__long_stackSize__ThreadPriority_priority_,
+ "sxxd", temp, (unsigned int) &target, stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Thread::GetExitCode(int &exitCode) const {
+ typedef result
+ (Thread::*methodType)(int &exitCode) const;
+ static methodType GetExitCodep = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+// int exitOld = exitCode;
+
+ if (!GetExitCodep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
+ "_ZNK5Tizen4Base7Runtime6Thread11GetExitCodeERi");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::GetExitCode");
+ exit(0);
+ }
+
+ memcpy(&GetExitCodep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*GetExitCodep)(exitCode);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__GetExitCode_int__exitCode__const,
+ "d", exitCode);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+const Tizen::Base::String & Thread::GetName(void) const {
+ typedef const Tizen::Base::String &
+ (Thread::*methodType)(void) const;
+ static methodType GetNamep = 0;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!GetNamep) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZNK5Tizen4Base7Runtime6Thread7GetNameEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::GetName");
+ exit(0);
+ }
+
+ memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ const Tizen::Base::String& ret = (this->*GetNamep)();
+ result res = GetLastResult();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, ret.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_const_Tizen__Base__String___Thread__GetName_void__const,
+ "", 0);
+ PACK_COMMON_END(ret.GetPointer(), res, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result Thread::Join(void) {
+ typedef result
+ (Thread::*methodType)(void);
+ static methodType Joinp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Joinp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4JoinEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Join");
+ exit(0);
+ }
+
+ memcpy(&Joinp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Join_void_,
+ "", 0);
+ PACK_COMMON_END(0, 0, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_WAIT_START);
+ FLUSH_LOCAL_BUF();
+
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Joinp)();
+ //
+ if (postBlockBegin(blockresult)) {
+ setProbePoint(&probeInfo);
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Join_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_WAIT_END);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+//Tizen::Base::Object * Thread::Run(void) {
+// typedef Tizen::Base::Object * (Thread::*methodType)(void);
+// static methodType Runp = 0;
+// Tizen::Base::Object * ret;
+// probeInfo_t probeInfo;
+// log_t log;
+// int blockresult;
+// bool bfiltering = true;
+// void *tmpPtr;
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "call Thread::Run");
+// printLog(&log, MSG_MSG);
+// return null;
+// if (!Runp) {
+// probeBlockStart();
+// void* lib_handle = dlopen("libosp-appfw.so", RTLD_LAZY);
+// if (lib_handle == NULL) {
+// perror("dlopen failed : libosp-appfw.so");
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "dlopen failed :libosp-appfw.so");
+// printLog(&log, MSG_MSG);
+// return null;
+// }
+// tmpPtr =
+// dlsym(
+// RTLD_NEXT,
+// "_ZN5Tizen4Base7Runtime6Thread3RunEv");
+//
+// if (tmpPtr == NULL || dlerror() != NULL) {
+// perror("dlsym failed : Thread::Run");
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "dlsym failed : Thread::Run");
+// printLog(&log, MSG_MSG);
+// return null;
+// }
+//
+// memcpy(&Runp, &tmpPtr, sizeof(tmpPtr));
+// probeBlockEnd();
+// }
+//
+// if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+// setProbePoint(&probeInfo);
+// preBlockEnd();
+// }
+// //
+// ret = (this->*Runp)();
+// //
+// if (postBlockBegin(blockresult)) {
+// log.type = 0;
+// log.length = 0;
+// log.data[0] = '\0';
+// log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", LC_THREAD,
+// probeInfo.eventIndex, "Thread::Run",
+// probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
+// //Input,ret
+// log.length += sprintf(log.data + log.length, "`,`,0x%x",(unsigned int)ret;
+// //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
+//
+//
+// log.length += sprintf(log.data + log.length,
+// "`,0`,0`,%d`,0`,0x%x`,%d`,%d`,`,", blockresult,
+// (unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_OTHER);
+// //callstack
+// log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
+// getBacktraceString(&log, 4096 - log.length - 17);
+// log.length += sprintf(log.data + log.length, "`,callstack_end");
+//
+// printLog(&log, MSG_LOG);
+// postBlockEnd();
+// }
+// return ret;
+//}
+
+result Thread::Start(void) {
+ typedef result (Thread::*methodType)(void);
+ static methodType Startp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Startp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread5StartEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Start");
+ exit(0);
+ }
+
+ memcpy(&Startp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Startp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Start_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_START);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+result Thread::Stop(void) {
+ typedef result (Thread::*methodType)(void);
+ static methodType Stopp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Stopp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime6Thread4StopEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::Thread::Stop");
+ exit(0);
+ }
+
+ memcpy(&Stopp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Stopp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_Thread__Stop_void_,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_WORKER, THREAD_API_STOP);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result EventDrivenThread::Construct(long stackSize, ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(long stackSize, ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructElNS1_14ThreadPriorityE");
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::EventDrivenThread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_EventDrivenThread__Construct_long_stackSize__ThreadPriority_priority_,
+ "xd", stackSize, priority);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_EVENTDRIVEN, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+result EventDrivenThread::Construct(const Tizen::Base::String &name, long stackSize,
+ ThreadPriority priority) {
+ typedef result
+ (Thread::*methodType)(const Tizen::Base::String &name, long stackSize,
+ ThreadPriority priority);
+ static methodType Constructp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+ char temp[50];
+
+ if (!Constructp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr =
+ dlsym(
+ lib_handle[LIBOSP_APPFW],
+ "_ZN5Tizen4Base7Runtime17EventDrivenThread9ConstructERKNS0_6StringElNS1_14ThreadPriorityE");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::EventDrivenThread::Construct");
+ exit(0);
+ }
+
+ memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Constructp)(name, stackSize, priority);
+ //
+ if (postBlockBegin(blockresult)) {
+
+ WcharToChar(temp, name.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_EventDrivenThread__Construct_const_Tizen__Base__String__name__long_stackSize__ThreadPriority_priority_,
+ "sx", temp, stackSize);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_EVENTDRIVEN, THREAD_API_NEW);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+
+}
+
+result EventDrivenThread::Quit() {
+ typedef result (Thread::*methodType)(void);
+ static methodType Quitp = 0;
+ result ret;
+ probeInfo_t probeInfo;
+ int blockresult;
+ bool bfiltering = true;
+ void *tmpPtr;
+
+ if (!Quitp) {
+ probeBlockStart();
+ if(lib_handle[LIBOSP_APPFW] == NULL) {
+ lib_handle[LIBOSP_APPFW] = dlopen(lib_string[LIBOSP_APPFW], RTLD_LAZY);
+ if (lib_handle[LIBOSP_APPFW] == NULL) {
+ perror("dlopen failed : libosp-appfw.so");
+ exit(0);
+ }
+ }
+ tmpPtr = dlsym(lib_handle[LIBOSP_APPFW], "_ZN5Tizen4Base7Runtime17EventDrivenThread4QuitEv");
+
+ if (tmpPtr == NULL || dlerror() != NULL) {
+ perror("dlsym failed : Tizen::Base::Runtime::EventThread::Quit");
+ exit(0);
+ }
+
+ memcpy(&Quitp, &tmpPtr, sizeof(tmpPtr));
+ probeBlockEnd();
+ }
+
+ if ((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
+ setProbePoint(&probeInfo);
+ preBlockEnd();
+ }
+ //
+ ret = (this->*Quitp)();
+ //
+ if (postBlockBegin(blockresult)) {
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_THREAD,
+ API_ID_result_EventDrivenThread__Quit__,
+ "", 0);
+ PACK_COMMON_END(ret, ret, blockresult);
+ PACK_THREAD((unsigned int) this, THREAD_TIZENTHREAD_EVENTDRIVEN, THREAD_API_STOP);
+ FLUSH_LOCAL_BUF();
+
+ postBlockEnd();
+ }
+ return ret;
+}
+
+}
+}
+}
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//#include <stdio.h>
+//#include <stdlib.h>
+//#include <string.h>
+//#include <dlfcn.h>
+//#include <stdbool.h>
+//#include <memory.h>
+//#include <errno.h>
+
+#include <Evas.h>
+#include <Elementary.h>
+//#include <app.h>
+
+#include "daprobe.h"
+#include "probeinfo.h"
+#include "da_ui.h"
+
+Evas_Object *elm_win_add(Evas_Object *parent, const char* name, Elm_Win_Type type)
+{
+ static Evas_Object * (*elm_win_addp)(Evas_Object *parent, const char* name, Elm_Win_Type type);
+
+ BEFORE_ORIGINAL_SNAPSHOT(elm_win_add, LIBELEMENTARY);
+
+ ret = elm_win_addp(parent, name, type);
+
+ AFTER_ORIGINAL_SNAPSHOT(ret);
+
+ return ret;
+}
+
+Evas_Object * elm_controlbar_add (Evas_Object *parent)
+{
+ static Evas_Object * (*elm_controlbar_addp)(Evas_Object *parent);
+
+ BEFORE_ORIGINAL_SNAPSHOT(elm_controlbar_add, LIBELEMENTARY);
+
+ ret = elm_controlbar_addp(parent);
+
+ AFTER_ORIGINAL_SNAPSHOT(ret);
+
+ return ret;
+
+// ecore_evas_callback_post_render_set(ecore_evas_ecore_evas_get(evas_object_evas_get(parent)), _cbecore);
+}
+
+Evas_Object *elm_naviframe_add(Evas_Object *parent)
+{
+ static Evas_Object * (*elm_naviframe_addp)(Evas_Object *parent);
+
+ BEFORE_ORIGINAL_SNAPSHOT(elm_naviframe_add, LIBELEMENTARY);
+
+ ret = elm_naviframe_addp(parent);
+
+ AFTER_ORIGINAL_SNAPSHOT(ret);
+
+ return ret;
+}
+
+Evas_Object *elm_pager_add(Evas_Object *parent)
+{
+ static Evas_Object * (*elm_pager_addp)(Evas_Object *parent);
+
+ BEFORE_ORIGINAL_SNAPSHOT(elm_pager_add, LIBELEMENTARY);
+
+ ret = elm_pager_addp(parent);
+
+ AFTER_ORIGINAL_SNAPSHOT(ret);
+
+ return ret;
+}
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <Evas.h>
-
-#include <FUi.h>
-//#include <FMedia.h>
-
-#include "daprobe.h"
-#include "dahelper.h"
-#include "dacollection.h"
-#include "daerror.h"
-//#include "da_ui.h"
-#include "osp_probe.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Ui;
-using namespace Tizen::Graphics;
-using namespace Tizen::Media;
-
-/*
-#define LIBUTILX "libutilX.so.1"
-
-typedef void* (*utilx_create_screen_shot_type)(Display* dpy, int width, int height);
-typedef void (*utilx_release_screen_shot_type)(void);
-
-static Tizen::Graphics::Bitmap* sysutil_capture_screen()
-{
- static utilx_create_screen_shot_type utilx_create_screen_shotp;
- static utilx_release_screen_shot_type utilx_release_screen_shotp;
- result r;
- Bitmap* pBitmap = NULL;
-
- if(unlikely(utilx_create_screen_shotp == NULL))
- {
- void* lib_handle = dlopen(LIBUTILX, RTLD_LAZY);
- if(lib_handle == NULL) {
- SetLastResult(ERR_DLOPEN);
- return NULL;
- }
- utilx_create_screen_shotp = (utilx_create_screen_shot_type)dlsym(lib_handle, "utilx_create_screen_shot");
- if(utilx_create_screen_shotp == NULL || dlerror() != NULL) {
- SetLastResult(ERR_DLSYM);
- return NULL;
- }
- }
-
- if(unlikely(utilx_release_screen_shotp == NULL))
- {
- void* lib_handle = dlopen(LIBUTILX, RTLD_LAZY);
- if(lib_handle == NULL) {
- SetLastResult(ERR_DLOPEN);
- return NULL;
- }
- utilx_release_screen_shotp = (utilx_release_screen_shot_type)dlsym(lib_handle, "utilx_release_screen_shot");
- if(utilx_release_screen_shotp == NULL || dlerror() != NULL) {
- SetLastResult(ERR_DLSYM);
- return NULL;
- }
- }
-
- Display* pDpy = XOpenDisplay(NULL);
- if(pDpy == NULL)
- {
- SetLastResult(ERR_USER - 1);
- return NULL;
- }
-
- int width = DisplayWidth(pDpy, DefaultScreen(pDpy));
- int height = DisplayHeight(pDpy, DefaultScreen(pDpy));
-
- void* pDump = utilx_create_screen_shotp(pDpy, width, height);
- if(likely(pDump != NULL))
- {
- ByteBuffer buffer;
- r = buffer.Construct(static_cast<byte*>(pDump), 0, width*height*4, width*height*4);\
- if(likely(r == E_SUCCESS))
- {
- Tizen::Graphics::Dimension dim(width, height);
- Bitmap* pBitmap = new Bitmap();
- if(likely(pBitmap != NULL))
- {
- r = pBitmap->Construct(buffer, dim, BITMAP_PIXEL_FORMAT_ARGB8888);
- if(unlikely(r != E_SUCCESS))
- {
- SetLastResult(r);
- delete pBitmap;
- pBitmap = NULL;
- }
- else { SetLastResult(E_SUCCESS); }
- }
- else { SetLastResult(ERR_OUTOFMEMORY); }
- }
- else { SetLastResult(r); }
- }
- else { SetLastResult(ERR_USER - 2); }
-
- utilx_release_screen_shotp();
-
- return pBitmap;
-}
-
-static Bitmap* getBitmapFromBuffer(void* pDump, int width, int height)
-{
- result r;
- ByteBuffer buffer;
- Bitmap* pBitmap = NULL;
-
- r = buffer.Construct(static_cast<byte*>(pDump), 0, width*height*4, width*height*4);
- if(likely(r == E_SUCCESS))
- {
- Tizen::Graphics::Dimension dim(width, height);
- pBitmap = new Bitmap();
- if(likely(pBitmap != NULL))
- {
- r = pBitmap->Construct(buffer, dim, BITMAP_PIXEL_FORMAT_ARGB8888);
- if(unlikely(r != E_SUCCESS))
- {
- SetLastResult(r);
- delete pBitmap;
- pBitmap = NULL;
- }
- else { SetLastResult(E_SUCCESS); }
- }
- else { SetLastResult(ERR_OUTOFMEMORY); }
- }
- else { SetLastResult(r); }
-
- return pBitmap;
-}
-
-// return 0 if succeed
-// return -1 if failed to capture
-int captureScreen()
-{
- Image img;
- Bitmap* bitmap;
- probeInfo_t probeInfo; log_t log;
- result r;
- int ret = 0, width, height;
- char* capbuf;
-
- probeBlockStart();
-
- capbuf = captureScreenShotX(&width, &height);
- if(capbuf != NULL)
- {
- bitmap = getBitmapFromBuffer((void*)capbuf, width, height);
- if(bitmap != NULL)
- {
- String dstPath;
- setProbePoint(&probeInfo);
-
- dstPath.Format(MAX_PATH_LENGTH, L"/tmp/da/%d.jpg", probeInfo.eventIndex);
- img.Construct();
- r = img.EncodeToFile(*bitmap, IMG_FORMAT_JPG, dstPath, true);
- if(r == E_SUCCESS)
- {
- INIT_LOG;
- APPEND_LOG_BASIC_NAME(LC_SNAPSHOT, "captureScreen");
- APPEND_LOG_COMMON_NONE(0);
- log.length += sprintf(log.data + log.length, "`,%S", dstPath.GetPointer());
- printLog(&log, MSG_LOG);
- }
- else
- {
- ret = -1;
- }
-
- delete bitmap;
- }
- else
- {
- char buf[128];
- r = GetLastResult();
- sprintf(buf, "bitmap is null (%p, %d, %s)\n", capbuf, (int)r, GetErrorMessage(r));
- ret = -1;
- }
- }
- else
- {
- ret = -1;
- }
-
- releaseScreenShotX();
- probeBlockEnd();
-
- return ret;
-}
-*/
-
-namespace Tizen { namespace Ui {
-/*
-class _EcoreEvas
-{
-public:
- Evas* GetEvas(void) const;
-};
-
-class _EcoreEvasMgr
-{
- void SetEcoreEvas(const _EcoreEvas& ecoreevas);
-};
-
-
-void _EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreevas)
-{
- typedef void (_EcoreEvasMgr::*methodType)(const _EcoreEvas& ecoreevas);
- static methodType _ecoreevasmgr_setecoreevasp;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui13_EcoreEvasMgr12SetEcoreEvasERKNS0_10_EcoreEvasE,
- LIBOSP_UIFW, _ecoreevasmgr_setecoreevasp);
-
- probeBlockStart();
- evas_event_callback_add(ecoreevas.GetEvas(),
- EVAS_CALLBACK_RENDER_FLUSH_POST, _cb_render_post, NULL);
- probeBlockEnd();
-
- (this->*_ecoreevasmgr_setecoreevasp)(ecoreevas);
-}
-*/
-
-result Control::SetShowState(bool state)
-{
- typedef result (Control::*methodType)(bool state);
- static methodType control_setshowstatep;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui7Control12SetShowStateEb,
- LIBOSP_UIFW, control_setshowstatep);
-
- ret = (this->*control_setshowstatep)(state);
-
- probeBlockStart();
- {
- char *type, *classname;
- if(find_object_hash((void*)this, &type, &classname) == 1)
- {
- if(strcmp(type, "Panel") == 0 || strcmp(type, "OverlayPanel") == 0 || strcmp(type, "ScrollPanel") == 0)
- {
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- }
- else
- {
- // do nothing
- }
- }
- else
- {
- // never happened
- }
- }
- probeBlockEnd();
-
- return ret;
-}
-
-namespace Controls {
-
-result Frame::SetCurrentForm(const Form& form)
-{
- typedef result (Frame::*methodType)(const Form& form);
- static methodType frame_setcurrentformp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5Frame14SetCurrentFormERKNS1_4FormE,
- LIBOSP_UIFW, frame_setcurrentformp);
-
- ret = (this->*frame_setcurrentformp)(form);
-
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-
- return ret;
-}
-
-result Frame::SetCurrentForm(Form* pForm)
-{
- typedef result (Frame::*methodType)(Form* pForm);
- static methodType frame_setcurrentformp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui8Controls5Frame14SetCurrentFormEPNS1_4FormE,
- LIBOSP_UIFW, frame_setcurrentformp);
-
- ret = (this->*frame_setcurrentformp)(pForm);
-
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-
- return ret;
-}
-
-
-} // end of namespace Tizen::Ui::Controls
-
-namespace Animations {
-
-result FrameAnimator::SetCurrentForm(const Tizen::Ui::Controls::Form& form)
-{
- typedef result (FrameAnimator::*methodType)(const Tizen::Ui::Controls::Form& form);
- static methodType frameanimator_setcurrentformp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations13FrameAnimator14SetCurrentFormERKNS0_8Controls4FormE,
- LIBOSP_UIFW, frameanimator_setcurrentformp);
-
- ret = (this->*frameanimator_setcurrentformp)(form);
-
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-
- return ret;
-}
-
-result FrameAnimator::SetCurrentForm(Tizen::Ui::Controls::Form* pForm)
-{
- typedef result (FrameAnimator::*methodType)(Tizen::Ui::Controls::Form* pForm);
- static methodType frameanimator_setcurrentformp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations13FrameAnimator14SetCurrentFormEPNS0_8Controls4FormE,
- LIBOSP_UIFW, frameanimator_setcurrentformp);
-
- ret = (this->*frameanimator_setcurrentformp)(pForm);
-
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-
- return ret;
-}
-
-
-} // end of namespace Tizen::Ui::Animations
-
-} } // end of namespace Tizen::Ui
-
-
+++ /dev/null
-#include <FUi.h>
-
-#include "daprobe.h"
-#include "dahelper.h"
-#include "osp_probe.h"
-
-namespace Tizen { namespace Ui { namespace Animations {
-
-class _RootVisualElement
-{
-};
-
-class _DisplayManager
-{
-// bool RenderAll(bool check);
-// bool Render(_RootVisualElement& root, bool check);
- result PostRender(_RootVisualElement& root);
-// result Flush(void);
-// bool UpdateScene(bool force);
-};
-/*
-bool _DisplayManager::RenderAll(bool check)
-{
- typedef bool (_DisplayManager::*methodtype)(bool check);
- static methodtype mp;
- bool ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager9RenderAllEb, LIBOSP_UIFW, mp);
- probeBlockStart();
- probeBlockEnd();
-
- ret = (this->*mp)(check);
-
- probeBlockStart();
- probeBlockEnd();
-
- return ret;
-}
-
-bool _DisplayManager::Render(_RootVisualElement& root, bool check)
-{
- typedef bool (_DisplayManager::*methodtype)(_RootVisualElement& root, bool check);
- static methodtype mp;
- bool ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager6RenderERNS1_18_RootVisualElementEb, LIBOSP_UIFW, mp);
- probeBlockStart();
- probeBlockEnd();
- ret = (this->*mp)(root, check);
- probeBlockStart();
- probeBlockEnd();
-
- return ret;
-}
-*/
-result _DisplayManager::PostRender(_RootVisualElement& root)
-{
- typedef result (_DisplayManager::*methodtype)(_RootVisualElement& root);
- static methodtype mp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager10PostRenderERNS1_18_RootVisualElementE, LIBOSP_UIFW, mp);
- probeBlockStart();
- probeBlockEnd();
-
- ret = (this->*mp)(root);
-
- probeBlockStart();
- SCREENSHOT_DONE();
- probeBlockEnd();
-
- return ret;
-}
-/*
-result _DisplayManager::Flush(void)
-{
- typedef result (_DisplayManager::*methodtype)(void);
- static methodtype mp;
- result ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager5FlushEv, LIBOSP_UIFW, mp);
- probeBlockStart();
- probeBlockEnd();
- ret = (this->*mp)();
- probeBlockStart();
- probeBlockEnd();
-
- return ret;
-}
-
-bool _DisplayManager::UpdateScene(bool force)
-{
- typedef bool (_DisplayManager::*methodtype)(bool force);
- static methodtype mp;
- bool ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui10Animations15_DisplayManager11UpdateSceneEb, LIBOSP_UIFW, mp);
- probeBlockStart();
- probeBlockEnd();
- ret = (this->*mp)(force);
- probeBlockStart();
- probeBlockEnd();
-
- return ret;
-}
-*/
-
-} } } // end of namespace
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#include "daprobe.h"
-#include "dahelper.h"
-#include "osp_frameani.h"
-
-DAFrameAnimationEventListener DAFrameAnimationEventListener::rInstance;
-
-DAFrameAnimationEventListener::DAFrameAnimationEventListener()
-{
-}
-
-DAFrameAnimationEventListener::~DAFrameAnimationEventListener()
-{
-}
-
-void DAFrameAnimationEventListener::OnFormTransitionAnimationFinished(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
-{
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-}
-
-void DAFrameAnimationEventListener::OnFormTransitionAnimationStarted(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
-{
- probeBlockStart();
- SCREENSHOT_UNSET();
- probeBlockEnd();
-}
-
-void DAFrameAnimationEventListener::OnFormTransitionAnimationStopped(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
-{
- probeBlockStart();
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- probeBlockEnd();
-}
-
-DAFrameAnimationEventListener& DAFrameAnimationEventListener::GetInstance(void)
-{
- return rInstance;
-}
-
-IFrameAnimatorEventListener& GetFrameAnimatorEventListener()
-{
- DAFrameAnimationEventListener& listener = DAFrameAnimationEventListener::GetInstance();
- return static_cast<IFrameAnimatorEventListener&>(listener);
-}
-
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#ifndef __OSP_FRAMEANI_H__
-#define __OSP_FRAMEANI_H__
-
-#include <FUi.h>
-
-using namespace Tizen::Ui::Animations;
-using namespace Tizen::Ui::Controls;
-
-class DAFrameAnimationEventListener :
- public IFrameAnimatorEventListener
-{
-public:
- DAFrameAnimationEventListener();
- virtual ~DAFrameAnimationEventListener();
-
- virtual void OnFormTransitionAnimationFinished (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
- virtual void OnFormTransitionAnimationStarted (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
- virtual void OnFormTransitionAnimationStopped (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
-
- static DAFrameAnimationEventListener& GetInstance(void);
-
-private:
- static DAFrameAnimationEventListener rInstance;
-};
-
-
-#endif // __OSP_FRAMEANI_H__
-
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- *
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Woojin Jung <woojin2.jung@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * Anastasia Lyupa <a.lyupa@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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- * - Samsung RnD Institute Russia
- *
- */
-
-#include <assert.h>
-#include <FBase.h>
-#include <FUi.h>
-
-#include "daprobe.h"
-#include "dacollection.h" // for find_object_hash
-#include "dahelper.h" // for captureScreen
-#include "osp_probe.h"
-
-#include "binproto.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
-
-int SceneManagerUsed = 0;
-
-class SceneManagerEventListener : public ISceneManagerEventListener
-{
-public:
- virtual void OnSceneTransitionCompleted(const SceneId &previousSceneId, const SceneId ¤tSceneId);
- virtual void OnSceneTransitionStarted(const SceneId ¤tSceneId, const SceneId &nextSceneId);
- static SceneManagerEventListener& GetInstance();
-private:
- static SceneManagerEventListener rInstance;
- unsigned long startTime;
-};
-
-SceneManagerEventListener SceneManagerEventListener::rInstance;
-
-void SceneManagerEventListener::OnSceneTransitionCompleted(const SceneId &previousSceneId, const SceneId ¤tSceneId)
-{
- probeBlockStart();
- {
- SceneManager* scenemanager = SceneManager::GetInstance();
-
- if(scenemanager->GetCurrentSceneId() == currentSceneId)
- {
- if(isOptionEnabled(OPT_UI))
- {
- probeInfo_t probeInfo;
- Scene* scene;
- String sceneid, formid, panelid;
- Form* pform;
- Panel* ppanel;
- unsigned long transition, user = 0;
-
- setProbePoint(&probeInfo);
-
- scene = scenemanager->GetCurrentScene();
- sceneid = scene->GetSceneId();
- formid = scene->GetFormId();
- panelid = scene->GetPanelId();
- pform = scene->GetForm();
- ppanel = scene->GetPanel();
-
- transition = (probeInfo.currentTime - startTime);
-
- char scene_name[50];
- WcharToChar(scene_name, sceneid.GetPointer());
-
- PREPARE_LOCAL_BUF();
- PACK_COMMON_BEGIN(MSG_PROBE_SCENE,
- API_ID_void_SceneManagerEventListener__OnSceneTransitionCompleted_const_SceneId__previousSceneId__const_SceneId__currentSceneId_,
- "pp", &previousSceneId, ¤tSceneId);
- PACK_COMMON_END(0, 0, 0);
- PACK_SCENE(scene_name, formid, pform, panelid, ppanel, transition, user);
- FLUSH_LOCAL_BUF();
- }
- }
- else
- {
- // never happened
- assert(false);
- }
-
- SCREENSHOT_SET();
-// SCREENSHOT_DONE();
- }
-
- SceneManagerUsed = 0;
- probeBlockEnd();
-}
-
-void SceneManagerEventListener::OnSceneTransitionStarted(const SceneId ¤tSceneId, const SceneId &nextSceneId)
-{
- probeBlockStart();
- SceneManagerUsed = 1;
- startTime = getCurrentTime();
- probeBlockEnd();
-}
-
-SceneManagerEventListener& SceneManagerEventListener::GetInstance()
-{
- return rInstance;
-}
-
-
-namespace Tizen { namespace Ui { namespace Scenes {
-
-SceneManager* SceneManager::GetInstance(void)
-{
- typedef SceneManager* (*methodType)(void);
- static methodType scenemanager_getinstancep;
- static int initialized = 0;
- SceneManager* ret;
-
- GET_REAL_FUNC_OSP(_ZN5Tizen2Ui6Scenes12SceneManager11GetInstanceEv, LIBOSP_UIFW, scenemanager_getinstancep);
-
- ret = scenemanager_getinstancep();
-
- probeBlockStart();
- if(unlikely(initialized == 0))
- {
- if(likely(ret != NULL))
- {
- ret->AddSceneManagerEventListener(SceneManagerEventListener::GetInstance());
- initialized = 1;
- }
- }
- probeBlockEnd();
-
- return ret;
-}
-
-
-} } } // end of namespace
+++ /dev/null
-/*
- * DA probe
- *
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-//#include <stdio.h>
-//#include <stdlib.h>
-//#include <string.h>
-//#include <dlfcn.h>
-//#include <stdbool.h>
-//#include <memory.h>
-//#include <errno.h>
-
-#include <Evas.h>
-#include <Elementary.h>
-//#include <app.h>
-
-#include "daprobe.h"
-#include "probeinfo.h"
-#include "da_ui.h"
-
-Evas_Object *elm_win_add(Evas_Object *parent, const char* name, Elm_Win_Type type)
-{
- static Evas_Object * (*elm_win_addp)(Evas_Object *parent, const char* name, Elm_Win_Type type);
-
- BEFORE_ORIGINAL_SNAPSHOT(elm_win_add, LIBELEMENTARY);
-
- ret = elm_win_addp(parent, name, type);
-
- AFTER_ORIGINAL_SNAPSHOT(ret);
-
- return ret;
-}
-
-Evas_Object * elm_controlbar_add (Evas_Object *parent)
-{
- static Evas_Object * (*elm_controlbar_addp)(Evas_Object *parent);
-
- BEFORE_ORIGINAL_SNAPSHOT(elm_controlbar_add, LIBELEMENTARY);
-
- ret = elm_controlbar_addp(parent);
-
- AFTER_ORIGINAL_SNAPSHOT(ret);
-
- return ret;
-
-// ecore_evas_callback_post_render_set(ecore_evas_ecore_evas_get(evas_object_evas_get(parent)), _cbecore);
-}
-
-Evas_Object *elm_naviframe_add(Evas_Object *parent)
-{
- static Evas_Object * (*elm_naviframe_addp)(Evas_Object *parent);
-
- BEFORE_ORIGINAL_SNAPSHOT(elm_naviframe_add, LIBELEMENTARY);
-
- ret = elm_naviframe_addp(parent);
-
- AFTER_ORIGINAL_SNAPSHOT(ret);
-
- return ret;
-}
-
-Evas_Object *elm_pager_add(Evas_Object *parent)
-{
- static Evas_Object * (*elm_pager_addp)(Evas_Object *parent);
-
- BEFORE_ORIGINAL_SNAPSHOT(elm_pager_add, LIBELEMENTARY);
-
- ret = elm_pager_addp(parent);
-
- AFTER_ORIGINAL_SNAPSHOT(ret);
-
- return ret;
-}
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <Evas.h>
+
+#include <FUi.h>
+//#include <FMedia.h>
+
+#include "daprobe.h"
+#include "dahelper.h"
+#include "dacollection.h"
+#include "daerror.h"
+//#include "da_ui.h"
+#include "tizen_probe.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+
+/*
+#define LIBUTILX "libutilX.so.1"
+
+typedef void* (*utilx_create_screen_shot_type)(Display* dpy, int width, int height);
+typedef void (*utilx_release_screen_shot_type)(void);
+
+static Tizen::Graphics::Bitmap* sysutil_capture_screen()
+{
+ static utilx_create_screen_shot_type utilx_create_screen_shotp;
+ static utilx_release_screen_shot_type utilx_release_screen_shotp;
+ result r;
+ Bitmap* pBitmap = NULL;
+
+ if(unlikely(utilx_create_screen_shotp == NULL))
+ {
+ void* lib_handle = dlopen(LIBUTILX, RTLD_LAZY);
+ if(lib_handle == NULL) {
+ SetLastResult(ERR_DLOPEN);
+ return NULL;
+ }
+ utilx_create_screen_shotp = (utilx_create_screen_shot_type)dlsym(lib_handle, "utilx_create_screen_shot");
+ if(utilx_create_screen_shotp == NULL || dlerror() != NULL) {
+ SetLastResult(ERR_DLSYM);
+ return NULL;
+ }
+ }
+
+ if(unlikely(utilx_release_screen_shotp == NULL))
+ {
+ void* lib_handle = dlopen(LIBUTILX, RTLD_LAZY);
+ if(lib_handle == NULL) {
+ SetLastResult(ERR_DLOPEN);
+ return NULL;
+ }
+ utilx_release_screen_shotp = (utilx_release_screen_shot_type)dlsym(lib_handle, "utilx_release_screen_shot");
+ if(utilx_release_screen_shotp == NULL || dlerror() != NULL) {
+ SetLastResult(ERR_DLSYM);
+ return NULL;
+ }
+ }
+
+ Display* pDpy = XOpenDisplay(NULL);
+ if(pDpy == NULL)
+ {
+ SetLastResult(ERR_USER - 1);
+ return NULL;
+ }
+
+ int width = DisplayWidth(pDpy, DefaultScreen(pDpy));
+ int height = DisplayHeight(pDpy, DefaultScreen(pDpy));
+
+ void* pDump = utilx_create_screen_shotp(pDpy, width, height);
+ if(likely(pDump != NULL))
+ {
+ ByteBuffer buffer;
+ r = buffer.Construct(static_cast<byte*>(pDump), 0, width*height*4, width*height*4);\
+ if(likely(r == E_SUCCESS))
+ {
+ Tizen::Graphics::Dimension dim(width, height);
+ Bitmap* pBitmap = new Bitmap();
+ if(likely(pBitmap != NULL))
+ {
+ r = pBitmap->Construct(buffer, dim, BITMAP_PIXEL_FORMAT_ARGB8888);
+ if(unlikely(r != E_SUCCESS))
+ {
+ SetLastResult(r);
+ delete pBitmap;
+ pBitmap = NULL;
+ }
+ else { SetLastResult(E_SUCCESS); }
+ }
+ else { SetLastResult(ERR_OUTOFMEMORY); }
+ }
+ else { SetLastResult(r); }
+ }
+ else { SetLastResult(ERR_USER - 2); }
+
+ utilx_release_screen_shotp();
+
+ return pBitmap;
+}
+
+static Bitmap* getBitmapFromBuffer(void* pDump, int width, int height)
+{
+ result r;
+ ByteBuffer buffer;
+ Bitmap* pBitmap = NULL;
+
+ r = buffer.Construct(static_cast<byte*>(pDump), 0, width*height*4, width*height*4);
+ if(likely(r == E_SUCCESS))
+ {
+ Tizen::Graphics::Dimension dim(width, height);
+ pBitmap = new Bitmap();
+ if(likely(pBitmap != NULL))
+ {
+ r = pBitmap->Construct(buffer, dim, BITMAP_PIXEL_FORMAT_ARGB8888);
+ if(unlikely(r != E_SUCCESS))
+ {
+ SetLastResult(r);
+ delete pBitmap;
+ pBitmap = NULL;
+ }
+ else { SetLastResult(E_SUCCESS); }
+ }
+ else { SetLastResult(ERR_OUTOFMEMORY); }
+ }
+ else { SetLastResult(r); }
+
+ return pBitmap;
+}
+
+// return 0 if succeed
+// return -1 if failed to capture
+int captureScreen()
+{
+ Image img;
+ Bitmap* bitmap;
+ probeInfo_t probeInfo; log_t log;
+ result r;
+ int ret = 0, width, height;
+ char* capbuf;
+
+ probeBlockStart();
+
+ capbuf = captureScreenShotX(&width, &height);
+ if(capbuf != NULL)
+ {
+ bitmap = getBitmapFromBuffer((void*)capbuf, width, height);
+ if(bitmap != NULL)
+ {
+ String dstPath;
+ setProbePoint(&probeInfo);
+
+ dstPath.Format(MAX_PATH_LENGTH, L"/tmp/da/%d.jpg", probeInfo.eventIndex);
+ img.Construct();
+ r = img.EncodeToFile(*bitmap, IMG_FORMAT_JPG, dstPath, true);
+ if(r == E_SUCCESS)
+ {
+ INIT_LOG;
+ APPEND_LOG_BASIC_NAME(LC_SNAPSHOT, "captureScreen");
+ APPEND_LOG_COMMON_NONE(0);
+ log.length += sprintf(log.data + log.length, "`,%S", dstPath.GetPointer());
+ printLog(&log, MSG_LOG);
+ }
+ else
+ {
+ ret = -1;
+ }
+
+ delete bitmap;
+ }
+ else
+ {
+ char buf[128];
+ r = GetLastResult();
+ sprintf(buf, "bitmap is null (%p, %d, %s)\n", capbuf, (int)r, GetErrorMessage(r));
+ ret = -1;
+ }
+ }
+ else
+ {
+ ret = -1;
+ }
+
+ releaseScreenShotX();
+ probeBlockEnd();
+
+ return ret;
+}
+*/
+
+namespace Tizen { namespace Ui {
+/*
+class _EcoreEvas
+{
+public:
+ Evas* GetEvas(void) const;
+};
+
+class _EcoreEvasMgr
+{
+ void SetEcoreEvas(const _EcoreEvas& ecoreevas);
+};
+
+
+void _EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreevas)
+{
+ typedef void (_EcoreEvasMgr::*methodType)(const _EcoreEvas& ecoreevas);
+ static methodType _ecoreevasmgr_setecoreevasp;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui13_EcoreEvasMgr12SetEcoreEvasERKNS0_10_EcoreEvasE,
+ LIBOSP_UIFW, _ecoreevasmgr_setecoreevasp);
+
+ probeBlockStart();
+ evas_event_callback_add(ecoreevas.GetEvas(),
+ EVAS_CALLBACK_RENDER_FLUSH_POST, _cb_render_post, NULL);
+ probeBlockEnd();
+
+ (this->*_ecoreevasmgr_setecoreevasp)(ecoreevas);
+}
+*/
+
+result Control::SetShowState(bool state)
+{
+ typedef result (Control::*methodType)(bool state);
+ static methodType control_setshowstatep;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui7Control12SetShowStateEb,
+ LIBOSP_UIFW, control_setshowstatep);
+
+ ret = (this->*control_setshowstatep)(state);
+
+ probeBlockStart();
+ {
+ char *type, *classname;
+ if(find_object_hash((void*)this, &type, &classname) == 1)
+ {
+ if(strcmp(type, "Panel") == 0 || strcmp(type, "OverlayPanel") == 0 || strcmp(type, "ScrollPanel") == 0)
+ {
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ }
+ else
+ {
+ // do nothing
+ }
+ }
+ else
+ {
+ // never happened
+ }
+ }
+ probeBlockEnd();
+
+ return ret;
+}
+
+namespace Controls {
+
+result Frame::SetCurrentForm(const Form& form)
+{
+ typedef result (Frame::*methodType)(const Form& form);
+ static methodType frame_setcurrentformp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5Frame14SetCurrentFormERKNS1_4FormE,
+ LIBOSP_UIFW, frame_setcurrentformp);
+
+ ret = (this->*frame_setcurrentformp)(form);
+
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ return ret;
+}
+
+result Frame::SetCurrentForm(Form* pForm)
+{
+ typedef result (Frame::*methodType)(Form* pForm);
+ static methodType frame_setcurrentformp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui8Controls5Frame14SetCurrentFormEPNS1_4FormE,
+ LIBOSP_UIFW, frame_setcurrentformp);
+
+ ret = (this->*frame_setcurrentformp)(pForm);
+
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ return ret;
+}
+
+
+} // end of namespace Tizen::Ui::Controls
+
+namespace Animations {
+
+result FrameAnimator::SetCurrentForm(const Tizen::Ui::Controls::Form& form)
+{
+ typedef result (FrameAnimator::*methodType)(const Tizen::Ui::Controls::Form& form);
+ static methodType frameanimator_setcurrentformp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations13FrameAnimator14SetCurrentFormERKNS0_8Controls4FormE,
+ LIBOSP_UIFW, frameanimator_setcurrentformp);
+
+ ret = (this->*frameanimator_setcurrentformp)(form);
+
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ return ret;
+}
+
+result FrameAnimator::SetCurrentForm(Tizen::Ui::Controls::Form* pForm)
+{
+ typedef result (FrameAnimator::*methodType)(Tizen::Ui::Controls::Form* pForm);
+ static methodType frameanimator_setcurrentformp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations13FrameAnimator14SetCurrentFormEPNS0_8Controls4FormE,
+ LIBOSP_UIFW, frameanimator_setcurrentformp);
+
+ ret = (this->*frameanimator_setcurrentformp)(pForm);
+
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ return ret;
+}
+
+
+} // end of namespace Tizen::Ui::Animations
+
+} } // end of namespace Tizen::Ui
+
+
--- /dev/null
+#include <FUi.h>
+
+#include "daprobe.h"
+#include "dahelper.h"
+#include "tizen_probe.h"
+
+namespace Tizen { namespace Ui { namespace Animations {
+
+class _RootVisualElement
+{
+};
+
+class _DisplayManager
+{
+// bool RenderAll(bool check);
+// bool Render(_RootVisualElement& root, bool check);
+ result PostRender(_RootVisualElement& root);
+// result Flush(void);
+// bool UpdateScene(bool force);
+};
+/*
+bool _DisplayManager::RenderAll(bool check)
+{
+ typedef bool (_DisplayManager::*methodtype)(bool check);
+ static methodtype mp;
+ bool ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations15_DisplayManager9RenderAllEb, LIBOSP_UIFW, mp);
+ probeBlockStart();
+ probeBlockEnd();
+
+ ret = (this->*mp)(check);
+
+ probeBlockStart();
+ probeBlockEnd();
+
+ return ret;
+}
+
+bool _DisplayManager::Render(_RootVisualElement& root, bool check)
+{
+ typedef bool (_DisplayManager::*methodtype)(_RootVisualElement& root, bool check);
+ static methodtype mp;
+ bool ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations15_DisplayManager6RenderERNS1_18_RootVisualElementEb, LIBOSP_UIFW, mp);
+ probeBlockStart();
+ probeBlockEnd();
+ ret = (this->*mp)(root, check);
+ probeBlockStart();
+ probeBlockEnd();
+
+ return ret;
+}
+*/
+result _DisplayManager::PostRender(_RootVisualElement& root)
+{
+ typedef result (_DisplayManager::*methodtype)(_RootVisualElement& root);
+ static methodtype mp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations15_DisplayManager10PostRenderERNS1_18_RootVisualElementE, LIBOSP_UIFW, mp);
+ probeBlockStart();
+ probeBlockEnd();
+
+ ret = (this->*mp)(root);
+
+ probeBlockStart();
+ SCREENSHOT_DONE();
+ probeBlockEnd();
+
+ return ret;
+}
+/*
+result _DisplayManager::Flush(void)
+{
+ typedef result (_DisplayManager::*methodtype)(void);
+ static methodtype mp;
+ result ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations15_DisplayManager5FlushEv, LIBOSP_UIFW, mp);
+ probeBlockStart();
+ probeBlockEnd();
+ ret = (this->*mp)();
+ probeBlockStart();
+ probeBlockEnd();
+
+ return ret;
+}
+
+bool _DisplayManager::UpdateScene(bool force)
+{
+ typedef bool (_DisplayManager::*methodtype)(bool force);
+ static methodtype mp;
+ bool ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui10Animations15_DisplayManager11UpdateSceneEb, LIBOSP_UIFW, mp);
+ probeBlockStart();
+ probeBlockEnd();
+ ret = (this->*mp)(force);
+ probeBlockStart();
+ probeBlockEnd();
+
+ return ret;
+}
+*/
+
+} } } // end of namespace
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include "daprobe.h"
+#include "dahelper.h"
+#include "tizen_frameani.h"
+
+DAFrameAnimationEventListener DAFrameAnimationEventListener::rInstance;
+
+DAFrameAnimationEventListener::DAFrameAnimationEventListener()
+{
+}
+
+DAFrameAnimationEventListener::~DAFrameAnimationEventListener()
+{
+}
+
+void DAFrameAnimationEventListener::OnFormTransitionAnimationFinished(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
+{
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+}
+
+void DAFrameAnimationEventListener::OnFormTransitionAnimationStarted(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
+{
+ probeBlockStart();
+ SCREENSHOT_UNSET();
+ probeBlockEnd();
+}
+
+void DAFrameAnimationEventListener::OnFormTransitionAnimationStopped(FrameAnimator &source, Frame &frame, Form &form1, Form &form2)
+{
+ probeBlockStart();
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ probeBlockEnd();
+}
+
+DAFrameAnimationEventListener& DAFrameAnimationEventListener::GetInstance(void)
+{
+ return rInstance;
+}
+
+IFrameAnimatorEventListener& GetFrameAnimatorEventListener()
+{
+ DAFrameAnimationEventListener& listener = DAFrameAnimationEventListener::GetInstance();
+ return static_cast<IFrameAnimatorEventListener&>(listener);
+}
+
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef __TIZEN_FRAMEANI_H__
+#define __TIZEN_FRAMEANI_H__
+
+#include <FUi.h>
+
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+class DAFrameAnimationEventListener :
+ public IFrameAnimatorEventListener
+{
+public:
+ DAFrameAnimationEventListener();
+ virtual ~DAFrameAnimationEventListener();
+
+ virtual void OnFormTransitionAnimationFinished (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
+ virtual void OnFormTransitionAnimationStarted (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
+ virtual void OnFormTransitionAnimationStopped (FrameAnimator &source, Frame &frame, Form &form1, Form &form2);
+
+ static DAFrameAnimationEventListener& GetInstance(void);
+
+private:
+ static DAFrameAnimationEventListener rInstance;
+};
+
+
+#endif // __TIZEN_FRAMEANI_H__
+
--- /dev/null
+/*
+ * DA probe
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Jaewon Lim <jaewon81.lim@samsung.com>
+ * Woojin Jung <woojin2.jung@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * Anastasia Lyupa <a.lyupa@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
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+#include <assert.h>
+#include <FBase.h>
+#include <FUi.h>
+
+#include "daprobe.h"
+#include "dacollection.h" // for find_object_hash
+#include "dahelper.h" // for captureScreen
+#include "tizen_probe.h"
+
+#include "binproto.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+int SceneManagerUsed = 0;
+
+class SceneManagerEventListener : public ISceneManagerEventListener
+{
+public:
+ virtual void OnSceneTransitionCompleted(const SceneId &previousSceneId, const SceneId ¤tSceneId);
+ virtual void OnSceneTransitionStarted(const SceneId ¤tSceneId, const SceneId &nextSceneId);
+ static SceneManagerEventListener& GetInstance();
+private:
+ static SceneManagerEventListener rInstance;
+ unsigned long startTime;
+};
+
+SceneManagerEventListener SceneManagerEventListener::rInstance;
+
+void SceneManagerEventListener::OnSceneTransitionCompleted(const SceneId &previousSceneId, const SceneId ¤tSceneId)
+{
+ probeBlockStart();
+ {
+ SceneManager* scenemanager = SceneManager::GetInstance();
+
+ if(scenemanager->GetCurrentSceneId() == currentSceneId)
+ {
+ if(isOptionEnabled(OPT_UI))
+ {
+ probeInfo_t probeInfo;
+ Scene* scene;
+ String sceneid, formid, panelid;
+ Form* pform;
+ Panel* ppanel;
+ unsigned long transition, user = 0;
+
+ setProbePoint(&probeInfo);
+
+ scene = scenemanager->GetCurrentScene();
+ sceneid = scene->GetSceneId();
+ formid = scene->GetFormId();
+ panelid = scene->GetPanelId();
+ pform = scene->GetForm();
+ ppanel = scene->GetPanel();
+
+ transition = (probeInfo.currentTime - startTime);
+
+ char scene_name[50];
+ WcharToChar(scene_name, sceneid.GetPointer());
+
+ PREPARE_LOCAL_BUF();
+ PACK_COMMON_BEGIN(MSG_PROBE_SCENE,
+ API_ID_void_SceneManagerEventListener__OnSceneTransitionCompleted_const_SceneId__previousSceneId__const_SceneId__currentSceneId_,
+ "pp", &previousSceneId, ¤tSceneId);
+ PACK_COMMON_END(0, 0, 0);
+ PACK_SCENE(scene_name, formid, pform, panelid, ppanel, transition, user);
+ FLUSH_LOCAL_BUF();
+ }
+ }
+ else
+ {
+ // never happened
+ assert(false);
+ }
+
+ SCREENSHOT_SET();
+// SCREENSHOT_DONE();
+ }
+
+ SceneManagerUsed = 0;
+ probeBlockEnd();
+}
+
+void SceneManagerEventListener::OnSceneTransitionStarted(const SceneId ¤tSceneId, const SceneId &nextSceneId)
+{
+ probeBlockStart();
+ SceneManagerUsed = 1;
+ startTime = getCurrentTime();
+ probeBlockEnd();
+}
+
+SceneManagerEventListener& SceneManagerEventListener::GetInstance()
+{
+ return rInstance;
+}
+
+
+namespace Tizen { namespace Ui { namespace Scenes {
+
+SceneManager* SceneManager::GetInstance(void)
+{
+ typedef SceneManager* (*methodType)(void);
+ static methodType scenemanager_getinstancep;
+ static int initialized = 0;
+ SceneManager* ret;
+
+ GET_REAL_FUNC_TIZEN(_ZN5Tizen2Ui6Scenes12SceneManager11GetInstanceEv, LIBOSP_UIFW, scenemanager_getinstancep);
+
+ ret = scenemanager_getinstancep();
+
+ probeBlockStart();
+ if(unlikely(initialized == 0))
+ {
+ if(likely(ret != NULL))
+ {
+ ret->AddSceneManagerEventListener(SceneManagerEventListener::GetInstance());
+ initialized = 1;
+ }
+ }
+ probeBlockEnd();
+
+ return ret;
+}
+
+
+} } } // end of namespace