X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fsystem%2Fcommon%2Ffile-closer.h;h=8a8a37dbea45372288040590f307e27c777439a9;hb=c1bb1606717a5a831a0e7bdaca8b4eb86dc5a89e;hp=78f6e5adb80711b32ea29af478c96667004b640a;hpb=e52363c6681706a228521e379ff04cd56c1c53ee;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/system/common/file-closer.h b/dali/internal/system/common/file-closer.h old mode 100644 new mode 100755 index 78f6e5a..8a8a37d --- a/dali/internal/system/common/file-closer.h +++ b/dali/internal/system/common/file-closer.h @@ -28,7 +28,23 @@ namespace Internal { namespace Platform { +namespace InternalFile +{ + FILE *fmemopen( void *__s, size_t __len, const char *__modes ); + + size_t fread( void* _Buffer, size_t _ElementSize, size_t _ElementCount, FILE* _Stream ); + int fclose( FILE *__stream ); + + size_t fread( void* buf, size_t eleSize, size_t count, const FILE *fp ); + + void fwrite( void *buf, int size, int count, FILE *fp ); + int fseek( FILE *fp, int offset, int origin ); + + int ftell( FILE *fp ); + + bool feof( FILE *fp ); +}; /** * Opens files and closes them later even if an exception is thrown. */ @@ -55,7 +71,7 @@ protected: // prevent this class being directly instantiated * @brief Construct a FileCloser guarding a FILE* for reading out of the memory buffer passed in. */ FileCloser( uint8_t* buffer, size_t dataSize, const char * const mode ) - : mFile( fmemopen( buffer, dataSize, mode) ) + : mFile( InternalFile::fmemopen( buffer, dataSize, mode) ) { } @@ -71,7 +87,7 @@ protected: // prevent this class being directly instantiated vector.Resize( bufferSize ); void * const buffer = &vector[0]; - mFile = fmemopen( buffer, bufferSize, mode ); + mFile = InternalFile::fmemopen( buffer, bufferSize, mode ); DALI_ASSERT_DEBUG( buffer != 0 && "Cant open file on null buffer." ); DALI_ASSERT_DEBUG( dataSize > 0 && "Pointless to open file on empty buffer." ); @@ -90,7 +106,7 @@ protected: // prevent this class being directly instantiated { if( mFile != 0 ) { - const int closeFailed = fclose( mFile ); + const int closeFailed = InternalFile::fclose( mFile ); if ( closeFailed ) {