tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / Filesystem / Enums.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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 #ifndef WRTDEVICEAPIS_FILESYSTEM_ENUMS_H_
17 #define WRTDEVICEAPIS_FILESYSTEM_ENUMS_H_
18
19 #include <string>
20 #include <map>
21
22 namespace WrtDeviceApis {
23 namespace Filesystem {
24 namespace Api {
25
26 enum LocationType
27 {
28     LT_APPS,
29     LT_DOCUMENTS,
30     LT_DOWNLOADS,
31     LT_GAMES,
32     LT_IMAGES,
33     LT_OTHERS,
34     LT_ROOT,
35     LT_SDCARD,
36     LT_SOUNDS,
37     LT_TEMP,
38     LT_VIDEOS
39 };
40
41 enum NodeType
42 {
43     NT_DIRECTORY,
44     NT_FILE
45 };
46
47 enum AccessMode
48 {
49     AM_READ     = 0x0001,
50     AM_WRITE    = 0x0002,
51     AM_APPEND   = 0x0004
52 };
53
54 /**
55  * Used in @see IManager::access().
56  */
57 enum AccessType
58 {
59     AT_EXISTS   = 0x0000, //!< AT_EXISTS - checks for existence
60     AT_READ     = 0x0001, //!< AT_READ   - checks for read access
61     AT_WRITE    = 0x0002, //!< AT_WRITE  - checks for write access
62     AT_EXEC     = 0x0004  //!< AT_EXEC   - checks for execution access
63 };
64
65 enum Permissions
66 {
67     PERM_NONE   = 0x0000,
68     PERM_READ   = 0x0001,
69     PERM_WRITE  = 0x0002
70 };
71
72 enum PlatformMode
73 {
74     PM_USER_READ    = 0x0100,
75     PM_USER_WRITE   = 0x0080,
76     PM_USER_EXEC    = 0x0040,
77     PM_GROUP_READ   = 0x0020,
78     PM_GROUP_WRITE  = 0x0010,
79     PM_GROUP_EXEC   = 0x0008,
80     PM_OTHER_READ   = 0x0004,
81     PM_OTHER_WRITE  = 0x0002,
82     PM_OTHER_EXEC   = 0x0001,
83     PM_NONE         = 0x0000
84 };
85
86 enum Options
87 {
88     OPT_NONE        = 0x0000,
89     OPT_OVERWRITE   = 0x0001,
90     OPT_RECURSIVE   = 0x0002
91 };
92
93 enum FindFilter
94 {
95     FF_NAME,
96     FF_CREATED,
97     FF_MODIFIED,
98     FF_SIZE
99 };
100 typedef std::map<FindFilter, std::string> FiltersMap;
101
102 } // API
103 } // Filesystem
104 } // WrtDeviceApis
105
106 #endif /* WRTDEVICEAPIS_FILESYSTEM_ENUMS_H_ */