Modify Scanner class
[platform/framework/native/appfw.git] / inc / FSysEnvironment.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        FSysEnvironment.h
20  * @brief       This is the header file for the %Environment class.
21  *
22  * This header file contains the declarations of the %Environment class.
23  */
24
25 #ifndef _FSYS_ENVIRONMENT_H_
26 #define _FSYS_ENVIRONMENT_H_
27
28 #include <FBaseString.h>
29
30 namespace Tizen { namespace System
31 {
32
33 /**
34  * @enum        PredefinedDirectoryType
35  *
36  * Defines the type of the pre-defined directory used to classify files to be stored.
37  *
38  * @since 2.0
39  */
40 enum PredefinedDirectoryType
41 {
42         PREDEFINED_DIRECTORY_IMAGES = 0, /**< The directory for image files to be stored in internal storage (read-write permission) */
43         PREDEFINED_DIRECTORY_SOUNDS,     /**< The directory for sound files to be stored in internal storage (read-write permission) */
44         PREDEFINED_DIRECTORY_VIDEOS,     /**< The directory for video files to be stored in internal storage (read-write permission) */
45         PREDEFINED_DIRECTORY_CAMERA,     /**< The directory for files to be stored in internal storage by camera application (read-write permission) */
46         PREDEFINED_DIRECTORY_DOWNLOADS,  /**< The directory for files to be stored in internal storage by download manager (read-write permission) */
47         PREDEFINED_DIRECTORY_OTHERS,     /**< The directory for other files to be stored in internal storage (read-write permission) */
48         PREDEFINED_DIRECTORY_SYSTEM_RINGTONES,   /**< The directory for preloaded system ringtone files in internal storage (read only permission) @b Since: @b 2.1*/
49
50         PREDEFINED_DIRECTORY_EXTERNAL_IMAGES = 100,     /**< The directory for image files to be stored in external MMC (read-write permission) */
51         PREDEFINED_DIRECTORY_EXTERNAL_SOUNDS,           /**< The directory for sound files to be stored in external MMC (read-write permission) */
52         PREDEFINED_DIRECTORY_EXTERNAL_VIDEOS,           /**< The directory for video files to be stored in external MMC (read-write permission) */
53         PREDEFINED_DIRECTORY_EXTERNAL_CAMERA,           /**< The directory for files to be stored in external MMC by camera application (read-write permission) */
54         PREDEFINED_DIRECTORY_EXTERNAL_DOWNLOADS,        /**< The directory for files to be stored in external MMC by download manager (read-write permission) */
55         PREDEFINED_DIRECTORY_EXTERNAL_OTHERS,           /**< The directory for other files to be stored in external MMC (read-write permission) */
56
57         PREDEFINED_DIRECTORY_APPLICATIONS = 200,        /**< The directory for applications to be installed in internal storage (read-only permission) */
58         PREDEFINED_DIRECTORY_EXTERNAL_APPLICATIONS,     /**< The directory for applications to be installed in external MMC (read-only permission) */
59 };
60
61 /**
62  * @class       Environment
63  * @brief       This class provides methods for getting the system environment variables.
64  *
65  * @since 2.0
66  *
67  * @final       This class is not intended for extension.
68  *
69  * The %Environment class provides methods for getting the system environment variables.
70  */
71 class _OSP_EXPORT_ Environment
72 {
73
74 public:
75         /**
76         * Gets the path for the media directory that is usually used to store media contents.
77         *
78         * @since 2.0
79         *
80         * @return       The media directory path
81         */
82         static Tizen::Base::String GetMediaPath(void);
83
84         /**
85         * Gets the path for the default download directory that is usually used to store downloaded contents by the Tizen::Content::DownloadManager class.
86         *
87         * @since 2.0
88         *
89         * @return       The default download directory path
90         */
91         static Tizen::Base::String GetDefaultDownloadPath(void);
92
93         /**
94         * Gets the path for the external storage.
95         *
96         * @since 2.0
97         *
98         * @return       The external storage directory path
99         */
100         static Tizen::Base::String GetExternalStoragePath(void);
101
102         /**
103         * Gets the directory path according to the pre-defined directory type.
104         *
105         * @since        2.0
106         *
107         * @return       The pre-defined directory path according to the specified @c dirType, @n
108         *               else an empty string if the specified @c dirType is invalid
109         * @param[in]    dirType The pre-defined directory type
110         * @remarks      The directory path for some directory types such as IMAGES, SOUNDS, VIDEOS, CAMERA, DOWNLOADS, and OTHERS may not yet exist,
111         *               so you must make sure that it exists before using it.
112         * @see          Tizen::Io::Directory::Create()
113         */
114         static Tizen::Base::String GetPredefinedPath(PredefinedDirectoryType dirType);
115
116 private:
117         /**
118         * The implementation of this constructor is intentionally blank to prohibit creation of an instance.
119         *
120         * @since 2.0
121         */
122         Environment(void);
123
124         /**
125         * The implementation of this destructor is intentionally blank because an instance cannot be created.
126         *
127         * @since 2.0
128         */
129         ~Environment(void);
130
131         /**
132         * This copy constructor is intentionally declared as private to prohibit copying.
133         *
134         * @since 2.0
135         */
136         Environment(const Environment& rhs);
137
138         /**
139         * This copy assignment operator is intentionally declared as private to prohibit copying.
140         *
141         * @since 2.0
142         */
143         Environment& operator =(const Environment& rhs);
144
145 }; // Environment
146
147 }} // Tizen::System
148
149 #endif // _FSYS_ENVIRONMENT_H_