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