Carddav_vcard

## Macros

#define | LINPHONE_VCARD BELLE_SIP_CAST(object, LinphoneVcard)
| Cast a belle_sip_object_t into LinphoneVcard.

## Typedefs

typedef struct _LinphoneVcard | LinphoneVcard
| Object storing contact information using vCard 4.0 format.

## Functions

LinphoneVcard * | linphone_vcard_ref (LinphoneVcard *vCard)
| Take a ref on a LinphoneVcard.
void | linphone_vcard_unref (LinphoneVcard *vCard)
| Release a LinphoneVcard.
LinphoneVcard * | linphone_vcard_clone (const LinphoneVcard *vCard)
| Clone a LinphoneVcard.
const char * | linphone_vcard_as_vcard4_string (LinphoneVcard *vCard)
| Returns the vCard4 representation of the LinphoneVcard.
void | linphone_vcard_set_full_name (LinphoneVcard *vCard, const char *name)
| Sets the FN attribute of the vCard (which is mandatory).
const char * | linphone_vcard_get_full_name (const LinphoneVcard *vCard)
| Returns the FN attribute of the vCard, or NULL if it isn't set yet.
void | linphone_vcard_set_skip_validation (LinphoneVcard *vCard, bool_t skip)
| Sets the skipFieldValidation property of the vcard.
bool_t | linphone_vcard_get_skip_validation (const LinphoneVcard *vCard)
| Returns the skipFieldValidation property of the vcard.
void | linphone_vcard_set_family_name (LinphoneVcard *vCard, const char *name)
| Sets the family name in the N attribute of the vCard.
const char * | linphone_vcard_get_family_name (const LinphoneVcard *vCard)
| Returns the family name in the N attribute of the vCard, or NULL if it isn't set yet.
void | linphone_vcard_set_given_name (LinphoneVcard *vCard, const char *name)
| Sets the given name in the N attribute of the vCard.
const char * | linphone_vcard_get_given_name (const LinphoneVcard *vCard)
| Returns the given name in the N attribute of the vCard, or NULL if it isn't set yet.
void | linphone_vcard_add_sip_address (LinphoneVcard *vCard, const char *sip_address)
| Adds a SIP address in the vCard, using the IMPP property.
void | linphone_vcard_remove_sip_address (LinphoneVcard *vCard, const char *sip_address)
| Removes a SIP address in the vCard (if it exists), using the IMPP property.
void | linphone_vcard_edit_main_sip_address (LinphoneVcard *vCard, const char *sip_address)
| Edits the preferred SIP address in the vCard (or the first one), using the IMPP property.
const bctbx_list_t * | linphone_vcard_get_sip_addresses (LinphoneVcard *vCard)
| Returns the list of SIP addresses in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or NULL.
void | linphone_vcard_add_phone_number (LinphoneVcard *vCard, const char *phone)
| Adds a phone number in the vCard, using the TEL property.
void | linphone_vcard_remove_phone_number (LinphoneVcard *vCard, const char *phone)
| Removes a phone number in the vCard (if it exists), using the TEL property.
bctbx_list_t * | linphone_vcard_get_phone_numbers (const LinphoneVcard *vCard)
| Returns the list of phone numbers in the vCard (all the TEL attributes) or NULL.
void | linphone_vcard_add_phone_number_with_label (LinphoneVcard *vCard, LinphoneFriendPhoneNumber *phoneNumber)
| Adds a LinphoneFriendPhoneNumber in the vCard, using the TEL property.
void | linphone_vcard_remove_phone_number_with_label (LinphoneVcard *vCard, const LinphoneFriendPhoneNumber *phoneNumber)
| Removes a LinphoneFriendPhoneNumber in the vCard (if it exists), using the TEL property.
bctbx_list_t * | linphone_vcard_get_phone_numbers_with_label (const LinphoneVcard *vCard)
| Returns the list of phone numbers in the vCard (all the TEL attributes) or NULL.
void | linphone_vcard_set_organization (LinphoneVcard *vCard, const char *organization)
| Fills the Organization field of the vCard.
const char * | linphone_vcard_get_organization (const LinphoneVcard *vCard)
| Gets the Organization of the vCard.
void | linphone_vcard_remove_organization (LinphoneVcard *vCard)
| Removes the Organization field of the vCard.
void | linphone_vcard_set_job_title (LinphoneVcard *vCard, const char *job_title)
| Fills the Title field of the vCard.
const char * | linphone_vcard_get_job_title (const LinphoneVcard *vCard)
| Gets the Title of the vCard.
void | linphone_vcard_remove_job_title (LinphoneVcard *vCard)
| Removes the Title field of the vCard.
void | linphone_vcard_set_photo (LinphoneVcard *vCard, const char *picture)
| Sets a picture URI in the vCard, using the PHOTO property.
void | linphone_vcard_remove_photo (LinphoneVcard *vCard)
| Removes any existing PHOTO property.
const char * | linphone_vcard_get_photo (const LinphoneVcard *vCard)
| Returns the first PHOTO property or NULL.
bool_t | linphone_vcard_generate_unique_id (LinphoneVcard *vCard)
| Generates a random unique id for the vCard.
void | linphone_vcard_set_uid (LinphoneVcard *vCard, const char *uid)
| Sets the unique ID of the vCard.
const char * | linphone_vcard_get_uid (const LinphoneVcard *vCard)
| Gets the UID of the vCard.
void | linphone_vcard_set_etag (LinphoneVcard *vCard, const char *etag)
| Sets the eTAG of the vCard.
const char * | linphone_vcard_get_etag (const LinphoneVcard *vCard)
| Gets the eTag of the vCard.
void | linphone_vcard_set_url (LinphoneVcard *vCard, const char *url)
| Sets the URL of the vCard.
const char * | linphone_vcard_get_url (const LinphoneVcard *vCard)
| Gets the URL of the vCard.
bctbx_list_t * | linphone_vcard_get_extended_properties_values_by_name (const LinphoneVcard *vCard, const char *name)
| Get the vCard extended properties values per property name.
void | linphone_vcard_add_extended_property (LinphoneVcard *vCard, const char *name, const char *value)
| Adds an extended property to the vCard.
void | linphone_vcard_remove_extented_properties_by_name (LinphoneVcard *vCard, const char *name)
| Remove all the extend properties per property name.

## Detailed Description

## Function Documentation

## linphone_vcard_add_extended_property()

void linphone_vcard_add_extended_property | ( | LinphoneVcard * | vCard,
|  | const char * | name,
|  | const char * | value )

Adds an extended property to the vCard.

Parameters

  vCard | the LinphoneVcard
  name | the name of the extended property to add
  value | the value of the extended property to add

## linphone_vcard_add_phone_number()

void linphone_vcard_add_phone_number | ( | LinphoneVcard * | vCard,
|  | const char * | phone )

Adds a phone number in the vCard, using the TEL property.

Parameters

  vCard | the LinphoneVcard
  phone | the phone number to add

## linphone_vcard_add_phone_number_with_label()

void linphone_vcard_add_phone_number_with_label | ( | LinphoneVcard * | vCard,
|  | LinphoneFriendPhoneNumber * | phoneNumber )

Adds a LinphoneFriendPhoneNumber in the vCard, using the TEL property.

Parameters

  vCard | the LinphoneVcard
  phoneNumber | the LinphoneFriendPhoneNumber to add

## linphone_vcard_add_sip_address()

void linphone_vcard_add_sip_address | ( | LinphoneVcard * | vCard,
|  | const char * | sip_address )

Adds a SIP address in the vCard, using the IMPP property.

Parameters

  vCard | the LinphoneVcard
  sip_address | the SIP address to add

## linphone_vcard_as_vcard4_string()

const char * linphone_vcard_as_vcard4_string | ( | LinphoneVcard * | vCard | ) |

Returns the vCard4 representation of the LinphoneVcard.

Parameters

  vCard | the LinphoneVcard

Returns
  a const char * that represents the vCard.

## linphone_vcard_clone()

LinphoneVcard * linphone_vcard_clone | ( | const LinphoneVcard * | vCard | ) |

Clone a LinphoneVcard.

Parameters

  vCard | LinphoneVcard object

Returns
  a new LinphoneVcard object

## linphone_vcard_edit_main_sip_address()

void linphone_vcard_edit_main_sip_address | ( | LinphoneVcard * | vCard,
|  | const char * | sip_address )

Edits the preferred SIP address in the vCard (or the first one), using the IMPP property.

Parameters

  vCard | the LinphoneVcard
  sip_address | the new SIP address

## linphone_vcard_generate_unique_id()

bool_t linphone_vcard_generate_unique_id | ( | LinphoneVcard * | vCard | ) |

Generates a random unique id for the vCard.

If is required to be able to synchronize the vCard with a CardDAV server

Parameters

  vCard | the LinphoneVcard

Returns
  TRUE if operation is successful, otherwise FALSE (for example if it already has an unique ID)

## linphone_vcard_get_etag()

const char * linphone_vcard_get_etag | ( | const LinphoneVcard * | vCard | ) |

Gets the eTag of the vCard.

Parameters

  vCard | the LinphoneVcard

Returns
  the eTag of the vCard in the CardDAV server, otherwise NULL.

## linphone_vcard_get_extended_properties_values_by_name()

bctbx_list_t * linphone_vcard_get_extended_properties_values_by_name | ( | const LinphoneVcard * | vCard,
|  | const char * | name )

Get the vCard extended properties values per property name.

Parameters

  vCard | the LinphoneVcard
  name | the name to filter the extended properties on.

Returns
  The extended properties values as string.

## linphone_vcard_get_family_name()

const char * linphone_vcard_get_family_name | ( | const LinphoneVcard * | vCard | ) |

Returns the family name in the N attribute of the vCard, or NULL if it isn't set yet.

Parameters

  vCard | the LinphoneVcard

Returns
  the family name of the vCard, or NULL

## linphone_vcard_get_full_name()

const char * linphone_vcard_get_full_name | ( | const LinphoneVcard * | vCard | ) |

Returns the FN attribute of the vCard, or NULL if it isn't set yet.

Parameters

  vCard | the LinphoneVcard

Returns
  the display name of the vCard, or NULL.

## linphone_vcard_get_given_name()

const char * linphone_vcard_get_given_name | ( | const LinphoneVcard * | vCard | ) |

Returns the given name in the N attribute of the vCard, or NULL if it isn't set yet.

Parameters

  vCard | the LinphoneVcard

Returns
  the given name of the vCard, or NULL

## linphone_vcard_get_job_title()

const char * linphone_vcard_get_job_title | ( | const LinphoneVcard * | vCard | ) |

Gets the Title of the vCard.

Parameters

  vCard | the LinphoneVcard

Returns
  the Title of the vCard or NULL.

## linphone_vcard_get_organization()

const char * linphone_vcard_get_organization | ( | const LinphoneVcard * | vCard | ) |

Gets the Organization of the vCard.

Parameters

  vCard | the LinphoneVcard

Returns
  the Organization of the vCard or NULL.

## linphone_vcard_get_phone_numbers()

bctbx_list_t * linphone_vcard_get_phone_numbers | ( | const LinphoneVcard * | vCard | ) |

Returns the list of phone numbers in the vCard (all the TEL attributes) or NULL.

Parameters

  vCard | the LinphoneVcard

Returns
  The phone numbers as string.

## linphone_vcard_get_phone_numbers_with_label()

bctbx_list_t * linphone_vcard_get_phone_numbers_with_label | ( | const LinphoneVcard * | vCard | ) |

Returns the list of phone numbers in the vCard (all the TEL attributes) or NULL.

Parameters

  vCard | the LinphoneVcard

Returns
  The phone numbers as LinphoneFriendPhoneNumber.

## linphone_vcard_get_photo()

const char * linphone_vcard_get_photo | ( | const LinphoneVcard * | vCard | ) |

Returns the first PHOTO property or NULL.

Parameters

  vCard | the LinphoneVcard

Returns
  The picture URI as string or NULL if none has been set.

## linphone_vcard_get_sip_addresses()

const bctbx_list_t * linphone_vcard_get_sip_addresses | ( | LinphoneVcard * | vCard | ) |

Returns the list of SIP addresses in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or NULL.

Parameters

  vCard | the LinphoneVcard

Returns
  The SIP addresses.

## linphone_vcard_get_skip_validation()

bool_t linphone_vcard_get_skip_validation | ( | const LinphoneVcard * | vCard | ) |

Returns the skipFieldValidation property of the vcard.

Parameters

  vCard | the LinphoneVcard

Returns
  the skipFieldValidation property of the vcard

## linphone_vcard_get_uid()

const char * linphone_vcard_get_uid | ( | const LinphoneVcard * | vCard | ) |

Gets the UID of the vCard.

Parameters

  vCard | the LinphoneVcard

Returns
  the UID of the vCard, otherwise NULL.

## linphone_vcard_get_url()

const char * linphone_vcard_get_url | ( | const LinphoneVcard * | vCard | ) |

Gets the URL of the vCard.

Parameters

  vCard | the LinphoneVcard

Returns
  the URL of the vCard in the CardDAV server, otherwise NULL.

## linphone_vcard_ref()

LinphoneVcard * linphone_vcard_ref | ( | LinphoneVcard * | vCard | ) |

Take a ref on a LinphoneVcard.

Parameters

  vCard | LinphoneVcard object

Returns
  the same LinphoneVcard object

## linphone_vcard_remove_extented_properties_by_name()

void linphone_vcard_remove_extented_properties_by_name | ( | LinphoneVcard * | vCard,
|  | const char * | name )

Remove all the extend properties per property name.

Parameters

  vCard | the LinphoneVcard
  name | the name to remove the extended properties on.

## linphone_vcard_remove_job_title()

void linphone_vcard_remove_job_title | ( | LinphoneVcard * | vCard | ) |

Removes the Title field of the vCard.

Parameters

  vCard | the LinphoneVcard

## linphone_vcard_remove_organization()

void linphone_vcard_remove_organization | ( | LinphoneVcard * | vCard | ) |

Removes the Organization field of the vCard.

Parameters

  vCard | the LinphoneVcard

## linphone_vcard_remove_phone_number()

void linphone_vcard_remove_phone_number | ( | LinphoneVcard * | vCard,
|  | const char * | phone )

Removes a phone number in the vCard (if it exists), using the TEL property.

Parameters

  vCard | the LinphoneVcard
  phone | the phone number to remove

## linphone_vcard_remove_phone_number_with_label()

void linphone_vcard_remove_phone_number_with_label | ( | LinphoneVcard * | vCard,
|  | const LinphoneFriendPhoneNumber * | phoneNumber )

Removes a LinphoneFriendPhoneNumber in the vCard (if it exists), using the TEL property.

Parameters

  vCard | the LinphoneVcard
  phoneNumber | the LinphoneFriendPhoneNumber to remove

## linphone_vcard_remove_photo()

void linphone_vcard_remove_photo | ( | LinphoneVcard * | vCard | ) |

Removes any existing PHOTO property.

Parameters

  vCard | the LinphoneVcard

## linphone_vcard_remove_sip_address()

void linphone_vcard_remove_sip_address | ( | LinphoneVcard * | vCard,
|  | const char * | sip_address )

Removes a SIP address in the vCard (if it exists), using the IMPP property.

Parameters

  vCard | the LinphoneVcard
  sip_address | the SIP address to remove

## linphone_vcard_set_etag()

void linphone_vcard_set_etag | ( | LinphoneVcard * | vCard,
|  | const char * | etag )

Sets the eTAG of the vCard.

Parameters

  vCard | the LinphoneVcard
  etag | the eTAG.

## linphone_vcard_set_family_name()

void linphone_vcard_set_family_name | ( | LinphoneVcard * | vCard,
|  | const char * | name )

Sets the family name in the N attribute of the vCard.

Parameters

  vCard | the LinphoneVcard
  name | the family name to set for the vCard

## linphone_vcard_set_full_name()

void linphone_vcard_set_full_name | ( | LinphoneVcard * | vCard,
|  | const char * | name )

Sets the FN attribute of the vCard (which is mandatory).

Parameters

  vCard | the LinphoneVcard
  name | the display name to set for the vCard

## linphone_vcard_set_given_name()

void linphone_vcard_set_given_name | ( | LinphoneVcard * | vCard,
|  | const char * | name )

Sets the given name in the N attribute of the vCard.

Parameters

  vCard | the LinphoneVcard
  name | the given name to set for the vCard

## linphone_vcard_set_job_title()

void linphone_vcard_set_job_title | ( | LinphoneVcard * | vCard,
|  | const char * | job_title )

Fills the Title field of the vCard.

Parameters

  vCard | the LinphoneVcard
  job_title | the job title.

## linphone_vcard_set_organization()

void linphone_vcard_set_organization | ( | LinphoneVcard * | vCard,
|  | const char * | organization )

Fills the Organization field of the vCard.

Parameters

  vCard | the LinphoneVcard
  organization | the Organization.

## linphone_vcard_set_photo()

void linphone_vcard_set_photo | ( | LinphoneVcard * | vCard,
|  | const char * | picture )

Sets a picture URI in the vCard, using the PHOTO property.

Parameters

  vCard | the LinphoneVcard
  picture | the picture URI to add. If NULL it will have the same effet as linphone_vcard_remove_photo().

## linphone_vcard_set_skip_validation()

void linphone_vcard_set_skip_validation | ( | LinphoneVcard * | vCard,
|  | bool_t | skip )

Sets the skipFieldValidation property of the vcard.

Parameters

  vCard | the LinphoneVcard
  skip | skipFieldValidation property of the vcard

## linphone_vcard_set_uid()

void linphone_vcard_set_uid | ( | LinphoneVcard * | vCard,
|  | const char * | uid )

Sets the unique ID of the vCard.

Parameters

  vCard | the LinphoneVcard
  uid | the unique id

## linphone_vcard_set_url()

void linphone_vcard_set_url | ( | LinphoneVcard * | vCard,
|  | const char * | url )

Sets the URL of the vCard.

Parameters

  vCard | the LinphoneVcard
  url | the URL.

## linphone_vcard_unref()

void linphone_vcard_unref | ( | LinphoneVcard * | vCard | ) |

Release a LinphoneVcard.

Parameters

  vCard | LinphoneVcard object