Package org.linphone.core
Interface Vcard
public interface Vcard
Object storing contact information using vCard 4.0 format.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtendedProperty
(String name, String value) Adds an extended property to the vCard.void
addPhoneNumber
(String phone) Adds a phone number in the vCard, using the TEL property.void
addPhoneNumberWithLabel
(FriendPhoneNumber phoneNumber) Adds aFriendPhoneNumber
in the vCard, using the TEL property.void
addSipAddress
(String sipAddress) Adds a SIP address in the vCard, using the IMPP property.Returns the vCard4 representation of the LinphoneVcard.clone()
Clone aVcard
.void
editMainSipAddress
(String sipAddress) Edits the preferred SIP address in the vCard (or the first one), using the IMPP
property.boolean
Generates a random unique id for the vCard.getEtag()
Gets the eTag of the vCard.String[]
Get the vCard extended properties values per property name.Returns the family name in the N attribute of the vCard, or null if it isn't
set yet.Returns the FN attribute of the vCard, or null if it isn't set yet.Returns the given name in the N attribute of the vCard, or null if it isn't set
yet.Gets the Title of the vCard.long
Gets the native pointer used by this class to make native method calls.Gets the Organization of the vCard.String[]
Returns the list of phone numbers in the vCard (all the TEL attributes) or
null.Returns the list of phone numbers in the vCard (all the TEL attributes) or
null.getPhoto()
Returns the first PHOTO property or null.Address[]
Returns the list of SIP addresses in the vCard (all the IMPP attributes that
has an URI value starting by "sip:") or null.boolean
Returns the skipFieldValidation property of the vcard.getUid()
Gets the UID of the vCard.getUrl()
Gets the URL of the vCard.Gets the object stored in this object user's datavoid
Remove all the extend properties per property name.void
Removes the Title field of the vCard.void
Removes the Organization field of the vCard.void
removePhoneNumber
(String phone) Removes a phone number in the vCard (if it exists), using the TEL property.void
removePhoneNumberWithLabel
(FriendPhoneNumber phoneNumber) Removes aFriendPhoneNumber
in the vCard (if it exists), using the TEL
property.void
Removes any existing PHOTO property.void
removeSipAddress
(String sipAddress) Removes a SIP address in the vCard (if it exists), using the IMPP property.void
Sets the eTAG of the vCard.void
setFamilyName
(String name) Sets the family name in the N attribute of the vCard.void
setFullName
(String name) Sets the FN attribute of the vCard (which is mandatory).void
setGivenName
(String name) Sets the given name in the N attribute of the vCard.void
setJobTitle
(String jobTitle) Fills the Title field of the vCard.void
setOrganization
(String organization) Fills the Organization field of the vCard.void
Sets a picture URI in the vCard, using the PHOTO property.void
setSkipValidation
(boolean skip) Sets the skipFieldValidation property of the vcard.void
Sets the unique ID of the vCard.void
Sets the URL of the vCard.void
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getEtag
Gets the eTag of the vCard.
- Returns:
- the eTag of the vCard in the CardDAV server, otherwise null.
-
setEtag
Sets the eTAG of the vCard.
- Parameters:
etag
- the eTAG.
-
getFamilyName
Returns the family name in the N attribute of the vCard, or null if it isn't
set yet.
- Returns:
- the family name of the vCard, or null
-
setFamilyName
Sets the family name in the N attribute of the vCard.
- Parameters:
name
- the family name to set for the vCard
-
getFullName
Returns the FN attribute of the vCard, or null if it isn't set yet.
- Returns:
- the display name of the vCard, or null.
-
setFullName
Sets the FN attribute of the vCard (which is mandatory).
- Parameters:
name
- the display name to set for the vCard
-
getGivenName
Returns the given name in the N attribute of the vCard, or null if it isn't set
yet.
- Returns:
- the given name of the vCard, or null
-
setGivenName
Sets the given name in the N attribute of the vCard.
- Parameters:
name
- the given name to set for the vCard
-
getJobTitle
Gets the Title of the vCard.
- Returns:
- the Title of the vCard or null.
-
setJobTitle
Fills the Title field of the vCard.
- Parameters:
jobTitle
- the job title.
-
getOrganization
Gets the Organization of the vCard.
- Returns:
- the Organization of the vCard or null.
-
setOrganization
Fills the Organization field of the vCard.
- Parameters:
organization
- the Organization.
-
getPhoneNumbers
Returns the list of phone numbers in the vCard (all the TEL attributes) or
null.
- Returns:
- The phone numbers as string.
-
getPhoneNumbersWithLabel
Returns the list of phone numbers in the vCard (all the TEL attributes) or
null.
- Returns:
- The phone numbers as
FriendPhoneNumber
.
-
getPhoto
Returns the first PHOTO property or null.
- Returns:
- The picture URI as string or null if none has been set.
-
setPhoto
Sets a picture URI in the vCard, using the PHOTO property.
- Parameters:
picture
- the picture URI to add. If null it will have the same effet as
removePhoto()
.
-
getSipAddresses
Returns the list of SIP addresses in the vCard (all the IMPP attributes that
has an URI value starting by "sip:") or null.
- Returns:
- The SIP addresses.
-
getSkipValidation
boolean getSkipValidation()Returns the skipFieldValidation property of the vcard.
- Returns:
- the skipFieldValidation property of the vcard
-
setSkipValidation
void setSkipValidation(boolean skip) Sets the skipFieldValidation property of the vcard.
- Parameters:
skip
- skipFieldValidation property of the vcard
-
getUid
Gets the UID of the vCard.
- Returns:
- the UID of the vCard, otherwise null.
-
setUid
Sets the unique ID of the vCard.
- Parameters:
uid
- the unique id
-
getUrl
Gets the URL of the vCard.
- Returns:
- the URL of the vCard in the CardDAV server, otherwise null.
-
setUrl
Sets the URL of the vCard.
- Parameters:
url
- the URL.
-
addExtendedProperty
Adds an extended property to the vCard.
- Parameters:
name
- the name of the extended property to addvalue
- the value of the extended property to add
-
addPhoneNumber
Adds a phone number in the vCard, using the TEL property.
- Parameters:
phone
- the phone number to add
-
addPhoneNumberWithLabel
- Parameters:
phoneNumber
- theFriendPhoneNumber
to add
-
addSipAddress
Adds a SIP address in the vCard, using the IMPP property.
- Parameters:
sipAddress
- the SIP address to add
-
asVcard4String
Returns the vCard4 representation of the LinphoneVcard.
- Returns:
- a const char * that represents the vCard.
-
clone
- Returns:
- a new
Vcard
object
-
editMainSipAddress
Edits the preferred SIP address in the vCard (or the first one), using the IMPP
property.
- Parameters:
sipAddress
- the new SIP address
-
generateUniqueId
boolean 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)
-
getExtendedPropertiesValuesByName
Get the vCard extended properties values per property name.
- Parameters:
name
- the name to filter the extended properties on.- Returns:
- The extended properties values as string.
-
removeExtentedPropertiesByName
Remove all the extend properties per property name.
- Parameters:
name
- the name to remove the extended properties on.
-
removeJobTitle
void removeJobTitle()Removes the Title field of the vCard.
-
removeOrganization
void removeOrganization()Removes the Organization field of the vCard.
-
removePhoneNumber
Removes a phone number in the vCard (if it exists), using the TEL property.
- Parameters:
phone
- the phone number to remove
-
removePhoneNumberWithLabel
- Parameters:
phoneNumber
- theFriendPhoneNumber
to remove
-
removePhoto
void removePhoto()Removes any existing PHOTO property.
-
removeSipAddress
Removes a SIP address in the vCard (if it exists), using the IMPP property.
- Parameters:
sipAddress
- the SIP address to remove
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-