Avaya Client Services API Reference (OS X)
Instance Methods | Properties | List of all members
CSContact Class Reference

Represents an immutable contact object which exposes all possible contact details. More...

#import <CSContact.h>

Inherits NSObject, and <CSContact>.

Instance Methods

(void) - retrievePictureWithCompletionHandler:
 Retrieve contact's Picture. More...
 
(BOOL) - hasContactSourceType:
 Returns if this contact source type is set on contact. More...
 
(BOOL) - hasPicture
 Returns if this contact has picture set on. More...
 
(void) - startPresenceWithAccessControlBehavior:completionHandler:
 Begin monitoring presence for this contact. More...
 
(void) - stopPresenceWithCompletionHandler:
 Stop monitoring presence for this contact. More...
 
(void) - removePictureFromCache
 Removes contact's picture from cache. More...
 
(BOOL) - canAddPhoneNumberOfType:
 
(BOOL) - canAddEmailAddressOfType:
 

Properties

id< CSContactDelegatedelegate
 This delegate responsible for handling updates for this contact. More...
 
NSString * uniqueAddressForMatching
 The matching/merging address. More...
 
CSContactStringFieldasciiLastName
 The non-localized last name. More...
 
CSContactStringFieldasciiFirstName
 The non-localized first name. More...
 
CSContactStringFieldasciiDisplayName
 The non-localized display name. More...
 
CSContactStringFieldasciiAlias
 The non-localized alias. More...
 
CSContactStringFieldfirstName
 The native first name. More...
 
CSContactStringFieldlastName
 The native last name. More...
 
CSContactStringFielddisplayName
 The native display name. More...
 
CSContactStringFieldalias
 The native alias. More...
 
CSContactStringFieldstreetAddress
 The street address. More...
 
CSContactStringFieldcity
 The city. More...
 
CSContactStringFieldstate
 The state. More...
 
CSContactStringFieldcountry
 The country. More...
 
CSContactStringFieldpostalCode
 The postal code. More...
 
CSContactStringFieldmanager
 The name of a person who is a supervisor. More...
 
CSContactStringFieldtitle
 The title or company role. More...
 
CSContactStringFieldlanguage
 The language is per contact record. More...
 
CSContactStringFieldcompany
 The company. More...
 
CSContactStringFielddepartment
 The department. More...
 
CSContactStringFieldnotes
 The notes field. More...
 
CSContactDoubleFieldrank
 The rank field defining the contact sorting order. More...
 
CSContactStringFieldListcustom1
 The list of custom1 values. More...
 
CSContactStringFieldListcustom2
 The list of custom2 values. More...
 
CSContactStringFieldListcustom3
 The list of custom3 values. More...
 
CSContactStringFieldlocation
 The location. More...
 
CSPresencepresence
 The presence state of this contact. More...
 
CSContactPhoneFieldListphoneNumbers
 The list of phone numbers. More...
 
CSContactEmailFieldListemailAddresses
 The list of email addresses. More...
 
CSContactIMAddressFieldListIMAddresses
 Contact's list of instant messaging addresses. More...
 
CSContactBoolFieldfavorite
 The favorite flag. More...
 
CSContactBoolFieldisBuddy
 The buddy flag. More...
 
CSContactBoolFieldisVIP
 The VIP flag. More...
 
NSArray * contactSources
 Returns list of contact sources. More...
 
CSCapabilityupdateCapability
 
CSCapabilitydeleteCapability
 
CSCapabilityaddToGroupCapability
 
NSDictionary * extraFields
 The list extra fields used for local contacts. More...
 
CSContactBoolFieldvideoCapable
 
BOOL isExtendedContactDetailsAvailable
 
BOOL canAddEmailAddress
 
BOOL canAddIMAddress
 
- Properties inherited from <CSContact>
NSString * uniqueAddressForMatching
 The matching/merging address. More...
 
CSContactStringFieldasciiLastName
 The non-localized last name. More...
 
CSContactStringFieldasciiFirstName
 The non-localized first name. More...
 
CSContactStringFieldasciiDisplayName
 The non-localized display name. More...
 
CSContactStringFieldasciiAlias
 The non-localized alias. More...
 
CSContactStringFieldfirstName
 The native first name. More...
 
CSContactStringFieldlastName
 The native last name. More...
 
CSContactStringFielddisplayName
 The native display name. More...
 
CSContactStringFieldalias
 The native alias. More...
 
CSContactStringFieldstreetAddress
 The street address. More...
 
CSContactStringFieldcity
 The city. More...
 
CSContactStringFieldstate
 The state. More...
 
CSContactStringFieldcountry
 The country. More...
 
CSContactStringFieldpostalCode
 The postal code. More...
 
CSContactStringFieldmanager
 The name of a person who is a supervisor. More...
 
CSContactStringFieldtitle
 The title or company role. More...
 
CSContactStringFieldlanguage
 The language is per contact record. More...
 
CSContactStringFieldcompany
 The company. More...
 
CSContactStringFielddepartment
 The department. More...
 
CSContactStringFieldnotes
 The notes field. More...
 
CSContactDoubleFieldrank
 The rank field defining the contact sorting order. More...
 
CSContactStringFieldListcustom1
 The list of custom1 values. More...
 
CSContactStringFieldListcustom2
 The list of custom2 values. More...
 
CSContactStringFieldListcustom3
 The list of custom3 values. More...
 
CSContactStringFieldlocation
 The location. More...
 
CSContactPhoneFieldListphoneNumbers
 The list of phone numbers. More...
 
CSContactEmailFieldListemailAddresses
 The list of email addresses. More...
 
CSContactIMAddressFieldListIMAddresses
 Contact's list of instant messaging addresses. More...
 
CSContactBoolFieldfavorite
 The favorite flag. More...
 
CSContactBoolFieldisBuddy
 The buddy flag. More...
 
CSContactBoolFieldisVIP
 The VIP flag. More...
 
CSContactBoolFieldvideoCapable
 
BOOL isExtendedContactDetailsAvailable
 
BOOL canAddEmailAddress
 
BOOL canAddIMAddress
 
NSDictionary * extraFields
 The list extra fields used for local contacts. More...
 

Detailed Description

Represents an immutable contact object which exposes all possible contact details.

The contact object can also be used to subscribe for presence updates.

Contacts can be retrieved by using CSContactService methods retrieveContactsForSource:watcher: (CSContactService) or searchContactsWithSearchString:searchScope:searchLocation:maxNumberOfResults:maxChunkSize:watcher: (CSContactService). Both methods take a DataRetrievalWatcher argument which allows the application to be notified about the status of the operation and changes to the list of contacts retrieved.

This object cannot be used to edit the contact record. In order to update a contact record the following steps are required:

  1. Call createEditableContactFromContact: (CSContactService) to get an editable contact object.
  2. Make updates to the fields of the CSEditableContact object that was returned.
  3. Call updateContact:completionHandler: (CSContactService) to save the changes.
See also
CSEditableContact

Method Documentation

- (BOOL) canAddEmailAddressOfType: (CSContactEmailAddressType type
- (BOOL) canAddPhoneNumberOfType: (CSContactPhoneNumberType type

Reimplemented from <CSContact>.

- (BOOL) hasContactSourceType: (CSContactSourceType contactSourceType

Returns if this contact source type is set on contact.

- (BOOL) hasPicture

Returns if this contact has picture set on.

- (void) removePictureFromCache

Removes contact's picture from cache.

This method helps to manage the application memory. When the contact picture is not needed, it can be removed and downloaded again in the future.

See also
- retrievePictureWithCompletionHandler:
- (void) retrievePictureWithCompletionHandler: (void(^)(NSData *pictureData, NSError *error))  completionHandler

Retrieve contact's Picture.

Parameters
completionHandlerA block to be called when the operation is completed.
  • bytes the buffer containing picture data
  • length the number of bytes in hold from bytes
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) startPresenceWithAccessControlBehavior: (CSAccessControlBehavior accessControlBehavior
completionHandler: (void(^)(NSError *error))  completionHandler 

Begin monitoring presence for this contact.

Once the operation is completed, presence will return the actual presence information for the contact.

Parameters
accessControlBehaviorType of the ACL-confirm policy handling.
completionHandlerCompletion handler that is invoked once the operation completes.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
- (void) stopPresenceWithCompletionHandler: (void(^)(NSError *error))  completionHandler

Stop monitoring presence for this contact.

Once the operation is completed, presence will not be able to provide actual user's presence information.

Parameters
completionHandlerCompletion handler that is invoked once the operation completes.
  • error If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

Property Documentation

- (CSCapability*) addToGroupCapability
readnonatomicassign
Returns
Capability object describing whether this contact can be added to a group.
- (CSContactStringField*) alias
readnonatomicassign

The native alias.

Returns
Contact string field containing the native alias.
- (CSContactStringField*) asciiAlias
readnonatomicassign

The non-localized alias.

Returns
Contact string field containing a non-localized alias.
- (CSContactStringField*) asciiDisplayName
readnonatomicassign

The non-localized display name.

Returns
Contact string field containing non-localized display name.
- (CSContactStringField*) asciiFirstName
readnonatomicassign

The non-localized first name.

Returns
Contact string field containing non-localized first name.
- (CSContactStringField*) asciiLastName
readnonatomicassign

The non-localized last name.

Returns
Contact string field containing non-localized last name.
- (BOOL) canAddEmailAddress
readnonatomicassign
- (BOOL) canAddIMAddress
readnonatomicassign
- (CSContactStringField*) city
readnonatomicassign

The city.

Returns
Contact string field containing the city.
- (CSContactStringField*) company
readnonatomicassign

The company.

Returns
Contact string field containing the company.
- (NSArray*) contactSources
readnonatomicassign

Returns list of contact sources.

Returns
list of contact sources
- (CSContactStringField*) country
readnonatomicassign

The country.

Returns
Contact string field containing the country.
- (CSContactStringFieldList*) custom1
readnonatomicassign

The list of custom1 values.

Returns
list of custom1 values.
- (CSContactStringFieldList*) custom2
readnonatomicassign

The list of custom2 values.

Returns
list of custom2 values.
- (CSContactStringFieldList*) custom3
readnonatomicassign

The list of custom3 values.

Returns
list of custom3 values.
- (id<CSContactDelegate>) delegate
readwritenonatomicweak

This delegate responsible for handling updates for this contact.

- (CSCapability*) deleteCapability
readnonatomicassign
Returns
Capability object describing whether the contact services can delete this contact
- (CSContactStringField*) department
readnonatomicassign

The department.

Returns
Contact string field containing the department.
- (CSContactStringField*) displayName
readnonatomicassign

The native display name.

Returns
Contact string field containing the native display name.
- (CSContactEmailFieldList*) emailAddresses
readnonatomicassign

The list of email addresses.

Returns
Contact multi value field containing list of email addresses.
- (NSDictionary*) extraFields
readnonatomicassign

The list extra fields used for local contacts.

- (CSContactBoolField*) favorite
readnonatomicassign

The favorite flag.

Returns
Contact bool field containing the favorite flag.
- (CSContactStringField*) firstName
readnonatomicassign

The native first name.

Returns
Contact string field containing the native first name.
- (CSContactIMAddressFieldList*) IMAddresses
readnonatomicassign

Contact's list of instant messaging addresses.

Returns
Contact multi value field containing list of instant messaging addresses..
- (CSContactBoolField*) isBuddy
readnonatomicassign

The buddy flag.

Used for presence feature purpose.

Returns
Contact bool field containing the buddy flag.
- (BOOL) isExtendedContactDetailsAvailable
readnonatomicassign
- (CSContactBoolField*) isVIP
readnonatomicassign

The VIP flag.

Returns
Contact bool field containing the VIP flag.
- (CSContactStringField*) language
readnonatomicassign

The language is per contact record.

Returns
Contact string field containing the language is per contact record.
- (CSContactStringField*) lastName
readnonatomicassign

The native last name.

Returns
Contact string field containing the native last name.
- (CSContactStringField*) location
readnonatomicassign

The location.

Returns
Contact string field containing the location.
- (CSContactStringField*) manager
readnonatomicassign

The name of a person who is a supervisor.

Returns
Contact string field containing the name of a person who is a supervisor.
- (CSContactStringField*) notes
readnonatomicassign

The notes field.

Returns
Contact string field containing the notes field.
- (CSContactPhoneFieldList*) phoneNumbers
readnonatomicassign

The list of phone numbers.

Returns
Contact multi value field containing list of phone numbers.
- (CSContactStringField*) postalCode
readnonatomicassign

The postal code.

Returns
Contact string field containing the postal code.
- (CSPresence*) presence
readnonatomicassign

The presence state of this contact.

Note that for the presence to start being updated, startPresenceWithAccessControlBehavior:completionHandler: must be invoked.

- (CSContactDoubleField*) rank
readnonatomicassign

The rank field defining the contact sorting order.

Returns
Non-negative double value. 0.0 value means "No rank".
- (CSContactStringField*) state
readnonatomicassign

The state.

Returns
Contact string field containing the state.
- (CSContactStringField*) streetAddress
readnonatomicassign

The street address.

Returns
Contact string field containing the street address.
- (CSContactStringField*) title
readnonatomicassign

The title or company role.

Returns
Contact string field containing the title or company role.
- (NSString*) uniqueAddressForMatching
readnonatomicassign

The matching/merging address.

That parameter can be used as a record’s unique id.

Returns
Contact string field containing the matching/merging address.
- (CSCapability*) updateCapability
readnonatomicassign
Returns
Capability object describing whether the contact services can update this contact
- (CSContactBoolField*) videoCapable
readnonatomicassign

The documentation for this class was generated from the following file: