]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPMessage.cpp
Merge branch 'mdb.master' of /home/hyc/OD/mdb
[openldap] / contrib / ldapc++ / src / LDAPMessage.cpp
index 5c33f650d1d51cee2a1fd3cfcf3e15e7bcb3117f..881f8a11535a75d77607afaa759889d613d6fea7 100644 (file)
@@ -1,5 +1,6 @@
+// $OpenLDAP$
 /*
- * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2011 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -8,6 +9,7 @@
 
 #include "LDAPResult.h"
 #include "LDAPExtResult.h"
+#include "LDAPSaslBindResult.h"
 #include "LDAPRequest.h"
 #include "LDAPSearchResult.h"
 #include "LDAPSearchReference.h"
@@ -22,6 +24,13 @@ LDAPMsg::LDAPMsg(LDAPMessage *msg){
     m_hasControls=false;
 }
 
+LDAPMsg::LDAPMsg(int type, int id=0){
+    DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPMsg::LDAPMsg()" << endl);
+    msgType = type;
+    msgID = id;
+    m_hasControls=false;
+}
+
 LDAPMsg* LDAPMsg::create(const LDAPRequest *req, LDAPMessage *msg){
     DEBUG(LDAP_DEBUG_TRACE,"LDAPMsg::create()" << endl);
     switch(ldap_msgtype(msg)){
@@ -34,6 +43,8 @@ LDAPMsg* LDAPMsg::create(const LDAPRequest *req, LDAPMessage *msg){
         case EXTENDED_RESPONSE :
             return new LDAPExtResult(req,msg);
         break;
+        case BIND_RESPONSE :
+            return new LDAPSaslBindResult(req,msg);
         default :
             return new LDAPResult(req, msg);
     }