2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FIo_IFileCore.h
19 * @brief This is the header file for the _IFileCore class.
21 * This header file contains the declarations of the %_IFileCore class.
24 #ifndef _FIO_INTERNAL_IFILECORE_H_
25 #define _FIO_INTERNAL_IFILECORE_H_
27 #include <FBaseString.h>
28 #include <FBaseByteBuffer.h>
29 #include <FBaseResult.h>
31 namespace Tizen { namespace Io
45 virtual ~_IFileCore(void) {}
47 virtual result Read(Tizen::Base::ByteBuffer& buffer) = 0;
49 virtual int Read(void* buffer, int length) = 0;
51 virtual result Read(Tizen::Base::String& buffer) = 0;
53 virtual result Write(const Tizen::Base::ByteBuffer& buffer) = 0;
55 virtual result Write(const void* buffer, int length) = 0;
57 virtual result Write(const Tizen::Base::String& buffer) = 0;
59 virtual result Flush(void) = 0;
61 virtual int Tell(void) const = 0;
63 virtual result Seek(FileSeekPosition position, long offset) = 0;
65 virtual result Truncate(int length) = 0;
67 virtual Tizen::Base::String GetName(void) = 0;
69 virtual FILE* GetFilePointer(void) = 0;
81 #endif // _FIO_INTERNAL_IFILECORE_H_