LDAPRequest.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
00003  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
00004  */
00005 
00006 
00007 #ifndef LDAP_REQUEST_H
00008 #define LDAP_REQUEST_H
00009 
00010 #include <LDAPConstraints.h>
00011 #include <LDAPAsynConnection.h>
00012 #include <LDAPMessageQueue.h>
00013 
00014 class LDAPUrl;
00015 
00024 class LDAPRequest{
00025 
00026     public :
00027         static const int BIND=0;
00028         static const int UNBIND=2;
00029         static const int SEARCH=3;
00030         static const int MODIFY=7;
00031         static const int ADD=8;
00032         static const int DELETE=10;
00033         static const int COMPARE=14;
00034 
00035         LDAPRequest(const LDAPRequest& req);
00036         LDAPRequest(LDAPAsynConnection* conn, 
00037                 const LDAPConstraints* cons, bool isReferral=false,
00038                 const LDAPRequest* parent=0);
00039         virtual ~LDAPRequest();
00040         
00041         const LDAPConstraints* getConstraints() const;
00042         const LDAPAsynConnection* getConnection() const;
00043         int getType()const;
00044         int getMsgID() const;
00045         int getHopCount() const;
00046 
00051         const LDAPRequest* getParent() const;
00052 
00057         bool isReferral() const;
00058         
00059         void unbind() const; 
00060 
00065         virtual LDAPMessageQueue* sendRequest()=0;
00066         virtual LDAPRequest* followReferral(LDAPMsg* ref)=0;
00067 
00072         virtual bool equals(const LDAPRequest* req) const;
00073 
00074         bool isCycle() const;
00075         
00076     protected :
00077         bool m_isReferral;
00078         int m_requestType;
00079         LDAPConstraints *m_cons;
00080         LDAPAsynConnection *m_connection;
00081         const LDAPRequest* m_parent;
00082         int m_hopCount;
00083         int m_msgID;  //the associated C-API Message ID
00084         LDAPRequest();
00085 };
00086 #endif //LDAP_REQUEST_H 
00087 

Generated on Fri Jun 16 17:48:53 2006 for ldapsdk by  doxygen 1.4.6