Liblinphone  5.3.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

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::Vcardclone () 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...
 

Detailed Description

Object storing contact information using vCard 4.0 format.

Member Function Documentation

◆ addExtendedProperty()

LINPHONECXX_PUBLIC void linphone::Vcard::addExtendedProperty ( const std::string &  name,
const std::string &  value 
)

Adds an extended property to the vCard.

Parameters
namethe name of the extended property to add
valuethe value of the extended property to add

◆ addPhoneNumber()

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

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

Parameters
phonethe phone number to add

◆ addPhoneNumberWithLabel()

LINPHONECXX_PUBLIC void linphone::Vcard::addPhoneNumberWithLabel ( const std::shared_ptr< linphone::FriendPhoneNumber > &  phoneNumber)

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

Parameters
phoneNumberthe FriendPhoneNumber 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
sipAddressthe 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
sipAddressthe 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.

◆ getExtendedPropertiesValuesByName()

LINPHONECXX_PUBLIC std::list<std::string> linphone::Vcard::getExtendedPropertiesValuesByName ( const std::string &  name) const

Get the vCard extended properties values per property name.

Parameters
namethe name to filter the extended properties on.
Returns
The extended properties values as string.

◆ 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

◆ getJobTitle()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getJobTitle ( ) const

Gets the Title of the vCard.

Returns
the Title 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.

◆ getPhoneNumbersWithLabel()

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.

Returns
The phone numbers as FriendPhoneNumber.

◆ getPhoto()

LINPHONECXX_PUBLIC std::string linphone::Vcard::getPhoto ( ) const

Returns the first PHOTO property or nullptr.

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

◆ 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.

◆ removeExtentedPropertiesByName()

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

Remove all the extend properties per property name.

Parameters
namethe name to remove the extended properties on.

◆ 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
phonethe phone number to remove

◆ removePhoneNumberWithLabel()

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.

Parameters
phoneNumberthe FriendPhoneNumber 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
sipAddressthe SIP address to remove

◆ setEtag()

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

Sets the eTAG of the vCard.

Parameters
etagthe eTAG.

◆ setFamilyName()

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

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

Parameters
namethe 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
namethe 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
namethe given name to set for the vCard

◆ setJobTitle()

LINPHONECXX_PUBLIC void linphone::Vcard::setJobTitle ( const std::string &  jobTitle)

Fills the Title field of the vCard.

Parameters
jobTitlethe job title.

◆ setOrganization()

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

Fills the Organization field of the vCard.

Parameters
organizationthe Organization.

◆ setPhoto()

LINPHONECXX_PUBLIC void linphone::Vcard::setPhoto ( const std::string &  picture)

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

Parameters
picturethe picture URI to add. If nullptr it will have the same effet as removePhoto().

◆ setSkipValidation()

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

Sets the skipFieldValidation property of the vcard.

Parameters
skipskipFieldValidation property of the vcard

◆ setUid()

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

Sets the unique ID of the vCard.

Parameters
uidthe unique id

◆ setUrl()

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

Sets the URL of the vCard.

Parameters
urlthe URL.

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