summaryrefslogtreecommitdiff
path: root/inc/FSclContact.h
blob: 4d54998e59a95b8187a10139a77c0e07a29d3d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
 * @file		FSclContact.h
 * @brief		This is the header file for the %Contact class.
 *
 * This header file contains the declarations of the %Contact class.
 */
#ifndef _FSCL_CONTACT_H_
#define _FSCL_CONTACT_H_

#include <FBaseTypes.h>
#include <FBaseString.h>
#include <FBaseDateTime.h>
#include <FBaseColIList.h>
#include <FGrpBitmap.h>
#include <FSclTypes.h>
#include <FSclRecord.h>

namespace Tizen { namespace Social
{

class Address;
class PhoneNumber;
class Email;
class Url;
class ImAddress;
class Organization;
class ContactEvent;
class Relationship;
class ContactAppLaunchData;

/**
 * @class	Contact
 * @brief	This class provides a contact.
 *
 * @since	2.0
 *
 * @final	This class is not intended for extension.
 *
 * The %Contact class provides a contact, a record that represents the contact information of a person. It provides the properties declared in
 * the #ContactPropertyId and #ContactMultiPropertyId enumerators. Check the descriptions for each property ID carefully to know the exact type
 * of the property and its value. @n
 *
 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/social/contact.htm">Contact</a>.
 *
 * The following example demonstrates how to use the %Contact class.
 *
 * @code
 *
	#include <FSocial.h>

	using namespace Tizen::Base;
	using namespace Tizen::Base::Collection;
	using namespace Tizen::Social;

	void
	ContactExample(void)
	{
		// Creates a contact
		Contact contact;

		// Sets the contact's properties
		contact.SetValue(CONTACT_PROPERTY_ID_FIRST_NAME, L"Thomas");
		contact.SetValue(CONTACT_PROPERTY_ID_LAST_NAME, L"A Anderson");

		PhoneNumber phoneNumber(PHONENUMBER_TYPE_MOBILE, L"820223459876");
		contact.AddPhoneNumber(phoneNumber);

		// Gets the contact's properties
		String firstName, lastName;
		contact.GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
		contact.GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);

		IList* pPhoneNumberList = contact.GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
		if (pPhoneNumberList != null)
		{
			PhoneNumber* pPhoneNumber = null;
			String number;
			IEnumerator* pEnum = pPhoneNumberList->GetEnumeratorN();
			while (pEnum->MoveNext() == E_SUCCESS)
			{
				pPhoneNumber = (PhoneNumber*) pEnum->GetCurrent();
				number = pPhoneNumber->GetPhoneNumber();
				// Uses the phone number
				// ..
			}

			delete pEnum;
			pPhoneNumberList->RemoveAll(true);
			delete pPhoneNumberList;
		}
	}
 *
 * @endcode
 *
 */
class _OSP_EXPORT_ Contact
	: public Record
{
public:
	/**
	 * This is the default constructor for this class.
	 *
	 * @since	2.0
	 */
	Contact(void);

	/**
	 * Copying of objects using this copy constructor is allowed.
	 *
	 * @since	2.0
	 *
	 * @param[in]	rhs		An instance of %Contact
	 */
	Contact(const Contact& rhs);

	/**
	 * This destructor overrides Tizen::Social::Record::~Record().
	 *
	 * @since	2.0
	 *
	 */
	virtual ~Contact(void);

	/**
	 * Checks whether the value of the specified instance is equal to the value of the current instance of Tizen::Base::Object.
	 *
	 * @since	2.0
	 *
	 * @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
	 *			else @c false
	 * @param[in]	rhs		An instance of Tizen::Base::Object to compare
	 */
	virtual bool Equals(const Tizen::Base::Object& rhs) const;

	/**
	 * Gets the hash value of the current instance.
	 *
	 * @since	2.0
	 *
	 * @return	The hash value of the current instance
	 */
	virtual int GetHashCode(void) const;

	/**
	 * @if OSPDEPREC
	 * Gets the @c Tizen::Graphics::Bitmap object of the thumbnail image. @n
	 * If the thumbnail is not set, @c null is returned.
	 *
	 * @brief <i> [Deprecated] </i>
	 * @deprecated This method is deprecated. Instead of using this method, use GetThumbnailPath()
	 * @since	2.0
	 *
	 * @return		The @c Tizen::Graphics::Bitmap object of the thumbnail image
	 * @exception	E_SUCCESS			The method is successful.
	 * @exception	E_SYSTEM			The method cannot proceed due to a severe system error.
	 * @remarks		The specific error code can be accessed using the GetLastResult() method.
	 * @see	SetThumbnail()
	 * @endif
	 */
	Tizen::Graphics::Bitmap* GetThumbnailN(void) const;

	/**
	 * Gets the thumbnail path.
	 *
	 * @since	2.0
	 *
	 * @return     The file path of the thumbnail
	 * @remarks    If the thumbnail has not been set, an empty string is returned.
	 */
	Tizen::Base::String GetThumbnailPath(void) const;

	/**
	 * Sets the thumbnail image. @n
	 * If the specified @c filePath is an empty string, the current thumbnail image is removed.
	 *
	 * @if OSPCOMPAT
	 * @brief <i> [Compatibility] </i>
	 * @endif
	 * @since	2.0
	 * @if OSPCOMPAT
	 * @compatibility            This method has compatibility issues with OSP compatible applications. @n
	 *					For more information, see @ref CompIoPathPage "here".
	 * @endif
	 *
	 * @return	An error code
	 * @param[in]	filePath		The file path of the thumbnail image
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The length of the specified @c filePath exceeds system limitations.
	 * @exception	E_FILE_NOT_FOUND	The specified file cannot be found or accessed.
	 * @exception	E_SYSTEM		The method cannot proceed due to a severe system error.
	 * @see	GetThumbnailPath()
	 */
	result SetThumbnail(const Tizen::Base::String& filePath);

	/**
	 * Sets the value of the property having the specified ID to the specified value.
	 *
	 * @if OSPCOMPAT
	 * @brief <i> [Compatibility] </i>
	 * @endif
	 * @since	2.0
	 * @if OSPCOMPAT
	 * @compatibility            This method has compatibility issues with OSP compatible applications. @n
	 *                            For more information, see @ref CompContactSetValuePage "here".
	 * @endif
	 *
	 * @return	An error code
	 * @param[in]	id			The ID of the property whose value is to set
	 * @param[in]	value			A new string value to set
	 * @exception	E_SUCCESS		    The method is successful.
	 * @exception	E_INVALID_ARG		The @c id is #CONTACT_PROPERTY_ID_DISPLAY_NAME or @if OSPDEPREC #CONTACT_PROPERTY_ID_THUMBNAIL, or @endif
	 *									the ringtone file path (value) is invalid if @c id is #CONTACT_PROPERTY_ID_RINGTONE.
	 * @remarks		
	 *		- The #CONTACT_PROPERTY_ID_DISPLAY_NAME property cannot be set. @n
	 *		- The #CONTACT_PROPERTY_ID_RINGTONE can be set to the path string of the ringtone file. @n
	 * @if OSPDEPREC
	 *		- The #CONTACT_PROPERTY_ID_THUMBNAIL property cannot be set. @n
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_NICK_NAME, @n
	 *                         	- If this contact has nicknames, the first nickname among them is set to the @c value. @n
	 *                         	- If not, a new nickname is added to this contact. @n
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_NOTE, @n
	 *                         	- If this contact has notes, the first note among them is set to the @c value. @n
	 *                         	- If not, a new note is added to this contact. @n
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_COMPANY, @n
	 *                         	- If this contact has organizations, the name value of the first organization among them is set to the @c value. @n
	 *                         	- If not, a new organization is added to this contact. @n
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_JOB_TITLE, @n
	 *                         	- If this contact has organizations, the job title value of the first organization among them is set to the @c value. @n
	 *                         	- If not, a new organization is added to this contact. @n
	 * @endif
	 */
	result SetValue(ContactPropertyId id, const Tizen::Base::String& value);

	/**
	 * @if OSPCOMPAT
	 * @page		CompContactSetValuePage		Compatibility for SetValue()
	 * @section		CompContactSetValuePageIssueSection		Issues
	 * Implementing this method in OSP compatible applications has the following issues: @n
	 * -# If the length of the value is greater than the maximum length of the specified property, E_INVALID_ARG is returned.
	 * -# The path should begin with an allowed path prefix such as @b '/Home', @b '/Home/Share', @b '/Res', @b '/Share/[@e appid]',
	 * @b '/Media', and @b '/Storagecard/Media'.
	 *
	 * @section		CompContactSetValuePageSolutionSection		Resolutions
	 * -# The first issue mentioned above has been resolved in Tizen.
	 * -# There are no specific allowed path prefixes. Applications can obtain accessible directory path using the following methods. @n
	 *  - For accessing its own data directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"data" @n
	 *    or Tizen::App::App::GetInstance()->GetAppDataPath().
	 *  - For accessing its own resource directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"res". @n
	 *    or Tizen::App::App::GetInstance()->GetAppResourcePath().
	 *  - For accessing its own share directory, use Tizen::App::App::GetInstance()->GetAppRootPath() + L"share".
	 *  - For accessing the media directory, use Tizen::System::Environment::GetMediaPath().
	 *  - For accessing the external storage, use Tizen::System::Environment::GetExternalStoragePath().
	 *
	 * For more information on the path,
	 * see <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/io_overview.htm">I/O Overview</a>.
	 * @endif
	 */

	/**
	 * Sets the specified value for the property having the specified ID.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	id			The ID of the property whose value is to set
	 * @param[in]	value			An instance of Tizen::Base::DateTime value to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The property with the specified contact property ID is not of Tizen::Base::DateTime type, or
	 *									the property is read-only.
	 * @if OSPDEPREC
	 * @remarks    
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_BIRTHDAY, @n
	 *                         -	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. @n
	 *                         -	If not, a new event whose type is #CONTACT_EVENT_TYPE_BIRTHDAY is added to this contact. @n
	 *		- In case @c id is set to #CONTACT_PROPERTY_ID_ANNIVERSARY, @n
	 *                         -	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. @n
	 *                         -	If not, a new event whose type is #CONTACT_EVENT_TYPE_ANNIVERSARY is added to this contact. @n        
	 * @endif
	 */
	result SetValue(ContactPropertyId id, const Tizen::Base::DateTime& value);

	/**
	 * Gets the value of the specified property.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	id			The property ID
	 * @param[out]	value			The property value
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified contact property ID is not supported.
	 */
	result GetValue(ContactPropertyId id, Tizen::Base::String& value) const;

	/**
	 * Gets the value of the specified Tizen::Base::DateTime property such as birthday. @n
	 * If the Tizen::Base::DateTime value has not been set for the specified property, the property has value, '1899, 12, 31, 00:00:00'.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	id			The property ID
	 * @param[out]	value			The property value
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified contact property ID is not supported.
	 */
	result GetValue(ContactPropertyId id, Tizen::Base::DateTime& value) const;

	/**
	 * Sets the specified phone number at the specified index.
	 *
	 * @since	2.0
	 *
	 * @return     An error code
	 * @param[in]  index          An index to set the value
	 * @param[in]  phoneNumber    An instance of PhoneNumber to set, @n
	 *                            else @c false
	 * @exception  E_SUCCESS      The method is successful.
	 * @exception  E_INVALID_ARG  The specified @c phoneNumber is empty.
	 * @exception  E_OUT_OF_RANGE The specified @c index is outside the bounds of the properties.
	 */
	result SetPhoneNumberAt(int index, const PhoneNumber& phoneNumber);

	/**
	 * Sets the specified email corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return		An error code
	 * @param[in]	index				An index to set the value
	 * @param[in]	email				An instance of Email
	 * @exception	E_SUCCESS			The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c email is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetEmailAt(int index, const Email& email);

	/**
	 * Sets the specified URL corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return		An error code
	 * @param[in]	index				An index to set the value
	 * @param[in]	url					An instance of Url
	 * @exception	E_SUCCESS			The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c url is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetUrlAt(int index, const Url& url);

	/**
	 * Sets the specified address corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return		An error code
	 * @param[in]	index				An index to set the value
	 * @param[in]	address				An instance of Address
	 * @exception	E_SUCCESS			The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c address is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetAddressAt(int index, const Address& address);

	/**
	 * Sets the specified ImAddress corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return		An error code
	 * @param[in]	index				An index to set the value
	 * @param[in]	imAddress			An instance of ImAddress
	 * @exception	E_SUCCESS			The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c imAddress is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetImAddressAt(int index, const ImAddress& imAddress);

	/**
	 * Sets the specified note corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	index			An index to set the value
	 * @param[in]	note			The note to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c note is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetNoteAt(int index, const Tizen::Base::String& note);

	/**
	 * Sets the specified nick name corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	index			An index to set the value
	 * @param[in]	nickname		The nick name to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c nickname is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetNicknameAt(int index, const Tizen::Base::String& nickname);

	/**
	 * Sets the specified event corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	index			An index to set the value
	 * @param[in]	event			The event to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The date of the specified @c event has not been set.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetEventAt(int index, const ContactEvent& event);

	/**
	 * Sets the specified organization corresponding to the specified index.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	index			An index to set the value
	 * @param[in]	organization		The organization to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c organization is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetOrganizationAt(int index, const Organization& organization);

	/**
	 * Sets the specified @c relationship corresponding to the specified @c index.
	 *
	 * @since	2.1
	 *
	 * @return	An error code
	 * @param[in]	index			An index to set the value
	 * @param[in]	relationship		The relationship to set
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c relationship is empty.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result SetRelationshipAt(int index, const Relationship& relationship);

        /**
         * Sets the app launch data at the specified index.
         *
         * @since       2.2
         *
         *
         * @return      An error code
         * @param[in]   index                   An index to set the contact app launch data
         * @param[in]   appLaunchData           The app launch data to set
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG           The specified @c appLaunchData has no relevant information.
         * @exception   E_OUT_OF_RANGE          The specified @c index is outside the bounds of the app launch data.
         */
        result SetContactAppLaunchDataAt(int index, const ContactAppLaunchData& appLaunchData);

	/**
	 * Gets the addressbook ID.
	 *
	 * @since	2.0
	 *
	 * @return	The addressbook ID
	 */
	AddressbookId GetAddressbookId(void) const;

	/**
	 * Gets the person ID to which this contact is linked.
	 *
	 * @since	2.0
	 *
	 * @return	The person ID
	 */
	PersonId GetPersonId(void) const;

	/**
	 * Gets a list of the values belonging to the specific multi value property.
	 *
	 * @since	2.0
	 *
	 * @return	A list of the values belonging to the specific multi value property
	 * @param[in]	id			A property ID
	 * @exception	E_SUCCESS		The method is successful.
	 * @remarks	The specific error code can be accessed using the GetLastResult() method.
	 */
	Tizen::Base::Collection::IList* GetValuesN(ContactMultiPropertyId id) const;

	/**
	 * Adds the specified phone number to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	phoneNumber		The phone number to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c phoneNumber is empty.
	 */
	result AddPhoneNumber(const PhoneNumber& phoneNumber);

	/**
	 * Adds the specified email to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	email		The mail address to add
	 * @exception	E_SUCCESS	The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c email is empty.
	 */
	result AddEmail(const Email& email);

	/**
	 * Adds the specified URL to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	url		The URL to add
	 * @exception	E_SUCCESS	The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c url is empty.
	 */
	result AddUrl(const Url& url);

	/**
	 * Adds the specified address to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	address		The address to add
	 * @exception	E_SUCCESS	The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c address is empty.
	 */
	result AddAddress(const Address& address);

	/**
	 * Adds the specified instant message information to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	imAddress	The IM address to add
	 * @exception	E_SUCCESS	The method is successful.
	 * @exception	E_INVALID_ARG	The specified @c imAddress is empty.
	 */
	result AddImAddress(const ImAddress& imAddress);

	/**
	 * Adds the specified note to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	note			The note to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c note is empty.
	 */
	result AddNote(const Tizen::Base::String& note);

	/**
	 * Adds the specified nick name to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	nickname		The nick name to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c nickname is empty.
	 */
	result AddNickname(const Tizen::Base::String& nickname);

	/**
	 * Adds the specified event to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	event			The event to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The date of the specified @c event has not been set.
	 */
	result AddEvent(const ContactEvent& event);

	/**
	 * Adds the specified organization to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	organization		The organization to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c organization is empty.
	 */
	result AddOrganization(const Organization& organization);

	/**
	 * Adds the specified relationship to the contact.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	relationship		The relationship to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c organization is empty.
	 */
	result AddRelationship(const Relationship& relationship);

	/**
	 * Adds the specified app launch data to the contact.
	 *
	 * @since	2.2
	 *
	 * @return	An error code
	 * @param[in]	appLaunchData		The app launch data to add
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_INVALID_ARG		The specified @c appLaunchData has no relevant information.
	 */
	result AddContactAppLaunchData(const ContactAppLaunchData& appLaunchData);

	/**
	 * Removes the specific value at the specified index of the multi value property.
	 *
	 * @since	2.0
	 *
	 * @return	An error code
	 * @param[in]	id			A property ID
	 * @param[in]	index			The index of the value to remove
	 * @exception	E_SUCCESS		The method is successful.
	 * @exception	E_OUT_OF_RANGE		The specified @c index is outside the bounds of the properties.
	 */
	result RemoveAt(ContactMultiPropertyId id, int index);

	/**
	 * Checks whether this contact is a favorite or not.
	 *
	 * @since	2.1
	 *
	 * @return     @c true if this contact is a favorite, @n
	 *              else @c false
	 * @see	SetAsFavorite()
	 */
	bool IsFavorite(void) const;

	/**
	 * Sets or unsets a contact as a favorite.
	 *
	 * @since	2.1
	 * @see IsFavorite()
	 */
	void SetAsFavorite(bool isFavorite = true);

	/**
	 * Copying of objects using this copy assignment operator is allowed.
	 *
	 * @since	2.0
	 *
	 * @param[in]	rhs		An instance of %Contact
	 */
	Contact& operator =(const Contact& rhs);

private:
	friend class _ContactImpl;
	class _ContactImpl* __pContactImpl;

}; // Contact

}} // Tizen::Social

#endif // _FSCL_CONTACT_H_