467 lines
16 KiB
XML
467 lines
16 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<wsdcodegen ConfigFileVersion="1.3">
|
|
<LayerPrefix>FileServiceSecure</LayerPrefix>
|
|
<LayerNumber>1</LayerNumber>
|
|
<!--************************************************************-->
|
|
<!--*** WSDLS TO BE INCLUDED ***-->
|
|
<!--************************************************************-->
|
|
<Wsdl PrefixMessageStructureNames="true">
|
|
<Path>FileServiceSecure.wsdl</Path>
|
|
</Wsdl>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** METADATA CONFIGURATION ***-->
|
|
<!--Be sure to change all default fields in ThisModelMetadata!-->
|
|
<!--All fields except <manufacturer> and <modelName> are optional.-->
|
|
<!--************************************************************-->
|
|
<ThisModelMetadata>
|
|
<Manufacturer>Microsoft Corporation</Manufacturer>
|
|
<ManufacturerURL>http://www.microsoft.com</ManufacturerURL>
|
|
<ModelName>Microsoft FileService Secure Device Emulator</ModelName>
|
|
<ModelNumber>MFSDE-0002</ModelNumber>
|
|
<ModelURL>http://www.microsoft.com</ModelURL>
|
|
<PresentationURL>http://www.microsoft.com</PresentationURL>
|
|
</ThisModelMetadata>
|
|
|
|
<!--Hosts built with this metadata can support all of these services.-->
|
|
<RelationshipMetadata>
|
|
<HostMetadata>
|
|
<Hosted>
|
|
<Types>http://www.example.com/ncd/FileServiceSecure/:FileServiceSecure</Types>
|
|
<ServiceId>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure0</ServiceId>
|
|
</Hosted>
|
|
</HostMetadata>
|
|
</RelationshipMetadata>
|
|
|
|
<!--This Macro will be included in all header files.-->
|
|
<Macro Name="PragmaOnce">
|
|
<![CDATA[
|
|
#pragma once
|
|
]]>
|
|
</Macro>
|
|
|
|
<!-- This Macro will be included in automatically generated files where -->
|
|
<!-- a modification to the file is required. -->
|
|
<Macro Name="NeedToModify">
|
|
<![CDATA[
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// This file is automatically generated. However, the file needs to be
|
|
// modified in order to accomodate changes needed for for the device host
|
|
// creation to use WSDCreateDeviceHost2 instead with customized parameters,
|
|
// or for the device proxy creation to use WSDCreateDeviceProxy2 instead with
|
|
// customized parameters.
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
]]>
|
|
</Macro>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** TYPES HEADER FILE ***-->
|
|
<!--This file contains forward declarations and structure definitions.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecureTypes.h">
|
|
<Include Macro="NeedToModify" />
|
|
<Include Macro="PragmaOnce" />
|
|
<NamespaceDeclarations />
|
|
<NamespaceNameMacros />
|
|
<StructDeclarations />
|
|
<StructDefinitions />
|
|
<EnumerationValueDeclarations />
|
|
<TypeTableDeclarations />
|
|
<MessageStructureDefinitions />
|
|
<PortTypeDeclarations />
|
|
<RelationshipMetadataDeclaration />
|
|
<ThisModelMetadataDeclaration />
|
|
<HostBuilderDeclaration>
|
|
<Interface>IFileServiceSecureService</Interface>
|
|
</HostBuilderDeclaration>
|
|
<StubDeclarations>
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
</StubDeclarations>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** TYPES FILE ***-->
|
|
<!--This file contains type table and operation definitions.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecureTypes.cpp">
|
|
<Include Macro="DoNotModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecure.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecureTypes.h</LiteralInclude>
|
|
<NamespaceDefinitions />
|
|
<TypeTableDefinitions />
|
|
<MessageTypeDefinitions />
|
|
<PortTypeDefinitions>
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
<StubFunction>True</StubFunction>
|
|
</PortTypeDefinitions>
|
|
<RelationshipMetadataDefinition />
|
|
<ThisModelMetadataDefinition />
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** INTERFACE IDL ***-->
|
|
<!--This file defines the interfaces for the specified services.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecure.idl">
|
|
<Include Macro="DoNotModify" />
|
|
<![CDATA[
|
|
interface IFileServiceSecure;
|
|
interface IFileServiceSecureService;
|
|
interface IFileServiceSecureEventNotify;
|
|
]]>
|
|
<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">FileServiceSecureTypes.h</LiteralInclude>
|
|
<![CDATA[
|
|
//
|
|
// IFileServiceSecure Interface
|
|
// This interface contains the methods included in FileServiceSecure.wsdl, and
|
|
// is used by FileService Secure Client to execute methods on FileService
|
|
// Secure Service.
|
|
//
|
|
[
|
|
object,
|
|
uuid(614fcb26-6efc-4836-9d42-968e7910f2f2),
|
|
helpstring("IFileServiceSecure Interface"),
|
|
pointer_default(unique),
|
|
restricted,
|
|
local
|
|
]
|
|
interface IFileServiceSecure : IUnknown
|
|
{
|
|
]]>
|
|
<IdlFunctionDeclarations>
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
</IdlFunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
<![CDATA[
|
|
//
|
|
// IFileServiceSecureService Interface
|
|
// This interface contains the same methods declared in IFileServiceSecure,
|
|
// but its methods contain the event parameter. The event parameter contains
|
|
// information about the user being authenticated to perform the requested
|
|
// method. This interface is intended for use only by the FileService
|
|
// Secure Service, and not by the client.
|
|
//
|
|
[
|
|
object,
|
|
uuid(98c671f0-9fea-11df-981c-0800200c9a66),
|
|
helpstring("IFileServiceSecureService Interface"),
|
|
pointer_default(unique),
|
|
restricted,
|
|
local
|
|
]
|
|
interface IFileServiceSecureService : IUnknown
|
|
{
|
|
]]>
|
|
<IdlFunctionDeclarations>
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
<eventArg>true</eventArg>
|
|
</IdlFunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
<![CDATA[
|
|
//
|
|
// IFileServiceSecureEventNotify Interface
|
|
//
|
|
[
|
|
object,
|
|
uuid(bc95c002-b202-4af8-8c6c-6ed1e76b0373),
|
|
helpstring("IFileServiceSecureEventNotify Interface"),
|
|
pointer_default(unique),
|
|
restricted,
|
|
local
|
|
]
|
|
interface IFileServiceSecureEventNotify : IUnknown
|
|
{
|
|
]]>
|
|
<IdlFunctionDeclarations Events="True">
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
</IdlFunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** PROXY HEADER FILES ***-->
|
|
<!--This file contains declarations for proxy classes and builder functions.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecureProxy.h">
|
|
<Include Macro="DoNotModify" />
|
|
<Include Macro="PragmaOnce" />
|
|
<![CDATA[
|
|
class CFileServiceSecureProxy;
|
|
class CFileServiceSecureEventSource;
|
|
]]>
|
|
<EventSourceBuilderDeclarations>
|
|
<ProxyClass>CFileServiceSecureEventSource</ProxyClass>
|
|
</EventSourceBuilderDeclarations>
|
|
<![CDATA[
|
|
class CFileServiceSecureEventSource: public IFileServiceSecureEventNotify
|
|
{
|
|
protected:
|
|
~CFileServiceSecureEventSource();
|
|
LONG m_cRef;
|
|
IWSDDeviceHost* m_host;
|
|
const WCHAR* m_serviceId;
|
|
|
|
public:
|
|
HRESULT STDMETHODCALLTYPE Init(IWSDDeviceHost* pIWSDDeviceHost, const WCHAR* serviceId);
|
|
CFileServiceSecureEventSource();
|
|
]]>
|
|
<IUnknownDeclarations />
|
|
<FunctionDeclarations Events="True">
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
</FunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** PROXY FILE ***-->
|
|
<!--This file contains code for proxy classes and functions.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecureProxy.cpp">
|
|
<Include Macro="DoNotModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecure.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecureTypes.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecureProxy.h</LiteralInclude>
|
|
<EventSourceBuilderImplementations>
|
|
<ProxyClass>CFileServiceSecureEventSource</ProxyClass>
|
|
</EventSourceBuilderImplementations>
|
|
<![CDATA[
|
|
CFileServiceSecureEventSource::CFileServiceSecureEventSource() :
|
|
m_cRef(1), m_host(NULL)
|
|
{
|
|
}
|
|
|
|
CFileServiceSecureEventSource::~CFileServiceSecureEventSource()
|
|
{
|
|
if ( NULL != m_host )
|
|
{
|
|
m_host->Release();
|
|
m_host = NULL;
|
|
}
|
|
};
|
|
|
|
HRESULT STDMETHODCALLTYPE CFileServiceSecureEventSource::Init(
|
|
/* [in] */ IWSDDeviceHost* pIWSDDeviceHost,
|
|
/* [in] */ const WCHAR* serviceId )
|
|
{
|
|
if( NULL == pIWSDDeviceHost )
|
|
{
|
|
return E_INVALIDARG;
|
|
}
|
|
|
|
m_serviceId = serviceId;
|
|
|
|
m_host = pIWSDDeviceHost;
|
|
m_host->AddRef();
|
|
|
|
return S_OK;
|
|
}
|
|
]]>
|
|
<IUnknownDefinitions>
|
|
<ProxyClass>CFileServiceSecureEventSource</ProxyClass>
|
|
<RefCountVar>m_cRef</RefCountVar>
|
|
<Interface>IFileServiceSecureEventNotify</Interface>
|
|
</IUnknownDefinitions>
|
|
<ProxyFunctionImplementations Events="True">
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
<ProxyClass>CFileServiceSecureEventSource</ProxyClass>
|
|
</ProxyFunctionImplementations>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** STUB FILE ***-->
|
|
<!--This file contains stub function code.-->
|
|
<!--************************************************************-->
|
|
<File Name="FileServiceSecureStub.cpp">
|
|
<Include Macro="NeedToModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecure.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">FileServiceSecureTypes.h</LiteralInclude>
|
|
<MessageTypeDeclarations />
|
|
<HostBuilderImplementation>
|
|
<HostedService>
|
|
<ServiceId>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure0</ServiceId>
|
|
<CodeName>FileServiceSecure</CodeName>
|
|
<Interface>IFileServiceSecureService</Interface>
|
|
</HostedService>
|
|
</HostBuilderImplementation>
|
|
<StubDefinitions>
|
|
<PortType>http://www.example.com/ncd/FileServiceSecure/FileServiceSecure</PortType>
|
|
<ServerClass>IFileServiceSecureService</ServerClass>
|
|
<eventArg>true</eventArg>
|
|
<Deallocator>WSDFreeLinkedMemory</Deallocator>
|
|
</StubDefinitions>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** README FILE ***-->
|
|
<!--This file contains readme text.-->
|
|
<!---->
|
|
<!--Changes made to the contents of the metadata section of this-->
|
|
<!--configuration file will not impact the accuracy of the Readme.txt-->
|
|
<!--file, but more significant changes may render the Readme.txt file-->
|
|
<!--inaccurate.-->
|
|
<!--************************************************************-->
|
|
<File Name="Readme.txt">
|
|
<![CDATA[=== Index ====================================================================
|
|
* Quick start guide
|
|
+ Service
|
|
+ Compiling
|
|
* Generated files
|
|
* Generated interfaces
|
|
+ Base interfaces
|
|
+ Event notify interfaces
|
|
* Generated classes
|
|
+ Event source classes
|
|
* Generated functions
|
|
+ Host builder function
|
|
+ Stub functions
|
|
* Generated structures
|
|
+ Metadata structures
|
|
+ Parameter structures
|
|
|
|
|
|
|
|
|
|
=== Quick start guide ========================================================
|
|
--- Service --------------------------
|
|
To build a host application, implement the IFileServiceSecureService service
|
|
interface. Then, pass this object into the host builder function,
|
|
CreateFileServiceSecureHost() (see below). Lastly, call Start()
|
|
on the resulting IWSDDeviceHost object.
|
|
|
|
|
|
|
|
--- Compiling -----------------------
|
|
All generated files must be compiled together into one static library,
|
|
executable, or DLL.
|
|
|
|
The generated IDL file (FileServiceSecure.idl) may be compiled into
|
|
C++ files with the MIDL tool. The other generated files require that
|
|
FileServiceSecure.idl will be compiled into FileServiceSecure.h.
|
|
|
|
|
|
|
|
|
|
=== Generated files ==========================================================
|
|
* FileServiceSecureTypes.h Forward-declarations and struct definitions
|
|
* FileServiceSecureTypes.cpp Type table and operation structure definitions
|
|
* FileServiceSecure.idl Defines the interfaces for the specified services
|
|
* FileServiceSecureProxy.h Declares proxy classes and builder functions
|
|
* FileServiceSecureProxy.cpp Proxy class and function implementations
|
|
* FileServiceSecureStub.cpp Stub function code
|
|
|
|
|
|
|
|
=== Generated interfaces =====================================================
|
|
--- Base interfaces ------------------
|
|
* IFileServiceSecure
|
|
|
|
This base interface is generated directly by the WSDL. Clients should use the
|
|
extended proxy classes, below. No eventing operations are included in the base
|
|
interface. The proxy uses this interface to communicate with the server,
|
|
although the server uses another interface (IFileServiceSecureEventNotify) to
|
|
execute the service methods.
|
|
|
|
|
|
|
|
--- Event notify interfaces ----------
|
|
* IFileServiceSecureEventNotify
|
|
|
|
These event notify interfaces are used by services to issue events, and are
|
|
implemented by client code to receive events. Subscription management is
|
|
handled separately in the proxy interfaces (listed above).
|
|
|
|
Your service code should instantiate objects that expose these interfaces
|
|
using the event source builder functions (see below), and should call into
|
|
the exposed methods.
|
|
|
|
You should build a client object that implements these interfaces, and
|
|
register that object when subscribing for events. Your object will receive
|
|
callbacks when you receive events from the service.
|
|
|
|
|
|
|
|
=== Manually added interfaces ================================================
|
|
* IFileServiceSecureService
|
|
|
|
This interface contains the same methods available in IFileServiceSecure,
|
|
but its methods have an event parameter in which the service can retrieve the
|
|
authenticated user handle currently attempting to perform the requested method
|
|
operation.
|
|
|
|
In this particular sample, your service objects should implement this
|
|
interface.
|
|
|
|
|
|
|
|
=== Generated classes ========================================================
|
|
--- Event source classes -------------
|
|
* CFileServiceSecureEventSource
|
|
|
|
These event source classes can be called from your service, and will issue
|
|
events to subscribed clients. To instantiate one of these classes, use a
|
|
event source builder function (see below).
|
|
|
|
|
|
|
|
|
|
=== Generated functions ======================================================
|
|
--- Host builder function ------------
|
|
* CreateFileServiceSecureHost()
|
|
|
|
Use this function to create a host and register your service(s).
|
|
|
|
|
|
--- Event source builder functions ---
|
|
* CreateCFileServiceSecureEventSource()
|
|
|
|
Use these functions to generate event source classes (see above).
|
|
|
|
|
|
|
|
--- Stub functions -------------------
|
|
These functions receive calls from WSDAPI and dispatch them into your
|
|
service object. You should not call these functions from your application.
|
|
|
|
|
|
|
|
|
|
=== Generated structures =====================================================
|
|
--- Metadata structures --------------
|
|
* WSD_HOST_METADATA hostMetadata
|
|
* WSD_THIS_MODEL_METADATA thisModelMetadata
|
|
|
|
Pass these structures to your host builder function (see above).
|
|
|
|
|
|
|
|
--- Parameter structures -------------
|
|
All parameter structures are defined inside FileServiceSecureTypes.h.
|
|
]]>
|
|
</File>
|
|
</wsdcodegen> |