Public Member Functions | Public Attributes

nsILDAPURL Interface Reference

Strings in methods inherited from nsIURI, which are using XPIDL |string| types, are expected to be UTF8 encoded. More...

import "nsILDAPURL.idl";

Inheritance diagram for nsILDAPURL:
Collaboration diagram for nsILDAPURL:

List of all members.

Public Member Functions

void init (in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI)
 Initialize an LDAP URL.
void getAttributes (out unsigned long aCount,[retval, array, size_is(aCount)] out string aAttrs)
 Return all LDAP attributes currently set.
void setAttributes (in unsigned long aCount,[array, size_is(aCount)] in string aAttrs)
 Set the array of attributes, dropping whatever was there before.
void addAttribute (in string aAttribute)
 Add one attribute to the array of attributes to request.
void removeAttribute (in string aAttribute)
 Remove one attribute from the array of attributes to request.
boolean hasAttribute (in string aAttribute)
 Test if an attribute is in our list of attributes already.

Public Attributes

attribute AUTF8String dn
 The distinguished name of the URL (ie the base DN for the search).
attribute long scope
 The scope of the search.
const long SCOPE_BASE = 0
 Search just the base object.
const long SCOPE_ONELEVEL = 1
 Search only the children of the base object.
const long SCOPE_SUBTREE = 2
 Search the entire subtree under and including the base object.
attribute AUTF8String filter
 The search filter.
attribute unsigned long options
 Any options defined for this URL (check options using a bitwise and).
const unsigned long OPT_SECURE = 0x01
 If this is set/true, this is an ldaps: URL, not an ldap: URL.

Detailed Description

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).


Member Function Documentation

void nsILDAPURL::addAttribute ( in string  aAttribute  ) 

Add one attribute to the array of attributes to request.

If the attribute is already in our array, this becomes a noop.

Parameters:
aAttribute An LDAP attribute (e.g. "cn")
void nsILDAPURL::getAttributes ( out unsigned long  aCount,
[retval, array, size_is(aCount)] out string  aAttrs 
)

Return all LDAP attributes currently set.

The empty array indicates that all attributes are requested.

Exceptions:
NS_ERROR_NULL_POINTER NULL pointer to GET method
NS_ERROR_OUT_OF_MEMORY Ran out of memory
boolean nsILDAPURL::hasAttribute ( in string  aAttribute  ) 

Test if an attribute is in our list of attributes already.

Parameters:
aAttribute An LDAP attribute (e.g. "cn")
Returns:
boolean Truth value
Exceptions:
NS_ERROR_NULL_POINTER NULL pointer to GET method
void nsILDAPURL::init ( in unsigned long  aUrlType,
in long  aDefaultPort,
in AUTF8String  aSpec,
in string  aOriginCharset,
in nsIURI  aBaseURI 
)

Initialize an LDAP URL.

Parameters:
aUrlType - one of the URLTYPE_ flags nsIStandardURL
aDefaultPort - if the port parsed from the URL string matches this port, then the port will be removed from the canonical form of the URL.
aSpec - URL string.
aOriginCharset - the charset from which this URI string originated. this corresponds to the charset that should be used when communicating this URI to an origin server, for example. if null, then provide aBaseURI implements this interface, the origin charset of aBaseURI will be assumed, otherwise defaulting to UTF-8 (i.e., no charset transformation from aSpec).
aBaseURI - if null, aSpec must specify an absolute URI. otherwise, aSpec will be resolved relative to aBaseURI.
void nsILDAPURL::removeAttribute ( in string  aAttribute  ) 

Remove one attribute from the array of attributes to request.

If the attribute didn't exist in the array, this becomes a noop.

Parameters:
aAttribute An LDAP attribute (e.g. "cn")
Exceptions:
NS_ERROR_OUT_OF_MEMORY Ran out of memory
void nsILDAPURL::setAttributes ( in unsigned long  aCount,
[array, size_is(aCount)] in string  aAttrs 
)

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

Parameters:
aAttrs An array of LDAP attributes
Exceptions:
NS_ERROR_OUT_OF_MEMORY Ran out of memory

Member Data Documentation

attribute AUTF8String nsILDAPURL::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:

Exceptions:
NS_ERROR_NULL_POINTER NULL pointer to GET method
NS_ERROR_OUT_OF_MEMORY Ran out of memory
attribute AUTF8String nsILDAPURL::filter

The search filter.

"(objectClass=*)" is the default.

const unsigned long nsILDAPURL::OPT_SECURE = 0x01

If this is set/true, this is an ldaps: URL, not an ldap: URL.

attribute unsigned long nsILDAPURL::options

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

Exceptions:
NS_ERROR_NULL_POINTER NULL pointer to GET method
NS_ERROR_OUT_OF_MEMORY Ran out of memory
attribute long nsILDAPURL::scope

The scope of the search.

defaults to SCOPE_BASE.

Exceptions:
NS_ERROR_NULL_POINTER NULL pointer to GET method
NS_ERROR_MALFORMED_URI Illegal base to SET method
const long nsILDAPURL::SCOPE_BASE = 0

Search just the base object.

Search only the children of the base object.

const long nsILDAPURL::SCOPE_SUBTREE = 2

Search the entire subtree under and including the base object.


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