Avaya Client Services API Reference (iOS)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

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< CSContactDelegate > | delegate
| This delegate responsible for handling updates for this contact. More...
NSString * | uniqueAddressForMatching
| The matching/merging address. More...
CSContactStringField * | asciiLastName
| The non-localized last name. More...
CSContactStringField * | asciiFirstName
| The non-localized first name. More...
CSContactStringField * | asciiDisplayName
| The non-localized display name. More...
CSContactStringField * | asciiAlias
| The non-localized alias. More...
CSContactStringField * | firstName
| The native first name. More...
CSContactStringField * | lastName
| The native last name. More...
CSContactStringField * | displayName
| The native display name. More...
CSContactStringField * | alias
| The native alias. More...
CSContactStringField * | streetAddress
| The street address. More...
CSContactStringField * | city
| The city. More...
CSContactStringField * | state
| The state. More...
CSContactStringField * | country
| The country. More...
CSContactStringField * | postalCode
| The postal code. More...
CSContactStringField * | manager
| The name of a person who is a supervisor. More...
CSContactStringField * | title
| The title or company role. More...
CSContactStringField * | language
| The language is per contact record. More...
CSContactStringField * | company
| The company. More...
CSContactStringField * | department
| The department. More...
CSContactStringField * | notes
| The notes field. More...
CSContactDoubleField * | rank
| The rank field defining the contact sorting order. More...
CSContactStringFieldList * | custom1
| The list of custom1 values. More...
CSContactStringFieldList * | custom2
| The list of custom2 values. More...
CSContactStringFieldList * | custom3
| The list of custom3 values. More...
CSContactStringField * | location
| The location. More...
CSPresence * | presence
| The presence state of this contact. More...
CSContactPhoneFieldList * | phoneNumbers
| The list of phone numbers. More...
CSContactEmailFieldList * | emailAddresses
| The list of email addresses. More...
CSContactIMAddressFieldList * | IMAddresses
| Contact's list of instant messaging addresses. More...
CSContactBoolField * | favorite
| The favorite flag. More...
CSContactBoolField * | isBuddy
| The buddy flag. More...
CSContactBoolField * | isVIP
| The VIP flag. More...
NSArray * | contactSources
| Returns list of contact sources. More...
CSCapability * | updateCapability
CSCapability * | deleteCapability
CSCapability * | addToGroupCapability
NSDictionary * | extraFields
| The list extra fields used for local contacts. More...
CSContactBoolField * | videoCapable
BOOL | isExtendedContactDetailsAvailable
BOOL | canAddEmailAddress
BOOL | canAddIMAddress
Properties inherited from <CSContact>
NSString * | uniqueAddressForMatching
| The matching/merging address. More...
CSContactStringField * | asciiLastName
| The non-localized last name. More...
CSContactStringField * | asciiFirstName
| The non-localized first name. More...
CSContactStringField * | asciiDisplayName
| The non-localized display name. More...
CSContactStringField * | asciiAlias
| The non-localized alias. More...
CSContactStringField * | firstName
| The native first name. More...
CSContactStringField * | lastName
| The native last name. More...
CSContactStringField * | displayName
| The native display name. More...
CSContactStringField * | alias
| The native alias. More...
CSContactStringField * | streetAddress
| The street address. More...
CSContactStringField * | city
| The city. More...
CSContactStringField * | state
| The state. More...
CSContactStringField * | country
| The country. More...
CSContactStringField * | postalCode
| The postal code. More...
CSContactStringField * | manager
| The name of a person who is a supervisor. More...
CSContactStringField * | title
| The title or company role. More...
CSContactStringField * | language
| The language is per contact record. More...
CSContactStringField * | company
| The company. More...
CSContactStringField * | department
| The department. More...
CSContactStringField * | notes
| The notes field. More...
CSContactDoubleField * | rank
| The rank field defining the contact sorting order. More...
CSContactStringFieldList * | custom1
| The list of custom1 values. More...
CSContactStringFieldList * | custom2
| The list of custom2 values. More...
CSContactStringFieldList * | custom3
| The list of custom3 values. More...
CSContactStringField * | location
| The location. More...
CSContactPhoneFieldList * | phoneNumbers
| The list of phone numbers. More...
CSContactEmailFieldList * | emailAddresses
| The list of email addresses. More...
CSContactIMAddressFieldList * | IMAddresses
| Contact's list of instant messaging addresses. More...
CSContactBoolField * | favorite
| The favorite flag. More...
CSContactBoolField * | isBuddy
| The buddy flag. More...
CSContactBoolField * | isVIP
| The VIP flag. More...
CSContactBoolField * | videoCapable
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

  completionHandler | A 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

  accessControlBehavior | Type of the ACL-confirm policy handling.
  completionHandler | Completion 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

  completionHandler | Completion 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
| read nonatomic assign

Returns
  Capability object describing whether this contact can be added to a group.

- (CSContactStringField*) alias
| read nonatomic assign

The native alias.

Returns
  Contact string field containing the native alias.

- (CSContactStringField*) asciiAlias
| read nonatomic assign

The non-localized alias.

Returns
  Contact string field containing a non-localized alias.

- (CSContactStringField*) asciiDisplayName
| read nonatomic assign

The non-localized display name.

Returns
  Contact string field containing non-localized display name.

- (CSContactStringField*) asciiFirstName
| read nonatomic assign

The non-localized first name.

Returns
  Contact string field containing non-localized first name.

- (CSContactStringField*) asciiLastName
| read nonatomic assign

The non-localized last name.

Returns
  Contact string field containing non-localized last name.

- (BOOL) canAddEmailAddress
| read nonatomic assign

- (BOOL) canAddIMAddress
| read nonatomic assign

- (CSContactStringField*) city
| read nonatomic assign

The city.

Returns
  Contact string field containing the city.

- (CSContactStringField*) company
| read nonatomic assign

The company.

Returns
  Contact string field containing the company.

- (NSArray*) contactSources
| read nonatomic assign

Returns list of contact sources.

Returns
  list of contact sources

- (CSContactStringField*) country
| read nonatomic assign

The country.

Returns
  Contact string field containing the country.

- (CSContactStringFieldList*) custom1
| read nonatomic assign

The list of custom1 values.

Returns
  list of custom1 values.

- (CSContactStringFieldList*) custom2
| read nonatomic assign

The list of custom2 values.

Returns
  list of custom2 values.

- (CSContactStringFieldList*) custom3
| read nonatomic assign

The list of custom3 values.

Returns
  list of custom3 values.

- (id<CSContactDelegate>) delegate
| read write nonatomic weak

This delegate responsible for handling updates for this contact.

- (CSCapability*) deleteCapability
| read nonatomic assign

Returns
  Capability object describing whether the contact services can delete this contact

- (CSContactStringField*) department
| read nonatomic assign

The department.

Returns
  Contact string field containing the department.

- (CSContactStringField*) displayName
| read nonatomic assign

The native display name.

Returns
  Contact string field containing the native display name.

- (CSContactEmailFieldList*) emailAddresses
| read nonatomic assign

The list of email addresses.

Returns
  Contact multi value field containing list of email addresses.

- (NSDictionary*) extraFields
| read nonatomic assign

The list extra fields used for local contacts.

- (CSContactBoolField*) favorite
| read nonatomic assign

The favorite flag.

Returns
  Contact bool field containing the favorite flag.

- (CSContactStringField*) firstName
| read nonatomic assign

The native first name.

Returns
  Contact string field containing the native first name.

- (CSContactIMAddressFieldList*) IMAddresses
| read nonatomic assign

Contact's list of instant messaging addresses.

Returns
  Contact multi value field containing list of instant messaging addresses..

- (CSContactBoolField*) isBuddy
| read nonatomic assign

The buddy flag.

Used for presence feature purpose.

Returns
  Contact bool field containing the buddy flag.

- (BOOL) isExtendedContactDetailsAvailable
| read nonatomic assign

- (CSContactBoolField*) isVIP
| read nonatomic assign

The VIP flag.

Returns
  Contact bool field containing the VIP flag.

- (CSContactStringField*) language
| read nonatomic assign

The language is per contact record.

Returns
  Contact string field containing the language is per contact record.

- (CSContactStringField*) lastName
| read nonatomic assign

The native last name.

Returns
  Contact string field containing the native last name.

- (CSContactStringField*) location
| read nonatomic assign

The location.

Returns
  Contact string field containing the location.

- (CSContactStringField*) manager
| read nonatomic assign

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
| read nonatomic assign

The notes field.

Returns
  Contact string field containing the notes field.

- (CSContactPhoneFieldList*) phoneNumbers
| read nonatomic assign

The list of phone numbers.

Returns
  Contact multi value field containing list of phone numbers.

- (CSContactStringField*) postalCode
| read nonatomic assign

The postal code.

Returns
  Contact string field containing the postal code.

- (CSPresence*) presence
| read nonatomic assign

The presence state of this contact.

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

- (CSContactDoubleField*) rank
| read nonatomic assign

The rank field defining the contact sorting order.

Returns
  Non-negative double value. 0.0 value means "No rank".

- (CSContactStringField*) state
| read nonatomic assign

The state.

Returns
  Contact string field containing the state.

- (CSContactStringField*) streetAddress
| read nonatomic assign

The street address.

Returns
  Contact string field containing the street address.

- (CSContactStringField*) title
| read nonatomic assign

The title or company role.

Returns
  Contact string field containing the title or company role.

- (NSString*) uniqueAddressForMatching
| read nonatomic assign

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
| read nonatomic assign

Returns
  Capability object describing whether the contact services can update this contact

- (CSContactBoolField*) videoCapable
| read nonatomic assign

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

- CSContact.h