nsILDAPURL

IID:7310562d-1567-43c7-a123-633c1ba3663e
Inherits From:nsIURI

Strings in methods inherited from nsIURI, which are using XPIDL string types, are expected to be UTF8 encoded. All such strings in this interface, except attribute types (e.g. "cn"), should in fact be UTF8. It's important to remember that attributes can not be UTF8, they can only be of a limited subset of ASCII (see RFC 2251).

This interface is implemented by the following components:


Constants

Search just the base object
PRInt32 SCOPE_BASE = 0
Search only the children of the base object
PRInt32 SCOPE_ONELEVEL = 1
Search the entire subtree under and including the base object
PRInt32 SCOPE_SUBTREE = 2
If this is set/true, this is an ldaps: URL, not an ldap: URL
PRUint32 OPT_SECURE = 1

Properties

AUTF8String dn

The distinguished name of the URL (ie the base DN for the search). This string is expected to be a valid UTF8 string.

For the getter:

AUTF8String filter

The search filter. "(objectClass=*)" is the default.

PRUint32 options

Any options defined for this URL (check options using a bitwise and)

PRInt32 scope

The scope of the search. defaults to SCOPE_BASE.


Methods

void addAttribute ( char* attribute ) void getAttributes ( out PRUint32 count , out arrayof char* attrs ) PRBool hasAttribute ( char* attribute ) void removeAttribute ( char* attribute ) void setAttributes ( PRUint32 count , arrayof char* attrs )

void addAttribute ( char* attribute )

Add one attribute to the array of attributes to request. If the attribute is already in our array, this becomes a noop.

Arguments:
attribute: An LDAP attribute (e.g. "cn")

void getAttributes ( out PRUint32 count , out arrayof char* attrs )

Return all LDAP attributes currently set. The empty array indicates that all attributes are requested.

Arguments:
count
attrs

PRBool hasAttribute ( char* attribute )

Test if an attribute is in our list of attributes already

Arguments:
attribute: An LDAP attribute (e.g. "cn")
Returns:
boolean Truth value

void removeAttribute ( char* attribute )

Remove one attribute from the array of attributes to request. If the attribute didn't exist in the array, this becomes a noop.

Arguments:
attribute: An LDAP attribute (e.g. "cn")

void setAttributes ( PRUint32 count , arrayof char* attrs )

Set the array of attributes, dropping whatever was there before.

Arguments:
count
attrs: An array of LDAP attributes

References

This interface is the type of the following properties:

nsIAbLDAPReplicationQuery.replicationURL, nsILDAPAutoCompleteSession.serverURL, nsILDAPServer.url

This interface is passed as an argument to the following methods:

nsIAbLDAPReplicationQuery.connectToLDAPServer, nsILDAPSyncQuery.getQueryResults

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com