Merge "Modify Scanner class" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FIoDataRow.h
1 //\r
2 // Open Service Platform\r
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Apache License, Version 2.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 /**\r
19 * @file         FIoDataRow.h\r
20 * @brief                This is the header file for the %DataRow class.\r
21 *\r
22 * This header file contains the declarations of the %DataRow class.\r
23 */\r
24 \r
25 #ifndef _FIO_DATA_ROW_H_\r
26 #define _FIO_DATA_ROW_H_\r
27 \r
28 #include <FBaseObject.h>\r
29 #include <FBaseByteBuffer.h>\r
30 #include <FBaseDateTime.h>\r
31 \r
32 namespace Tizen { namespace Io\r
33 {\r
34 \r
35 /**\r
36 * @class                DataRow\r
37 \r
38 * @brief                This class provides methods to create a row in in-memory table.\r
39 *\r
40 * @since                2.1\r
41 *\r
42 * @final                This class is not intended for extension.\r
43 *\r
44 * The %DataRow class provides methods to create a row in in-memory table.\r
45 *\r
46 * @see Tizen::Io::DataSet\r
47 */\r
48 class _OSP_EXPORT_ DataRow\r
49            : public Tizen::Base::Object\r
50 {\r
51 \r
52 public:\r
53         /**\r
54         * This destructor overrides Tizen::Base::Object::~Object().\r
55         *\r
56         * @since                2.1\r
57         */\r
58         virtual ~DataRow(void);\r
59 \r
60         /**\r
61         * Sets a Tizen::Base::ByteBuffer value to the column whose index is specified.\r
62         *\r
63         * @since                2.1\r
64         *\r
65         * @return               An error code\r
66         * @param[in]            columnIndex             The index of the column whose value is set @n\r
67         *                                                               The column index starts from 0.\r
68         * @param[in]            pValue                  The value to set @n\r
69         *                                                               The specified @c pValue is a pointer to user-provided Tizen::Base::ByteBuffer type buffer.\r
70         * @exception            E_SUCCESS               The method is successful.\r
71         * @exception            E_INVALID_ARG   Either of the following conditions has occurred: @n\r
72         *                                                                       - The specified @c columnIndex is out of range.\r
73         *                                                                       - The specified @c pValue is @c null.\r
74         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
75         * @remarks              This method performs a shallow copy. It copies only the pointer; not the element itself. @n\r
76         *                               The platform will take the ownership of @c pValue after calling this method.\r
77         */\r
78         result SetBlobAt(int columnIndex, Tizen::Base::ByteBuffer* pValue);\r
79 \r
80 \r
81         /**\r
82         * Sets a Tizen::Base::DateTime value to the column whose index is specified.\r
83         *\r
84         * @since                2.1\r
85         *\r
86         * @return               An error code\r
87         * @param[in]            columnIndex             The index of the column whose value is set @n\r
88         *                                                               The column index starts from 0.\r
89         * @param[in]            value                   The value to set\r
90         * @exception            E_SUCCESS                       The method is successful.\r
91         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
92         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
93         */\r
94         result SetDateTimeAt(int columnIndex, const Tizen::Base::DateTime& value);\r
95 \r
96 \r
97         /**\r
98         * Sets a @c double value to the column whose index is specified.\r
99         *\r
100         * @since                2.1\r
101         *\r
102         * @return               An error code\r
103         * @param[in]            columnIndex             The index of the column whose value is set @n\r
104         *                                                               The column index starts from 0.\r
105         * @param[in]            value                   The value to set\r
106         * @exception            E_SUCCESS                       The method is successful.\r
107         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
108         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
109         */\r
110         result SetDoubleAt(int columnIndex, double value);\r
111 \r
112         /**\r
113         * Sets an @c int value to the column whose index is specified.\r
114         *\r
115         * @since                2.1\r
116         *\r
117         * @return               An error code\r
118         * @param[in]            columnIndex             The index of the column whose value is set @n\r
119         *                                                               The column index starts from 0.\r
120         * @param[in]            value                   The value to set\r
121         * @exception            E_SUCCESS                       The method is successful.\r
122         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
123         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
124         */\r
125         result SetIntAt(int columnIndex, int value);\r
126 \r
127         /**\r
128         * Sets a @c long @c long value to the column whose index is specified.\r
129         *\r
130         * @since                2.1\r
131         *\r
132         * @return               An error code\r
133         * @param[in]            columnIndex             The index of the column whose value is set @n\r
134         *                                                               The column index starts from 0.\r
135         * @param[in]            value                   The value to set\r
136         * @exception            E_SUCCESS                       The method is successful.\r
137         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
138         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
139         */\r
140         result SetInt64At(int columnIndex, long long value);\r
141 \r
142         /**\r
143         * Sets a Tizen::Base::String value to the column whose index is specified.\r
144         *\r
145         * @since                2.1\r
146         *\r
147         * @return               An error code\r
148         * @param[in]            columnIndex             The index of the column whose value is set @n\r
149         *                                                               The column index starts from 0.\r
150         * @param[in]            value                   The value to set\r
151         * @exception            E_SUCCESS                       The method is successful.\r
152         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
153         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
154         */\r
155         result SetStringAt(int columnIndex, const Tizen::Base::String& value);\r
156 \r
157 private:\r
158         //\r
159         // This default constructor is intentionally declared as private so that only the platform can create an instance.\r
160         //\r
161         // @since       2.1\r
162         //\r
163         DataRow(void);\r
164 \r
165         //\r
166         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.\r
167         //\r
168         // @since       2.1\r
169         //\r
170         DataRow(const DataRow& rhs);\r
171 \r
172         //\r
173         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.\r
174         //\r
175         // @since       2.1\r
176         //\r
177         DataRow& operator =(const DataRow& rhs);\r
178 \r
179         class _DataRowImpl* __pDataRowImpl;\r
180         friend class _DataRowImpl;\r
181 \r
182 }; // DataRow\r
183 \r
184 }} // Tizen::Io\r
185 \r
186 #endif // _FIO_DATA_ROW_H_\r