2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
11 #include "LDAPExtRequest.h"
12 #include "LDAPException.h"
14 LDAPExtRequest::LDAPExtRequest(const LDAPExtRequest& req) :
16 DEBUG(LDAP_DEBUG_TRACE,
17 "LDAPExtRequest::LDAPExtRequest(LDAPExtRequest&)" << endl);
20 LDAPExtRequest::LDAPExtRequest(const char *oid, const BerValue* data,
21 const LDAPAsynConnection *connect, const LDAPConstraints *cons,
22 bool isReferral=false) : LDAPRequest(connect, cons, isReferral){
23 DEBUG(LDAP_DEBUG_TRACE, "LDAPExtRequest::LDAPExtRequest()" << endl);
24 DEBUG(LDAP_DEBUG_PARAMETER, " oid:" << oid << endl);
28 m_data=ber_bvdup(data);
34 LDAPExtRequest::~LDAPExtRequest(){
35 DEBUG(LDAP_DEBUG_TRACE, "LDAPExtRequest::~LDAPExtRequest()" << endl);
40 LDAPMessageQueue* LDAPExtRequest::sendRequest(){
41 DEBUG(LDAP_DEBUG_TRACE, "LDAPExtRequest::sendRequest()" << endl);
43 int err=ldap_extended_operation(m_connection->getSessionHandle(),m_oid,
44 m_data, m_cons->getSrvCtrlsArray(), m_cons->getClCtrlsArray(),
46 if(err != LDAP_SUCCESS){
48 throw LDAPException(err);
51 return new LDAPMessageQueue(this);
55 LDAPRequest* LDAPExtRequest::followReferral(LDAPUrlList *urls){
56 DEBUG(LDAP_DEBUG_TRACE, "LDAPExtRequest::followReferral()" << endl);
57 cerr << "to be implemented" << endl;