//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0009
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.idl";
import "Windows.Storage.Streams.idl";
// Additional imports to ensure that all required headers are included
cpp_quote("#if defined(__cplusplus)")
cpp_quote("}")
cpp_quote("#endif // defined(__cplusplus)")
cpp_quote("#include <Windows.Foundation.h>")
cpp_quote("#if !defined(__windows2Estorage2Estreams_h__)")
cpp_quote("#include <Windows.Storage.Streams.h>")
cpp_quote("#endif // !defined(__windows2Estorage2Estreams_h__)")
cpp_quote("#if defined(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            interface IBuffer;

            interface IInputStream;

            interface IOutputStream;
        }
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace Custom
        {
            typedef enum IOControlAccessMode IOControlAccessMode;

            typedef enum IOControlBufferingMethod IOControlBufferingMethod;

            typedef enum DeviceAccessMode DeviceAccessMode;

            typedef enum DeviceSharingMode DeviceSharingMode;

            interface IKnownDeviceTypesStatics;

            interface IIOControlCode;

            interface IIOControlCodeFactory;

            interface ICustomDeviceStatics;

            interface ICustomDevice;

            runtimeclass KnownDeviceTypes;

            runtimeclass IOControlCode;

            runtimeclass CustomDevice;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace Custom
        {
            declare
            {
                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Custom.CustomDevice*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace Custom
        {
            [version(0x06030000)]
            enum IOControlAccessMode
            {
                Any       = 0,
                Read      = 1,
                Write     = 2,
                ReadWrite = 3
            };

            [version(0x06030000)]
            enum IOControlBufferingMethod
            {
                Buffered     = 0,
                DirectInput  = 1,
                DirectOutput = 2,
                Neither      = 3
            };

            [version(0x06030000)]
            enum DeviceAccessMode
            {
                Read      = 0,
                Write     = 1,
                ReadWrite = 2
            };

            [version(0x06030000)]
            enum DeviceSharingMode
            {
                Shared    = 0,
                Exclusive = 1
            };

            [exclusiveto(Windows.Devices.Custom.KnownDeviceTypes)]
            [uuid(EE5479C2-5448-45DA-AD1B-24948C239094)]
            [version(0x06030000)]
            interface IKnownDeviceTypesStatics : IInspectable
            {
                [propget] HRESULT Unknown([out] [retval] UINT16* value);
            }

            [uuid(0E9559E7-60C8-4375-A761-7F8808066C60)]
            [version(0x06030000)]
            interface IIOControlCode : IInspectable
            {
                [propget] HRESULT AccessMode([out] [retval] Windows.Devices.Custom.IOControlAccessMode* value);
                [propget] HRESULT BufferingMethod([out] [retval] Windows.Devices.Custom.IOControlBufferingMethod* value);
                [propget] HRESULT Function([out] [retval] UINT16* value);
                [propget] HRESULT DeviceType([out] [retval] UINT16* value);
                [propget] HRESULT ControlCode([out] [retval] UINT32* value);
            }

            [exclusiveto(Windows.Devices.Custom.IOControlCode)]
            [uuid(856A7CF0-4C11-44AE-AFC6-B8D4A212788F)]
            [version(0x06030000)]
            interface IIOControlCodeFactory : IInspectable
            {
                HRESULT CreateIOControlCode([in] UINT16 deviceType, [in] UINT16 function, [in] Windows.Devices.Custom.IOControlAccessMode accessMode, [in] Windows.Devices.Custom.IOControlBufferingMethod bufferingMethod, [out] [retval] Windows.Devices.Custom.IOControlCode** instance);
            }

            [exclusiveto(Windows.Devices.Custom.CustomDevice)]
            [uuid(C8220312-EF4C-46B1-A58E-EEB308DC8917)]
            [version(0x06030000)]
            interface ICustomDeviceStatics : IInspectable
            {
                HRESULT GetDeviceSelector([in] GUID classGuid, [out] [retval] HSTRING* value);
                HRESULT FromIdAsync([in] HSTRING deviceId, [in] Windows.Devices.Custom.DeviceAccessMode desiredAccess, [in] Windows.Devices.Custom.DeviceSharingMode sharingMode, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Custom.CustomDevice*>** operation);
            }

            [exclusiveto(Windows.Devices.Custom.CustomDevice)]
            [uuid(DD30251F-C48B-43BD-BCB1-DEC88F15143E)]
            [version(0x06030000)]
            interface ICustomDevice : IInspectable
            {
                [propget] HRESULT InputStream([out] [retval] Windows.Storage.Streams.IInputStream** value);
                [propget] HRESULT OutputStream([out] [retval] Windows.Storage.Streams.IOutputStream** value);
                HRESULT SendIOControlAsync([in] Windows.Devices.Custom.IIOControlCode* ioControlCode, [in] Windows.Storage.Streams.IBuffer* inputBuffer, [in] Windows.Storage.Streams.IBuffer* outputBuffer, [out] [retval] Windows.Foundation.IAsyncOperation<UINT32>** operation);
                HRESULT TrySendIOControlAsync([in] Windows.Devices.Custom.IIOControlCode* ioControlCode, [in] Windows.Storage.Streams.IBuffer* inputBuffer, [in] Windows.Storage.Streams.IBuffer* outputBuffer, [out] [retval] Windows.Foundation.IAsyncOperation<boolean>** operation);
            }

            [marshaling_behavior(agile)]
            [static(Windows.Devices.Custom.IKnownDeviceTypesStatics, 0x06030000)]
            [version(0x06030000)]
            runtimeclass KnownDeviceTypes
            {
            }

            [activatable(Windows.Devices.Custom.IIOControlCodeFactory, 0x06030000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass IOControlCode
            {
                [default] interface Windows.Devices.Custom.IIOControlCode;
            }

            [marshaling_behavior(agile)]
            [static(Windows.Devices.Custom.ICustomDeviceStatics, 0x06030000)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass CustomDevice
            {
                [default] interface Windows.Devices.Custom.ICustomDevice;
            }
        }
    }
}
