// WMHeaderDisp.h: interface for the WMHeaderDisp class.
//
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003 Robert Cunnings. All rights reserved.
//
// You may copy, modify, distribute or publish this code free of charge.
//
// NO WARRANTY: This software is provided AS IS, without warranty of any kind.
//
//////////////////////////////////////////////////////////////////////
//
// WMSOAPHeaderDisp class - a SOAP header processor dispatcher.
// 
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_WMSOAPHEADERDISP_H__75E3BBAF_B397_42E5_AA3D_B5E2FFDFC7FD__INCLUDED_)
#define AFX_WMSOAPHEADERDISP_H__75E3BBAF_B397_42E5_AA3D_B5E2FFDFC7FD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <comdef.h>
#include "SOAPEventHandler.h"
#include "..\wmsoapmsg\wmsoapmsg.h"

class WMSOAPHeaderDisp  
{
public:
	WMSOAPHeaderDisp();
	virtual ~WMSOAPHeaderDisp();

	void Cleanup();
	bool Initialize(list<wstring>& listProgIDs, Iwmsoapmsg2 *pIwmsoapmsg);
	bool PreProcessMUHeaders(Iwmsoapmsg2 *pIwmsoapmsg);
	bool ProcessHeader(Iwmsoapmsg2 *pIwmsoapmsg);

private:
	bool WMSOAPHeaderDisp::CallHeaderHandler(IDispatch *pIDispatch,
											 Iwmsoapmsg2 *pIwmsoapmsg);
    bool TestMUHeaderBlock( IDispatch *pIDispatch,
                            BSTR bstrNamespace,
                            BSTR bstrLocalName,
                            Iwmsoapmsg2 *pIwmsoapmsg);
	list<IDispatch *>		m_listHeaderProcs;
};

#endif // !defined(AFX_WMSOAPHEADERDISP_H__75E3BBAF_B397_42E5_AA3D_B5E2FFDFC7FD__INCLUDED_)
