Change event sync to async
[platform/framework/native/appfw.git] / src / io / inc / FIo_FileAttributesImpl.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_FileAttributesImpl.h
19  * @brief       This is the header file for the %_FileAttributesImpl class.
20  *
21  * This header file contains the declarations of the %_FileAttributesImpl class.
22  */
23
24 #ifndef _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
25 #define _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
26
27 #include <FBaseDateTime.h>
28
29 namespace Tizen {namespace Base
30 {
31 class String;
32 class ByteBuffer;
33 }}
34
35 namespace Tizen { namespace Io
36 {
37
38 class _FileAttributesImpl
39         : public Tizen::Base::Object
40 {
41
42 public:
43         _FileAttributesImpl(void);
44
45         virtual ~_FileAttributesImpl(void);
46
47         _FileAttributesImpl(const _FileAttributesImpl& fileAttributesImpl);
48
49         _FileAttributesImpl& operator =(const _FileAttributesImpl& fileAttributesImpl);
50
51         static _FileAttributesImpl* GetInstance(FileAttributes& fileAttributes);
52
53         static const _FileAttributesImpl* GetInstance(const FileAttributes& fileAttributes);
54
55         virtual bool Equals(const Tizen::Base::Object& object) const;
56
57         int GetHashCode(void) const;
58
59         long long GetFileSize(void) const;
60
61         bool IsDirectory(void) const;
62
63         bool IsHidden(void) const;
64
65         bool IsReadOnly(void) const;
66
67         Tizen::Base::DateTime GetDateTime(void) const;
68
69         Tizen::Base::DateTime GetLastModifiedTime(void) const;
70
71 private:
72         void Set(const Tizen::Base::DateTime& dateTime, const Tizen::Base::DateTime& modifiedTime, off64_t fileSize,
73                          unsigned long attribute, bool hidden);
74
75 private:
76         off64_t __fileSize;
77         bool __directory;
78         bool __hidden;
79         bool __readOnly;
80         Tizen::Base::DateTime __creationTime;
81         Tizen::Base::DateTime __lastModifiedTime;
82
83         friend class FileAttributes;
84         friend class _NormalFile;
85         friend class _FileUtil;
86
87 }; // _FileAttributesImpl
88
89 }} // Tizen::Io
90
91 #endif // _FIO_INTERNAL_FILEATTRIBUTES_IMPL_H_
92