Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsLDAPBERElement Class Reference

#include <nsLDAPBERElement.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSILDAPBERELEMENT 
nsLDAPBERElement ()
void init (in nsILDAPBERValue aValue)
 Initialize this object.
unsigned long putString (in AUTF8String aString, in unsigned long aTag)
 Write a string to this element.
void startSet (in unsigned long aTag)
 Start a set.
unsigned long putSet ()
 Cause the entire set started by the last startSet() call to be written.

Public Attributes

const unsigned long TAG_LBER_ERROR = 0xffffffff
 Most TAG_* constants can be used in the construction or passing in of values to the aTag arguments to most of the methods in this interface.
const unsigned long TAG_LBER_DEFAULT = 0xffffffff
const unsigned long TAG_LBER_END_OF_SEQORSET = 0xfffffffe
const unsigned long TAG_LBER_PRIMITIVE = 0x00
 BER encoding types and masks.
const unsigned long TAG_LBER_CONSTRUCTED = 0x20
 The following two tags are carried over from the LDAP C SDK; their exact purpose there is not well documented.
const unsigned long TAG_LBER_ENCODING_MASK = 0x20
const unsigned long TAG_LBER_BIG_TAG_MASK = 0x1f
const unsigned long TAG_LBER_MORE_TAG_MASK = 0x80
const unsigned long TAG_LBER_BOOLEAN = 0x01
 general BER types we know about
const unsigned long TAG_LBER_INTEGER = 0x02
const unsigned long TAG_LBER_BITSTRING = 0x03
const unsigned long TAG_LBER_OCTETSTRING = 0x04
const unsigned long TAG_LBER_NULL = 0x05
const unsigned long TAG_LBER_ENUMERATED = 0x0a
const unsigned long TAG_LBER_SEQUENCE = 0x30
const unsigned long TAG_LBER_SET = 0x31
readonly attribute nsILDAPBERValue asValue
 an nsILDAPBERValue version of this element.

Private Member Functions

 ~nsLDAPBERElement ()

Private Attributes

BerElement * mElement

Detailed Description

Definition at line 48 of file nsLDAPBERElement.h.


Constructor & Destructor Documentation

Definition at line 47 of file nsLDAPBERElement.cpp.

  : mElement(0)
{
}

Definition at line 52 of file nsLDAPBERElement.cpp.

{
  if (mElement) {
    // anything inside here is not something that we own separately from
    // this object, so free it
    ber_free(mElement, 1);
  }

  return;
}

Here is the call graph for this function:


Member Function Documentation

Initialize this object.

Must be called before calling any other method on this interface.

Parameters:
aValuevalue to preinitialize with; 0 for a new empty object
Exceptions:
NS_ERROR_NOT_IMPLEMENTEDpreinitialization is currently not implemented
NS_ERROR_OUT_OF_MEMORYunable to allocate the internal BerElement
unsigned long nsILDAPBERElement::putSet ( ) [inherited]

Cause the entire set started by the last startSet() call to be written.

Exceptions:
NS_ERROR_FAILUEC-SDK returned an error
Returns:
number of bytes written
unsigned long nsILDAPBERElement::putString ( in AUTF8String  aString,
in unsigned long  aTag 
) [inherited]

Write a string to this element.

Parameters:
aStringstring to write
aTagtag for this string (if TAG_LBER_DEFAULT is used, TAG_LBER_OCTETSTRING will be written).
Returns:
number of bytes written
Exceptions:
NS_ERROR_FAILUEC-SDK returned error
void nsILDAPBERElement::startSet ( in unsigned long  aTag) [inherited]

Start a set.

Sets may be nested.

Parameters:
aTagtag for this set (if TAG_LBER_DEFAULT is used, TAG_LBER_SET will be written).
Exceptions:
NS_ERROR_FAILUEC-SDK returned an error

Member Data Documentation

an nsILDAPBERValue version of this element.

Calls ber_flatten() under the hood.

Exceptions:
NS_ERROR_OUT_OF_MEMORY

Definition at line 154 of file nsILDAPBERElement.idl.

BerElement* nsLDAPBERElement::mElement [private]

Definition at line 59 of file nsLDAPBERElement.h.

Definition at line 101 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_BITSTRING = 0x03 [inherited]

Definition at line 109 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_BOOLEAN = 0x01 [inherited]

general BER types we know about

Definition at line 107 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_CONSTRUCTED = 0x20 [inherited]

The following two tags are carried over from the LDAP C SDK; their exact purpose there is not well documented.

They both have the same value there as well.

Definition at line 98 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_DEFAULT = 0xffffffff [inherited]

Definition at line 85 of file nsILDAPBERElement.idl.

Definition at line 99 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_END_OF_SEQORSET = 0xfffffffe [inherited]

Definition at line 86 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_ENUMERATED = 0x0a [inherited]

Definition at line 112 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_ERROR = 0xffffffff [inherited]

Most TAG_* constants can be used in the construction or passing in of values to the aTag arguments to most of the methods in this interface.

When returned from a parsing method, 0xffffffff is referred to has the parse-error semantic (ie TAG_LBER_ERROR); when passing it to a construction method, it is used to mean "pick the default tag for this type" (ie TAG_LBER_DEFAULT).

Definition at line 84 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_INTEGER = 0x02 [inherited]

Definition at line 108 of file nsILDAPBERElement.idl.

Definition at line 102 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_NULL = 0x05 [inherited]

Definition at line 111 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_OCTETSTRING = 0x04 [inherited]

Definition at line 110 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_PRIMITIVE = 0x00 [inherited]

BER encoding types and masks.

Definition at line 91 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_SEQUENCE = 0x30 [inherited]

Definition at line 113 of file nsILDAPBERElement.idl.

const unsigned long nsILDAPBERElement::TAG_LBER_SET = 0x31 [inherited]

Definition at line 114 of file nsILDAPBERElement.idl.


The documentation for this class was generated from the following files: