2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
10 #include "LDAPConstraints.h"
11 #include "LDAPAsynConnection.h"
12 #include "LDAPMessageQueue.h"
16 //!virtual class for Requests
20 static const int BIND=0;
21 static const int UNBIND=2;
22 static const int SEARCH=3;
23 static const int MODIFY=7;
24 static const int ADD=8;
25 static const int DELETE=10;
26 static const int COMPARE=14;
28 LDAPRequest(const LDAPRequest& req);
29 LDAPRequest(LDAPAsynConnection* conn,
30 const LDAPConstraints* cons, bool isReferral=false,
31 const LDAPRequest* parent=0);
32 virtual ~LDAPRequest();
34 const LDAPConstraints* getConstraints() const;
35 const LDAPAsynConnection* getConnection() const;
38 int getHopCount() const;
39 const LDAPRequest* getParent() const;
41 bool isReferral() const;
43 virtual LDAPMessageQueue* sendRequest()=0;
44 virtual LDAPRequest* followReferral(LDAPMsg* ref)=0;
45 virtual bool equals(const LDAPRequest* req) const;
51 LDAPConstraints *m_cons;
52 LDAPAsynConnection *m_connection;
53 const LDAPRequest* m_parent;
55 int m_msgID; //the associated C-API Message ID
58 #endif //LDAP_REQUEST_H