Liblinphone 5.0.0

Public Member Functions | List of all members
linphone::Vcard Class Reference

Object storing contact information using vCard 4.0 format. More...

`#include <vcard.hh>`

Inheritance diagram for linphone::Vcard:

## Public Member Functions
| Vcard (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneVcard * | cPtr ()
LINPHONECXX_PUBLIC std::shared_ptr< belcard::BelCard > & | getVcard ()
LINPHONECXX_PUBLIC std::string | getEtag () const
| Gets the eTag of the vCard. More...
LINPHONECXX_PUBLIC void | setEtag (const std::string &etag)
| Sets the eTAG of the vCard. More...
LINPHONECXX_PUBLIC std::string | getFamilyName () const
| Returns the family name in the N attribute of the vCard, or nullptr if it isn't set yet. More...
LINPHONECXX_PUBLIC void | setFamilyName (const std::string &name)
| Sets the family name in the N attribute of the vCard. More...
LINPHONECXX_PUBLIC std::string | getFullName () const
| Returns the FN attribute of the vCard, or nullptr if it isn't set yet. More...
LINPHONECXX_PUBLIC void | setFullName (const std::string &name)
| Sets the FN attribute of the vCard (which is mandatory). More...
LINPHONECXX_PUBLIC std::string | getGivenName () const
| Returns the given name in the N attribute of the vCard, or nullptr if it isn't set yet. More...
LINPHONECXX_PUBLIC void | setGivenName (const std::string &name)
| Sets the given name in the N attribute of the vCard. More...
LINPHONECXX_PUBLIC std::string | getOrganization () const
| Gets the Organization of the vCard. More...
LINPHONECXX_PUBLIC void | setOrganization (const std::string &organization)
| Fills the Organization field of the vCard. More...
LINPHONECXX_PUBLIC std::list< std::string > | getPhoneNumbers () const
| Returns the list of phone numbers in the vCard (all the TEL attributes) or nullptr. More...
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Address > > | getSipAddresses ()
| Returns the list of SIP addresses in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or nullptr. More...
LINPHONECXX_PUBLIC bool | getSkipValidation () const
| Returns the skipFieldValidation property of the vcard. More...
LINPHONECXX_PUBLIC void | setSkipValidation (bool skip)
| Sets the skipFieldValidation property of the vcard. More...
LINPHONECXX_PUBLIC std::string | getUid () const
| Gets the UID of the vCard. More...
LINPHONECXX_PUBLIC void | setUid (const std::string &uid)
| Sets the unique ID of the vCard. More...
LINPHONECXX_PUBLIC std::string | getUrl () const
| Gets the URL of the vCard. More...
LINPHONECXX_PUBLIC void | setUrl (const std::string &url)
| Sets the URL of the vCard. More...
LINPHONECXX_PUBLIC void | addPhoneNumber (const std::string &phone)
| Adds a phone number in the vCard, using the TEL property. More...
LINPHONECXX_PUBLIC void | addSipAddress (const std::string &sipAddress)
| Adds a SIP address in the vCard, using the IMPP property. More...
LINPHONECXX_PUBLIC std::string | asVcard4String ()
| Returns the vCard4 representation of the LinphoneVcard. More...
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Vcard > | clone () const
| Clone a Vcard. More...
LINPHONECXX_PUBLIC void | editMainSipAddress (const std::string &sipAddress)
| Edits the preferred SIP address in the vCard (or the first one), using the IMPP property. More...
LINPHONECXX_PUBLIC bool | generateUniqueId ()
| Generates a random unique id for the vCard. More...
LINPHONECXX_PUBLIC void | removeOrganization ()
| Removes the Organization field of the vCard.
LINPHONECXX_PUBLIC void | removePhoneNumber (const std::string &phone)
| Removes a phone number in the vCard (if it exists), using the TEL property. More...
LINPHONECXX_PUBLIC void | removeSipAddress (const std::string &sipAddress)
| Removes a SIP address in the vCard (if it exists), using the IMPP property. More...

## Detailed Description

Object storing contact information using vCard 4.0 format.

## Member Function Documentation

## ◆ addPhoneNumber()

LINPHONECXX_PUBLIC void linphone::Vcard::addPhoneNumber | ( | const std::string & | phone | ) |

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

Parameters

  phone | the phone number to add

## ◆ addSipAddress()

LINPHONECXX_PUBLIC void linphone::Vcard::addSipAddress | ( | const std::string & | sipAddress | ) |

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

Parameters

  sipAddress | the SIP address to add

## ◆ asVcard4String()

LINPHONECXX_PUBLIC std::string linphone::Vcard::asVcard4String | ( |  | ) |

Returns the vCard4 representation of the LinphoneVcard.

Returns
  a const char * that represents the vCard.

## ◆ clone()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::Vcard > linphone::Vcard::clone | ( |  | ) | const

Clone a Vcard.

Returns
  a new Vcard object

## ◆ editMainSipAddress()

LINPHONECXX_PUBLIC void linphone::Vcard::editMainSipAddress | ( | const std::string & | sipAddress | ) |

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

Parameters

  sipAddress | the new SIP address

## ◆ generateUniqueId()

LINPHONECXX_PUBLIC bool linphone::Vcard::generateUniqueId | ( |  | ) |

Generates a random unique id for the vCard.

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

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

## ◆ getEtag()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getEtag | ( |  | ) | const

Gets the eTag of the vCard.

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

## ◆ getFamilyName()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getFamilyName | ( |  | ) | const

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

Returns
  the family name of the vCard, or nullptr

## ◆ getFullName()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getFullName | ( |  | ) | const

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

Returns
  the display name of the vCard, or nullptr.

## ◆ getGivenName()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getGivenName | ( |  | ) | const

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

Returns
  the given name of the vCard, or nullptr

## ◆ getOrganization()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getOrganization | ( |  | ) | const

Gets the Organization of the vCard.

Returns
  the Organization of the vCard or nullptr.

## ◆ getPhoneNumbers()

LINPHONECXX_PUBLIC std::list< std::string > linphone::Vcard::getPhoneNumbers | ( |  | ) | const

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

Returns
  The phone numbers as string.

## ◆ getSipAddresses()

LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Address > > linphone::Vcard::getSipAddresses | ( |  | ) |

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

Returns
  The SIP addresses.

## ◆ getSkipValidation()

LINPHONECXX_PUBLIC bool linphone::Vcard::getSkipValidation | ( |  | ) | const

Returns the skipFieldValidation property of the vcard.

Returns
  the skipFieldValidation property of the vcard

## ◆ getUid()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getUid | ( |  | ) | const

Gets the UID of the vCard.

Returns
  the UID of the vCard, otherwise nullptr.

## ◆ getUrl()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getUrl | ( |  | ) | const

Gets the URL of the vCard.

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

## ◆ removePhoneNumber()

LINPHONECXX_PUBLIC void linphone::Vcard::removePhoneNumber | ( | const std::string & | phone | ) |

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

Parameters

  phone | the phone number to remove

## ◆ removeSipAddress()

LINPHONECXX_PUBLIC void linphone::Vcard::removeSipAddress | ( | const std::string & | sipAddress | ) |

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

Parameters

  sipAddress | the SIP address to remove

## ◆ setEtag()

LINPHONECXX_PUBLIC void linphone::Vcard::setEtag | ( | const std::string & | etag | ) |

Sets the eTAG of the vCard.

Parameters

  etag | the eTAG.

## ◆ setFamilyName()

LINPHONECXX_PUBLIC void linphone::Vcard::setFamilyName | ( | const std::string & | name | ) |

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

Parameters

  name | the family name to set for the vCard

## ◆ setFullName()

LINPHONECXX_PUBLIC void linphone::Vcard::setFullName | ( | const std::string & | name | ) |

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

Parameters

  name | the display name to set for the vCard

## ◆ setGivenName()

LINPHONECXX_PUBLIC void linphone::Vcard::setGivenName | ( | const std::string & | name | ) |

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

Parameters

  name | the given name to set for the vCard

## ◆ setOrganization()

LINPHONECXX_PUBLIC void linphone::Vcard::setOrganization | ( | const std::string & | organization | ) |

Fills the Organization field of the vCard.

Parameters

  organization | the Organization.

## ◆ setSkipValidation()

LINPHONECXX_PUBLIC void linphone::Vcard::setSkipValidation | ( | bool | skip | ) |

Sets the skipFieldValidation property of the vcard.

Parameters

  skip | skipFieldValidation property of the vcard

## ◆ setUid()

LINPHONECXX_PUBLIC void linphone::Vcard::setUid | ( | const std::string & | uid | ) |

Sets the unique ID of the vCard.

Parameters

  uid | the unique id

## ◆ setUrl()

LINPHONECXX_PUBLIC void linphone::Vcard::setUrl | ( | const std::string & | url | ) |

Sets the URL of the vCard.

Parameters

  url | the URL.

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

- vcard.hh