Merge branch 'temp' into nkw
[platform/framework/native/appfw.git] / src / io / FIo_MemoryMappedFileImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16
17 /**
18  * @file        FIo_MemoryMappedFileImpl.h
19  * @brief       This is the header file for the %_MemoryMappedFileImpl class.
20  *
21  * This header file contains the declarations of the %_MemoryMappedFileImpl class.
22  */
23
24 #ifndef _FIO_INTERNAL_MEMORY_MAPPED_FILE_IMPL_H_
25 #define _FIO_INTERNAL_MEMORY_MAPPED_FILE_IMPL_H_
26
27 #include <FBaseObject.h>
28
29 namespace Tizen { namespace Io
30 {
31
32 class _MemoryMappedFileImpl
33         : public Tizen::Base::Object
34 {
35
36 public:
37         _MemoryMappedFileImpl(void);
38
39         ~_MemoryMappedFileImpl(void);
40
41         result Construct(const File& file);
42
43         void* Map(void* address, long long length, unsigned long protection, unsigned long flag, long long offset);
44
45         result Unmap(void* address, long long length);
46
47         result Sync(void* address, long long length, MemoryMappedFileSyncFlag syncFlag);
48
49 private:
50         /**
51         * This is the default copy constructor for this class.
52         *
53         * @since 2.1
54         */
55         _MemoryMappedFileImpl(const _MemoryMappedFileImpl& rhs);
56
57         /**
58         * This is the assignment operator for this class.
59         *
60         * @since 2.1
61         */
62         _MemoryMappedFileImpl& operator =(const _MemoryMappedFileImpl& rhs);
63
64         int __fd;
65
66 }; // _MemoryMappedFileImpl
67
68 }} // Tizen::Io
69
70 #endif // _FIO_INTERNAL_MEMORY_MAPPED_FILE_IMPL_H_
71