// CwmsoapstructObj.cpp : Implementation of CwmsoapstructObj
//
// Copyright (c) 2002 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.
//
//////////////////////////////////////////////////////////////////////
//
// CwmsoapstructObj class - implementation of SOAP Struct type.
// 
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "wmsoapstructObj.h"
#include "wmsoapstruct.h"

// CwmsoapstructObj

STDMETHODIMP CwmsoapstructObj::GetMember(BSTR bstrName, VARIANT *pvarValue, VARIANT_BOOL *pResult)
{
	if (m_pSOAPStruct != NULL)
	{
		bool bRtn = m_pSOAPStruct->GetMember(bstrName, pvarValue);
		*pResult = (bRtn == true) ? VARIANT_TRUE : VARIANT_FALSE;
	}
	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::SetMember(BSTR bstrName, VARIANT varValue, VARIANT_BOOL *pResult)
{
	if (m_pSOAPStruct != NULL)
	{
		bool bRtn = m_pSOAPStruct->SetMember(bstrName, varValue);
		*pResult = (bRtn == true) ? VARIANT_TRUE : VARIANT_FALSE;
	}
	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::GetFirstMember(BSTR *pbstrName, VARIANT *pvarValue, long *plPosition, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pSOAPStruct->GetFirstMember(  pbstrName,
												pvarValue,
												plPosition);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);

	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::GetNextMember(BSTR *pbstrName, VARIANT *pvarValue, long *plPosition, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pSOAPStruct->GetNextMember(   pbstrName,
												pvarValue,
												plPosition);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);

	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::GetMemberQN(BSTR bstrName, BSTR bstrNS, VARIANT *pvarValue, VARIANT_BOOL *pResult)
{
	if (m_pSOAPStruct != NULL)
	{
		bool bRtn = m_pSOAPStruct->GetMemberQN(bstrName, bstrNS, pvarValue);
		*pResult = (bRtn == true) ? VARIANT_TRUE : VARIANT_FALSE;
	}
	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::SetMemberQN(BSTR bstrName, BSTR bstrNS, VARIANT varValue, VARIANT_BOOL *pResult)
{
	if (m_pSOAPStruct != NULL)
	{
		bool bRtn = m_pSOAPStruct->SetMemberQN(bstrName, bstrNS, varValue);
		*pResult = (bRtn == true) ? VARIANT_TRUE : VARIANT_FALSE;
	}
	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::GetFirstMemberQN(BSTR *pbstrName, BSTR *pbstrNS, VARIANT *pvarValue, long *plPosition, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pSOAPStruct->GetFirstMemberQN(pbstrName,
												pbstrNS,
												pvarValue,
												plPosition);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);

	return S_OK;
}

STDMETHODIMP CwmsoapstructObj::GetNextMemberQN(BSTR *pbstrName, BSTR *pbstrNS, VARIANT *pvarValue, long *plPosition, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pSOAPStruct->GetNextMemberQN( pbstrName,
												pbstrNS,
												pvarValue,
												plPosition);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);

	return S_OK;
}
