//
// ldap_asn.h
//
// Code automatically generated by asnparse.
//

#ifndef __LDAP_H
#define __LDAP_H

#ifdef P_USE_PRAGMA
#pragma interface
#endif

#include <ptclib/asner.h>

//
// UnbindRequest
//

class LDAP_UnbindRequest : public PASN_Null
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_UnbindRequest, PASN_Null);
#endif
  public:
    LDAP_UnbindRequest(unsigned tag = 2, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// SearchResponse
//

class LDAP_SearchResponse_entry;
class LDAP_LDAPResult;

class LDAP_SearchResponse : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchResponse, PASN_Choice);
#endif
  public:
    LDAP_SearchResponse(unsigned tag = 0, TagClass tagClass = UniversalTagClass);

    enum Choices {
      e_entry = 4,
      e_resultCode
    };

#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_SearchResponse_entry &() const;
#else
    operator LDAP_SearchResponse_entry &();
    operator const LDAP_SearchResponse_entry &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_LDAPResult &() const;
#else
    operator LDAP_LDAPResult &();
    operator const LDAP_LDAPResult &() const;
#endif

    BOOL CreateObject();
    PObject * Clone() const;
};


//
// MessageID
//

class LDAP_MessageID : public PASN_Integer
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_MessageID, PASN_Integer);
#endif
  public:
    LDAP_MessageID(unsigned tag = UniversalInteger, TagClass tagClass = UniversalTagClass);

    LDAP_MessageID & operator=(int v);
    LDAP_MessageID & operator=(unsigned v);
    PObject * Clone() const;
};


//
// Filter
//

class LDAP_ArrayOf_Filter;
class LDAP_ArrayOf_Filter;
class LDAP_AttributeValueAssertion;
class LDAP_SubstringFilter;
class LDAP_AttributeValueAssertion;
class LDAP_AttributeValueAssertion;
class LDAP_AttributeType;
class LDAP_AttributeValueAssertion;

class LDAP_Filter : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_Filter, PASN_Choice);
#endif
  public:
    LDAP_Filter(unsigned tag = 0, TagClass tagClass = UniversalTagClass);

    enum Choices {
      e_and,
      e_or,
      e_equalityMatch = 3,
      e_substrings,
      e_greaterOrEqual,
      e_lessOrEqual,
      e_present,
      e_approxMatch
    };

#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_ArrayOf_Filter &() const;
#else
    operator LDAP_ArrayOf_Filter &();
    operator const LDAP_ArrayOf_Filter &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_AttributeValueAssertion &() const;
#else
    operator LDAP_AttributeValueAssertion &();
    operator const LDAP_AttributeValueAssertion &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_SubstringFilter &() const;
#else
    operator LDAP_SubstringFilter &();
    operator const LDAP_SubstringFilter &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_AttributeType &() const;
#else
    operator LDAP_AttributeType &();
    operator const LDAP_AttributeType &() const;
#endif

    BOOL CreateObject();
    PObject * Clone() const;
};


//
// AttributeValue
//

class LDAP_AttributeValue : public PASN_OctetString
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AttributeValue, PASN_OctetString);
#endif
  public:
    LDAP_AttributeValue(unsigned tag = UniversalOctetString, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeValue & operator=(const char * v);
    LDAP_AttributeValue & operator=(const PString & v);
    LDAP_AttributeValue & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// LDAPString
//

class LDAP_LDAPString : public PASN_OctetString
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPString, PASN_OctetString);
#endif
  public:
    LDAP_LDAPString(unsigned tag = UniversalOctetString, TagClass tagClass = UniversalTagClass);

    LDAP_LDAPString & operator=(const char * v);
    LDAP_LDAPString & operator=(const PString & v);
    LDAP_LDAPString & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// LDAPMessage_protocolOp
//

class LDAP_SearchRequest;
class LDAP_SearchResponse;
class LDAP_ModifyRequest;
class LDAP_ModifyResponse;
class LDAP_AddRequest;
class LDAP_AddResponse;
class LDAP_DelRequest;
class LDAP_DelResponse;
class LDAP_ModifyRDNRequest;
class LDAP_ModifyRDNResponse;
class LDAP_CompareRequest;
class LDAP_CompareResponse;
class LDAP_BindRequest;
class LDAP_BindResponse;
class LDAP_AbandonRequest;
class LDAP_UnbindRequest;

class LDAP_LDAPMessage_protocolOp : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPMessage_protocolOp, PASN_Choice);
#endif
  public:
    LDAP_LDAPMessage_protocolOp(unsigned tag = 0, TagClass tagClass = UniversalTagClass);

    enum Choices {
      e_searchRequest = 3,
      e_modifyRequest = 6,
      e_modifyResponse,
      e_addRequest,
      e_addResponse,
      e_delRequest,
      e_delResponse,
      e_modifyRDNRequest,
      e_modifyRDNResponse,
      e_compareDNRequest,
      e_compareDNResponse,
      e_bindRequest = 0,
      e_bindResponse,
      e_abandonRequest = 16,
      e_unbindRequest = 2
    };

#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_SearchRequest &() const;
#else
    operator LDAP_SearchRequest &();
    operator const LDAP_SearchRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_SearchResponse &() const;
#else
    operator LDAP_SearchResponse &();
    operator const LDAP_SearchResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_ModifyRequest &() const;
#else
    operator LDAP_ModifyRequest &();
    operator const LDAP_ModifyRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_ModifyResponse &() const;
#else
    operator LDAP_ModifyResponse &();
    operator const LDAP_ModifyResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_AddRequest &() const;
#else
    operator LDAP_AddRequest &();
    operator const LDAP_AddRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_AddResponse &() const;
#else
    operator LDAP_AddResponse &();
    operator const LDAP_AddResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_DelRequest &() const;
#else
    operator LDAP_DelRequest &();
    operator const LDAP_DelRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_DelResponse &() const;
#else
    operator LDAP_DelResponse &();
    operator const LDAP_DelResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_ModifyRDNRequest &() const;
#else
    operator LDAP_ModifyRDNRequest &();
    operator const LDAP_ModifyRDNRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_ModifyRDNResponse &() const;
#else
    operator LDAP_ModifyRDNResponse &();
    operator const LDAP_ModifyRDNResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_CompareRequest &() const;
#else
    operator LDAP_CompareRequest &();
    operator const LDAP_CompareRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_CompareResponse &() const;
#else
    operator LDAP_CompareResponse &();
    operator const LDAP_CompareResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_BindRequest &() const;
#else
    operator LDAP_BindRequest &();
    operator const LDAP_BindRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_BindResponse &() const;
#else
    operator LDAP_BindResponse &();
    operator const LDAP_BindResponse &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_AbandonRequest &() const;
#else
    operator LDAP_AbandonRequest &();
    operator const LDAP_AbandonRequest &() const;
#endif
#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_UnbindRequest &() const;
#else
    operator LDAP_UnbindRequest &();
    operator const LDAP_UnbindRequest &() const;
#endif

    BOOL CreateObject();
    PObject * Clone() const;
};


//
// BindRequest_authentication
//

class LDAP_BindRequest_authentication : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_BindRequest_authentication, PASN_Choice);
#endif
  public:
    LDAP_BindRequest_authentication(unsigned tag = 0, TagClass tagClass = UniversalTagClass);

    enum Choices {
      e_simple,
      e_krbv42LDAP,
      e_krbv42DSA
    };

    BOOL CreateObject();
    PObject * Clone() const;
};


//
// SearchRequest_scope
//

class LDAP_SearchRequest_scope : public PASN_Enumeration
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchRequest_scope, PASN_Enumeration);
#endif
  public:
    LDAP_SearchRequest_scope(unsigned tag = UniversalEnumeration, TagClass tagClass = UniversalTagClass);

    enum Enumerations {
      e_baseObject,
      e_singleLevel,
      e_wholeSubtree
    };

    LDAP_SearchRequest_scope & operator=(unsigned v);
    PObject * Clone() const;
};


//
// SearchRequest_derefAliases
//

class LDAP_SearchRequest_derefAliases : public PASN_Enumeration
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchRequest_derefAliases, PASN_Enumeration);
#endif
  public:
    LDAP_SearchRequest_derefAliases(unsigned tag = UniversalEnumeration, TagClass tagClass = UniversalTagClass);

    enum Enumerations {
      e_neverDerefAliases,
      e_derefInSearching,
      e_derefFindingBaseObj,
      e_alwaysDerefAliases
    };

    LDAP_SearchRequest_derefAliases & operator=(unsigned v);
    PObject * Clone() const;
};


//
// ArrayOf_AttributeType
//

class LDAP_AttributeType;

class LDAP_ArrayOf_AttributeType : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ArrayOf_AttributeType, PASN_Array);
#endif
  public:
    LDAP_ArrayOf_AttributeType(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_AttributeType & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// ModifyRequest_modifications
//

class LDAP_ModifyRequest_modifications_subtype;

class LDAP_ModifyRequest_modifications : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRequest_modifications, PASN_Array);
#endif
  public:
    LDAP_ModifyRequest_modifications(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_ModifyRequest_modifications_subtype & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// AddRequest_attrs
//

class LDAP_AddRequest_attrs_subtype;

class LDAP_AddRequest_attrs : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AddRequest_attrs, PASN_Array);
#endif
  public:
    LDAP_AddRequest_attrs(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_AddRequest_attrs_subtype & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// ArrayOf_Filter
//

class LDAP_Filter;

class LDAP_ArrayOf_Filter : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ArrayOf_Filter, PASN_Array);
#endif
  public:
    LDAP_ArrayOf_Filter(unsigned tag = 0, TagClass tagClass = ContextSpecificTagClass);

    PASN_Object * CreateObject() const;
    LDAP_Filter & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// LDAPResult_resultCode
//

class LDAP_LDAPResult_resultCode : public PASN_Enumeration
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPResult_resultCode, PASN_Enumeration);
#endif
  public:
    LDAP_LDAPResult_resultCode(unsigned tag = UniversalEnumeration, TagClass tagClass = UniversalTagClass);

    enum Enumerations {
      e_success,
      e_operationsError,
      e_protocolError,
      e_timeLimitExceeded,
      e_sizeLimitExceeded,
      e_compareFalse,
      e_compareTrue,
      e_authMethodNotSupported,
      e_strongAuthRequired,
      e_noSuchAttribute = 16,
      e_undefinedAttributeType,
      e_inappropriateMatching,
      e_constraintViolation,
      e_attributeOrValueExists,
      e_invalidAttributeSyntax,
      e_noSuchObject = 32,
      e_aliasProblem,
      e_invalidDNSyntax,
      e_isLeaf,
      e_aliasDereferencingProblem,
      e_inappropriateAuthentication = 48,
      e_invalidCredentials,
      e_insufficientAccessRights,
      e_busy,
      e_unavailable,
      e_unwillingToPerform,
      e_loopDetect,
      e_namingViolation = 64,
      e_objectClassViolation,
      e_notAllowedOnNonLeaf,
      e_notAllowedOnRDN,
      e_entryAlreadyExists,
      e_objectClassModsProhibited,
      e_other = 80
    };

    LDAP_LDAPResult_resultCode & operator=(unsigned v);
    PObject * Clone() const;
};


//
// SubstringFilter_value
//

class LDAP_SubstringFilter_value_subtype;

class LDAP_SubstringFilter_value : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SubstringFilter_value, PASN_Array);
#endif
  public:
    LDAP_SubstringFilter_value(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_SubstringFilter_value_subtype & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// SearchResponse_entry_attributes
//

class LDAP_SearchResponse_entry_attributes_subtype;

class LDAP_SearchResponse_entry_attributes : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchResponse_entry_attributes, PASN_Array);
#endif
  public:
    LDAP_SearchResponse_entry_attributes(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_SearchResponse_entry_attributes_subtype & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// SubstringFilter_value_subtype
//

class LDAP_LDAPString;
class LDAP_LDAPString;
class LDAP_LDAPString;

class LDAP_SubstringFilter_value_subtype : public PASN_Choice
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SubstringFilter_value_subtype, PASN_Choice);
#endif
  public:
    LDAP_SubstringFilter_value_subtype(unsigned tag = 0, TagClass tagClass = UniversalTagClass);

    enum Choices {
      e_initial,
      e_any,
      e_final
    };

#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
    operator LDAP_LDAPString &() const;
#else
    operator LDAP_LDAPString &();
    operator const LDAP_LDAPString &() const;
#endif

    BOOL CreateObject();
    PObject * Clone() const;
};


//
// ModifyRequest_modifications_subtype_operation
//

class LDAP_ModifyRequest_modifications_subtype_operation : public PASN_Enumeration
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRequest_modifications_subtype_operation, PASN_Enumeration);
#endif
  public:
    LDAP_ModifyRequest_modifications_subtype_operation(unsigned tag = UniversalEnumeration, TagClass tagClass = UniversalTagClass);

    enum Enumerations {
      e_add,
      e_delete,
      e_replace
    };

    LDAP_ModifyRequest_modifications_subtype_operation & operator=(unsigned v);
    PObject * Clone() const;
};


//
// ArrayOf_AttributeValue
//

class LDAP_AttributeValue;

class LDAP_ArrayOf_AttributeValue : public PASN_Array
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ArrayOf_AttributeValue, PASN_Array);
#endif
  public:
    LDAP_ArrayOf_AttributeValue(unsigned tag = UniversalSet, TagClass tagClass = UniversalTagClass);

    PASN_Object * CreateObject() const;
    LDAP_AttributeValue & operator[](PINDEX i) const;
    PObject * Clone() const;
};


//
// LDAPMessage
//

class LDAP_LDAPMessage : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPMessage, PASN_Sequence);
#endif
  public:
    LDAP_LDAPMessage(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_MessageID m_messageID;
    LDAP_LDAPMessage_protocolOp m_protocolOp;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// AbandonRequest
//

class LDAP_AbandonRequest : public LDAP_MessageID
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AbandonRequest, LDAP_MessageID);
#endif
  public:
    LDAP_AbandonRequest(unsigned tag = 16, TagClass tagClass = ApplicationTagClass);

    LDAP_AbandonRequest & operator=(int v);
    LDAP_AbandonRequest & operator=(unsigned v);
    PObject * Clone() const;
};


//
// LDAPDN
//

class LDAP_LDAPDN : public LDAP_LDAPString
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPDN, LDAP_LDAPString);
#endif
  public:
    LDAP_LDAPDN(unsigned tag = UniversalOctetString, TagClass tagClass = UniversalTagClass);

    LDAP_LDAPDN & operator=(const char * v);
    LDAP_LDAPDN & operator=(const PString & v);
    LDAP_LDAPDN & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// RelativeLDAPDN
//

class LDAP_RelativeLDAPDN : public LDAP_LDAPString
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_RelativeLDAPDN, LDAP_LDAPString);
#endif
  public:
    LDAP_RelativeLDAPDN(unsigned tag = UniversalOctetString, TagClass tagClass = UniversalTagClass);

    LDAP_RelativeLDAPDN & operator=(const char * v);
    LDAP_RelativeLDAPDN & operator=(const PString & v);
    LDAP_RelativeLDAPDN & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// LDAPResult
//

class LDAP_LDAPResult : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_LDAPResult, PASN_Sequence);
#endif
  public:
    LDAP_LDAPResult(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_LDAPResult_resultCode m_resultCode;
    LDAP_LDAPDN m_matchedDN;
    LDAP_LDAPString m_errorMessage;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// AttributeType
//

class LDAP_AttributeType : public LDAP_LDAPString
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AttributeType, LDAP_LDAPString);
#endif
  public:
    LDAP_AttributeType(unsigned tag = UniversalOctetString, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType & operator=(const char * v);
    LDAP_AttributeType & operator=(const PString & v);
    LDAP_AttributeType & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// AttributeValueAssertion
//

class LDAP_AttributeValueAssertion : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AttributeValueAssertion, PASN_Sequence);
#endif
  public:
    LDAP_AttributeValueAssertion(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType m_attributeType;
    LDAP_AttributeValue m_attributeValue;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// SubstringFilter
//

class LDAP_SubstringFilter : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SubstringFilter, PASN_Sequence);
#endif
  public:
    LDAP_SubstringFilter(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType m_type;
    LDAP_SubstringFilter_value m_value;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// SearchResponse_entry
//

class LDAP_SearchResponse_entry : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchResponse_entry, PASN_Sequence);
#endif
  public:
    LDAP_SearchResponse_entry(unsigned tag = 4, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_objectName;
    LDAP_SearchResponse_entry_attributes m_attributes;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// AddRequest_attrs_subtype
//

class LDAP_AddRequest_attrs_subtype : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AddRequest_attrs_subtype, PASN_Sequence);
#endif
  public:
    LDAP_AddRequest_attrs_subtype(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType m_type;
    LDAP_ArrayOf_AttributeValue m_values;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// SearchResponse_entry_attributes_subtype
//

class LDAP_SearchResponse_entry_attributes_subtype : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchResponse_entry_attributes_subtype, PASN_Sequence);
#endif
  public:
    LDAP_SearchResponse_entry_attributes_subtype(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType m_type;
    LDAP_ArrayOf_AttributeValue m_values;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// ModifyRequest_modifications_subtype_modification
//

class LDAP_ModifyRequest_modifications_subtype_modification : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRequest_modifications_subtype_modification, PASN_Sequence);
#endif
  public:
    LDAP_ModifyRequest_modifications_subtype_modification(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_AttributeType m_type;
    LDAP_ArrayOf_AttributeValue m_values;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// BindRequest
//

class LDAP_BindRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_BindRequest, PASN_Sequence);
#endif
  public:
    LDAP_BindRequest(unsigned tag = 0, TagClass tagClass = ApplicationTagClass);

    PASN_Integer m_version;
    LDAP_LDAPDN m_name;
    LDAP_BindRequest_authentication m_authentication;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// BindResponse
//

class LDAP_BindResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_BindResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_BindResponse(unsigned tag = 1, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// SearchRequest
//

class LDAP_SearchRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_SearchRequest, PASN_Sequence);
#endif
  public:
    LDAP_SearchRequest(unsigned tag = 3, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_baseObject;
    LDAP_SearchRequest_scope m_scope;
    LDAP_SearchRequest_derefAliases m_derefAliases;
    PASN_Integer m_sizeLimit;
    PASN_Integer m_timeLimit;
    PASN_Boolean m_attrsOnly;
    LDAP_Filter m_filter;
    LDAP_ArrayOf_AttributeType m_attributes;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// ModifyRequest
//

class LDAP_ModifyRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRequest, PASN_Sequence);
#endif
  public:
    LDAP_ModifyRequest(unsigned tag = 6, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_object;
    LDAP_ModifyRequest_modifications m_modifications;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// ModifyResponse
//

class LDAP_ModifyResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_ModifyResponse(unsigned tag = 7, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// AddRequest
//

class LDAP_AddRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AddRequest, PASN_Sequence);
#endif
  public:
    LDAP_AddRequest(unsigned tag = 8, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_entry;
    LDAP_AddRequest_attrs m_attrs;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// AddResponse
//

class LDAP_AddResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_AddResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_AddResponse(unsigned tag = 9, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// DelRequest
//

class LDAP_DelRequest : public LDAP_LDAPDN
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_DelRequest, LDAP_LDAPDN);
#endif
  public:
    LDAP_DelRequest(unsigned tag = 10, TagClass tagClass = ApplicationTagClass);

    LDAP_DelRequest & operator=(const char * v);
    LDAP_DelRequest & operator=(const PString & v);
    LDAP_DelRequest & operator=(const PBYTEArray & v);
    PObject * Clone() const;
};


//
// DelResponse
//

class LDAP_DelResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_DelResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_DelResponse(unsigned tag = 11, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// ModifyRDNRequest
//

class LDAP_ModifyRDNRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRDNRequest, PASN_Sequence);
#endif
  public:
    LDAP_ModifyRDNRequest(unsigned tag = 12, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_entry;
    LDAP_RelativeLDAPDN m_newrdn;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// ModifyRDNResponse
//

class LDAP_ModifyRDNResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRDNResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_ModifyRDNResponse(unsigned tag = 13, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// CompareRequest
//

class LDAP_CompareRequest : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_CompareRequest, PASN_Sequence);
#endif
  public:
    LDAP_CompareRequest(unsigned tag = 14, TagClass tagClass = ApplicationTagClass);

    LDAP_LDAPDN m_entry;
    LDAP_AttributeValueAssertion m_ava;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


//
// CompareResponse
//

class LDAP_CompareResponse : public LDAP_LDAPResult
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_CompareResponse, LDAP_LDAPResult);
#endif
  public:
    LDAP_CompareResponse(unsigned tag = 15, TagClass tagClass = ApplicationTagClass);

    PObject * Clone() const;
};


//
// ModifyRequest_modifications_subtype
//

class LDAP_ModifyRequest_modifications_subtype : public PASN_Sequence
{
#ifndef PASN_LEANANDMEAN
    PCLASSINFO(LDAP_ModifyRequest_modifications_subtype, PASN_Sequence);
#endif
  public:
    LDAP_ModifyRequest_modifications_subtype(unsigned tag = UniversalSequence, TagClass tagClass = UniversalTagClass);

    LDAP_ModifyRequest_modifications_subtype_operation m_operation;
    LDAP_ModifyRequest_modifications_subtype_modification m_modification;

    PINDEX GetDataLength() const;
    BOOL Decode(PASN_Stream & strm);
    void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON
    void PrintOn(ostream & strm) const;
#endif
    Comparison Compare(const PObject & obj) const;
    PObject * Clone() const;
};


#endif // __LDAP_H


// End of ldap_asn.h
