]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/LDAPRequest.cpp
Initial check of the LDAP C++ SDK written by Ralf Haferkamp <rhafer@suse.de>
[openldap] / contrib / ldapc++ / src / LDAPRequest.cpp
1 /*
2  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 // $Id: LDAPRequest.cpp,v 1.11 2000/08/31 17:43:49 rhafer Exp $
7
8 #include "debug.h"
9 #include "LDAPRequest.h"
10 #include "LDAPReferral.h"
11
12 LDAPRequest::LDAPRequest(){
13 }
14
15 LDAPRequest::LDAPRequest(const LDAPRequest& req){
16     DEBUG(LDAP_DEBUG_TRACE, "LDAPRequest::LDAPRequest(LDAPRequest&)" << endl);
17 }
18
19 LDAPRequest::LDAPRequest(const LDAPAsynConnection* con, 
20        const LDAPConstraints* cons, bool isReferral){
21     DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::LDAPRequest()" << endl);
22     m_connection=con;
23     if(cons == 0){
24         cons=con->getConstraints();
25     }
26     m_cons=new LDAPConstraints( *cons);
27     m_isReferral=isReferral;    
28 }
29
30 LDAPRequest::~LDAPRequest(){
31     DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::~LDAPRequest()" << endl);
32     delete m_cons;
33 }
34
35 const LDAPConstraints* LDAPRequest::getConstraints(){
36     return m_cons;
37 }
38
39 const LDAPAsynConnection* LDAPRequest::getConnection(){
40     return m_connection;
41 }
42
43 int LDAPRequest::getType() const {
44     return m_requestType;
45 }
46
47 int LDAPRequest::getMsgID() const {
48     return m_msgID;
49 }
50
51 bool LDAPRequest::isReferral() const {
52     return m_isReferral;
53 }
54
55 /*
56    bool LDAPRequest::doRebind() const {
57     cerr << "doRebind not implemented always returns true" << endl;
58     return true;
59 }
60 */
61