MSG_PROBE_RESOURCE: change fd type from int32 to int64
[platform/core/system/swap-probe.git] / probe_badaapi / bada_file.cpp
1 /*
2  *  DA probe
3  *
4  * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: 
7  *
8  * Jaewon Lim <jaewon81.lim@samsung.com>
9  * Woojin Jung <woojin2.jung@samsung.com>
10  * Juyoung Kim <j0.kim@samsung.com>
11  * Anastasia Lyupa <a.lyupa@samsung.com>
12  * 
13  * This library is free software; you can redistribute it and/or modify it under
14  * the terms of the GNU Lesser General Public License as published by the
15  * Free Software Foundation; either version 2.1 of the License, or (at your option)
16  * any later version.
17  * 
18  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
19  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
21  * License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public License
24  * along with this library; if not, write to the Free Software Foundation, Inc., 51
25  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26  *
27  * Contributors:
28  * - S-Core Co., Ltd
29  * - Samsung RnD Institute Russia
30  * 
31  */
32
33 #include <FBase.h>
34 //#include <FIo.h>
35 #include "daprobe.h"
36 #include "probeinfo.h"
37 #include "dahelper.h"
38
39 #include "binproto.h"
40
41 using namespace Tizen::Base;
42
43 enum FileSeekPosition {
44         FILESEEKPOSITION_BEGIN, /**<The beginning of the file */
45         FILESEEKPOSITION_CURRENT, /**<The current position of the file */
46         FILESEEKPOSITION_END
47 /**<The end of the file */
48 };
49
50 static enum DaOptions _sopt = OPT_FILE;
51
52 namespace Tizen {
53 namespace Io {
54
55 class FileAttributes {
56 public:
57         virtual bool Equals(const Object& object) const;
58         FileAttributes(const FileAttributes &fileAttributes);
59         FileAttributes(void);
60         DateTime GetDateTime(void) const;
61         long long GetFileSize(void) const;
62         virtual int GetHashCode(void) const;
63         DateTime GetLastModifiedTime(void) const;
64         bool IsDirectory(void) const;
65         bool IsHidden(void) const;
66         bool IsReadOnly(void) const;
67         FileAttributes & operator=(const FileAttributes &fileAttributes);
68         virtual ~FileAttributes(void);
69 };
70
71 class File {
72 public:
73
74 /* deprecated apis
75  *   
76         result Construct(const Tizen::Base::String& filePath,
77                         const Tizen::Base::String& openMode, bool secureMode,
78                         bool createParentDirectories);
79         result Construct(const Tizen::Base::String& filePath,
80                         const Tizen::Base::String& openMode, bool secureMode,
81                         const Tizen::Base::ByteBuffer& key, bool createParentDirectories);
82         
83         result Construct(const Tizen::Base::String& filePath,
84                         const Tizen::Base::String& openMode,
85                         const Tizen::Base::ByteBuffer& secretKey);
86 */      
87         result Construct(const Tizen::Base::String& filePath,
88                         const Tizen::Base::String& openMode, bool createParentDirectories);
89         result Construct(const Tizen::Base::String& filePath,
90                         const Tizen::Base::String& openMode);
91         
92         result Construct(const Tizen::Base::String& filePath,
93                         const char *pOpenMode);
94         result Construct(const Tizen::Base::String& filePath,
95                         const char *pOpenMode, const Tizen::Base::ByteBuffer &seretKey);
96
97         
98         /*
99          File(void);
100          */
101         result Flush(void);
102
103         Tizen::Base::String GetName(void) const;
104         result Read(Tizen::Base::String& buffer);
105         result Read(Tizen::Base::ByteBuffer& buffer);
106         int Read(void *buffer, int length);
107         result Seek(FileSeekPosition position, long offset);
108
109         int Tell(void) const;
110
111         result Truncate(int length);
112
113         result Write(const void *buffer, int length);
114
115         result Write(const Tizen::Base::ByteBuffer& buffer);
116         result Write(const Tizen::Base::String& buffer);
117         virtual ~File(void);
118         /*
119          // static methods
120          static result ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
121          const Tizen::Base::String &secureFilePath);
122          static result ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
123          const Tizen::Base::String &secureFilePath,
124          const Tizen::Base::ByteBuffer& key);
125          static result Copy(const Tizen::Base::String& srcFilePath,
126          const Tizen::Base::String& destFilePath, bool failIfExist);
127          static result GetAttributes(const Tizen::Base::String& filePath,
128          FileAttributes& attribute);
129          static const Tizen::Base::String GetFileExtension(
130          const Tizen::Base::String& filePath);
131
132          static const Tizen::Base::String GetFileName(const Tizen::Base::String& filePath);
133
134          const Tizen::Base::String& filePath);
135          static bool IsEncrypted(const Tizen::Base::String &filePath);
136          static bool IsFileExist(const Tizen::Base::String& filePath);
137          static result Move(const Tizen::Base::String& oldFilePath,
138          const Tizen::Base::String& newFilePath);
139          static result Remove(const Tizen::Base::String& filePath);
140          //     static Tizen::Base::Collection::IList *GetPathsToAppsN(void);
141          */
142 };
143
144 //File::File(void) {
145 //static (File::*Filep)();
146 //}
147
148 result File::Construct(const Tizen::Base::String& filePath,
149                 const Tizen::Base::String& openMode, bool createParentDirectories) {
150         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
151                         const Tizen::Base::String& openMode, bool createParentDirectories);
152         static methodType Constructp = 0;
153         result ret;
154         probeInfo_t     probeInfo;
155         int blockresult;
156         bool bfiltering = true;
157         char temp_path[50];
158         char temp_mode[50];
159         //FileAttributes attr;
160
161         if (!Constructp) {
162                 probeBlockStart();
163                 void *tmpPtr = dlsym(RTLD_NEXT,
164                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_b");
165
166                 if (tmpPtr == NULL || dlerror() != NULL) {
167                         perror("dlsym failed : Tizen::Io::File::Construct");
168                         exit(0);
169                 }
170
171                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
172                 probeBlockEnd();
173         }
174
175         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
176                 setProbePoint(&probeInfo);
177                 preBlockEnd();
178         }
179
180         ret = (this->*Constructp)(filePath, openMode, createParentDirectories);
181
182         if(postBlockBegin(blockresult)) {
183
184                  WcharToChar(temp_path,filePath.GetPointer());
185                  WcharToChar(temp_mode,openMode.GetPointer()); 
186                  
187                 PREPARE_LOCAL_BUF();
188                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE, API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode__bool_createParentDirectories_,
189                                   "ssd", temp_path, temp_mode, createParentDirectories);
190                 PACK_COMMON_END(ret, ret, blockresult);
191                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, 0, temp_path);
192                 FLUSH_LOCAL_BUF();
193                  
194                  postBlockEnd();
195         }
196
197         return ret;
198 }
199
200 /* deprecated apis
201 result File::Construct(const Tizen::Base::String& filePath,
202                 const Tizen::Base::String& openMode, bool secureMode,
203                 bool createParentDirectories) {
204         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
205                         const Tizen::Base::String& openMode, bool secureMode,
206                         bool createParentDirectories);
207         static methodType Constructp = 0;
208         result ret;
209         probeInfo_t     probeInfo;
210         log_t   log;
211         int blockresult;
212         bool bfiltering = true;
213         char temp[50];
214         //FileAttributes attr;
215
216         if (!Constructp) {
217                 probeBlockStart();
218
219                 void *tmpPtr = dlsym(RTLD_NEXT,
220                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_bb");
221
222                 if (tmpPtr == NULL || dlerror() != NULL) {
223                         perror("dlsym failed : Tizen::Io::File::Construct");
224                         exit(0);
225                 }
226
227                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
228                 probeBlockEnd();
229         }
230
231         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
232                 setProbePoint(&probeInfo);
233                 preBlockEnd();
234         }
235
236         ret = (this->*Constructp)(filePath, openMode, secureMode,
237                         createParentDirectories);
238
239         if(postBlockBegin(blockresult)) {
240                  log.type = 0;
241                  log.length = 0;
242                  log.data[0] = '\0';
243                  log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d",
244                  LC_RESOURCE, probeInfo.eventIndex, "File::Construct",
245                  probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
246                  //Input,ret
247                  WcharToChar(temp,filePath.GetPointer());
248                  log.length += sprintf(log.data + log.length,"`,%s",temp);
249                  WcharToChar(temp,openMode.GetPointer());
250                  log.length += sprintf(log.data + log.length,", %s",temp);
251                  log.length += sprintf(log.data + log.length,", %s,%s`,%ld",(secureMode == 0 ? "false" : "true"),(createParentDirectories == 0 ? "false" : "true"),ret);
252                  //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
253                  //File::GetAttributes(this->GetName(),attr);
254                  WcharToChar(temp,filePath.GetPointer());
255                  log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
256                  //callstack
257
258                  //              if(E_SUCCESS != ret || blockresult == 2) {
259 //                       log.length += sprintf(log.data + log.length,
260 //                                       "`,\ncallstack_start`,`,callstack_end");
261 //               } else{
262                          log.length += sprintf(log.data + log.length,
263                                          "`,\ncallstack_start`,");
264                          getBacktraceString(&log, 4096 - log.length - 17);
265                          log.length += sprintf(log.data + log.length, "`,callstack_end");
266 //               }
267
268                  printLog(&log, MSG_LOG);
269                  postBlockEnd();
270         }
271
272         return ret;
273 }
274
275 result File::Construct(const Tizen::Base::String& filePath,
276                 const Tizen::Base::String& openMode, bool secureMode,
277                 const Tizen::Base::ByteBuffer& key, bool createParentDirectories) {
278         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
279                         const Tizen::Base::String& openMode, bool secureMode,
280                         const Tizen::Base::ByteBuffer& key, bool createParentDirectories);
281         static methodType Constructp = 0;
282         result ret;
283         probeInfo_t     probeInfo;
284         log_t   log;
285         int blockresult;
286         bool bfiltering = true;
287         char temp[50];
288         //FileAttributes attr;
289
290         if (!Constructp) {
291                 probeBlockStart();
292
293                 void *tmpPtr = dlsym(RTLD_NEXT,
294                                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_bRKNS2_10ByteBufferEb");
295
296                 if (tmpPtr == NULL || dlerror() != NULL) {
297                         perror("dlsym failed : Tizen::Io::File::Construct");
298                         exit(0);
299                 }
300
301                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
302                 probeBlockEnd();
303         }
304
305         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
306                 setProbePoint(&probeInfo);
307                 preBlockEnd();
308         }
309
310         ret = (this->*Constructp)(filePath, openMode, secureMode, key,
311                         createParentDirectories);
312
313         if(postBlockBegin(blockresult)) {
314                  log.type = 0;
315                  log.length = 0;
316                  log.data[0] = '\0';
317                  log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d",
318                  LC_RESOURCE, probeInfo.eventIndex, "File::Construct",
319                  probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
320                  //Input,ret
321                  WcharToChar(temp,filePath.GetPointer());
322                  log.length += sprintf(log.data + log.length,"`,%s",temp);
323                  WcharToChar(temp,openMode.GetPointer());
324                  log.length += sprintf(log.data + log.length,", %s",temp);
325                  log.length += sprintf(log.data + log.length,", %s,0x%x,%s`,%ld",(secureMode == 0 ? "false" : "true"),(unsigned int)&key,(createParentDirectories == 0 ? "false" : "true"),ret);
326                  //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
327                  //File::GetAttributes(this->GetName(),attr);
328                  WcharToChar(temp,filePath.GetPointer());
329                  log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
330                  //callstack
331
332                  //              if(E_SUCCESS != ret || blockresult == 2) {
333 //                       log.length += sprintf(log.data + log.length,
334 //                                       "`,\ncallstack_start`,`,callstack_end");
335 //               } else{
336                          log.length += sprintf(log.data + log.length,
337                                          "`,\ncallstack_start`,");
338                          getBacktraceString(&log, 4096 - log.length - 17);
339                          log.length += sprintf(log.data + log.length, "`,callstack_end");
340 //               }
341
342                  printLog(&log, MSG_LOG);
343                  postBlockEnd();
344         }
345
346         return ret;
347 }
348 */
349 result File::Construct(const Tizen::Base::String& filePath,
350                 const Tizen::Base::String& openMode) {
351         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
352                         const Tizen::Base::String& openMode);
353         static methodType Constructp = 0;
354         result ret;
355         probeInfo_t     probeInfo;
356         int blockresult;
357         bool bfiltering = true;
358         char temp_path[50];
359         char temp_mode[50];
360         //FileAttributes attr;
361
362         if(!Constructp) {
363                 probeBlockStart();
364                 void *tmpPtr = dlsym(RTLD_NEXT,
365                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_");
366
367                 if(tmpPtr == NULL || dlerror() != NULL) {
368                         perror("dlsym failed : Tizen::Io::File::Construct");
369                         exit(0);
370                 }
371
372                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
373                 probeBlockEnd();
374         }
375
376         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
377                 setProbePoint(&probeInfo);
378                 preBlockEnd();
379         }
380
381         ret = (this->*Constructp)(filePath, openMode);
382
383         if(postBlockBegin(blockresult)) {
384                  WcharToChar(temp_path,filePath.GetPointer());
385                  WcharToChar(temp_mode,openMode.GetPointer());
386
387                 PREPARE_LOCAL_BUF();
388                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
389                                   API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_Tizen__Base__String__openMode_,
390                                   "ss", temp_path, temp_mode);
391                 PACK_COMMON_END(ret, ret, blockresult);
392                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, 0, temp_path);
393                 FLUSH_LOCAL_BUF();
394
395                  postBlockEnd();
396         }
397
398         return ret;
399 }
400
401 /* deprecated apis
402 result File::Construct(const Tizen::Base::String& filePath,
403                 const Tizen::Base::String& openMode,
404                 const Tizen::Base::ByteBuffer& secretKey) {
405         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
406                         const Tizen::Base::String &openMode,
407                         const Tizen::Base::ByteBuffer& secretKey);
408         static methodType Constructp = 0;
409         result ret;
410         probeInfo_t probeInfo;
411         log_t   log;
412         int blockresult;
413         bool bfiltering = true;
414         char temp[50];
415         //FileAttributes attr;
416
417         if(!Constructp) {
418                 probeBlockStart();
419
420                 void *tmpPtr = dlsym(RTLD_NEXT,
421                                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringES5_RKNS2_10ByteBufferE");
422
423                 if(tmpPtr == NULL || dlerror() != NULL) {
424                         perror("dlsym failed : Tizen::Io::File::Construct");
425                         exit(0);
426                 }
427
428                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
429                 probeBlockEnd();
430         }
431
432         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
433                 setProbePoint(&probeInfo);
434                 preBlockEnd();
435         }
436
437         ret = (this->*Constructp)(filePath, openMode, secretKey);
438
439         if(postBlockBegin(blockresult)) {
440                  log.type = 0;
441                  log.length = 0;
442                  log.data[0] = '\0';
443                  log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d",
444                  LC_RESOURCE, probeInfo.eventIndex, "File::Construct",
445                  probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
446                  //Input,ret
447                  WcharToChar(temp,filePath.GetPointer());
448                  log.length += sprintf(log.data + log.length,"`,%s",temp);
449                  WcharToChar(temp,openMode.GetPointer());
450                  log.length += sprintf(log.data + log.length,", %s",temp);
451                  log.length += sprintf(log.data + log.length,", 0x%x`,%ld",(unsigned int)&secretKey,ret);
452                  //PCAddr,errno,InternalCall,size,FD,FDType,FDApiType,FileSize,FilePath
453                  //File::GetAttributes(this->GetName(),attr);
454                  WcharToChar(temp,filePath.GetPointer());
455                  log.length += sprintf(log.data + log.length,"`,0`,%lu`,%d`,%u`,0`,0x%x`,%d`,%d`,?`,%s",ret,blockresult,(unsigned int)CALLER_ADDRESS,(unsigned int)this,FD_FILE,FD_API_OPEN,temp);
456                  //callstack
457
458 //               if(E_SUCCESS != ret || blockresult == 2) {
459 //                       log.length += sprintf(log.data + log.length,
460 //                                       "`,\ncallstack_start`,`,callstack_end");
461 //               } else{
462                          log.length += sprintf(log.data + log.length,
463                                          "`,\ncallstack_start`,");
464                          getBacktraceString(&log, 4096 - log.length - 17);
465                          log.length += sprintf(log.data + log.length, "`,callstack_end");
466 //               }
467
468                  printLog(&log, MSG_LOG);
469                  postBlockEnd();
470         }
471         
472         return ret;
473 }
474 */
475 result File::Construct(const Tizen::Base::String& filePath,
476                 const char *pOpenMode) {
477         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
478                         const char *pOpenMode);
479         static methodType Constructp = 0;
480         result ret;
481         probeInfo_t     probeInfo;
482         int blockresult;
483         bool bfiltering = true;
484         char temp[50];
485         //FileAttributes attr;
486
487         if(!Constructp) {
488                 probeBlockStart();
489                 void *tmpPtr = dlsym(RTLD_NEXT,
490                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKc");
491
492                 if(tmpPtr == NULL || dlerror() != NULL) {
493                         perror("dlsym failed : Tizen::Io::File::Construct");
494                         exit(0);
495                 }
496
497                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
498                 probeBlockEnd();
499         }
500
501         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
502                 setProbePoint(&probeInfo);
503                 preBlockEnd();
504         }
505
506         ret = (this->*Constructp)(filePath, pOpenMode);
507
508         if(postBlockBegin(blockresult)) {
509
510                  WcharToChar(temp,filePath.GetPointer());
511
512                 PREPARE_LOCAL_BUF();
513                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
514                                   API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode_,
515                                   "sp", temp, pOpenMode);
516                 PACK_COMMON_END(ret, ret, blockresult);
517                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, 0, temp);
518                 FLUSH_LOCAL_BUF();
519
520                  postBlockEnd();
521         }
522
523         return ret;
524 }
525
526 result File::Construct(const Tizen::Base::String& filePath,
527                 const char *pOpenMode,
528                 const Tizen::Base::ByteBuffer& secretKey) {
529         typedef result (File::*methodType)(const Tizen::Base::String& filePath,
530                         const char *pOpenMode,
531                         const Tizen::Base::ByteBuffer& secretKey);
532         static methodType Constructp = 0;
533         result ret;
534         probeInfo_t probeInfo;
535         int blockresult;
536         bool bfiltering = true;
537         char temp[50];
538         //FileAttributes attr;
539
540         if(!Constructp) {
541                 probeBlockStart();
542
543                 void *tmpPtr = dlsym(RTLD_NEXT,
544                                                 "_ZN5Tizen2Io4File9ConstructERKNS_4Base6StringEPKcRKNS2_10ByteBufferE");
545
546                 if(tmpPtr == NULL || dlerror() != NULL) {
547                         perror("dlsym failed : Tizen::Io::File::Construct");
548                         exit(0);
549                 }
550
551                 memcpy(&Constructp, &tmpPtr, sizeof(tmpPtr));
552                 probeBlockEnd();
553         }
554
555         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
556                 setProbePoint(&probeInfo);
557                 preBlockEnd();
558         }
559
560         ret = (this->*Constructp)(filePath, pOpenMode, secretKey);
561
562         if(postBlockBegin(blockresult)) {
563                  WcharToChar(temp,filePath.GetPointer());
564
565                 PREPARE_LOCAL_BUF();
566                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
567                                   API_ID_result_File__Construct_const_Tizen__Base__String__filePath__const_char__pOpenMode__const_Tizen__Base__ByteBuffer__secretKey_,
568                                   "sp", temp, pOpenMode);
569                 PACK_COMMON_END(ret, ret, blockresult);
570                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OPEN, 0, temp);
571                 FLUSH_LOCAL_BUF();
572
573                  postBlockEnd();
574         }
575         
576         return ret;
577 }
578
579 result File::Flush(void) {
580         typedef result (File::*methodType)(void);
581         static methodType Flushp = 0;
582         result ret;
583         probeInfo_t     probeInfo;
584         int blockresult;
585         bool bfiltering = true;
586         char temp[50];
587         //FileAttributes attr;
588
589         if (!Flushp) {
590                 probeBlockStart();
591
592                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5FlushEv");
593
594                 if (tmpPtr == NULL || dlerror() != NULL) {
595                         perror("dlsym failed : Tizen::Io::File::Flush");
596                         exit(0);
597                 }
598
599                 memcpy(&Flushp, &tmpPtr, sizeof(tmpPtr));
600                 probeBlockEnd();
601         }
602
603         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
604                 setProbePoint(&probeInfo);
605                 preBlockEnd();
606         }
607
608         ret = (this->*Flushp)();
609
610         if(postBlockBegin(blockresult)) {
611                  WcharToChar(temp,this->GetName().GetPointer());
612
613                 PREPARE_LOCAL_BUF();
614                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
615                                   API_ID_result_File__Flush_void_,
616                                   "", 0);
617                 PACK_COMMON_END(ret, ret, blockresult);
618                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, 0, temp);
619                 FLUSH_LOCAL_BUF();
620
621                  postBlockEnd();
622         }
623
624         return ret;
625 }
626
627 Tizen::Base::String File::GetName(void) const{
628         typedef Tizen::Base::String (File::*methodType)(void) const;
629         static methodType GetNamep = 0;
630         Tizen::Base::String ret;
631         probeInfo_t     probeInfo;
632         int blockresult;
633         bool bfiltering = true;
634         char temp[50];
635         //FileAttributes attr;
636
637         if (!GetNamep) {
638                 probeBlockStart();
639
640                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File7GetNameEv");
641
642                 if (tmpPtr == NULL || dlerror() != NULL) {
643                         perror("dlsym failed : Tizen::Io::File::GetName");
644                         exit(0);
645                 }
646
647                 memcpy(&GetNamep, &tmpPtr, sizeof(tmpPtr));
648                 probeBlockEnd();
649         }
650
651         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
652                 setProbePoint(&probeInfo);
653                 preBlockEnd();
654         }
655
656         ret = (this->*GetNamep)();
657         result res = GetLastResult();
658
659         if(postBlockBegin(blockresult)) {
660                  WcharToChar(temp,ret.GetPointer());
661
662                 PREPARE_LOCAL_BUF();
663                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
664                                   API_ID_Tizen__Base__String_File__GetName_void__const,
665                                   "", 0);
666                 PACK_COMMON_END(ret.GetPointer(), res, blockresult);
667                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, 0, temp);
668                 FLUSH_LOCAL_BUF();
669
670                  postBlockEnd();
671         }
672
673         return ret;
674 }
675
676 result File::Read(Tizen::Base::String& buffer) {
677         typedef result (File::*methodType)(Tizen::Base::String & buffer);
678         static methodType Readp = 0;
679         result ret;
680         probeInfo_t     probeInfo;
681         int blockresult;
682         bool bfiltering = true;
683         char temp[50];
684         int nRead = 0;
685         //FileAttributes attr;
686
687         if (!Readp) {
688                 probeBlockStart();
689
690                 void *tmpPtr = dlsym(RTLD_NEXT,
691                                 "_ZN5Tizen2Io4File4ReadERNS_4Base6StringE");
692
693                 if (tmpPtr == NULL || dlerror() != NULL) {
694                         perror("dlsym failed : Tizen::Io::File::Read");
695                         exit(0);
696                 }
697
698                 memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
699                 probeBlockEnd();
700         }
701
702         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
703                 setProbePoint(&probeInfo);
704                 preBlockEnd();
705         }
706
707         ret = (this->*Readp)(buffer);
708
709         if(postBlockBegin(blockresult)) {
710                  WcharToChar(temp,this->GetName().GetPointer());
711                  nRead = buffer.GetLength();
712
713                 PREPARE_LOCAL_BUF();
714                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
715                                   API_ID_result_File__Read_Tizen__Base__String__buffer_,
716                                   "x", (unsigned long)&buffer);
717                 PACK_COMMON_END(ret, ret, blockresult);
718                 PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ, 0, temp);
719                 FLUSH_LOCAL_BUF();
720
721                  postBlockEnd();
722         }
723
724         return ret;
725 }
726
727 result File::Read(Tizen::Base::ByteBuffer& buffer) {
728         typedef result (File::*methodType)(Tizen::Base::ByteBuffer & buffer);
729         static methodType Readp = 0;
730         result ret;
731         probeInfo_t     probeInfo;
732         int blockresult;
733         bool bfiltering = true;
734         char temp[50];
735         int nRead = 0;
736         //FileAttributes attr;
737
738         if (!Readp) {
739                 probeBlockStart();
740
741                 void *tmpPtr = dlsym(RTLD_NEXT,
742                                 "_ZN5Tizen2Io4File4ReadERNS_4Base10ByteBufferE");
743
744                 if (tmpPtr == NULL || dlerror() != NULL) {
745                         perror("dlsym failed : Tizen::Io::File::Read");
746                         exit(0);
747                 }
748
749                 memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
750                 probeBlockEnd();
751         }
752
753         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
754                 setProbePoint(&probeInfo);
755                 preBlockEnd();
756         }
757
758         ret = (this->*Readp)(buffer);
759
760         if(postBlockBegin(blockresult)) {
761                  WcharToChar(temp,this->GetName().GetPointer());
762                  buffer.GetInt(nRead);
763
764                 PREPARE_LOCAL_BUF();
765                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
766                                   API_ID_result_File__Read_Tizen__Base__ByteBuffer__buffer_,
767                                   "x", (unsigned long)&buffer);
768                 PACK_COMMON_END(ret, ret, blockresult);
769                 PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ, 0, temp);
770                 FLUSH_LOCAL_BUF();
771                 
772                  postBlockEnd();
773         }
774
775         return ret;
776 }
777
778 int File::Read(void *buffer, int length) {
779         typedef int (File::*methodType)(void *buffer, int length);
780         static methodType Readp = 0;
781         int ret;
782         probeInfo_t     probeInfo;
783         int blockresult;
784         bool bfiltering = true;
785         char temp[50];
786         int nRead = 0;
787         //FileAttributes attr;
788
789         if (!Readp) {
790                 probeBlockStart();
791
792                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File4ReadEPvi");
793
794                 if (tmpPtr == NULL || dlerror() != NULL) {
795                         perror("dlsym failed : Tizen::Io::File::Read");
796                         exit(0);
797                 }
798
799                 memcpy(&Readp, &tmpPtr, sizeof(tmpPtr));
800                 probeBlockEnd();
801         }
802
803         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
804                 setProbePoint(&probeInfo);
805                 nRead = Tell();
806                 preBlockEnd();
807         }
808
809         ret = (this->*Readp)(buffer, length);
810         result res = GetLastResult();
811
812         if(postBlockBegin(blockresult)) {
813                  WcharToChar(temp,this->GetName().GetPointer());
814                  nRead = Tell() - nRead;
815
816                 PREPARE_LOCAL_BUF();
817                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
818                                   API_ID_int_File__Read_void__buffer__int_length_,
819                                   "xd", (unsigned long)buffer, length);
820                 PACK_COMMON_END(ret, res, blockresult);
821                 PACK_RESOURCE(nRead, (unsigned long)this, FD_FILE, FD_API_READ, 0, temp);
822                 FLUSH_LOCAL_BUF();
823
824                  postBlockEnd();
825         }
826
827         return ret;
828 }
829
830 result File::Seek(FileSeekPosition position, long offset) {
831         typedef result (File::*methodType)(FileSeekPosition position, long offset);
832         static methodType Seekp = 0;
833         result ret;
834         probeInfo_t     probeInfo;
835         int blockresult;
836         bool bfiltering = true;
837         char temp[50];
838         char temp_pos[50];
839         //FileAttributes attr;
840
841         if (!Seekp) {
842                 probeBlockStart();
843
844                 void *tmpPtr = dlsym(RTLD_NEXT,
845                                 "_ZN5Tizen2Io4File4SeekE16FileSeekPositionl");
846
847                 if (tmpPtr == NULL || dlerror() != NULL) {
848                         perror("dlsym failed : Tizen::Io::File::Seek");
849                         exit(0);
850                 }
851
852                 memcpy(&Seekp, &tmpPtr, sizeof(tmpPtr));
853
854                 probeBlockEnd();
855         }
856
857         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
858                 setProbePoint(&probeInfo);
859                 preBlockEnd();
860         }
861
862         ret = (this->*Seekp)(position, offset);
863
864         if(postBlockBegin(blockresult)) {
865
866                  if(FILESEEKPOSITION_BEGIN == position)
867                          strcpy(temp_pos, "FILESEEKPOSITION_BEGIN");
868                  else if(FILESEEKPOSITION_CURRENT == position)
869                          strcpy(temp_pos, "FILESEEKPOSITION_CURRENT");
870                  else if(FILESEEKPOSITION_END == position)
871                          strcpy(temp_pos, "FILESEEKPOSITION_END");
872                  else
873                          sprintf(temp_pos, "%d", position);
874
875                  WcharToChar(temp,this->GetName().GetPointer());
876
877                 PREPARE_LOCAL_BUF();
878                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
879                                   API_ID_result_File__Seek_FileSeekPosition_position__long_offset_,
880                                   "sx", temp_pos, offset);
881                 PACK_COMMON_END(ret, ret, blockresult);
882                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, 0, temp);
883                 FLUSH_LOCAL_BUF();
884
885                  postBlockEnd();
886         }
887
888         return ret;
889 }
890
891 int File::Tell(void) const {
892         typedef int (File::*methodType)(void) const;
893         static methodType Tellp = 0;
894         int ret;
895         probeInfo_t     probeInfo;
896         int blockresult;
897         bool bfiltering = true;
898         char temp[50];
899         //FileAttributes attr;
900
901         if (!Tellp) {
902                 probeBlockStart();
903
904                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZNK5Tizen2Io4File4TellEv");
905
906                 if (tmpPtr == NULL || dlerror() != NULL) {
907                         perror("dlsym failed : Tizen::Io::File::Tell");
908                         exit(0);
909                 }
910
911                 memcpy(&Tellp, &tmpPtr, sizeof(tmpPtr));
912
913                 probeBlockEnd();
914         }
915
916         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
917                 setProbePoint(&probeInfo);
918                 preBlockEnd();
919         }
920
921         ret = (this->*Tellp)();
922         result res = GetLastResult();
923
924         if(postBlockBegin(blockresult)) {
925                  WcharToChar(temp,this->GetName().GetPointer());
926
927                 PREPARE_LOCAL_BUF();
928                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
929                                   API_ID_int_File__Tell_void__const,
930                                   "", 0);
931                 PACK_COMMON_END(ret, res, blockresult);
932                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, 0, temp);
933                 FLUSH_LOCAL_BUF();
934
935                  postBlockEnd();
936         }
937
938         return ret;
939 }
940
941 result File::Truncate(int length) {
942         typedef result (File::*methodType)(int length);
943         static methodType Truncatep = 0;
944         result ret;
945         probeInfo_t     probeInfo;
946         int blockresult;
947         bool bfiltering = true;
948         char temp[50];
949         //FileAttributes attr;
950
951         if (!Truncatep) {
952                 probeBlockStart();
953
954                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File8TruncateEi");
955
956                 if (tmpPtr == NULL || dlerror() != NULL) {
957                         perror("dlsym failed : Tizen::Io::File::Truncate");
958                         exit(0);
959                 }
960
961                 memcpy(&Truncatep, &tmpPtr, sizeof(tmpPtr));
962                 probeBlockEnd();
963         }
964
965         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
966                 setProbePoint(&probeInfo);
967                 preBlockEnd();
968         }
969
970         ret = (this->*Truncatep)(length);
971
972         if(postBlockBegin(blockresult)) {
973                  WcharToChar(temp,this->GetName().GetPointer());
974
975                 PREPARE_LOCAL_BUF();
976                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
977                                   API_ID_result_File__Truncate_int_length_,
978                                   "d", length);
979                 PACK_COMMON_END(ret, ret, blockresult);
980                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_OTHER, 0, temp);
981                 FLUSH_LOCAL_BUF();
982
983                  postBlockEnd();
984         }
985
986         return ret;
987 }
988
989 result File::Write(const void *buffer, int length) {
990         typedef result (File::*methodType)(const void *buffer, int length);
991         static methodType Writep = 0;
992         result ret;
993         probeInfo_t     probeInfo;
994         int blockresult;
995         bool bfiltering = true;
996         char temp[50];
997         int nWritten = 0;
998         //FileAttributes attr;
999
1000         if (!Writep) {
1001                 probeBlockStart();
1002
1003                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteEPKvi");
1004
1005                 if (tmpPtr == NULL || dlerror() != NULL) {
1006                         perror("dlsym failed : Tizen::Io::File::Write");
1007                         exit(0);
1008                 }
1009
1010                 memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
1011                 probeBlockEnd();
1012         }
1013
1014         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
1015                 setProbePoint(&probeInfo);
1016                 nWritten = Tell();
1017                 preBlockEnd();
1018         }
1019
1020         ret = (this->*Writep)(buffer, length);
1021
1022         if(postBlockBegin(blockresult)) {
1023                  WcharToChar(temp,this->GetName().GetPointer());
1024                  nWritten = Tell() - nWritten;
1025
1026                 PREPARE_LOCAL_BUF();
1027                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
1028                                   API_ID_result_File__Write_const_void__buffer__int_length_,
1029                                   "xd", (unsigned long)buffer, length);
1030                 PACK_COMMON_END(ret, ret, blockresult);
1031                 PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE, 0, temp);
1032                 FLUSH_LOCAL_BUF();
1033
1034                  postBlockEnd();
1035         }
1036
1037         return ret;
1038 }
1039
1040 result File::Write(const Tizen::Base::ByteBuffer& buffer) {
1041         typedef result (File::*methodType)(const Tizen::Base::ByteBuffer& buffer);
1042         static methodType Writep = 0;
1043         result ret;
1044         probeInfo_t     probeInfo;
1045         int blockresult;
1046         bool bfiltering = true;
1047         char temp[50];
1048         int nWritten = 0;
1049         //FileAttributes attr;
1050
1051         if (!Writep) {
1052                 probeBlockStart();
1053
1054                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base10ByteBufferE");
1055
1056                 if (tmpPtr == NULL || dlerror() != NULL) {
1057                         perror("dlsym failed : Tizen::Io::File::Write");
1058                         exit(0);
1059                 }
1060
1061                 memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
1062                 probeBlockEnd();
1063         }
1064
1065         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
1066                 setProbePoint(&probeInfo);
1067                 nWritten = Tell();
1068                 preBlockEnd();
1069         }
1070
1071         ret = (this->*Writep)(buffer);
1072
1073         if(postBlockBegin(blockresult)) {
1074                  WcharToChar(temp,this->GetName().GetPointer());
1075                  nWritten = Tell() - nWritten;
1076
1077                 PREPARE_LOCAL_BUF();
1078                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
1079                                   API_ID_result_File__Write_const_Tizen__Base__ByteBuffer__buffer_,
1080                                   "x", (unsigned long)&buffer);
1081                 PACK_COMMON_END(ret, ret, blockresult);
1082                 PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE, 0, temp);
1083                 FLUSH_LOCAL_BUF();
1084
1085                  postBlockEnd();
1086         }
1087
1088         return ret;
1089 }
1090
1091 result File::Write(const Tizen::Base::String& buffer) {
1092         typedef result (File::*methodType)(const Tizen::Base::String& buffer);
1093         static methodType Writep = 0;
1094         result ret;
1095         probeInfo_t     probeInfo;
1096         int blockresult;
1097         bool bfiltering = true;
1098         char temp_buf[50];
1099         char temp_path[50];
1100         int nWritten = 0;
1101         //FileAttributes attr;
1102
1103         if (!Writep) {
1104                 probeBlockStart();
1105
1106                 void *tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4File5WriteERKNS_4Base6StringE");
1107
1108                 if (tmpPtr == NULL || dlerror() != NULL) {
1109                         perror("dlsym failed : Tizen::Io::File::Write");
1110                         exit(0);
1111                 }
1112
1113                 memcpy(&Writep, &tmpPtr, sizeof(tmpPtr));
1114                 probeBlockEnd();
1115         }
1116
1117         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
1118                 setProbePoint(&probeInfo);
1119                 nWritten = Tell();
1120                 preBlockEnd();
1121         }
1122
1123         ret = (this->*Writep)(buffer);
1124
1125         if(postBlockBegin(blockresult)) {
1126                  WcharToChar(temp_buf,buffer.GetPointer());
1127                  WcharToChar(temp_path,this->GetName().GetPointer());
1128                  nWritten = Tell() - nWritten;
1129
1130                 PREPARE_LOCAL_BUF();
1131                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
1132                                   API_ID_result_File__Write_const_Tizen__Base__String__buffer_,
1133                                   "s", temp_buf);
1134                 PACK_COMMON_END(ret, ret, blockresult);
1135                 PACK_RESOURCE(nWritten, (unsigned long)this, FD_FILE, FD_API_WRITE, 0, temp_path);
1136                 FLUSH_LOCAL_BUF();
1137
1138                  postBlockEnd();
1139         }
1140         return ret;
1141 }
1142
1143 File::~File(void) {
1144         typedef void (File::*methodType)();
1145         static methodType FileDp = 0;
1146         probeInfo_t     probeInfo;
1147         int blockresult;
1148         bool bfiltering = true;
1149         void *tmpPtr;
1150
1151         if (!FileDp) {
1152                 probeBlockStart();
1153
1154                 tmpPtr = dlsym(RTLD_NEXT, "_ZN5Tizen2Io4FileD1Ev");
1155
1156                 if (tmpPtr == NULL || dlerror() != NULL) {
1157                         perror("dlsym failed : Tizen::Io::File::~File");
1158                         exit(0);
1159                 }
1160
1161                 memcpy(&FileDp, &tmpPtr, sizeof(tmpPtr));
1162                 probeBlockEnd();
1163         }
1164
1165         if((blockresult = preBlockBegin(CALLER_ADDRESS, bfiltering, _sopt)) != 0) {
1166                 setProbePoint(&probeInfo);
1167                 preBlockEnd();
1168         }
1169 //
1170         (this->*FileDp)();
1171 //
1172         if(postBlockBegin(blockresult)) {
1173
1174                 PREPARE_LOCAL_BUF();
1175                 PACK_COMMON_BEGIN(MSG_PROBE_RESOURCE,
1176                                   API_ID_File___File_void_,
1177                                   "", 0);
1178                 PACK_COMMON_END(0, 0, blockresult);
1179                 PACK_RESOURCE(0, (unsigned long)this, FD_FILE, FD_API_CLOSE, 0, "");
1180                 FLUSH_LOCAL_BUF();
1181
1182                 postBlockEnd();
1183         }
1184 }
1185
1186
1187 // static methods
1188 //static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
1189 //              const Tizen::Base::String &secureFilePath) {
1190 //      typedef result (File::*methodType)(
1191 //                      const Tizen::Base::String &plainFilePath,
1192 //                      const Tizen::Base::String &secureFilePath);
1193 //      static methodType ConvertToSecureFilep = 0;
1194 //
1195 //}
1196 //static result File::ConvertToSecureFile(const Tizen::Base::String &plainFilePath,
1197 //              const Tizen::Base::String &secureFilePath,
1198 //              const Tizen::Base::ByteBuffer& key) {
1199 //      typedef result (File::*methodType)(
1200 //                      const Tizen::Base::String &plainFilePath,
1201 //                      const Tizen::Base::String &secureFilePath,
1202 //                      const Tizen::Base::ByteBuffer& key);
1203 //      static methodType ConvertToSecureFilep = 0;
1204 //
1205 //}
1206 //static result File::Copy(const Tizen::Base::String& srcFilePath,
1207 //              const Tizen::Base::String& destFilePath, bool failIfExist) {
1208 //      typedef result (File::*methodType)(const Tizen::Base::String& srcFilePath,
1209 //                      const Tizen::Base::String& destFilePath, bool failIfExist);
1210 //      static methodType Copyp = 0;
1211 //
1212 //}
1213 //static result File::GetAttributes(const Tizen::Base::String& filePath,
1214 //              FileAttributes& attribute) {
1215 //      typedef result (File::*methodType)(const Tizen::Base::String& filePath,
1216 //                      FileAttributes& attribute);
1217 //      static methodType GetAttributesp = 0;
1218 //
1219 //}
1220 //static const Tizen::Base::String File::GetFileExtension(
1221 //              const Tizen::Base::String& filePath) {
1222 //      typedef const Tizen::Base::String (File::*methodType)(
1223 //                      const Tizen::Base::String& filePath);
1224 //      static methodType GetFileExtensionp = 0;
1225 //
1226 //}
1227 //const Tizen::Base::String File::GetFileName(
1228 //              const Tizen::Base::String& filePath) {
1229 //      typedef const Tizen::Base::String (File::*methodType)(
1230 //                      const Tizen::Base::String& filePath);
1231 //      static methodType GetFileNamep = 0;
1232 //      Tizen::Base::String ret;
1233 //
1234 //      if (!GetFileNamep) {
1235 //                      probeBlockStart();
1236 //                      void *tmpPtr = dlsym(RTLD_NEXT,
1237 //                                      "_ZN5Tizen2Io4File11GetFileNameERKNS_4Base6StringE");
1238 //
1239 //                      if (tmpPtr == NULL || dlerror() != NULL) {
1240 //                              perror("dlsym failed : Tizen::Io::File::GetFileName");
1241 //                              exit(0);
1242 //                      }
1243 //
1244 //                      memcpy(&GetFileNamep, &tmpPtr, sizeof(tmpPtr));
1245 //                      probeBlockEnd();
1246 //              }
1247 //      ret = (File::(*GetFileNamep))(filePath);
1248 //
1249 //return ret;
1250 //}
1251 //static bool File::IsEncrypted(const Tizen::Base::String &filePath) {
1252 //      typedef bool (File::*methodType)(const Tizen::Base::String &filePath);
1253 //      static methodType IsEncryptedp = 0;
1254 //
1255 //}
1256 //static bool File::IsFileExist(const Tizen::Base::String& filePath) {
1257 //      typedef bool (File::*methodType)(const Tizen::Base::String& filePath);
1258 //      static methodType IsFileExistp = 0;
1259 //
1260 //}
1261 //static result File::Move(const Tizen::Base::String& oldFilePath,
1262 //              const Tizen::Base::String& newFilePath) {
1263 //      typedef result (File::*methodType)(const Tizen::Base::String& oldFilePath,
1264 //                      const Tizen::Base::String& newFilePath);
1265 //      static methodType Movep = 0;
1266 //
1267 //}
1268 //static result File::Remove(const Tizen::Base::String& filePath) {
1269 //      typedef result (File::*methodType)(const Tizen::Base::String& filePath);
1270 //      static methodType Removep = 0;
1271 //
1272 //}
1273
1274 }
1275 }