Merge "Revert "Fix N_SE-46938 for tz list."" into devel_3.0_main
[platform/framework/native/appfw.git] / src / io / inc / FIo_DataControlResultSetImpl.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        FIo_DataControlResultSetImpl.h
19  * @brief       This is the header file for the %_DataControlResultSetImpl class.
20  *
21  * This header file contains the declarations of the %_DataControlResultSetImpl class.
22  */
23
24 #ifndef _FIO_INTERNAL_DATACONTROL_RESULTSET_IMPL_H_
25 #define _FIO_INTERNAL_DATACONTROL_RESULTSET_IMPL_H_
26
27 #include <FBaseDataType.h>
28 #include <FBaseObject.h>
29 #include <FOspConfig.h>
30 #include <FIoDbEnumerator.h>
31
32 namespace Tizen { namespace App
33 {
34 class _AppImpl;
35 }}
36 namespace Tizen { namespace Base
37 {
38 class String;
39 }}
40
41 namespace Tizen { namespace Io
42 {
43
44 class DbEnumerator;
45
46 class _OSP_EXPORT_ _DataControlResultSetImpl
47         : public Tizen::Base::Object
48 {
49
50 public:
51         /**
52         * This is the constructor for this class.
53         *
54         * @since 2.1
55         * @param[in]    reqId           The request ID @n
56         *                                                       It is identification for data control request to be replied
57         */
58         _DataControlResultSetImpl(RequestId reqId);
59
60         /**
61         * This is the destructor for this class.
62         *
63         * @since 2.1
64         */
65         virtual ~_DataControlResultSetImpl(void);
66
67         /**
68         * Fills result set with the specified @c dbEnumerator.
69         *
70         * @since 2.1
71         * @return               An error code
72         * @param[in]    dbEnumerator            %Database enumerator instance
73         * @exception    E_SUCCESS                       The method was successful.
74         * @exception    E_INVALID_STATE         Either of the following conditions has occurred:
75         *                                                                       - This instance has not been properly constructed.
76         *                                                                       - The specified @c dbEnumerator has already been set.
77         * @exception    E_DATABASE                      Either of the following conditions has occurred:
78         *                                                                       - The database file was closed.
79         *                                                                       - The database engine has failed to execute query.
80         * @exception    E_IO                            Either of the following conditions has occurred:
81         *                                                                       - An unexpected device failure has occurred as the media ejected suddenly.
82         *                                                                       - Detected corruption of a file.
83         */
84         result FillWith(IDbEnumerator* pDbEnum, Tizen::Base::String& version);
85
86 private:
87         /**
88         * This is the default constructor for this class.
89         *
90         * @since 2.1
91         */
92         _DataControlResultSetImpl(void);
93
94         /**
95         * This is the default copy constructor for this class.
96         *
97         * @since 2.1
98         */
99         _DataControlResultSetImpl(const _DataControlResultSetImpl& rhs);
100
101         /**
102         * This is the assignment operator for this class.
103         *
104         * @since 2.1
105         */
106         _DataControlResultSetImpl& operator =(const _DataControlResultSetImpl& rhs);
107
108         /**
109         * Sets the range of a set of data to be added.
110         *
111         * @since 2.1
112         * @return       An error code
113         * @param[in]    pageNo              The page number of the data set. @n
114         *                                   It starts from @c 1.
115         * @param[in]    countPerPage        The desired maximum count of the data item on the page.
116         * @exception    E_SUCCESS                       The method was successful.
117         * @exception    E_INVALID_STATE     This instance has not been properly constructed yet.
118         * @exception    E_INVALID_ARG       Either of the following conditions has occurred: @n
119         *                                   - The specified @c pageNo parameter is less than @c 1.
120         *                                   - The specified @c countPerPage parameter is less than @c 1.
121         */
122         result SetCapacity(int pageNo = 1, int countPerPage = 20);
123
124         bool __constructed;
125         int __pageNo;
126         int __countPerPage;
127         result __result;
128         Tizen::Base::String __tmpPath;
129         RequestId __reqId;
130
131         friend class Tizen::App::_AppImpl;
132
133 }; // _DataControlResultSetImpl
134
135 }} // Tizen::Io
136
137 #endif // _FIO_INTERNAL_DATACONTROL_RESULTSET_IMPL_H_
138