The nsIAbCard
interface is used to represent and manipulate cards in the addressbook. Following a huge refactoring of the address book code, most of the documentation below is out of date. Properties aren't stored anymore on the card, except for a handful of them. Complex properties are expected to be accessed through a call to getProperty. See http://mxr.mozilla.org/comm-central/source//mailnews/addrbook/public/nsIAbCard.idl for more details.
Inherits from: nsISupports
AString getCardValue(in string name) |
void setCardValue(in string attrname, in AString value) |
void copy(in nsIAbCard srcCard) |
boolean equals(in nsIAbCard card) |
string convertToBase64EncodedXML() |
AString convertToXMLPrintData() |
string convertToEscapedVCard() |
AString generateName(in long aGenerateFormat,[optional] in nsIStringBundle aBundle) |
AString generatePhoneticName(in boolean aLastNameFirst) |
Attribute | Type | Description |
firstName |
AString |
|
lastName |
AString |
|
phoneticFirstName |
AString |
|
phoneticLastName |
AString |
|
displayName |
AString |
|
nickName |
AString |
|
primaryEmail |
AString |
|
secondEmail |
AString |
|
workPhone |
AString |
|
homePhone |
AString |
|
faxNumber |
AString |
|
pagerNumber |
AString |
|
cellularNumber |
AString |
|
workPhoneType |
AString |
|
homePhoneType |
AString |
|
faxNumberType |
AString |
|
pagerNumberType |
AString |
|
cellularNumberType |
AString |
|
homeAddress |
AString |
|
homeAddress2 |
AString |
|
homeCity |
AString |
|
homeState |
AString |
|
homeZipCode |
AString |
|
homeCountry |
AString |
|
workAddress |
AString |
|
workAddress2 |
AString |
|
workCity |
AString |
|
workState |
AString |
|
workZipCode |
AString |
|
workCountry |
AString |
|
jobTitle |
AString |
|
department |
AString |
|
company |
AString |
|
aimScreenName |
AString |
|
anniversaryYear |
AString |
|
anniversaryMonth |
AString |
|
anniversaryDay |
AString |
|
spouseName |
AString |
|
familyName |
AString |
|
defaultAddress |
AString |
|
category |
AString |
|
webPage1 |
AString |
Used for the contact's work web page |
webPage2 |
AString |
Used for the contact's home web page |
birthYear |
AString |
|
birthMonth |
AString |
|
birthDay |
AString |
|
custom1 |
AString |
|
custom2 |
AString |
|
custom3 |
AString |
|
custom4 |
AString |
|
notes |
AString |
|
lastModifiedDate |
unsigned long |
|
popularityIndex |
unsigned long |
popularityIndex is bumped every time e-mail is sent to this recipient . |
preferMailFormat |
unsigned long |
Allowed values are stored in nsIAbPreferMailFormat . |
isMailList |
boolean |
|
mailListURI |
string |
If isMailList is true then mailListURI will contain the URI of the associated mailing list. |
allowRemoteContent |
boolean |
Allow remote content to be displayed in HTML mail received from this contact |
AString getCardValue(in string name)
name
void setCardValue(in string attrname, in AString value)
attrname
value
This function will copy all values from one card to another.
void copy(in nsIAbCard srcCard)
srcCard
boolean equals(in nsIAbCard card)
card
true
if the cards are the same.
string convertToBase64EncodedXML()
AString convertToXMLPrintData()
string convertToEscapedVCard()
Generate a name from the card for display purposes. Using the firstName, lastName and the displayName. We allow the caller to cache the pref value, so we don't have to go to prefs every time.
AString generateName(in long aGenerateFormat,[optional] in nsIStringBundle aBundle)
aGenerateFormat
0
1
lastFirstFormat
property in addressBook.properties.2
firstLastFormat
property in addressBook.properties.aBundle
Generate a phonetic name from the card, using the firstName and lastName values.
AString generatePhoneticName(in boolean aLastNameFirst)
aLastNameFirst
true
to put the last name before the first.