sync with tizen_2.0
[platform/framework/native/appfw.git] / src / io / inc / FIo_FileAttributesImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FIo_FileAttributesImpl.h
20  * @brief       This is the header file for the %_FileAttributesImpl class.
21  *
22  * This header file contains the declarations of the %_FileAttributesImpl class.
23  */
24
25 #ifndef _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
26 #define _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
27
28 #include <FBaseDateTime.h>
29
30 namespace Tizen {namespace Base
31 {
32 class String;
33 class ByteBuffer;
34 }}
35
36 namespace Tizen { namespace Io
37 {
38
39 class _FileAttributesImpl
40         : public Tizen::Base::Object
41 {
42
43 public:
44         _FileAttributesImpl(void);
45
46         virtual ~_FileAttributesImpl(void);
47
48         _FileAttributesImpl(const _FileAttributesImpl& fileAttributesImpl);
49
50         _FileAttributesImpl& operator =(const _FileAttributesImpl& fileAttributesImpl);
51
52         static _FileAttributesImpl* GetInstance(FileAttributes& fileAttributes);
53
54         static const _FileAttributesImpl* GetInstance(const FileAttributes& fileAttributes);
55
56         virtual bool Equals(const Tizen::Base::Object& object) const;
57
58         int GetHashCode(void) const;
59
60         long long GetFileSize(void) const;
61
62         bool IsDirectory(void) const;
63
64         bool IsHidden(void) const;
65
66         bool IsReadOnly(void) const;
67
68         Tizen::Base::DateTime GetDateTime(void) const;
69
70         Tizen::Base::DateTime GetLastModifiedTime(void) const;
71
72 private:
73         void Set(const Tizen::Base::DateTime& dateTime, const Tizen::Base::DateTime& modifiedTime, long long fileSize,
74                          unsigned long attribute, bool hidden);
75
76 private:
77         long long __fileSize;
78         bool __directory;
79         bool __hidden;
80         bool __readOnly;
81         Tizen::Base::DateTime __creationTime;
82         Tizen::Base::DateTime __lastModifiedTime;
83
84         friend class FileAttributes;
85         friend class _NormalFile;
86         friend class _FileUtil;
87
88 }; // _FileAttributesImpl
89
90 }} // Tizen::Io
91
92 #endif // _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
93