Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsILDAPAutoCompFormatter Interface Reference

An interface to allow different users of nsILDAPAutoCompleteSession to format each nsILDAPMessage into an nsIAutoCompleteItem as it sees fit. More...

import "nsILDAPAutoCompFormatter.idl";

Inheritance diagram for nsILDAPAutoCompFormatter:
Inheritance graph
[legend]
Collaboration diagram for nsILDAPAutoCompFormatter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsIAutoCompleteItem format (in nsILDAPMessage aMessage)
 Returns an nsIAutoCompleteItem generated from the data in the given nsILDAPMessage.
void getAttributes (out unsigned long aCount,[retval, array, size_is(aCount)] out string aAttrs)
 Gets a list of all the LDAP attributes that should be requested from the LDAP server when a lookup is done.
nsIAutoCompleteItem formatException (in long aState, in nsresult aErrorCode)
 This method formats an error condition into an nsIAutoCompleteItem for display to the user.

Public Attributes

const long STATE_UNBOUND = 0
 Possible states that can be passed in aState to formatException.
const long STATE_INITIALIZING = 1
const long STATE_BINDING = 2
const long STATE_BOUND = 3
const long STATE_SEARCHING = 4

Detailed Description

An interface to allow different users of nsILDAPAutoCompleteSession to format each nsILDAPMessage into an nsIAutoCompleteItem as it sees fit.

Definition at line 50 of file nsILDAPAutoCompFormatter.idl.


Member Function Documentation

Returns an nsIAutoCompleteItem generated from the data in the given nsILDAPMessage.

Parameters:
aMessagemessage to be formatted
Returns:
resulting nsIAutoCompleteItem

This method formats an error condition into an nsIAutoCompleteItem for display to the user.

Specifically, the state that the session was in when the error occured (aState) is formatted into a general error message which is put in the value attribute of the item, and the specific error (aErrorCode) is formatted into another message which is put in an nsISupportsString in the param attribute of the item.

Parameters:
aStatestate of autocomplete session when error occurred
aErrorCodespecific error encountered
Returns:
newly generated item
void nsILDAPAutoCompFormatter::getAttributes ( out unsigned long  aCount,
[retval, array, size_is(aCount)] out string  aAttrs 
)

Gets a list of all the LDAP attributes that should be requested from the LDAP server when a lookup is done.

This avoids wasting server time, bandwidth, and client time processing unused attributes.

Note that this is only required to be called by the nsILDAPAutoCompleteSession implementation when the nsILDAPAutoCompleteSession::formatter IDL attribute is set. . So if for some reason, the LDAP attributes to be returned by searches has to change (eg because the user changed a preference), the nsILDAPAutoCompleteSession::formatter IDL attribute should be re-set to the same object to force a new getAttributes() call.

Parameters:
aCountnumber of attributes in the array
aAttrslist of LDAP attributes to request

Member Data Documentation

Definition at line 104 of file nsILDAPAutoCompFormatter.idl.

Definition at line 105 of file nsILDAPAutoCompFormatter.idl.

Definition at line 103 of file nsILDAPAutoCompFormatter.idl.

Definition at line 106 of file nsILDAPAutoCompFormatter.idl.

Possible states that can be passed in aState to formatException.

Definition at line 102 of file nsILDAPAutoCompFormatter.idl.


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