Liblinphone
5.3.0
|
Object storing contact information using vCard 4.0 format. More...
#include <vcard.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | 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 | getJobTitle () const |
Gets the Title of the vCard. More... | |
LINPHONECXX_PUBLIC void | setJobTitle (const std::string &jobTitle) |
Fills the Title field 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::FriendPhoneNumber > > | getPhoneNumbersWithLabel () const |
Returns the list of phone numbers in the vCard (all the TEL attributes) or nullptr. More... | |
LINPHONECXX_PUBLIC std::string | getPhoto () const |
Returns the first PHOTO property or nullptr. More... | |
LINPHONECXX_PUBLIC void | setPhoto (const std::string &picture) |
Sets a picture URI in the vCard, using the PHOTO property. 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 | addExtendedProperty (const std::string &name, const std::string &value) |
Adds an extended property to 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 | addPhoneNumberWithLabel (const std::shared_ptr< linphone::FriendPhoneNumber > &phoneNumber) |
Adds a FriendPhoneNumber 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 std::list< std::string > | getExtendedPropertiesValuesByName (const std::string &name) const |
Get the vCard extended properties values per property name. More... | |
LINPHONECXX_PUBLIC void | removeExtentedPropertiesByName (const std::string &name) |
Remove all the extend properties per property name. More... | |
LINPHONECXX_PUBLIC void | removeJobTitle () |
Removes the Title field of the vCard. | |
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 | removePhoneNumberWithLabel (const std::shared_ptr< const linphone::FriendPhoneNumber > &phoneNumber) |
Removes a FriendPhoneNumber in the vCard (if it exists), using the TEL property. More... | |
LINPHONECXX_PUBLIC void | removePhoto () |
Removes any existing PHOTO property. | |
LINPHONECXX_PUBLIC void | removeSipAddress (const std::string &sipAddress) |
Removes a SIP address in the vCard (if it exists), using the IMPP property. More... | |
Object storing contact information using vCard 4.0 format.
LINPHONECXX_PUBLIC void linphone::Vcard::addExtendedProperty | ( | const std::string & | name, |
const std::string & | value | ||
) |
Adds an extended property to the vCard.
name | the name of the extended property to add |
value | the value of the extended property to add |
LINPHONECXX_PUBLIC void linphone::Vcard::addPhoneNumber | ( | const std::string & | phone | ) |
Adds a phone number in the vCard, using the TEL property.
phone | the phone number to add |
LINPHONECXX_PUBLIC void linphone::Vcard::addPhoneNumberWithLabel | ( | const std::shared_ptr< linphone::FriendPhoneNumber > & | phoneNumber | ) |
Adds a FriendPhoneNumber in the vCard, using the TEL property.
phoneNumber | the FriendPhoneNumber to add |
LINPHONECXX_PUBLIC void linphone::Vcard::addSipAddress | ( | const std::string & | sipAddress | ) |
Adds a SIP address in the vCard, using the IMPP property.
sipAddress | the SIP address to add |
LINPHONECXX_PUBLIC std::string linphone::Vcard::asVcard4String | ( | ) |
Returns the vCard4 representation of the LinphoneVcard.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Vcard> linphone::Vcard::clone | ( | ) | const |
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.
sipAddress | the new SIP address |
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
LINPHONECXX_PUBLIC std::string linphone::Vcard::getEtag | ( | ) | const |
Gets the eTag of the vCard.
LINPHONECXX_PUBLIC std::list<std::string> linphone::Vcard::getExtendedPropertiesValuesByName | ( | const std::string & | name | ) | const |
Get the vCard extended properties values per property name.
name | the name to filter the extended properties on. |
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.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getFullName | ( | ) | const |
Returns the FN attribute of the vCard, or nullptr if it isn't set yet.
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.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getJobTitle | ( | ) | const |
Gets the Title of the vCard.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getOrganization | ( | ) | const |
Gets the Organization of the vCard.
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.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::FriendPhoneNumber> > linphone::Vcard::getPhoneNumbersWithLabel | ( | ) | const |
Returns the list of phone numbers in the vCard (all the TEL attributes) or nullptr.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getPhoto | ( | ) | const |
Returns the first PHOTO property or nullptr.
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.
LINPHONECXX_PUBLIC bool linphone::Vcard::getSkipValidation | ( | ) | const |
Returns the skipFieldValidation property of the vcard.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getUid | ( | ) | const |
Gets the UID of the vCard.
LINPHONECXX_PUBLIC std::string linphone::Vcard::getUrl | ( | ) | const |
Gets the URL of the vCard.
LINPHONECXX_PUBLIC void linphone::Vcard::removeExtentedPropertiesByName | ( | const std::string & | name | ) |
Remove all the extend properties per property name.
name | the name to remove the extended properties on. |
LINPHONECXX_PUBLIC void linphone::Vcard::removePhoneNumber | ( | const std::string & | phone | ) |
Removes a phone number in the vCard (if it exists), using the TEL property.
phone | the phone number to remove |
LINPHONECXX_PUBLIC void linphone::Vcard::removePhoneNumberWithLabel | ( | const std::shared_ptr< const linphone::FriendPhoneNumber > & | phoneNumber | ) |
Removes a FriendPhoneNumber in the vCard (if it exists), using the TEL property.
phoneNumber | the FriendPhoneNumber to remove |
LINPHONECXX_PUBLIC void linphone::Vcard::removeSipAddress | ( | const std::string & | sipAddress | ) |
Removes a SIP address in the vCard (if it exists), using the IMPP property.
sipAddress | the SIP address to remove |
LINPHONECXX_PUBLIC void linphone::Vcard::setEtag | ( | const std::string & | etag | ) |
Sets the eTAG of the vCard.
etag | the eTAG. |
LINPHONECXX_PUBLIC void linphone::Vcard::setFamilyName | ( | const std::string & | name | ) |
Sets the family name in the N attribute of the vCard.
name | the family name to set for the vCard |
LINPHONECXX_PUBLIC void linphone::Vcard::setFullName | ( | const std::string & | name | ) |
Sets the FN attribute of the vCard (which is mandatory).
name | the display name to set for the vCard |
LINPHONECXX_PUBLIC void linphone::Vcard::setGivenName | ( | const std::string & | name | ) |
Sets the given name in the N attribute of the vCard.
name | the given name to set for the vCard |
LINPHONECXX_PUBLIC void linphone::Vcard::setJobTitle | ( | const std::string & | jobTitle | ) |
Fills the Title field of the vCard.
jobTitle | the job title. |
LINPHONECXX_PUBLIC void linphone::Vcard::setOrganization | ( | const std::string & | organization | ) |
Fills the Organization field of the vCard.
organization | the Organization. |
LINPHONECXX_PUBLIC void linphone::Vcard::setPhoto | ( | const std::string & | picture | ) |
Sets a picture URI in the vCard, using the PHOTO property.
picture | the picture URI to add. If nullptr it will have the same effet as removePhoto(). |
LINPHONECXX_PUBLIC void linphone::Vcard::setSkipValidation | ( | bool | skip | ) |
Sets the skipFieldValidation property of the vcard.
skip | skipFieldValidation property of the vcard |
LINPHONECXX_PUBLIC void linphone::Vcard::setUid | ( | const std::string & | uid | ) |
Sets the unique ID of the vCard.
uid | the unique id |
LINPHONECXX_PUBLIC void linphone::Vcard::setUrl | ( | const std::string & | url | ) |
Sets the URL of the vCard.
url | the URL. |