Initialize Tizen 2.3
[framework/osp/social.git] / inc / FSclContact.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                FSclContact.h
18  * @brief               This is the header file for the %Contact class.
19  *
20  * This header file contains the declarations of the %Contact class.
21  */
22 #ifndef _FSCL_CONTACT_H_
23 #define _FSCL_CONTACT_H_
24
25 #include <FBaseTypes.h>
26 #include <FBaseString.h>
27 #include <FBaseDateTime.h>
28 #include <FBaseColIList.h>
29 #include <FGrpBitmap.h>
30 #include <FSclTypes.h>
31 #include <FSclRecord.h>
32
33 namespace Tizen { namespace Social
34 {
35
36 class Address;
37 class PhoneNumber;
38 class Email;
39 class Url;
40 class ImAddress;
41 class Organization;
42 class ContactEvent;
43 class Relationship;
44 class ContactAppLaunchData;
45
46 /**
47  * @class       Contact
48  * @brief       This class provides a contact.
49  *
50  * @since       2.0
51  *
52  * @final       This class is not intended for extension.
53  *
54  * The %Contact class provides a contact, a record that represents the contact information of a person. It provides the properties declared in
55  * the #ContactPropertyId and #ContactMultiPropertyId enumerators. Check the descriptions for each property ID carefully to know the exact type
56  * of the property and its value. @n
57  *
58  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/social/contact.htm">Contact</a>.
59  *
60  * The following example demonstrates how to use the %Contact class.
61  *
62  * @code
63  *
64         #include <FSocial.h>
65
66         using namespace Tizen::Base;
67         using namespace Tizen::Base::Collection;
68         using namespace Tizen::Social;
69
70         void
71         ContactExample(void)
72         {
73                 // Creates a contact
74                 Contact contact;
75
76                 // Sets the contact's properties
77                 contact.SetValue(CONTACT_PROPERTY_ID_FIRST_NAME, L"Thomas");
78                 contact.SetValue(CONTACT_PROPERTY_ID_LAST_NAME, L"A Anderson");
79
80                 PhoneNumber phoneNumber(PHONENUMBER_TYPE_MOBILE, L"820223459876");
81                 contact.AddPhoneNumber(phoneNumber);
82
83                 // Gets the contact's properties
84                 String firstName, lastName;
85                 contact.GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
86                 contact.GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
87
88                 IList* pPhoneNumberList = contact.GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
89                 if (pPhoneNumberList != null)
90                 {
91                         PhoneNumber* pPhoneNumber = null;
92                         String number;
93                         IEnumerator* pEnum = pPhoneNumberList->GetEnumeratorN();
94                         while (pEnum->MoveNext() == E_SUCCESS)
95                         {
96                                 pPhoneNumber = (PhoneNumber*) pEnum->GetCurrent();
97                                 number = pPhoneNumber->GetPhoneNumber();
98                                 // Uses the phone number
99                                 // ..
100                         }
101
102                         delete pEnum;
103                         pPhoneNumberList->RemoveAll(true);
104                         delete pPhoneNumberList;
105                 }
106         }
107  *
108  * @endcode
109  *
110  */
111 class _OSP_EXPORT_ Contact
112         : public Record
113 {
114 public:
115         /**
116          * This is the default constructor for this class.
117          *
118          * @since       2.0
119          */
120         Contact(void);
121
122         /**
123          * Copying of objects using this copy constructor is allowed.
124          *
125          * @since       2.0
126          *
127          * @param[in]   rhs             An instance of %Contact to copy
128          */
129         Contact(const Contact& rhs);
130
131         /**
132          * This destructor overrides Tizen::Social::Record::~Record().
133          *
134          * @since       2.0
135          *
136          */
137         virtual ~Contact(void);
138
139         /**
140          * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
141          *
142          * @since       2.0
143          *
144          * @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
145          *                      else @c false
146          * @param[in]   rhs             An instance of Tizen::Base::Object to compare
147          */
148         virtual bool Equals(const Tizen::Base::Object& rhs) const;
149
150         /**
151          * Gets the hash value of the current instance.
152          *
153          * @since       2.0
154          *
155          * @return      The hash value of the current instance
156          */
157         virtual int GetHashCode(void) const;
158
159         /**
160          * @if OSPDEPREC
161          * Gets the Tizen::Graphics::Bitmap object of the thumbnail image. @n
162          * If the thumbnail is not set, @c null is returned.
163          *
164          * @brief <i> [Deprecated] </i>
165          * @deprecated This method is deprecated. Instead of using this method, use GetThumbnailPath()
166          * @since       2.0
167          *
168          * @return              The Tizen::Graphics::Bitmap object of the thumbnail image
169          * @exception   E_SUCCESS                       The method is successful.
170          * @exception   E_SYSTEM                        The method cannot proceed due to a severe system error.
171          * @remarks             The specific error code can be accessed using the GetLastResult() method.
172          * @see SetThumbnail()
173          * @endif
174          */
175         Tizen::Graphics::Bitmap* GetThumbnailN(void) const;
176
177         /**
178          * Gets the thumbnail path.
179          *
180          * @since       2.0
181          *
182          * @return     The file path of the thumbnail
183          * @remarks    If the thumbnail has not been set, an empty string is returned.
184          */
185         Tizen::Base::String GetThumbnailPath(void) const;
186
187         /**
188          * Sets the thumbnail image. @n
189          * If the specified @c filePath is an empty string, the current thumbnail image is removed.
190          *
191          * @if OSPCOMPAT
192          * @brief <i> [Compatibility] </i>
193          * @endif
194          * @since       2.0
195          * @if OSPCOMPAT
196          * @compatibility            This method has compatibility issues with OSP compatible applications. @n
197          *                                                      For more information, see @ref CompIoPathPage "here".
198          * @endif
199          *
200          * @return      An error code
201          * @param[in]   filePath                        The file path of the thumbnail image
202          * @exception   E_SUCCESS                       The method is successful.
203          * @exception   E_INVALID_ARG           The length of the specified @c filePath exceeds system limitations.
204          * @exception   E_FILE_NOT_FOUND        The specified file cannot be found or accessed.
205          * @exception   E_SYSTEM                        The method cannot proceed due to a severe system error.
206          * @see GetThumbnailPath()
207          */
208         result SetThumbnail(const Tizen::Base::String& filePath);
209
210         /**
211          * Sets the value of the property having the specified ID, to the specified value.
212          *
213          * @if OSPCOMPAT
214          * @brief <i> [Compatibility] </i>
215          * @endif
216          * @since       2.0
217          * @if OSPCOMPAT
218          * @compatibility             This method has compatibility issues with OSP compatible applications. @n
219          *                            For more information, see @ref CompContactSetValuePage "here".
220          * @endif
221          *
222          * @return              An error code
223          * @param[in]   id                                      The ID of the property whose value is set
224          * @param[in]   value                           The new string value to set
225          * @exception   E_SUCCESS                   The method is successful.
226          * @exception   E_INVALID_ARG           The specified @c id is #CONTACT_PROPERTY_ID_DISPLAY_NAME, @if OSPDEPREC #CONTACT_PROPERTY_ID_THUMBNAIL, or @endif
227          *                                                                      the ringtone file path (value) is invalid if @c id is #CONTACT_PROPERTY_ID_RINGTONE.
228          * @remarks             
229          *              - The #CONTACT_PROPERTY_ID_DISPLAY_NAME property cannot be set. @n
230          *              - The #CONTACT_PROPERTY_ID_RINGTONE can be set to the path string of the ringtone file. @n
231          * @if OSPDEPREC
232          *              - The #CONTACT_PROPERTY_ID_THUMBNAIL property cannot be set. @n
233          *              - In case @c id is set to #CONTACT_PROPERTY_ID_NICK_NAME, @n
234          *                              - If this contact has nicknames, the first nickname among them is set to the @c value. @n
235          *                              - If not, a new nickname is added to this contact. @n
236          *              - In case @c id is set to #CONTACT_PROPERTY_ID_NOTE, @n
237          *                              - If this contact has notes, the first note among them is set to the @c value. @n
238          *                              - If not, a new note is added to this contact. @n
239          *              - In case @c id is set to #CONTACT_PROPERTY_ID_COMPANY, @n
240          *                              - If this contact has organizations, the name value of the first organization among them is set to the @c value. @n
241          *                              - If not, a new organization is added to this contact. @n
242          *              - In case @c id is set to #CONTACT_PROPERTY_ID_JOB_TITLE, @n
243          *                              - If this contact has organizations, the job title value of the first organization among them is set to the @c value. @n
244          *                              - If not, a new organization is added to this contact. @n
245          * @endif
246          */
247         result SetValue(ContactPropertyId id, const Tizen::Base::String& value);
248
249         /**
250          * @if OSPCOMPAT
251          * @page                CompContactSetValuePage         Compatibility for SetValue()
252          * @section             CompContactSetValuePageIssueSection             Issues
253          *                              Implementing this method in OSP compatible applications has the following issues: @n
254          *                              -# If the length of the value is greater than the maximum length of the specified property, @c E_INVALID_ARG is returned.
255          *                              -# The path should begin with an allowed path prefix such as @b '/Home', @b '/Home/Share', @b '/Res', @b '/Share/[@e appid]',
256          *                                 @b '/Media', and @b '/Storagecard/Media'.
257          *
258          * @section             CompContactSetValuePageSolutionSection          Resolutions
259          * -# The first issue mentioned above has been resolved in Tizen.
260          * -# There are no specific allowed path prefixes. Applications can obtain an accessible directory path using the following methods. @n
261          *  - For accessing its own data directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"data" @n
262          *    or Tizen::App::App::GetInstance()->GetAppDataPath().
263          *  - For accessing its own resource directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"res". @n
264          *    or Tizen::App::App::GetInstance()->GetAppResourcePath().
265          *  - For accessing its own share directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"share".
266          *  - For accessing the media directory, use Tizen::System::Environment::GetMediaPath().
267          *  - For accessing the external storage, use Tizen::System::Environment::GetExternalStoragePath().
268          *
269          * For more information on the path,
270          * see <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/io_overview.htm">I/O Overview</a>.
271          * @endif
272          */
273
274         /**
275          * Sets the specified value for the property having the specified ID.
276          *
277          * @since       2.0
278          *
279          * @return      An error code
280          * @param[in]   id                              The ID of the property whose value is set
281          * @param[in]   value                   An instance of Tizen::Base::DateTime value to set
282          * @exception   E_SUCCESS               The method is successful.
283          * @exception   E_INVALID_ARG   Either of the following conditions has occurred:
284          *                                                              - The property with the specified contact property ID is not of Tizen::Base::DateTime type.
285          *                                                              - The property is read-only.
286          * @if OSPDEPREC
287          * @remarks    
288          *              - In case @c id is set to #CONTACT_PROPERTY_ID_BIRTHDAY,
289          *                         -    If this contact has events whose types are #CONTACT_EVENT_TYPE_BIRTHDAY, the date value of the first event among them is set to the @c value.
290          *                         -    If not, a new event whose type is #CONTACT_EVENT_TYPE_BIRTHDAY is added to this contact.
291          *              - In case @c id is set to #CONTACT_PROPERTY_ID_ANNIVERSARY,
292          *                         -    If this contact has events whose types are #CONTACT_EVENT_TYPE_ANNIVERSARY, the date value of the first event among them is set to the @c value.
293          *                         -    If not, a new event whose type is #CONTACT_EVENT_TYPE_ANNIVERSARY is added to this contact.
294          * @endif
295          */
296         result SetValue(ContactPropertyId id, const Tizen::Base::DateTime& value);
297
298         /**
299          * Gets the value of the specified property.
300          *
301          * @since       2.0
302          *
303          * @return      An error code
304          * @param[in]   id                              The property ID
305          * @param[out]  value                   The property value
306          * @exception   E_SUCCESS               The method is successful.
307          * @exception   E_INVALID_ARG   The specified contact property ID is not supported.
308          */
309         result GetValue(ContactPropertyId id, Tizen::Base::String& value) const;
310
311         /**
312          * Gets the value of the specified Tizen::Base::DateTime property such as birthday. @n
313          * If the %Tizen::Base::DateTime value has not been set for the specified property, the property has a value, '1899, 12, 31, 00:00:00'.
314          *
315          * @since       2.0
316          *
317          * @return      An error code
318          * @param[in]   id                              The property ID
319          * @param[out]  value                   The property value
320          * @exception   E_SUCCESS               The method is successful.
321          * @exception   E_INVALID_ARG   The specified contact property ID is not supported.
322          */
323         result GetValue(ContactPropertyId id, Tizen::Base::DateTime& value) const;
324
325         /**
326          * Sets the specified phone number at the specified index.
327          *
328          * @since       2.0
329          *
330          * @return     An error code
331          * @param[in]  index          The index at which to set the value
332          * @param[in]  phoneNumber    An instance of PhoneNumber to set, @n
333          *                            else @c false
334          * @exception  E_SUCCESS      The method is successful.
335          * @exception  E_INVALID_ARG  The specified @c phoneNumber is empty.
336          * @exception  E_OUT_OF_RANGE The specified @c index is outside the bounds of the properties.
337          */
338         result SetPhoneNumberAt(int index, const PhoneNumber& phoneNumber);
339
340         /**
341          * Sets the specified email corresponding to the specified index.
342          *
343          * @since       2.0
344          *
345          * @return              An error code
346          * @param[in]   index                           The index at which to set the value
347          * @param[in]   email                           An instance of Email
348          * @exception   E_SUCCESS                       The method is successful.
349          * @exception   E_INVALID_ARG           The specified @c email is empty.
350          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
351          */
352         result SetEmailAt(int index, const Email& email);
353
354         /**
355          * Sets the specified URL corresponding to the specified index.
356          *
357          * @since       2.0
358          *
359          * @return              An error code
360          * @param[in]   index                           The index at which to set the value
361          * @param[in]   url                                     An instance of Url
362          * @exception   E_SUCCESS                       The method is successful.
363          * @exception   E_INVALID_ARG           The specified @c url is empty.
364          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
365          */
366         result SetUrlAt(int index, const Url& url);
367
368         /**
369          * Sets the specified address corresponding to the specified index.
370          *
371          * @since       2.0
372          *
373          * @return              An error code
374          * @param[in]   index                           The index at which to set the value
375          * @param[in]   address                         An instance of Address
376          * @exception   E_SUCCESS                       The method is successful.
377          * @exception   E_INVALID_ARG           The specified @c address is empty.
378          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
379          */
380         result SetAddressAt(int index, const Address& address);
381
382         /**
383          * Sets the specified ImAddress corresponding to the specified index.
384          *
385          * @since       2.0
386          *
387          * @return              An error code
388          * @param[in]   index                           The index at which to set the value
389          * @param[in]   imAddress                       An instance of ImAddress
390          * @exception   E_SUCCESS                       The method is successful.
391          * @exception   E_INVALID_ARG           The specified @c imAddress is empty.
392          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
393          */
394         result SetImAddressAt(int index, const ImAddress& imAddress);
395
396         /**
397          * Sets the specified note corresponding to the specified index.
398          *
399          * @since       2.0
400          *
401          * @return      An error code
402          * @param[in]   index                           The index at which to set the value
403          * @param[in]   note                            The note to set
404          * @exception   E_SUCCESS                       The method is successful.
405          * @exception   E_INVALID_ARG           The specified @c note is empty.
406          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
407          */
408         result SetNoteAt(int index, const Tizen::Base::String& note);
409
410         /**
411          * Sets the specified nick name corresponding to the specified index.
412          *
413          * @since       2.0
414          *
415          * @return      An error code
416          * @param[in]   index                           The index at which to set the value
417          * @param[in]   nickname                        The nick name to set
418          * @exception   E_SUCCESS                       The method is successful.
419          * @exception   E_INVALID_ARG           The specified @c nickname is empty.
420          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
421          */
422         result SetNicknameAt(int index, const Tizen::Base::String& nickname);
423
424         /**
425          * Sets the specified event corresponding to the specified index.
426          *
427          * @since       2.0
428          *
429          * @return      An error code
430          * @param[in]   index                           The index at which to set the value
431          * @param[in]   event                           The event to set
432          * @exception   E_SUCCESS                       The method is successful.
433          * @exception   E_INVALID_ARG           The date of the specified @c event has not been set.
434          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
435          */
436         result SetEventAt(int index, const ContactEvent& event);
437
438         /**
439          * Sets the specified organization corresponding to the specified index.
440          *
441          * @since       2.0
442          *
443          * @return      An error code
444          * @param[in]   index                           The index at which to set the value
445          * @param[in]   organization            The organization to set
446          * @exception   E_SUCCESS                       The method is successful.
447          * @exception   E_INVALID_ARG           The specified @c organization is empty.
448          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
449          */
450         result SetOrganizationAt(int index, const Organization& organization);
451
452         /**
453          * Sets the specified @c relationship corresponding to the specified @c index.
454          *
455          * @since       2.1
456          *
457          * @return      An error code
458          * @param[in]   index                           The index at which to set the value
459          * @param[in]   relationship            The relationship to set
460          * @exception   E_SUCCESS                       The method is successful.
461          * @exception   E_INVALID_ARG           The specified @c relationship is empty.
462          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the properties.
463          */
464         result SetRelationshipAt(int index, const Relationship& relationship);
465
466         /**
467          * Sets the app launch data at the specified index.
468          *
469          * @since       2.2
470          *
471          *
472          * @return      An error code
473          * @param[in]   index                   The index at which to set the contact app launch data
474          * @param[in]   appLaunchData           The app launch data to set
475          * @exception   E_SUCCESS               The method is successful.
476          * @exception   E_INVALID_ARG           The specified @c appLaunchData has no relevant information.
477          * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the app launch data.
478          */
479         result SetContactAppLaunchDataAt(int index, const ContactAppLaunchData& appLaunchData);
480
481         /**
482          * Gets the addressbook ID.
483          *
484          * @since       2.0
485          *
486          * @return      The addressbook ID
487          */
488         AddressbookId GetAddressbookId(void) const;
489
490         /**
491          * Gets the person ID to which this contact is linked.
492          *
493          * @since       2.0
494          *
495          * @return      The person ID
496          */
497         PersonId GetPersonId(void) const;
498
499         /**
500          * Gets the list of values belonging to the specific multi value property.
501          *
502          * @since       2.0
503          *
504          * @return      The list of values belonging to the specific multi value property
505          * @param[in]   id                              The property ID
506          * @exception   E_SUCCESS               The method is successful.
507          * @remarks     The specific error code can be accessed using the GetLastResult() method.
508          */
509         Tizen::Base::Collection::IList* GetValuesN(ContactMultiPropertyId id) const;
510
511         /**
512          * Adds the specified phone number to the contact.
513          *
514          * @since       2.0
515          *
516          * @return      An error code
517          * @param[in]   phoneNumber                     The phone number to add
518          * @exception   E_SUCCESS                       The method is successful.
519          * @exception   E_INVALID_ARG           The specified @c phoneNumber is empty.
520          */
521         result AddPhoneNumber(const PhoneNumber& phoneNumber);
522
523         /**
524          * Adds the specified email to the contact.
525          *
526          * @since       2.0
527          *
528          * @return      An error code
529          * @param[in]   email                   The email address to add
530          * @exception   E_SUCCESS               The method is successful.
531          * @exception   E_INVALID_ARG   The specified @c email is empty.
532          */
533         result AddEmail(const Email& email);
534
535         /**
536          * Adds the specified URL to the contact.
537          *
538          * @since       2.0
539          *
540          * @return      An error code
541          * @param[in]   url                             The URL to add
542          * @exception   E_SUCCESS               The method is successful.
543          * @exception   E_INVALID_ARG   The specified @c url is empty.
544          */
545         result AddUrl(const Url& url);
546
547         /**
548          * Adds the specified address to the contact.
549          *
550          * @since       2.0
551          *
552          * @return      An error code
553          * @param[in]   address                 The address to add
554          * @exception   E_SUCCESS               The method is successful.
555          * @exception   E_INVALID_ARG   The specified @c address is empty.
556          */
557         result AddAddress(const Address& address);
558
559         /**
560          * Adds the specified instant message information to the contact.
561          *
562          * @since       2.0
563          *
564          * @return      An error code
565          * @param[in]   imAddress               The IM address to add
566          * @exception   E_SUCCESS               The method is successful.
567          * @exception   E_INVALID_ARG   The specified @c imAddress is empty.
568          */
569         result AddImAddress(const ImAddress& imAddress);
570
571         /**
572          * Adds the specified note to the contact.
573          *
574          * @since       2.0
575          *
576          * @return      An error code
577          * @param[in]   note                    The note to add
578          * @exception   E_SUCCESS               The method is successful.
579          * @exception   E_INVALID_ARG   The specified @c note is empty.
580          */
581         result AddNote(const Tizen::Base::String& note);
582
583         /**
584          * Adds the specified nick name to the contact.
585          *
586          * @since       2.0
587          *
588          * @return      An error code
589          * @param[in]   nickname                The nick name to add
590          * @exception   E_SUCCESS               The method is successful.
591          * @exception   E_INVALID_ARG   The specified @c nickname is empty.
592          */
593         result AddNickname(const Tizen::Base::String& nickname);
594
595         /**
596          * Adds the specified event to the contact.
597          *
598          * @since       2.0
599          *
600          * @return      An error code
601          * @param[in]   event                   The event to add
602          * @exception   E_SUCCESS               The method is successful.
603          * @exception   E_INVALID_ARG   The date of the specified @c event has not been set.
604          */
605         result AddEvent(const ContactEvent& event);
606
607         /**
608          * Adds the specified organization to the contact.
609          *
610          * @since       2.0
611          *
612          * @return      An error code
613          * @param[in]   organization            The organization to add
614          * @exception   E_SUCCESS                       The method is successful.
615          * @exception   E_INVALID_ARG           The specified @c organization is empty.
616          */
617         result AddOrganization(const Organization& organization);
618
619         /**
620          * Adds the specified relationship to the contact.
621          *
622          * @since       2.0
623          *
624          * @return      An error code
625          * @param[in]   relationship            The relationship to add
626          * @exception   E_SUCCESS                       The method is successful.
627          * @exception   E_INVALID_ARG           The specified @c organization is empty.
628          */
629         result AddRelationship(const Relationship& relationship);
630
631         /**
632          * Adds the specified app launch data to the contact.
633          *
634          * @since       2.2
635          *
636          * @return      An error code
637          * @param[in]   appLaunchData           The app launch data to add
638          * @exception   E_SUCCESS                       The method is successful.
639          * @exception   E_INVALID_ARG           The specified @c appLaunchData has no relevant information.
640          */
641         result AddContactAppLaunchData(const ContactAppLaunchData& appLaunchData);
642
643         /**
644          * Removes the value at the specified index of the multi value property.
645          *
646          * @since       2.0
647          *
648          * @return      An error code
649          * @param[in]   id                              The property ID
650          * @param[in]   index                   The index of the value to remove
651          * @exception   E_SUCCESS               The method is successful.
652          * @exception   E_OUT_OF_RANGE  The specified @c index is outside the bounds of the properties.
653          */
654         result RemoveAt(ContactMultiPropertyId id, int index);
655
656         /**
657          * Checks whether this contact is a favorite.
658          *
659          * @since       2.1
660          *
661          * @return     @c true if this contact is a favorite, @n
662          *             else @c false
663          * @see SetAsFavorite()
664          */
665         bool IsFavorite(void) const;
666
667         /**
668          * Sets or unsets a contact as a favorite.
669          *
670          * @since       2.1
671          * @see IsFavorite()
672          */
673         void SetAsFavorite(bool isFavorite = true);
674
675         /**
676          * Copying of objects using this copy assignment operator is allowed.
677          *
678          * @since       2.0
679          *
680          * @param[in]   rhs             An instance of %Contact to copy
681          */
682         Contact& operator =(const Contact& rhs);
683
684 private:
685         friend class _ContactImpl;
686         class _ContactImpl* __pContactImpl;
687
688 }; // Contact
689
690 }} // Tizen::Social
691
692 #endif // _FSCL_CONTACT_H_