Fix N_SE-32099 : zero length string may not save to setting.xml
[platform/framework/native/appfw.git] / inc / FAppIMapDataControlResponseListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19 * @file         FAppIMapDataControlResponseListener.h
20 * @brief        This is the header file for the %IMapDataControlResponseListener interface.
21 *
22 * This header file contains the declarations of the %IMapDataControlResponseListener interface.
23 */
24
25 #ifndef _FAPP_IMAP_DATA_CONTROL_RESPONSE_LISTENER_H_
26 #define _FAPP_IMAP_DATA_CONTROL_RESPONSE_LISTENER_H_
27
28 #include <FBaseDataType.h>
29 #include <FBaseString.h>
30 #include <FBaseColIList.h>
31 #include <FBaseRtIEventListener.h>
32
33 namespace Tizen { namespace App
34 {
35
36 /**
37 * @interface    IMapDataControlResponseListener
38 * @brief                This interface defines a listener for the MAP-type data control response.
39 *
40 * @since        2.0
41 *
42 * The %IMapDataControlResponseListener interface defines a listener for the MAP-type data control response.
43 */
44 class _OSP_EXPORT_ IMapDataControlResponseListener
45         : virtual public Tizen::Base::Runtime::IEventListener
46 {
47
48 public:
49         /**
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.
52          *
53          * @since       2.0
54          */
55         virtual ~IMapDataControlResponseListener(void) {}
56
57         /**
58         * Called when the result value list is received from MAP-type data control provider. @n
59         * The application requesting the data control can get the result value list by implementing this listener. @n
60         * This listener must be registered by MapDataControl::SetMapDataControlResponseListener() for receiving the result value set.
61         * It is called after MapDataControl::GetValue().
62         *
63         * @since        2.0
64         *
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 map to get from @n
68         *                                                                       The string consists of one or more components, separated by a slash('/').
69         * @param[in]    resultValueList         The result value list of data control request getting matching values @n
70         *                                                                       The type of objects contained in the specified @c resultValueList is
71         *                                                                       Tizen::Base::String class.
72         * @param[in]    providerResult          Set to @c true if the data control provider successfully processed the request getting the values, @n
73         *                                                                       else @c false
74         * @param[in]    pErrorMsg                       The error message from the data control provider
75         */
76         virtual void OnMapDataControlGetValueResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
77                         const Tizen::Base::String& dataId, Tizen::Base::Collection::IList& resultValueList,
78                         bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
79
80         /**
81         * Called when the response is received from MAP-type data control provider. @n
82         * The application requesting the data control can get the result by implementing this listener. @n
83         * This listener must be registered by MapDataControl::SetMapDataControlResponseListener() for receiving the result response.
84         * It is called after MapDataControl::AddValue().
85         *
86         * @since        2.0
87         *
88         * @param[in]    reqId                           The request ID
89         * @param[in]    providerId                      The data control provider ID
90         * @param[in]    dataId                          A string for identifying a specific map to add to @n
91         *                                                                       The string consists of one or more components, separated by a slash('/').
92         * @param[in]    providerResult          Set to @c true if the data control provider successfully processed the request adding a value, @n
93         *                                                                       else @c false
94         * @param[in]    pErrorMsg                       The error message from the data control provider
95         */
96         virtual void OnMapDataControlAddValueResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
97                         const Tizen::Base::String& dataId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
98
99         /**
100         * Called when the response is received from MAP-type data control provider. @n
101         * The application requesting the data control can get the result for some data controls by implementing this listener. @n
102         * This listener must be registered by MapDataControl::SetMapDataControlResponseListener() for receiving the result response.
103         * It is called after MapDataControl::SetValue().
104         *
105         * @since        2.0
106         *
107         * @param[in]    reqId                           The request ID
108         * @param[in]    providerId                      The data control provider ID
109         * @param[in]    dataId                          A string for identifying a specific map to update @n
110         *                                                                       The string consists of one or more components, separated by a slash('/').
111         * @param[in]    providerResult          Set to @c true if the data control provider successfully processed the request replacing a value, @n
112         *                                                                       else @c false
113         * @param[in]    pErrorMsg                       The error message from the data control provider
114         */
115         virtual void OnMapDataControlSetValueResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
116                         const Tizen::Base::String& dataId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
117
118         /**
119         * Called when the response is received from MAP-type data control provider. @n
120         * The application requesting the data control can get the result for some data controls by implementing this listener. @n
121         * This listener must be registered by MapDataControl::SetMapDataControlResponseListener() for receiving the result response.
122         * It is called after MapDataControl::RemoveValue().
123         *
124         * @since        2.0
125         *
126         * @param[in]    reqId                           The request ID
127         * @param[in]    providerId                      The data control provider ID
128         * @param[in]    dataId                          A string for identifying a specific map to remove from @n
129         *                                                                       The string consists of one or more components, separated by a slash('/').
130         * @param[in]    providerResult          Set to @c true if the data control provider successfully processed the request removing a value, @n
131         *                                                                       else @c false
132         * @param[in]    pErrorMsg                       The error message from the data control provider
133         */
134         virtual void OnMapDataControlRemoveValueResponseReceived(RequestId reqId, const Tizen::Base::String& providerId,
135                         const Tizen::Base::String& dataId, bool providerResult, const Tizen::Base::String* pErrorMsg) = 0;
136
137 protected:
138         //
139         // This method is for internal use only.
140         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
141         //
142         // This method is reserved and may change its name at any time without prior notice.
143         //
144         // @since       2.0
145         //
146         virtual void IMapDataControlResponseListener_Reserved1(void) {}
147
148         //
149         // This method is for internal use only.
150         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
151         //
152         // This method is reserved and may change its name at any time without prior notice.
153         //
154         // @since       2.0
155         //
156         virtual void IMapDataControlResponseListener_Reserved2(void) {}
157
158         //
159         // This method is for internal use only.
160         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
161         //
162         // This method is reserved and may change its name at any time without prior notice.
163         //
164         // @since       2.0
165         //
166         virtual void IMapDataControlResponseListener_Reserved3(void) {}
167
168         //
169         // This method is for internal use only.
170         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
171         //
172         // This method is reserved and may change its name at any time without prior notice.
173         //
174         // @since       2.0
175         //
176         virtual void IMapDataControlResponseListener_Reserved4(void) {}
177
178         //
179         // This method is for internal use only.
180         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
181         //
182         // This method is reserved and may change its name at any time without prior notice.
183         //
184         // @since       2.0
185         //
186         virtual void IMapDataControlResponseListener_Reserved5(void) {}
187
188 }; // IMapDataControlResponseListener
189
190 }} // Tizen::App
191
192 #endif // _FAPP_IMAP_DATA_CONTROL_RESPONSE_LISTENER_H_
193