2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FAppISqlDataControlResponseListener.h
20 * @brief This is the header file for the %ISqlDataControlResponseListener interface.
22 * This header file contains the declarations of the %ISqlDataControlResponseListener interface.
25 #ifndef _FAPP_ISQL_DATACONTROL_RESPONSE_LISTENER_H_
26 #define _FAPP_ISQL_DATACONTROL_RESPONSE_LISTENER_H_
28 #include <FBaseDataType.h>
29 #include <FBaseString.h>
30 #include <FBaseRtIEventListener.h>
31 #include <FIoIDbEnumerator.h>
33 namespace Tizen { namespace App
37 * @interface ISqlDataControlResponseListener
38 * @brief This interface defines a listener for the SQL-type data control response.
42 * The %ISqlDataControlResponseListener interface defines a listener for the SQL-type data control response.
44 class _OSP_EXPORT_ ISqlDataControlResponseListener
45 : virtual public Tizen::Base::Runtime::IEventListener
50 * This polymorphic destructor should be overridden if required.
51 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
55 virtual ~ISqlDataControlResponseListener(void) {}
58 * Called when the result set is received from SQL-type data control provider. @n
59 * The application requesting the data control can get the query result by implementing this listener. @n
60 * This listener must be registered by SqlDataControl::SetSqlDataControlResponseListener() for receiving the result set.
61 * It is called after SqlDataControl::Select().
65 * @param[in] reqId The request ID
66 * @param[in] providerId The data control provider ID
67 * @param[in] dataId A string for identifying a specific table to query from @n
68 * The string consists of one or more components, separated by a slash('/').
69 * @param[in] resultSetEnumerator Navigates the result of data control select request
70 * @param[in] providerResult Set to @c true if the data control provider successfully processed the query request, @n
72 * @param[in] pErrorMsg The error message from the data control provider
74 virtual void OnSqlDataControlSelectResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
75 const Tizen::Base::String& dataId, Tizen::Io::IDbEnumerator& resultSetEnumerator, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
78 * Called when the response is received from SQL-type data control provider. @n
79 * The application requesting the data control can get insert result by implementing this listener. @n
80 * This listener must be registered by SqlDataControl::SetSqlDataControlResponseListener() for receiving the result response.
81 * It is called after SqlDataControl::Insert().
85 * @param[in] reqId The request ID
86 * @param[in] providerId The data control provider ID
87 * @param[in] dataId A string for identifying a specific table to insert into @n
88 * The string consists of one or more components, separated by a slash('/').
89 * @param[in] insertRowId The inserted row ID set by the data control provider if the specified @c providerResult is @c true, @n
91 * @param[in] providerResult Set to @c true if the data control provider successfully processed the insert request, @n
93 * @param[in] pErrorMsg The error message from the data control provider
95 virtual void OnSqlDataControlInsertResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
96 const Tizen::Base::String& dataId, long long insertRowId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
99 * Called when the response is received from SQL-type data control provider. @n
100 * The application requesting the data control can get update result implementing this listener. @n
101 * This listener must be registered by SqlDataControl::SetSqlDataControlResponseListener() for receiving the result response.
102 * It is called after SqlDataControl::Update().
106 * @param[in] reqId The request ID
107 * @param[in] providerId The data control provider ID
108 * @param[in] dataId A string for identifying a specific table to update @n
109 * The string consists of one or more components, separated by a slash('/').
110 * @param[in] providerResult Set to @c true if the data control provider successfully processed the update request, @n
112 * @param[in] pErrorMsg The error message from the data control provider
114 virtual void OnSqlDataControlUpdateResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
115 const Tizen::Base::String& dataId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
118 * Called when the response is received from SQL-type data control provider. @n
119 * The application requesting the data control can get delete result by implementing this listener. @n
120 * This listener must be registered by SqlDataControl::SetSqlDataControlResponseListener() for receiving the result response.
121 * It is called after SqlDataControl::Delete().
125 * @param[in] reqId The request ID
126 * @param[in] providerId The data control provider ID
127 * @param[in] dataId A string for identifying a specific table to delete from @n
128 * The string consists of one or more components, separated by a slash('/').
129 * @param[in] providerResult Set to @c true if the data control provider successfully processed the delete request, @n
131 * @param[in] pErrorMsg The error message from the data control provider
133 virtual void OnSqlDataControlDeleteResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
134 const Tizen::Base::String& dataId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
138 // This method is for internal use only.
139 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
141 // This method is reserved and may change its name at any time without prior notice.
145 virtual void ISqlDataControlResponseListener_Reserved1(void) {}
148 // This method is for internal use only.
149 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
151 // This method is reserved and may change its name at any time without prior notice.
155 virtual void ISqlDataControlResponseListener_Reserved2(void) {}
158 // This method is for internal use only.
159 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
161 // This method is reserved and may change its name at any time without prior notice.
165 virtual void ISqlDataControlResponseListener_Reserved3(void) {}
168 // This method is for internal use only.
169 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
171 // This method is reserved and may change its name at any time without prior notice.
175 virtual void ISqlDataControlResponseListener_Reserved4(void) {}
178 // This method is for internal use only.
179 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
181 // This method is reserved and may change its name at any time without prior notice.
185 virtual void ISqlDataControlResponseListener_Reserved5(void) {}
187 }; // ISqlDataControlResponseListener
191 #endif // _FAPP_ISQL_DATACONTROL_RESPONSE_LISTENER_H_