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