Add the plug-in about upgrading of account provider
[platform/framework/native/social.git] / inc / FSclImAddress.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 * @file         FSclImAddress.h
18 * @brief        This is the header file for the %ImAddress class.
19 *
20 * This header file contains the declarations of the %ImAddress class.
21 */
22 #ifndef _FSCL_IM_ADDRESS_H_
23 #define _FSCL_IM_ADDRESS_H_
24
25 #include <FBaseResult.h>
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28
29 namespace Tizen { namespace Social
30 {
31 /**
32  * @if OSPDEPREC
33  * The maximum length of the IM address property.
34  *
35  * @brief <i> [Deprecated] </i>
36  * @deprecated  This constant is deprecated because there is no limitation any more.
37  * @since       2.0
38  * @endif
39  */
40 static const int MAX_IM_ADDRESS_LENGTH = 100;
41
42 /**
43  * @if OSPDEPREC
44  * The IM service provider name for MSN.
45  *
46  * @brief <i> [Deprecated] </i>
47  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
48  *                              Use IM_ADDRESS_MSN instead of this object.
49  * @since       2.0
50  * @endif
51  */
52 _OSP_EXPORT_ extern const Tizen::Base::String IM_MSN;
53
54 /**
55  * @if OSPDEPREC
56  * The IM service provider name for ICQ.
57  *
58  * @brief <i> [Deprecated] </i>
59  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
60  *                              Use IM_ADDRESS_ICQ instead of this object.
61  * @since       2.0
62  * @endif
63  */
64 _OSP_EXPORT_ extern const Tizen::Base::String IM_ICQ;
65
66 /**
67  * @if OSPDEPREC
68  * The IM service provider name for AIM.
69  *
70  * @brief <i> [Deprecated] </i>
71  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
72  *                              Use IM_ADDRESS_AIM instead of this object.
73  * @since       2.0
74  * @endif
75  */
76 _OSP_EXPORT_ extern const Tizen::Base::String IM_AIM;
77
78 /**
79  * @if OSPDEPREC
80  * The IM service provider name for Yahoo.
81  *
82  * @brief <i> [Deprecated] </i>
83  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
84  *                              Use IM_ADDRESS_YAHOO instead of this object.
85  * @since       2.0
86  * @endif
87  */
88 _OSP_EXPORT_ extern const Tizen::Base::String IM_YAHOO;
89
90 /**
91  * @if OSPDEPREC
92  * The IM service provider name for Jabber.
93  *
94  * @brief <i> [Deprecated] </i>
95  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
96  *                              Use IM_ADDRESS_JABBER instead of this object.
97  * @since       2.0
98  * @endif
99  */
100 _OSP_EXPORT_ extern const Tizen::Base::String IM_JABBER;
101
102 /**
103  * @if OSPDEPREC
104  * The IM service provider name for Google talk.
105  *
106  * @brief <i> [Deprecated] </i>
107  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
108  *                              Use IM_ADDRESS_GTALK instead of this object.
109  * @since       2.0
110  * @endif
111  */
112 _OSP_EXPORT_ extern const Tizen::Base::String IM_GTALK;
113
114 /**
115  * @if OSPDEPREC
116  * The IM service provider name for Skype.
117  *
118  * @brief <i> [Deprecated] </i>
119  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
120  *                              Use IM_ADDRESS_SKYPE instead of this object.
121  * @since       2.0
122  * @endif
123  */
124 _OSP_EXPORT_ extern const Tizen::Base::String IM_SKYPE;
125
126 /**
127  * @if OSPDEPREC
128  * The IM service provider name for QQ.
129  *
130  * @brief <i> [Deprecated] </i>
131  * @deprecated  This object is provided only for backward compatibility and will be deleted in the near future.
132  *                              Use IM_ADDRESS_QQ instead of this object.
133  * @since       2.0
134  * @endif
135  */
136 _OSP_EXPORT_ extern const Tizen::Base::String IM_QQ;
137
138 /**
139  * The IM service provider name for AIM.
140  *
141  * @since       2.0
142  */
143 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_AIM[];
144
145 /**
146  * The IM service provider name for Google talk.
147  *
148  * @since       2.0
149  */
150 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_GOOGLE_TALK[];
151
152 /**
153  * The IM service provider name for ICQ.
154  *
155  * @since       2.0
156  */
157 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_ICQ[];
158
159 /**
160  * The IM service provider name for Jabber.
161  *
162  * @since       2.0
163  */
164 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_JABBER[];
165
166 /**
167  * The IM service provider name for MSN.
168  *
169  * @since       2.0
170 */
171 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_MSN[];
172
173 /**
174  * The IM service provider name for QQ.
175  *
176  * @since       2.0
177  */
178 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_QQ[];
179
180 /**
181  * The IM service provider name for Skype.
182  *
183  * @since       2.0
184  */
185 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_SKYPE[];
186
187 /**
188  * The IM service provider name for Yahoo.
189  *
190  * @since       2.0
191  */
192 _OSP_EXPORT_ extern const wchar_t IM_ADDRESS_YAHOO[];
193
194 /**
195  * @class       ImAddress
196  * @brief       This class represents the Instant Messenger (IM) addresses.
197  *
198  * @since       2.0
199  *
200  * @final       This class is not intended for extension.
201  *
202  * The %ImAddress class represents the Instant Messenger (IM) addresses. It consists of an IM service provider name and an account.
203  */
204 class _OSP_EXPORT_ ImAddress
205         : public Tizen::Base::Object
206 {
207 public:
208         /**
209          * This is the default constructor for this class.
210          *
211          * @since       2.0
212          */
213         ImAddress(void);
214
215         /**
216          * Initializes this instance of %ImAddress with the specified parameters. @n
217          * This constructs an instance of %ImAddress with the specified service provider name.
218          *
219          * @since       2.0
220          *
221          * @param[in]   serviceProviderName             The service provider name of the %ImAddress
222          * @param[in]   imAddress                               The IM address
223          * @see                 #IM_ADDRESS_AIM
224          * @see                 #IM_ADDRESS_GOOGLE_TALK
225          * @see                 #IM_ADDRESS_ICQ
226          * @see                 #IM_ADDRESS_JABBER
227          * @see                 #IM_ADDRESS_MSN
228          * @see                 #IM_ADDRESS_QQ
229          * @see                 #IM_ADDRESS_SKYPE
230          * @see                 #IM_ADDRESS_YAHOO
231          */
232         ImAddress(const Tizen::Base::String& serviceProviderName, const Tizen::Base::String& imAddress);
233
234         /**
235          * Copying of objects using this copy constructor is allowed.
236          *
237          * @since       2.0
238          *
239          * @param[in]   rhs     An instance of %ImAddress
240          */
241         ImAddress(const ImAddress& rhs);
242
243         /**
244          * This destructor overrides Tizen::Base::Object::~Object().
245          *
246          * @since       2.0
247          */
248         virtual ~ImAddress(void);
249
250         /**
251          * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
252          *
253          * @since       2.0
254          *
255          * @return      @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current instance of %Tizen::Base::Object, @n
256          *                      else @c false
257          * @param[in]   rhs             An instance of Tizen::Base::Object to compare
258          */
259         virtual bool Equals(const Tizen::Base::Object& rhs) const;
260
261         /**
262          * Gets the hash value of the current instance of Tizen::Base::Object.
263          *
264          * @since       2.0
265          *
266          * @return      An integer value indicating the hash value of the current instance of Tizen::Base::Object
267          */
268         virtual int GetHashCode(void) const;
269
270         /**
271          * Gets the service provider name of the IM address.
272          *
273          * @since       2.0
274          *
275          * @return              The service provider name of the IM address
276          */
277         Tizen::Base::String GetServiceProviderName(void) const;
278
279         /**
280          * Gets the IM address of the current instance of %ImAddress.
281          *
282          * @since       2.0
283          *
284          * @return              The IM address
285          */
286         Tizen::Base::String GetImAddress(void) const;
287
288         /**
289          * Sets the service provider name of the IM address.
290          *
291          * @since       2.0
292          *
293          * @return              An error code
294          * @param[in]   serviceProviderName             The service provider name of the IM address
295          * @see                 #IM_ADDRESS_AIM
296          * @see                 #IM_ADDRESS_GOOGLE_TALK
297          * @see                 #IM_ADDRESS_ICQ
298          * @see                 #IM_ADDRESS_JABBER
299          * @see                 #IM_ADDRESS_MSN
300          * @see                 #IM_ADDRESS_QQ
301          * @see                 #IM_ADDRESS_SKYPE
302          * @see                 #IM_ADDRESS_YAHOO
303          */
304         void SetServiceProviderName(const Tizen::Base::String& serviceProviderName);
305
306         /**
307          * Sets the IM address of the current instance of %ImAddress.
308          *
309          * @if OSPCOMPAT
310          * @brief <i> [Compatibility] </i>
311          * @endif
312          * @since       2.0
313          * @if OSPCOMPAT
314          * @compatibility            This method has compatibility issues with OSP compatible applications. @n
315          *                              For more information, see @ref CompImAddressSetImAddressPage "here".
316          * @endif
317          *
318          * @return              An error code
319          * @param[in]   imAddress                       The IM address
320          * @exception   E_SUCCESS                       The method is successful.
321          * @exception   E_INVALID_ARG           The specified @c imAddress is an empty string.
322          */
323         result SetImAddress(const Tizen::Base::String& imAddress);
324
325         /**
326          * @if OSPCOMPAT
327          * @page                CompImAddressSetImAddressPage           Compatibility for SetImAddress()
328          * @section             CompImAddressSetImAddressPageIssueSection               Issues
329          * Implementing this method in OSP compatible applications has the following issue: @n
330          * -# If the length of an IM address to be set is greater than 100 characters, E_INVALID_ARG is returned.
331          *
332          * @section             CompImAddressSetImAddressPageSolutionSection            Resolutions
333          * The issue mentioned above has been resolved in Tizen.
334          * @endif
335          */
336
337         /**
338          * Copying of objects using this copy assignment operator is allowed.
339          *
340          * @since       2.0
341          *
342          * @param[in]   rhs     An instance of %ImAddress
343          */
344         ImAddress& operator =(const ImAddress& rhs);
345
346         /**
347          * Checks whether the value of the specified instance of %ImAddress is equal to the value of the current instance.
348          *
349          * @since       2.0
350          *
351          * @return              @c true if the value of the specified instance of %ImAddress is equal to the value of the current instance, @n
352          *                              else @c false
353          * @param[in]   rhs             An instance of %ImAddress
354          */
355         bool operator ==(const ImAddress& rhs) const;
356
357         /**
358          * Checks whether the value of the specified instance of %ImAddress does not match the value of the current instance.
359          *
360          * @since       2.0
361          *
362          * @return              @c true if the value of the specified instance of %ImAddress is not equal to the value of the current instance, @n
363          *                              else @c false
364          * @param[in]   rhs             An instance of %ImAddress
365          */
366         bool operator !=(const ImAddress& rhs) const;
367
368 private:
369         friend class _ImAddressImpl;
370         class _ImAddressImpl* __pImAddressImpl;
371
372 }; // ImAddress
373
374 }} // Tizen::Social
375
376 #endif // _FSCL_IM_ADDRESS_H_