// soap12testhdrUltRcvObj.h : Declaration of the Csoap12testhdrUltRcvObj

#pragma once
#include "resource.h"       // main symbols

#include "soap12testhdrUltRcv.h"
#include <string>
using namespace std;

interface Iwmsoapmsg2;

// Csoap12testhdrUltRcvObj

class ATL_NO_VTABLE Csoap12testhdrUltRcvObj : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<Csoap12testhdrUltRcvObj, &CLSID_soap12testhdrUltRcvObj>,
	public IDispatchImpl<Isoap12testhdrUltRcvObj, &IID_Isoap12testhdrUltRcvObj, &LIBID_soap12testhdrUltRcvLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
	Csoap12testhdrUltRcvObj()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_SOAP12TESTHDRULTRCVOBJ)


BEGIN_COM_MAP(Csoap12testhdrUltRcvObj)
	COM_INTERFACE_ENTRY(Isoap12testhdrUltRcvObj)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()


	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

public:
	STDMETHOD(OnProcessHeader)(/*[in]*/ VARIANT SOAPMsgInterface, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(OnTestMUHeaderBlock)(/*[in]*/ BSTR bstrNamespace, /*[in]*/ BSTR bstrLocalName, /*[out, retval]*/ VARIANT_BOOL *pResult);

private:
	bool ProcessRequest(Iwmsoapmsg2 *pIwmsoapmsg);
	bool ProcessResponse(Iwmsoapmsg2 *pIwmsoapmsg);

    bool        m_bAbortProcessing;
    bool        m_bEchoOkFound;
    wstring     m_wstrEchoOk;

};

OBJECT_ENTRY_AUTO(__uuidof(soap12testhdrUltRcvObj), Csoap12testhdrUltRcvObj)
