nsILDAPAutoCompFormatter
| IID: | cbec617c-22d2-4286-8308-0ef8bf57c0ce |
| Inherits From: | nsISupports |
An interface to allow different users of nsILDAPAutoCompleteSession to format each nsILDAPMessage into an nsIAutoCompleteItem as it sees fit.
Constants
| Possible states that can be passed in aState to formatException | ||
| PRInt32 | STATE_UNBOUND | = 0 |
| PRInt32 | STATE_INITIALIZING | = 1 |
| PRInt32 | STATE_BINDING | = 2 |
| PRInt32 | STATE_BOUND | = 3 |
| PRInt32 | STATE_SEARCHING | = 4 |
Methods
nsIAutoCompleteItem format ( nsILDAPMessage message )
nsIAutoCompleteItem formatException ( PRInt32 state , nsresult errorCode )
void getAttributes ( out PRUint32 count , out arrayof char* attrs )
nsIAutoCompleteItem format ( nsILDAPMessage message )
Returns an nsIAutoCompleteItem generated from the data in the given nsILDAPMessage.
- Arguments:
- message: message to be formatted
- Returns:
- nsIAutoCompleteItem
nsIAutoCompleteItem formatException ( PRInt32 state , nsresult errorCode )
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.
- Arguments:
- state: state of autocomplete session when error occurred
- errorCode: specific error encountered
- Returns:
- newly generated item
void getAttributes ( out PRUint32 count , out arrayof char* attrs )
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.
- Arguments:
- count: number of attributes in the array
- attrs: list of LDAP attributes to request
References
This interface is the type of the following properties:
nsILDAPAutoCompleteSession.formatter
Reference documentation is generated from Mozilla's source.
