//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are not authorized to use this source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the SOURCE.RTF on your install media or the root of your tools installation.
// THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//+----------------------------------------------------------------------------
//
//
// File:
//      TestConn.idl
//
// Contents:
//
//      Test connector's interface to connect to the test.
//
//-----------------------------------------------------------------------------

import "oaidl.idl";
import "ocidl.idl";
import "mssoap.idl";

#include "ConnGuid.h"
#include "IdlUtils.h"
#include "SoapVer.h"

LOCAL_INTERFACE(UUID_ITESTCONNECTOR, SOAP_SDK_VERSION, "ITestConnector Testing Interface")
interface ITestConnector : IUnknown
{
    [propget, helpstring("property Property")] HRESULT Property([in] BSTR pPropertyName, [out, retval] VARIANT *pPropertyValue);
    [propput, helpstring("property Property")] HRESULT Property([in] BSTR pPropertyName, [in] VARIANT PropertyValue);
    [id(DISPID_CONNECTOR_CONNECT), helpstring("method Connect")] HRESULT Connect([in] IWSDLPort *pPort);
    [id(DISPID_CONNECTOR_RESET), helpstring("method Reset")] HRESULT Reset();
    [id(DISPID_CONNECTOR_BEGINMSG),helpstring("method BeginMessage")] HRESULT BeginMessage([in] IWSDLOperation *pOperation);
    [id(DISPID_CONNECTOR_ENDMSG),helpstring("method EndMessage")] HRESULT EndMessage();
    [helpstring("method Read")] HRESULT Read([out, size_is(cb), length_is(*pcbRead)] void *pv, [in] ULONG cb, [out] ULONG *pcbRead);
    [helpstring("method Write")] HRESULT Write([in, size_is(cb)] void const *pv, [in] ULONG cb, [out] ULONG *pcbWritten);
};


TYPE_LIBRARY(LIBID_TESTCONNECTOR, SOAP_SDK_VERSION, "Soap Test Connector Type Library")
library TestConnectorLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

    LOCAL_COCLASS(CLSID_TESTCONNECTOR, SOAP_SDK_VERSION, "Soap Test Connector Class")
    coclass TestConnector
    {
        [default] interface ISoapConnector;
    };
};
