2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 // $Id: LDAPMessage.cpp,v 1.6 2000/08/31 17:43:48 rhafer Exp $
8 #include "LDAPMessage.h"
9 #include "LDAPResult.h"
10 #include "LDAPRequest.h"
11 #include "LDAPSearchResult.h"
12 #include "LDAPSearchReference.h"
16 LDAPMsg::LDAPMsg(LDAPMessage *msg){
17 DEBUG(LDAP_DEBUG_TRACE,"LDAPMsg::LDAPMsg()" << endl);
18 msgType=ldap_msgtype(msg);
21 LDAPMsg* LDAPMsg::create(LDAPRequest *req, LDAPMessage *msg){
22 DEBUG(LDAP_DEBUG_TRACE,"LDAPMsg::create()" << endl);
23 switch(ldap_msgtype(msg)){
24 case LDAP_RES_SEARCH_ENTRY :
25 return new LDAPSearchResult(req,msg);
27 case LDAP_RES_SEARCH_REFERENCE :
28 return new LDAPSearchReference(req, msg);
31 return new LDAPResult(req, msg);
37 int LDAPMsg::getMessageType(){
41 int LDAPMsg::getMsgID(){