Merge "Update privilege check logic" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FIoRegistry.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        FIoRegistry.h
20  * @brief       This is the header file for the %Registry class.
21  *
22  * This header file contains the declarations of the %Registry class.
23  */
24
25 #ifndef _FIO_REGISTRY_H_
26 #define _FIO_REGISTRY_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseUuId.h>
30 #include <FBaseByteBuffer.h>
31 #include <FBaseColArrayList.h>
32 #include <FBaseResult.h>
33 #include <FBaseColIMap.h>
34 #include <FIoFileLock.h>
35
36 namespace Tizen {namespace Base
37 {
38 class String;
39 class ByteBuffer;
40 }}
41
42 namespace Tizen { namespace Io
43 {
44
45 static const long REG_OPEN_READ_ONLY  = 0x00000001L;
46 static const long REG_OPEN_READ_WRITE = 0x00000002L;
47 static const long REG_OPEN_CREATE     = 0x00000004L;
48
49 /**
50  * @class       Registry
51  * @brief       This class provides a mechanism to access and manipulate registry files.
52  *
53  * @since       2.0
54  *
55  * @final       This class is not intended for extension.
56  *
57  * The %Registry class provides a mechanism to access and manipulate registry files.
58  *
59  * For more information on the class features,
60  * see <a href="../org.tizen.native.appprogramming/html/guide/io/io_namespace.htm">Io Guide</a>.
61  *
62  * The following example demonstrates how to use the %Registry class.
63  *
64  * @code
65 #include <FBase.h>
66 #include <FIo.h>
67 #include <FApp.h>
68
69 using namespace Tizen::Base;
70 using namespace Tizen::Io;
71 using namespace Tizen::App;
72
73 void
74 RegistryTest()
75 {
76         Registry reg;
77         String regPathName(L"regTest.ini");
78
79         // Section name
80         String sect1(L"section1");
81         String sect2(L"section2");
82         String sect3(L"section3");
83
84         // Entry name
85         String entry1(L"entry1");
86         String entry2(L"entry2");
87
88         int iVal;
89         result r;
90
91         r = reg.Construct(App::GetInstance()->GetAppDataPath() + regPathName, "a+");
92         if (IsFailed(r))
93         {
94                 goto CATCH;
95         }
96
97         // Create sections
98         r = reg.AddSection(sect1);
99         r = reg.AddSection(sect2);
100         r = reg.AddSection(sect3);
101
102         // Add value: section1 { entry1 = 999 }
103         r = reg.AddValue(sect1, entry1, 999);
104         if (IsFailed(r))
105         {
106                 goto CATCH;
107         }
108
109         // Change value: section1 { entry1 = 3 }
110         r = reg.SetValue(sect1, entry1, 3);
111         if (IsFailed(r))
112         {
113                 goto CATCH;
114         }
115
116         // Add value: section2 { entry2 = 1.1234599 }
117         r = reg.AddValue(sect2, entry2, 1.1234599);
118         if (IsFailed(r))
119         {
120                 goto CATCH;
121         }
122
123         // Get value: section1 { entry1 = ? }
124         r = reg.GetValue(sect1, entry1, iVal);
125         if (IsFailed(r))
126         {
127                 goto CATCH;
128         }
129
130         // Write to the file
131         r = reg.Flush();
132         if (IsFailed(r))
133         {
134                 goto CATCH;
135         }
136
137         return;
138
139 CATCH:
140         // Do some error handling
141         return;
142 }
143  * @endcode
144  */
145
146 class _OSP_EXPORT_ Registry
147         : public Tizen::Base::Object
148 {
149
150 public:
151         /**
152         * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
153         *
154         * @since        2.0
155         */
156         Registry(void);
157
158         /**
159         * This destructor overrides Tizen::Base::Object::~Object().
160         *
161         * @since        2.0
162         */
163         virtual ~Registry(void);
164
165         /**
166         * @{
167         * @if OSPDEPREC
168         * Initializes this instance of %Registry with the specified parameters. @n
169         * This method loads a registry file in the read-write mode.
170         *
171         * @if OSPCOMPAT
172         * @brief                        <i> [Deprecated] [Compatibility] </i>
173         * @endif
174         * @deprecated           This method is deprecated. Instead of using this method, use Directory::Create(const Tizen::Base::String &dirPath,
175         *                                       bool createParentDirectories=false) and Registry::Construct(const Tizen::Base::String& regPath, const Tizen::Base::String& openMode).
176         * @since                        2.0
177         * @if OSPCOMPAT
178         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
179         *                                       For more information, see @ref CompIoPathPage "here".
180         * @endif
181         *
182         * @return               An error code
183         * @param[in]    regPath                                 The path of the registry file to open or create
184         * @param[in]    createIfNotExist                Set to @c true to create a registry file, @n
185         *                                       else @c false to open an existing registry file
186         * @exception    E_SUCCESS                               The method is successful.
187         * @exception    E_INVALID_ARG                   Either of the following conditions has occurred: @n
188         *                                                                               - The length of the specified string of a file path is less
189         *                                                                                 than or equal to @c 0. @n
190         *                                                                               - The translated overall length of the specified path exceeds the
191         *                                                                                 system limitation. @n
192         *                                                                               - The specified path is invalid. @n
193         * @exception    E_FILE_NOT_FOUND                An entry for the specified file or path cannot be found.
194         * @exception    E_ILLEGAL_ACCESS                Access is denied due to insufficient permission.
195         * @exception    E_END_OF_FILE                   The file pointer has reached end-of-file.
196         * @exception    E_MAX_EXCEEDED                  The number of opened files has exceeded the maximum limit.
197         * @exception    E_STORAGE_FULL                  The disk space is full.
198         * @exception    E_IO                                    Either of the following conditions has occurred: @n
199         *                                                                               - An unexpected device failure has occurred as the media ejected suddenly. @n
200         *                                                                               - %File corruption is detected.
201         * @exception    E_INVALID_FORMAT                The input registry file contains '0x00' in the middle of the file.
202         * @exception    E_PARSING_FAILED                The method has failed to parse the registry file.
203         * @remarks              To load the registry in read-only mode, use the Registry::Construct(const Tizen::Base::String& regPath,
204         *               long openMode, long option) method with REG_OPEN_READ_ONLY as a value for the open mode flag.
205         * @endif
206         * @}
207         */
208         result Construct(const Tizen::Base::String& regPath, bool createIfNotExist);
209
210         /**
211         * @{
212         * @if OSPDEPREC
213         * Initializes this instance of %Registry with the specified parameters. @n
214         * This method loads a registry file in the read-only or the read-write mode.
215         *
216         * @if OSPCOMPAT
217         * @brief                        <i> [Deprecated] [Compatibility] </i>
218         * @endif
219         * @deprecated           This method is deprecated. Instead of using this method, use Directory::Create(const Tizen::Base::String &dirPath,
220         *                                       bool createParentDirectories=false) and Registry::Construct(const Tizen::Base::String& regPath, const Tizen::Base::String& openMode).
221         * @since                        2.0
222         * @if OSPCOMPAT
223         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
224         *                                       For more information, see @ref CompIoPathPage "here".
225         * @endif
226         *
227         * @return               An error code
228         * @param[in]    regPath                                 The path of the registry file to open or create
229         * @param[in]    openMode                                An open mode flag @n
230         *                                       Currently, the following flags can be used in combination with
231         *                                       the logical OR operator: @n
232         *                                                                                (1) REG_OPEN_READ_ONLY @n
233         *                                                                                (2) REG_OPEN_READ_WRITE @n
234         *                                                                                (3) REG_OPEN_READ_WRITE | REG_OPEN_CREATE
235         * @param[in]    option                                  This argument is reserved for further use @n It is recommended to use @c 0.
236         * @exception    E_SUCCESS                               The method is successful.
237         * @exception    E_INVALID_ARG                   Either of the following conditions has occurred: @n
238         *                                                                               - The length of the specified string of a file path is less
239         *                                                                                 than or equal to @c 0. @n
240         *                                                                               - The translated overall length of the specified path exceeds the
241         *                                                                                 system limitation. @n
242         *                                                                               - The specified path is invalid. @n
243         * @exception    E_FILE_NOT_FOUND                An entry for the specified file or path cannot be found.
244         * @exception    E_ILLEGAL_ACCESS                Access is denied due to insufficient permission.
245         * @exception    E_END_OF_FILE                   The file pointer has reached end-of-file.
246         * @exception    E_MAX_EXCEEDED                  The number of opened files has exceeded the maximum limit.
247         * @exception    E_STORAGE_FULL                  The disk space is full.
248         * @exception    E_IO                                    Either of the following conditions has occurred: @n
249         *                                                                               - An unexpected device failure has occurred as the media ejected suddenly. @n
250         *                                                                               - %File corruption is detected.
251         * @exception    E_INVALID_FORMAT                The input registry file contains '0x00' in the middle of the file.
252         * @exception    E_PARSING_FAILED                The method has failed to parse the registry file.
253         * @endif
254         * @}
255         */
256         result Construct(const Tizen::Base::String& regPath, long openMode, long option);
257
258         /**
259         * Initializes this instance of %Registry with the specified parameters. @n
260         * This method opens an existing registry file or creates a new one according to the specified file opening mode.
261         * And this method loads data of the registry file to system memory and flushes the data to the storage when this instance
262         * is released or Registry::Flush() is called.
263         *
264         * @since                2.0
265         *
266         * @return               An error code
267         * @param[in]    regPath                         The path of the registry file to open or create
268         * @param[in]    pOpenMode                       The file opening mode @n
269         *                                                                       It can be one of the following:
270         *                                                                       - r : Open for reading.
271         *                                                                       - r+: Open for reading and writing.
272         *                                                                       - w : Open for writing. The registry file is created if it does not exist,
273         *                                                                                 otherwise it is truncated to zero length.
274         *                                                                       - w+: Open for writing and reading. The registry file is created if it does not exist,
275         *                                                                                 otherwise it is truncated to zero length.
276         *                                                                       - a : Open for writing. The registry file is created if it does not exist.
277         *                                                                       - a+: Open for writing and reading. The registry file is created if it does not exist.
278         * @exception    E_SUCCESS                       The method is successful.
279         * @exception    E_INVALID_ARG           Either of the following conditions has occurred: @n
280         *                                                                       - The overall length of the specified @c regPath is equal to @c 0 or
281         *                                                                         exceeds system limitations. @n
282         *                                                                       - The combination of the specified @c pOpenMode is not allowed. @n
283         * @exception    E_ILLEGAL_ACCESS        Access is denied due to insufficient permission.
284         * @exception    E_FILE_NOT_FOUND        The specified @c regPath cannot be found.
285         * @exception    E_INVALID_FORMAT        Either of the following conditions has occurred: @n
286         *                                                                       - The section or entry name of the registry file includes one of the following characters:
287         *                                                                       '\0', '\n', '#' and '='.
288         *                                                                       - The entry value of the registry file includes one of the following characters:
289         *                                                                       '\0' and '\n'.
290         * @exception    E_MAX_EXCEEDED          The number of opened files has exceeded the maximum limit.
291         * @exception    E_STORAGE_FULL          The disk space is full.
292         * @exception    E_IO                            Either of the following conditions has occurred: @n
293         *                                                                       - An unexpected device failure has occurred as the media ejected suddenly. @n
294         *                                                                       - %File corruption is detected.
295         * @exception    E_SYSTEM                        The method cannot proceed due to a severe system error.
296         */
297         result Construct(const Tizen::Base::String& regPath, const char* pOpenMode);
298
299         /**
300         * Initializes this instance of %Registry with the specified parameters. @n
301         * This method opens an existing secure registry file or creates a new one according to the specified file opening mode.
302         * And this method loads data of the secure registry file to system memory and flushes the data to the storage when this instance
303         * is released or Registry::Flush() is called.
304         * The contents written to the secure registry file is automatically encrypted and the contents read from the secure registry
305         * file is automatically decrypted by the platform. @n
306         * Applications using this method can access the same secure registry files that are created by other applications with the
307         * identical key value in same device. However, the secure registry files created by this method cannot be accessed in other devices.
308         *
309         * @since                2.0
310         *
311         * @return               An error code
312         * @param[in]    regPath                         The path of the registry file to open or create
313         * @param[in]    pOpenMode                       The file opening mode @n
314         *                                                                       It can be one of the following:
315         *                                                                       - r : Open for reading.
316         *                                                                       - r+: Open for reading and writing.
317         *                                                                       - w : Open for writing. The registry file is created if it does not exist,
318         *                                                                                 otherwise it is truncated to zero length.
319         *                                                                       - w+: Open for writing and reading. The registry file is created if it does not exist,
320         *                                                                                 otherwise it is truncated to zero length.
321         *                                                                       - a : Open for writing. The registry file is created if it does not exist.
322         *                                                                       - a+: Open for writing and reading. The registry file is created if it does not exist.
323         * @param[in]    secretKey                       A key used to encrypt data of a registry file or decrypt a secure registry file @n
324         *                                                                       If a secure registry file is created with a specific key value,
325         *                                                                       other applications can access the same secure registry file with the identical key value.
326         * @exception    E_SUCCESS                       The method is successful.
327         * @exception    E_INVALID_ARG           Either of the following conditions has occurred: @n
328         *                                                                       - The overall length of the specified path is equal to @c 0 or
329         *                                                                         exceeds system limitations.
330         *                                                                       - The combination of the specified @c pOpenMode is not allowed. @n
331         *                                                                       - The specified @c secretKey is incorrect or the secure registry file is corrupted.
332         * @exception    E_ILLEGAL_ACCESS        Access is denied due to insufficient permission.
333         * @exception    E_FILE_NOT_FOUND        The specified @c regPath cannot be found.
334         * @exception    E_INVALID_FORMAT        Either of the following conditions has occurred: @n
335         *                                                                       - The section or entry name of the registry file includes one of the following characters:
336         *                                                                       '\0', '\n', '#' and '='.
337         *                                                                       - The entry value of the registry file includes one of the following characters:
338         *                                                                       '\0' and '\n'.
339         * @exception    E_MAX_EXCEEDED          The number of opened files has exceeded the maximum limit.
340         * @exception    E_STORAGE_FULL          The disk space is full.
341         * @exception    E_IO                            Either of the following conditions has occurred: @n
342         *                                                                       - An unexpected device failure has occurred as the media ejected suddenly. @n
343         *                                                                       - %File corruption is detected. @n
344         * @exception    E_SYSTEM                        The method cannot proceed due to a severe system error.
345         */
346         result Construct(const Tizen::Base::String& regPath, const char* pOpenMode, const Tizen::Base::ByteBuffer& secretKey);
347
348         /**
349         * Flushes the current contents of a registry in memory. @n
350         * If the secure mode is set to be @c true, the contents of the registry are automatically encrypted
351         * and saved by the platform.
352         *
353         * @since                2.0
354         *
355         * @return               An error code
356         * @exception    E_SUCCESS                               The method is successful.
357         * @exception    E_FILE_NOT_FOUND                An entry for the specified file or path cannot be found.
358         * @exception    E_ILLEGAL_ACCESS                Access is denied due to insufficient permission.
359         * @exception    E_MAX_EXCEEDED                  The number of opened files has exceeded the maximum limit.
360         * @exception    E_STORAGE_FULL                  The disk space is full.
361         * @exception    E_IO                                    Either of the following conditions has occurred: @n
362         *                                                                               - An unexpected device failure has occurred as the media ejected suddenly. @n
363         *                                                                               - %File corruption is detected. @n
364         */
365         result Flush(void);
366
367         /**
368         * Creates the specified section then adds it into the registry.
369         *
370         * @since                2.0
371         *
372         * @return               An error code
373         * @param[in]    sectionName                             The section name
374         * @exception    E_SUCCESS                               The method is successful.
375         * @exception    E_INVALID_ARG                   The length of the specified string for a section name is less than
376         *                                       or equal to @c 0.
377         * @exception    E_SECTION_ALREADY_EXIST A section with the specified name already exists.
378         */
379         result AddSection(const Tizen::Base::String& sectionName);
380
381         /**
382         * Removes the section from %Registry.
383         *
384         * @since                2.0
385         *
386         * @return               An error code
387         * @param[in]    sectionName                             The section name to remove
388         * @exception    E_SUCCESS                               The method is successful.
389         * @exception    E_INVALID_ARG                   The length of the specified string for a section is less than
390         *                                       or equal to @c 0.
391         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
392         */
393         result RemoveSection(const Tizen::Base::String& sectionName);
394
395         /**
396         * Gets all section names in the registry.
397         *
398         * @since                2.0
399         *
400         * @return               A list of section names @n
401         *                               If this method fails, @c null value is returned. @n
402         *                               The specific error code can be accessed using the GetLastResult() method. @n
403         *                               When there are no sections at all, the method returns an empty list instance. @n
404         *                               Use the Tizen::Base::Collection::ICollection::GetCount() method to check the number of elements in the list.
405         * @exception    E_SUCCESS                               The method is successful.
406         * @remarks              Do not forget to delete not only the returned IList instance, but also its
407         *               contents by invoking IList::RemoveAll(). @n
408         *                               The specific error code can be accessed using the GetLastResult() method.
409         */
410         Tizen::Base::Collection::IList* GetAllSectionNamesN(void) const;
411
412         /**
413         * Gets all entry names in the specified section of the registry.
414         *
415         * @since                2.0
416         *
417         * @return               A list of entry names @n
418         *                               If this method fails, @c null value is returned. @n
419         *                               When there are no entries at all, the method returns an empty list instance. @n
420         *                               Use the Tizen::Base::Collection::ICollection::GetCount() method to check the number of element in the list.
421         * @param[in]    sectionName                             The section name
422         * @exception    E_SUCCESS                               The method is successful.
423         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
424         * @exception    E_IO                                    A system error has occurred.
425         * @remarks              Do not forget to delete not only the returned IList instance, but also its
426         *                               contents by invoking IList::RemoveAll(). @n
427         *                               The specific error code can be accessed using the GetLastResult() method.
428         */
429         Tizen::Base::Collection::IList* GetAllEntryNamesN(const Tizen::Base::String& sectionName) const;
430
431         /**
432         * Adds the name-value pair of type integer as an entry of the specific section.
433         *
434         * @since                2.0
435         *
436         * @return               An error code
437         * @param[in]    sectionName                             The section name
438         * @param[in]    entryName                               The entry name
439         * @param[in]    value                                   The @c int value
440         * @exception    E_SUCCESS                               The method is successful.
441         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
442         *                                       or an entry is less than or equal to @c 0,
443         *                                       or a @c null value is passed. @n
444         *                                                                               Note that, it is also possible that the data inside a registry instance is
445         *                                                                               corrupted due to its usage in a multi-threaded environment without
446         *                                                                               synchronization.
447         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
448         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
449         */
450         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, int value);
451
452         /**
453         * Adds the name-value pair of type double as an entry of the specific section.
454         *
455         * @since                2.0
456         *
457         * @return               An error code
458         * @param[in]    sectionName                             The section name
459         * @param[in]    entryName                               The entry name
460         * @param[in]    value                                   The @c double value
461         * @exception    E_SUCCESS                               The method is successful.
462         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
463         *                                       or an entry is less than or equal to @c 0,
464         *                                       or a @c null value is passed. @n
465         *                                                                               Note that, it is also possible that the data inside a registry instance is
466         *                                                                               corrupted due to its usage in a multi-threaded environment without
467         *                                                                               synchronization.
468         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
469         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
470         */
471         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, double value);
472
473         /**
474         * Adds the name-value pair of type float as an entry of the specific section.
475         *
476         * @since                2.0
477         *
478         * @return               An error code
479         * @param[in]    sectionName                             The section name
480         * @param[in]    entryName                               The entry name
481         * @param[in]    value                                   The @c float value
482         * @exception    E_SUCCESS                               The method is successful.
483         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
484         *                                       or an entry is less than or equal to @c 0,
485         *                                       or a @c null value is passed. @n
486         *                                                                               Note that, it is also possible that the data inside a registry instance is
487         *                                                                               corrupted due to its usage in a multi-threaded environment without
488         *                                                                               synchronization.
489         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
490         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
491         */
492         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, float value);
493
494         /**
495         * Adds the name-value pair of type String as an entry of the specific section.
496         *
497         * @since                2.0
498         *
499         * @return               An error code
500         * @param[in]    sectionName                             The section name
501         * @param[in]    entryName                               The entry name
502         * @param[in]    value                                   The String value
503         * @exception    E_SUCCESS                               The method is successful.
504         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
505         *                                       or an entry is less than or equal to @c 0.
506         *                                                                               Note that, it is also possible that the data inside a registry instance is
507         *                                                                               corrupted due to its usage in a multi-threaded environment without
508         *                                                                               synchronization.
509         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
510         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
511         */
512         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::String& value);
513
514         /**
515         * Adds the name-value pair of type UuId as an entry for the specified section.
516         *
517         * @since                2.0
518         *
519         * @return               An error code
520         * @param[in]    sectionName                             The section name
521         * @param[in]    entryName                               The entry name
522         * @param[in]    value                                   The UuId value
523         * @exception    E_SUCCESS                               The method is successful.
524     * @exception        E_INVALID_ARG                   Either the length of the specified string for a section
525         *                                       or an entry is less than or equal to @c 0,
526         *                                       or a @c null value is passed. @n
527         *                                                                               Note that, it is also possible that the data inside a registry instance is
528         *                                                                               corrupted due to its usage in a multi-threaded environment without
529         *                                                                               synchronization.
530         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
531         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
532         */
533         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::UuId& value);
534
535         /**
536         * Adds the name-value pair of type ByteBuffer as an entry for the specified section.
537         *
538         * @since                2.0
539         *
540         * @return               An error code
541         * @param[in]    sectionName                             The section name
542         * @param[in]    entryName                               The entry name
543         * @param[in]    value                                   The @c ByteBuffer value @n
544         *                                       Note that, it should be constructed before being passed to the method.
545         * @exception    E_SUCCESS                               The method is successful.
546     * @exception        E_INVALID_ARG                   Either the length of the specified string for a section
547         *                                       or an entry is less than or equal to @c 0,
548         *                                       or a @c null value is passed. @n
549         *                                                                               Note that, it is also possible that the data inside a registry instance is
550         *                                                                               corrupted due to its usage in a multi-threaded environment without
551         *                                                                               synchronization.
552         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
553         * @exception    E_KEY_ALREADY_EXIST             The specified @c entryName already exists in this section.
554         * @remarks              Note that all the contents of @c ByteBuffer are saved as an entry value.
555         *               That is, byte data from @c 0 up to the buffer limit is saved.
556         * @see                  Tizen::Base::ByteBuffer
557         */
558         result AddValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::ByteBuffer& value);
559
560         /**
561         * Gets the @c int value of the specified entry.
562         *
563         * @since                2.0
564         *
565         * @return               An error code
566         * @param[in]    sectionName                             The section name
567         * @param[in]    entryName                               The name of entry where its value will be fetched
568         * @param[out]   retVal                                  The return value obtained from the registry
569         * @exception    E_SUCCESS                               The method is successful.
570         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
571         *                                       or an entry is less than or equal to @c 0,
572         *                                       or a @c null value is passed. @n
573         *                                                                               Note that, it is also possible that the data inside a registry instance is
574         *                                                                               corrupted due to its usage in a multi-threaded environment without
575         *                                                                               synchronization.
576         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
577         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
578         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
579         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
580         */
581         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, int& retVal) const;
582
583         /**
584         * Gets the @c double value of the specified entry.
585         *
586         * @since                2.0
587         *
588         * @return               An error code
589         * @param[in]    sectionName                             The section name
590         * @param[in]    entryName                               The name of entry where its value will be fetched
591         * @param[out]   retVal                                  The return value obtained from the registry
592         * @exception    E_SUCCESS                               The method is successful.
593         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
594         *                                       or an entry is less than or equal to @c 0,
595         *                                       or a @c null value is passed. @n
596         *                                                                               Note that, it is also possible that the data inside a registry instance is
597         *                                                                               corrupted due to its usage in a multi-threaded environment without
598         *                                                                               synchronization.
599         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
600         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
601         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
602         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
603         */
604         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, double& retVal) const;
605
606         /**
607         * Gets the @c float value of the specified entry.
608         *
609         * @since                2.0
610         *
611         * @return               An error code
612         * @param[in]    sectionName                             The section name
613         * @param[in]    entryName                               The name of entry where its value will be fetched
614         * @param[out]   retVal                                  The return value obtained from the registry
615         * @exception    E_SUCCESS                               The method is successful.
616         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
617         *                                       or an entry is less than or equal to @c 0,
618         *                                       or a @c null value is passed. @n
619         *                                                                               Note that, it is also possible that the data inside a registry instance is
620         *                                                                               corrupted due to its usage in a multi-threaded environment without
621         *                                                                               synchronization.
622         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
623         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
624         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
625         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
626         */
627         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, float& retVal) const;
628
629         /**
630         * Gets the String value of a specific entry.
631         *
632         * @since                2.0
633         *
634         * @return               An error code
635         * @param[in]    sectionName                             The section name
636         * @param[in]    entryName                               The name of entry where its value will be fetched
637         * @param[out]   retVal                                  The return value obtained from the registry
638         * @exception    E_SUCCESS                               The method is successful.
639         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
640         *                                       or an entry is less than or equal to @c 0,
641         *                                       or a @c null value is passed. @n
642         *                                                                               Note that, it is also possible that the data inside a registry instance is
643         *                                                                               corrupted due to its usage in a multi-threaded environment without
644         *                                                                               synchronization.
645         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
646         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
647         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
648         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
649         */
650         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, Tizen::Base::String& retVal) const;
651
652         /**
653         * Gets the UuId value of the specified entry.
654         *
655         * @since                2.0
656         *
657         * @return               An error code
658         * @param[in]    sectionName                             The section name
659         * @param[in]    entryName                               The name of entry where its value will be fetched
660         * @param[out]   retVal                                  The return value obtained from the registry
661         * @exception    E_SUCCESS                               The method is successful.
662         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
663         *                                       or an entry is less than or equal to @c 0,
664         *                                       or a @c null value is passed. @n
665         *                                                                               Note that, it is also possible that the data inside a registry instance is
666         *                                                                               corrupted due to its usage in a multi-threaded environment without
667         *                                                                               synchronization.
668         * @exception    E_SECTION_NOT_FOUND         The specified @c sectionName is not found within the registry.
669         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
670         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
671         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
672         */
673         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, Tizen::Base::UuId& retVal) const;
674
675         /**
676         * Gets the ByteBuffer value of the specified entry.
677         *
678         * @since                2.0
679         *
680         * @return               An error code
681         * @param[in]    sectionName                             The section name
682         * @param[in]    entryName                               The name of entry where its value will be fetched
683         * @param[out]   retVal                                  The return value obtained from the registry
684         * @exception    E_SUCCESS                               The method is successful.
685         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
686         *                                       or an entry is less than or equal to @c 0,
687         *                                       or a @c null value is passed. @n
688         *                                                                               Note that, it is also possible that the data inside a registry instance is
689         *                                                                               corrupted due to its usage in a multi-threaded environment without
690         *                                                                               synchronization.
691         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
692         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
693         * @exception    E_PARSING_FAILED                The method has failed to parse the encoded entry value string, or the value is retrieved by using an incorrect data type.
694         * @exception    E_DATA_NOT_FOUND                The name-value pair has no value assigned (if the value is retrieved using the REGTYPE_STRING type, an empty string is returned even if no value is assigned).
695         * @remarks              The ByteBuffer should be constructed before passing it to the method.
696         *                               That is, the size of the binary data to be fetched should be decided beforehand.
697         *                               When the %ByteBuffer capacity is less than the actual binary data stored in the registry,
698         *                               this method reads the data as much as the %ByteBuffer capacity. The position of the %ByteBuffer and
699         *                               limit are not changed. When the %ByteBuffer capacity is greater than the actual data size,
700         *                               the method reads the whole data and adjusts the limit of the buffer accordingly.
701         * @see                  Tizen::Base::ByteBuffer
702         */
703         result GetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, Tizen::Base::ByteBuffer& retVal) const;
704
705         /**
706         * Modifies the value of the specified entry using the specified @c int value.
707         *
708         * @since                2.0
709         *
710         * @return               An error code
711         * @param[in]    sectionName                             The section name
712         * @param[in]    entryName                               The entry name to modify
713         * @param[in]    newValue                                The @c int value
714         * @exception    E_SUCCESS                               The method is successful.
715         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
716         *                                       or an entry is less than or equal to @c 0,
717         *                                       or a @c null value is passed. @n
718         *                                                                               Note that, it is also possible that the data inside a registry instance is
719         *                                                                               corrupted due to its usage in a multi-threaded environment without
720         *                                                                               synchronization.
721         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
722         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
723         * @remarks              This method will not add a name-value pair as an entry of a specific section
724         *               if no entry with the specified name exists.
725         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
726         * @see                  AddValue()
727         */
728         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, int newValue);
729
730         /**
731         * Modifies the value of the specified entry using the specified @c double value.
732         *
733         * @since                2.0
734         *
735         * @return               An error code
736         * @param[in]    sectionName                             The section name
737         * @param[in]    entryName                               The entry name to modify
738         * @param[in]    newValue                                The @c double value
739         * @exception    E_SUCCESS                               The method is successful.
740         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
741         *                                       or an entry is less than or equal to @c 0,
742         *                                       or a @c null value is passed. @n
743         *                                                                               Note that, it is also possible that the data inside a registry instance is
744         *                                                                               corrupted due to its usage in a multi-threaded environment without
745         *                                                                               synchronization.
746         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
747         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
748         * @remarks              This method will not add a name-value pair as an entry of a specific section
749         *               if no entry with the specified name exists.
750         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
751         * @see                  AddValue()
752         */
753         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, double newValue);
754
755         /**
756         * Modifies the value of the specified entry using the specified @c float value.
757         *
758         * @since                2.0
759         *
760         * @return               An error code
761         * @param[in]    sectionName                             The section name
762         * @param[in]    entryName                               The entry name to modify
763         * @param[in]    newValue                                The @c float value
764         * @exception    E_SUCCESS                               The method is successful.
765         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
766         *                                       or an entry is less than or equal to @c 0,
767         *                                       or a @c null value is passed. @n
768         *                                                                               Note that, it is also possible that the data inside a registry instance is
769         *                                                                               corrupted due to its usage in a multi-threaded environment without
770         *                                                                               synchronization.
771         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
772         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
773         * @remarks              This method will not add a name-value pair as an entry of a specific section
774         *               if no entry with the specified name exists.
775         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
776         * @see                  AddValue()
777         */
778         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, float newValue);
779
780         /**
781         * Modifies the value of the specified entry using the specified String value.
782         *
783         * @since                2.0
784         *
785         * @return               An error code
786         * @param[in]    sectionName                             The section name
787         * @param[in]    entryName                               The entry name to modify
788         * @param[in]    newValue                                The String value
789         * @exception    E_SUCCESS                               The method is successful.
790         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
791         *                                       or an entry is less than or equal to @c 0.
792         *                                                                               Note that, it is also possible that the data inside a registry instance is
793         *                                                                               corrupted due to its usage in a multi-threaded environment without
794         *                                                                               synchronization.
795         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
796         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
797         * @remarks              This method will not add a name-value pair as an entry of a specific section
798         *               if no entry with the specified name exists.
799         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
800         * @see                  AddValue()
801         */
802         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::String& newValue);
803
804         /**
805         * Modifies the value of the specified entry using the specified UuID value.
806         *
807         * @since                2.0
808         *
809         * @return               An error code
810         * @param[in]    sectionName                             The section name
811         * @param[in]    entryName                               The entry name to modify
812         * @param[in]    newValue                                The UuId value
813         * @exception    E_SUCCESS                               The method is successful.
814         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
815         *                                       or an entry is less than or equal to @c 0,
816         *                                       or a @c null value is passed. @n
817         *                                                                               Note that, it is also possible that the data inside a registry instance is
818         *                                                                               corrupted due to its usage in a multi-threaded environment without
819         *                                                                               synchronization.
820         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
821         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
822         * @remarks              This method will not add a name-value pair as an entry of a specific section if no
823         *               entry with the specified name exists.
824         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
825         * @see                  AddValue()
826         */
827         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::UuId& newValue);
828
829         /**
830         * Modifies the value of the specified entry using the specified ByteBuffer value.
831         *
832         * @since                2.0
833         *
834         * @return               An error code
835         * @param[in]    sectionName                             The section name
836         * @param[in]    entryName                               The entry name to modify
837         * @param[in]    newValue                                The @c ByteBuffer value
838         * @exception    E_SUCCESS                               The method is successful.
839         * @exception    E_INVALID_ARG                   Either the length of the specified string for a section
840         *                                       or an entry is less than or equal to @c 0,
841         *                                       or a @c null value is passed. @n
842         *                                                                               Note that, it is also possible that the data inside a registry instance is
843         *                                                                               corrupted due to its usage in a multi-threaded environment without
844         *                                                                               synchronization.
845         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
846         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
847         * @remarks              This method will not add a name-value pair as an entry of a specific section
848         *               if no entry with the specified name exists.
849         *                               In such a case, it returns E_KEY_NOT_FOUND. Use AddValue() to insert a new entry.
850         * @see                  AddValue()
851         */
852         result SetValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName, const Tizen::Base::ByteBuffer& newValue);
853
854         /**
855         * Removes the name-value pair entry from specific section.
856         *
857         * @since                2.0
858         *
859         * @return               An error code
860         * @param[in]    sectionName                             The section name
861         * @param[in]    entryName                               The entry name to remove
862         * @exception    E_SUCCESS                               The method is successful.
863         * @exception    E_INVALID_ARG                   The length of the specified string for a section or entry is less
864         *                                       than or equal to @c 0.
865         * @exception    E_SECTION_NOT_FOUND             The specified @c sectionName is not found within the registry.
866         * @exception    E_KEY_NOT_FOUND                 The specified @c entryName is not found within the registry.
867         */
868         result RemoveValue(const Tizen::Base::String& sectionName, const Tizen::Base::String& entryName);
869
870         /**
871         * Acquires the file lock on the current opened whole file if it is not acquired.
872         * If the file lock is already acquired by another process, the current process is blocked until the file lock is
873         * released.
874         *
875         * @since                        2.1
876         *
877         * @return           The pointer to %FileLock instance, @n
878         *                                               else @c null pointer in case of failure
879         * @param[in]            lockType                                The type of file lock to be created
880         * @exception            E_SUCCESS                               The method is successful.
881         * @exception            E_INVALID_ARG                   The specified @c lockType is invalid.
882         * @exception            E_INVALID_OPERATION             Either of the following conditions has occurred: @n
883         *                                                                                               - The specified @c lockType cannot be FILE_LOCK_SHARED if the current
884         *                                                                                                 file is not open for reading. @n
885         *                                                                                               - The specified @c lockType cannot be FILE_LOCK_EXCLUSIVE if the current
886         *                                                                                                 file is not open for writing. @n
887         * @exception            E_WOULD_DEADLOCK                The method would cause a deadlock. @n
888         *                                                                                               The lock is blocked by a lock from another process, and putting the
889         *                                                                                               calling process to sleep to wait for that lock to become free would
890         *                                                                                               cause a deadlock.
891         * @exception            E_MAX_EXCEEDED                  The number of file lock exceeds system limitations.
892         * @exception            E_SYSTEM                                The method cannot proceed due to a severe system error.
893         * @remarks                      The %FileLock instance is invalid if the associated %File instance is deleted. @n
894         *                                               The specific error code can be accessed using the GetLastResult() method.
895         * @see                          Tizen::Io::File::FileLockType
896         */
897         FileLock* LockN(FileLockType lockType);
898
899         /**
900         * Tries to acquire the file lock on the current opened whole file.
901         * If the file lock is already acquired by another process, E_OBJECT_LOCKED is returned.
902         *
903         * @since                        2.1
904         *
905         * @return                       The pointer to %FileLock instance, @n
906         *                                               else @c null pointer in case of failure
907         * @param[in]            lockType                                The type of file lock to be created
908         * @exception            E_SUCCESS                               The method is successful.
909         * @exception            E_INVALID_ARG                   The specified @c lockType is invalid.
910         * @exception            E_INVALID_OPERATION             Either of the following conditions has occurred: @n
911         *                                                                                               - The specified @c lockType cannot be FILE_LOCK_SHARED if the current
912         *                                                                                                 file is not open for reading. @n
913         *                                                                                               - The specified @c lockType cannot be FILE_LOCK_EXCLUSIVE if the current
914         *                                                                                                 file is not open for writing. @n
915         * @exception            E_OBJECT_LOCKED                 Either of the following conditions has occurred: @n
916         *                                                                                               - The file lock is already held by another process. @n
917         *                                                                                               - The file to be locked has been memory-mapped by another process.
918         * @exception            E_MAX_EXCEEDED                  The number of file lock exceeds system limitations.
919         * @exception            E_SYSTEM                                The method cannot proceed due to a severe system error.
920         * @remarks                      The %FileLock instance is invalid if the associated %File instance is deleted. @n
921         *                                               The specific error code can be accessed using the GetLastResult() method.
922         * @see                          Tizen::Io::File::FileLockType
923         */
924         FileLock* TryToLockN(FileLockType lockType);
925
926         /**
927         * Removes the specified registry file.
928         *
929         * @if OSPCOMPAT
930         * @brief <i> [Compatibility] </i>
931         * @endif
932         * @since                2.0
933         * @if OSPCOMPAT
934         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
935         *                                       For more information, see @ref CompIoPathPage "here".
936         * @endif
937         *
938         * @return               An error code
939         * @param[in]    regPath                                 The path of the registry file to remove
940         * @exception    E_SUCCESS                               The method is successful.
941         * @exception    E_INVALID_ARG                   Either of the following conditions has occurred: @n
942         *                                                                               - The length of the specified string of a file path is less
943         *                                                                                 than or equal to @c 0. @n
944         *                                                                               - The translated overall length of the specified path exceeds the
945         *                                                                                 system limitation. @n
946         *                                                                               - The specified path is invalid. @n
947         * @exception    E_FILE_NOT_FOUND                An entry for the specified file or path cannot be found.
948         * @exception    E_ILLEGAL_ACCESS                Access is denied due to insufficient permission.
949         * @exception    E_IO                                    Either of the following conditions has occurred: @n
950         *                                                                               - An unexpected device failure has occurred as the media ejected suddenly. @n
951         *                                                                               - %File corruption is detected.
952         */
953         static result Remove(const Tizen::Base::String& regPath);
954
955         /**
956         * Converts a normal registry file to a secure registry file. @n
957         * A secure registry file that is converted by this method can be shared among applications with the same key value.
958         *
959         * @if OSPCOMPAT
960         * @brief <i> [Compatibility] </i>
961         * @endif
962         * @since 2.0
963         * @if OSPCOMPAT
964         * @compatibility        This method has compatibility issues with OSP compatible applications. @n
965         *                                       For more information, see @ref CompIoPathPage "here".
966         * @endif
967         *
968         * @return               An error code
969         * @param[in]    plainRegPath                    The normal (non-encrypted) registry file path
970         * @param[in]    secureRegPath                   The secure (encrypted) registry file path to create
971         * @param[in]    key                                             A key that encrypts a secure registry file @n
972         *                                                                               If the secure registry file is converted with a specific key value,
973         *                                                                               applications can access the same secure registry file with the identical key value.
974         * @exception    E_SUCCESS                               The method is successful.
975         * @exception    E_INVALID_ARG                   Either of the following conditions has occurred: @n
976         *                                                                               - The length of the specified string of a file path is less
977         *                                                                                 than or equal to @c 0. @n
978         *                                                                               - The translated overall length of the specified path exceeds the
979         *                                                                                 system limitation. @n
980         *                                                                               - The specified path is invalid. @n
981         * @exception    E_ILLEGAL_ACCESS                Access is denied due to insufficient permission.
982         * @exception    E_FILE_ALREADY_EXIST    The specified file already exists.
983         * @exception    E_FILE_NOT_FOUND                An entry for the specified file or path cannot be found.
984         * @exception    E_INVALID_FORMAT                The input registry file contains '0x00' in the middle of the file.
985         * @exception    E_PARSING_FAILED                The method has failed to parse the registry file.
986         * @exception    E_STORAGE_FULL                  The disk space is full.
987         * @exception    E_IO                                    Either of the following conditions has occurred: @n
988         *                                                                               - An unexpected device failure has occurred as the media ejected suddenly. @n
989         *                                                                               - %File corruption is detected. @n
990         *                                                                               - The number of opened files has exceeded the maximum limit.
991         */
992         static result ConvertToSecureRegistry(const Tizen::Base::String& plainRegPath, const Tizen::Base::String& secureRegPath, const Tizen::Base::ByteBuffer& key);
993
994 private:
995         /**
996         * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
997         *
998         * @since 2.0
999         */
1000         Registry(const Registry& source);
1001
1002         /**
1003         * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1004         *
1005         * @since 2.0
1006         */
1007         Registry& operator =(const Registry& source);
1008
1009         class _RegistryImpl* __pRegistryImpl;
1010
1011         friend class _RegistryImpl;
1012
1013 }; // Registry
1014
1015 }} // Tizen::Io
1016
1017 #endif //_FIO_REGISTRY_H_
1018