Public Member Functions | Public Attributes

nsIAbCollection Interface Reference

A collection of address book items. More...

import "nsIAbCollection.idl";

Inheritance diagram for nsIAbCollection:
Collaboration diagram for nsIAbCollection:

List of all members.

Public Member Functions

nsIAbCard cardForEmailAddress (in AUTF8String emailAddress)
 Returns an address book card for the specified email address if found.
nsIAbCard getCardFromProperty (in string aProperty, in AUTF8String aValue, in boolean aCaseSensitive)
 Returns an address book card for the specified property if found.
nsISimpleEnumerator getCardsFromProperty (in string aProperty, in AUTF8String aValue, in boolean aCaseSensitive)
 Returns all address book cards with a specific property matching value.

Public Attributes

readonly attribute boolean readOnly
 Returns true if this collection is read-only.
readonly attribute boolean isRemote
 Returns true if this collection is accessed over a network connection.
readonly attribute boolean isSecure
 Returns true if this collection is accessed over a secure connection.

Detailed Description

A collection of address book items.


Member Function Documentation

nsIAbCard nsIAbCollection::cardForEmailAddress ( in AUTF8String  emailAddress  ) 

Returns an address book card for the specified email address if found.

If there are multiple cards with the given email address, this method will return one of these cards in an implementation-defined manner.

Matching is performed in a case-insensitive manner.

This method performs a synchronous operation. If the collection cannot do the search in such a manner, then it should throw NS_ERROR_NOT_IMPLEMENTED.

Parameters:
emailAddress The email address to find in any of the email address fields. If emailAddress is empty, the database won't be searched and the function will return as if no card was found.
Returns:
An nsIAbCard if one was found, else returns NULL.
Exceptions:
NS_ERROR_NOT_IMPLEMENTED If the collection cannot do this.
nsIAbCard nsIAbCollection::getCardFromProperty ( in string  aProperty,
in AUTF8String  aValue,
in boolean  aCaseSensitive 
)

Returns an address book card for the specified property if found.

If there are multiple cards with the given value for the property, this method will return one of these cards in an implementation-defined manner.

This method performs a synchronous operation. If the collection cannot do the search in such a manner, then it should throw NS_ERROR_NOT_IMPLEMENTED.

If the property is not natively a string, it can still be searched for using the string-encoded value of the property, e.g. "0". See nsIAbCard::getPropertyAsAUTF8String for more information. Empty values will return no match, to prevent spurious results.

Parameters:
aProperty The property to look for.
aValue The value to search for.
aCaseSensitive True if matching should be done case-sensitively.
Returns:
An nsIAbCard if one was found, else returns NULL.
Exceptions:
NS_ERROR_NOT_IMPLEMENTED If the collection cannot do this.
nsISimpleEnumerator nsIAbCollection::getCardsFromProperty ( in string  aProperty,
in AUTF8String  aValue,
in boolean  aCaseSensitive 
)

Returns all address book cards with a specific property matching value.

This function is almost identical to getCardFromProperty, with the exception of returning all cards rather than just the first.

Parameters:
aProperty The property to look for.
aValue The value to search for.
aCaseSensitive True if matching should be done case-sensitively.
Returns:
A nsISimpleEnumerator that holds nsIAbCard instances.

Member Data Documentation

readonly attribute boolean nsIAbCollection::isRemote

Returns true if this collection is accessed over a network connection.

readonly attribute boolean nsIAbCollection::isSecure

Returns true if this collection is accessed over a secure connection.

If isRemote returns false, then this value MUST be false as well.

readonly attribute boolean nsIAbCollection::readOnly

Returns true if this collection is read-only.


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