2025-11-28 00:35:46 +09:00

290 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<wsdcodegen ConfigFileVersion="1.0">
<LayerPrefix>SimpleThermostat_WSD</LayerPrefix>
<LayerNumber>1</LayerNumber>
<!--************************************************************-->
<!--*** WSDLS TO BE INCLUDED ***-->
<!--************************************************************-->
<Wsdl PrefixMessageStructureNames="true">
<Path>SimpleThermostat.wsdl</Path>
</Wsdl>
<!--************************************************************-->
<!--*** METADATA CONFIGURATION ***-->
<!--Be sure to change all default fields in ThisModelMetadata!-->
<!-- -->
<!--This host was built with PnP-X tags. Modify the example-->
<!--PnP-X elements below. Note that <PnPXHardwareId> and-->
<!--<PnPXCompatbleId> tags have been generated for all services,-->
<!--but may be removed from services without PnP-X capabilities.-->
<!-- -->
<!--See http://www.microsoft.com/whdc/Rally/pnpx-spec.mspx for-->
<!--more information.-->
<!--************************************************************-->
<ThisModelMetadata>
<Manufacturer>Microsoft</Manufacturer>
<ManufacturerURL>http://www.microsoft.com</ManufacturerURL>
<ModelName>WSD Simple Thermostat Device</ModelName>
<ModelNumber>1000</ModelNumber>
<ModelUrl>http://www.example.com/SimpleThermostat1000</ModelUrl>
<PnPXDeviceCategory>HomeAutomation.Thermostat</PnPXDeviceCategory>
</ThisModelMetadata>
<!--Hosts built with this metadata can support all of these services.-->
<RelationshipMetadata>
<HostMetadata>
<Hosted>
<Types>http://www.example.com/ncd/Thermostat/:SimpleThermostat_WSD</Types>
<ServiceId>uri:MySimpleThermostat_WSDService</ServiceId>
<PnPXHardwareId>PnPX_SimpleThermostat_HWID</PnPXHardwareId>
<PnPXCompatibleId>PnPX_SimpleThermostat_CPID</PnPXCompatibleId>
</Hosted>
</HostMetadata>
</RelationshipMetadata>
<!--This Macro will be included in all header files.-->
<Macro Name="PragmaOnce">
<![CDATA[
#pragma once
]]>
</Macro>
<!--Additionally, the predefined "DoNotModify" macro will be included in all files.-->
<!--************************************************************-->
<!--*** TYPES HEADER FILE ***-->
<!--This file contains forward declarations and structure definitions.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSDTypes.h">
<Include Macro="DoNotModify" />
<Include Macro="PragmaOnce" />
<NamespaceDeclarations />
<StructDeclarations />
<StructDefinitions />
<EnumerationValueDeclarations />
<TypeTableDeclarations />
<MessageStructureDefinitions />
<PortTypeDeclarations />
<RelationshipMetadataDeclaration />
<ThisModelMetadataDeclaration />
<HostBuilderDeclaration>
<Interface>ISimpleThermostat_WSD</Interface>
</HostBuilderDeclaration>
<StubDeclarations>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
</StubDeclarations>
</File>
<!--************************************************************-->
<!--*** TYPES FILE ***-->
<!--This file contains type table and operation definitions.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSDTypes.cpp">
<Include Macro="DoNotModify" />
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSD.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSDTypes.h</LiteralInclude>
<NamespaceDefinitions />
<TypeTableDefinitions />
<MessageTypeDefinitions />
<PortTypeDefinitions>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<StubFunction>True</StubFunction>
</PortTypeDefinitions>
<RelationshipMetadataDefinition />
<ThisModelMetadataDefinition />
</File>
<!--************************************************************-->
<!--*** INTERFACE IDL ***-->
<!--This file defines the interfaces for the specified services.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSD.idl">
<Include Macro="DoNotModify" />
<![CDATA[
interface ISimpleThermostat_WSD;
interface ISimpleThermostat_WSDProxy;
]]>
<LiteralInclude Language="IDL">oaidl.idl</LiteralInclude>
<LiteralInclude Language="IDL">ocidl.idl</LiteralInclude>
<LiteralInclude Language="IDL">wsdattachment.idl</LiteralInclude>
<LiteralInclude Language="IDL">wsdclient.idl</LiteralInclude>
<LiteralInclude Language="IDL">wsdhost.idl</LiteralInclude>
<LiteralInclude Language="IDL">SimpleThermostat_WSDTypes.h</LiteralInclude>
<![CDATA[
//
// ISimpleThermostat_WSD Interface
//
[
object,
uuid(20487031-48eb-40e8-a18a-84761ef61bf0),
helpstring("ISimpleThermostat_WSD Interface"),
pointer_default(unique),
restricted,
local
]
interface ISimpleThermostat_WSD : IUnknown
{
]]>
<IdlFunctionDeclarations>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
</IdlFunctionDeclarations>
<![CDATA[
};
]]>
<![CDATA[
//
// ISimpleThermostat_WSDProxy Interface
//
[
object,
uuid(58a218a2-2545-4016-9ab8-d333038c1484),
helpstring("ISimpleThermostat_WSDProxy Interface"),
pointer_default(unique),
restricted,
local
]
interface ISimpleThermostat_WSDProxy : ISimpleThermostat_WSD
{
HRESULT Init(IWSDServiceProxy* genericProxy);
]]>
<IdlFunctionDeclarations Async="True">
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<Operation>GetCurrentTemp</Operation>
<Operation>GetDesiredTemp</Operation>
</IdlFunctionDeclarations>
<![CDATA[
};
]]>
</File>
<!--************************************************************-->
<!--*** PROXY HEADER FILES ***-->
<!--This file contains declarations for proxy classes and builder functions.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSDProxy.h">
<Include Macro="DoNotModify" />
<Include Macro="PragmaOnce" />
<![CDATA[
class CSimpleThermostat_WSDProxy;
]]>
<ProxyBuilderDeclarations>
<ProxyClass>CSimpleThermostat_WSDProxy</ProxyClass>
</ProxyBuilderDeclarations>
<![CDATA[
class CSimpleThermostat_WSDProxy: public ISimpleThermostat_WSDProxy
{
private:
~CSimpleThermostat_WSDProxy();
LONG m_cRef;
IWSDServiceProxy* m_genericProxy;
public:
HRESULT STDMETHODCALLTYPE Init(IWSDServiceProxy* genericProxy);
CSimpleThermostat_WSDProxy();
]]>
<IUnknownDeclarations />
<FunctionDeclarations>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
</FunctionDeclarations>
<FunctionDeclarations Async="True">
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<Operation>GetCurrentTemp</Operation>
<Operation>GetDesiredTemp</Operation>
</FunctionDeclarations>
<![CDATA[
};
]]>
</File>
<!--************************************************************-->
<!--*** PROXY FILE ***-->
<!--This file contains code for proxy classes and functions.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSDProxy.cpp">
<Include Macro="DoNotModify" />
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSD.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSDTypes.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSDProxy.h</LiteralInclude>
<ProxyBuilderImplementations>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<ProxyClass>CSimpleThermostat_WSDProxy</ProxyClass>
</ProxyBuilderImplementations>
<![CDATA[
CSimpleThermostat_WSDProxy::CSimpleThermostat_WSDProxy() :
m_cRef(1), m_genericProxy(NULL)
{
}
CSimpleThermostat_WSDProxy::~CSimpleThermostat_WSDProxy()
{
if ( NULL != m_genericProxy )
{
m_genericProxy->Release();
m_genericProxy = NULL;
}
};
HRESULT STDMETHODCALLTYPE CSimpleThermostat_WSDProxy::Init(
/* [in] */ IWSDServiceProxy* pIWSDServiceProxy )
{
if( NULL == pIWSDServiceProxy )
{
return E_INVALIDARG;
}
m_genericProxy = pIWSDServiceProxy;
m_genericProxy->AddRef();
return S_OK;
}
]]>
<IUnknownDefinitions>
<ProxyClass>CSimpleThermostat_WSDProxy</ProxyClass>
<RefCountVar>m_cRef</RefCountVar>
<Interface>ISimpleThermostat_WSD</Interface>
<Interface>ISimpleThermostat_WSDProxy</Interface>
</IUnknownDefinitions>
<ProxyFunctionImplementations>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<ProxyClass>CSimpleThermostat_WSDProxy</ProxyClass>
</ProxyFunctionImplementations>
<ProxyFunctionImplementations Async="True">
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<ProxyClass>CSimpleThermostat_WSDProxy</ProxyClass>
<Operation>GetCurrentTemp</Operation>
<Operation>GetDesiredTemp</Operation>
</ProxyFunctionImplementations>
</File>
<!--************************************************************-->
<!--*** STUB FILE ***-->
<!--This file contains stub function code.-->
<!--************************************************************-->
<File Name="SimpleThermostat_WSDStub.cpp">
<Include Macro="DoNotModify" />
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSD.h</LiteralInclude>
<LiteralInclude Language="C" Local="True">SimpleThermostat_WSDTypes.h</LiteralInclude>
<MessageTypeDeclarations />
<HostBuilderImplementation>
<HostedService>
<ServiceId>uri:MySimpleThermostat_WSDService</ServiceId>
<CodeName>SimpleThermostat_WSD</CodeName>
<Interface>ISimpleThermostat_WSD</Interface>
</HostedService>
</HostBuilderImplementation>
<StubDefinitions>
<PortType>http://www.example.com/ncd/Thermostat/SimpleThermostat_WSD</PortType>
<ServerClass>ISimpleThermostat_WSD</ServerClass>
<Deallocator>WSDFreeLinkedMemory</Deallocator>
</StubDefinitions>
</File>
</wsdcodegen>