//
// 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 Foundation
    {
        typedef struct DateTime DateTime;

        interface IAsyncAction;

        interface IClosable;
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            interface IBuffer;
        }
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace SmartCards
        {
            typedef enum SmartCardReaderKind SmartCardReaderKind;

            typedef enum SmartCardReaderStatus SmartCardReaderStatus;

            typedef enum SmartCardStatus SmartCardStatus;

            typedef enum SmartCardPinCharacterPolicyOption SmartCardPinCharacterPolicyOption;

            delegate SmartCardPinResetHandler;

            interface ISmartCardReaderStatics;

            interface ISmartCardReader;

            interface ICardAddedEventArgs;

            interface ICardRemovedEventArgs;

            interface ISmartCard;

            interface ISmartCardProvisioningStatics;

            interface ISmartCardProvisioning;

            interface ISmartCardPinResetRequest;

            interface ISmartCardPinResetDeferral;

            interface ISmartCardPinPolicy;

            interface ISmartCardChallengeContext;

            runtimeclass SmartCardReader;

            runtimeclass SmartCard;

            runtimeclass CardAddedEventArgs;

            runtimeclass CardRemovedEventArgs;

            runtimeclass SmartCardProvisioning;

            runtimeclass SmartCardPinPolicy;

            runtimeclass SmartCardChallengeContext;

            runtimeclass SmartCardPinResetRequest;

            runtimeclass SmartCardPinResetDeferral;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace SmartCards
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Devices.SmartCards.SmartCard*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.SmartCards.SmartCard*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.SmartCards.SmartCard*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardChallengeContext*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardProvisioning*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardReader*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardReaderStatus>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardStatus>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.SmartCards.SmartCard*>*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Devices.SmartCards.SmartCardReader*, Windows.Devices.SmartCards.CardAddedEventArgs*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Devices.SmartCards.SmartCardReader*, Windows.Devices.SmartCards.CardRemovedEventArgs*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace SmartCards
        {
            [version(0x06030000)]
            enum SmartCardReaderKind
            {
                Any     = 0,
                Generic = 1,
                Tpm     = 2,
                Nfc     = 3,
                Uicc    = 4
            };

            [version(0x06030000)]
            enum SmartCardReaderStatus
            {
                Disconnected = 0,
                Ready        = 1,
                Exclusive    = 2
            };

            [version(0x06030000)]
            enum SmartCardStatus
            {
                Disconnected = 0,
                Ready        = 1,
                Shared       = 2,
                Exclusive    = 3,
                Unresponsive = 4
            };

            [version(0x06030000)]
            enum SmartCardPinCharacterPolicyOption
            {
                Allow             = 0,
                RequireAtLeastOne = 1,
                Disallow          = 2
            };

            [uuid(138D5E40-F3BC-4A5C-B41D-4B4EF684E237)]
            [version(0x06030000)]
            delegate
                HRESULT SmartCardPinResetHandler([in] Windows.Devices.SmartCards.SmartCardProvisioning* sender, [in] Windows.Devices.SmartCards.SmartCardPinResetRequest* request);

            [exclusiveto(Windows.Devices.SmartCards.SmartCardReader)]
            [uuid(103C04E1-A1CA-48F2-A281-5B6F669AF107)]
            [version(0x06030000)]
            interface ISmartCardReaderStatics : IInspectable
            {
                [overload("GetDeviceSelector")] HRESULT GetDeviceSelector([out] [retval] HSTRING* selector);
                [overload("GetDeviceSelector")] HRESULT GetDeviceSelectorWithKind([in] Windows.Devices.SmartCards.SmartCardReaderKind kind, [out] [retval] HSTRING* selector);
                HRESULT FromIdAsync([in] HSTRING deviceId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardReader*>** result);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardReader)]
            [uuid(1074B4E0-54C2-4DF0-817A-14C14378F06C)]
            [version(0x06030000)]
            interface ISmartCardReader : IInspectable
            {
                [propget] HRESULT DeviceId([out] [retval] HSTRING* value);
                [propget] HRESULT Name([out] [retval] HSTRING* value);
                [propget] HRESULT Kind([out] [retval] Windows.Devices.SmartCards.SmartCardReaderKind* value);
                HRESULT GetStatusAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardReaderStatus>** result);
                HRESULT FindAllCardsAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.SmartCards.SmartCard*>*>** result);
                [eventadd] HRESULT CardAdded([in] Windows.Foundation.TypedEventHandler<Windows.Devices.SmartCards.SmartCardReader*, Windows.Devices.SmartCards.CardAddedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT CardAdded([in] EventRegistrationToken token);
                [eventadd] HRESULT CardRemoved([in] Windows.Foundation.TypedEventHandler<Windows.Devices.SmartCards.SmartCardReader*, Windows.Devices.SmartCards.CardRemovedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT CardRemoved([in] EventRegistrationToken token);
            }

            [exclusiveto(Windows.Devices.SmartCards.CardAddedEventArgs)]
            [uuid(18BBEF98-F18B-4DD3-B118-DFB2C8E23CC6)]
            [version(0x06030000)]
            interface ICardAddedEventArgs : IInspectable
            {
                [propget] HRESULT SmartCard([out] [retval] Windows.Devices.SmartCards.SmartCard** value);
            }

            [exclusiveto(Windows.Devices.SmartCards.CardRemovedEventArgs)]
            [uuid(15331AAF-22D7-4945-AFC9-03B46F42A6CD)]
            [version(0x06030000)]
            interface ICardRemovedEventArgs : IInspectable
            {
                [propget] HRESULT SmartCard([out] [retval] Windows.Devices.SmartCards.SmartCard** value);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCard)]
            [uuid(1B718871-6434-43F4-B55A-6A29623870AA)]
            [version(0x06030000)]
            interface ISmartCard : IInspectable
            {
                [propget] HRESULT Reader([out] [retval] Windows.Devices.SmartCards.SmartCardReader** value);
                HRESULT GetStatusAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardStatus>** result);
                HRESULT GetAnswerToResetAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer*>** result);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(13882848-0D13-4E70-9735-51DAECA5254F)]
            [version(0x06030000)]
            interface ISmartCardProvisioningStatics : IInspectable
            {
                HRESULT FromSmartCardAsync([in] Windows.Devices.SmartCards.SmartCard* card, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardProvisioning*>** result);
                [overload("RequestVirtualSmartCardCreationAsync")] HRESULT RequestVirtualSmartCardCreationAsync([in] HSTRING friendlyName, [in] Windows.Storage.Streams.IBuffer* administrativeKey, [in] Windows.Devices.SmartCards.SmartCardPinPolicy* pinPolicy, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardProvisioning*>** result);
                [overload("RequestVirtualSmartCardCreationAsync")] HRESULT RequestVirtualSmartCardCreationAsyncWithCardId([in] HSTRING friendlyName, [in] Windows.Storage.Streams.IBuffer* administrativeKey, [in] Windows.Devices.SmartCards.SmartCardPinPolicy* pinPolicy, [in] GUID cardId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardProvisioning*>** result);
                HRESULT RequestVirtualSmartCardDeletionAsync([in] Windows.Devices.SmartCards.SmartCard* card, [out] [retval] Windows.Foundation.IAsyncOperation<boolean>** result);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(19EEEDBD-1FAB-477C-B712-1A2C5AF1FD6E)]
            [version(0x06030000)]
            interface ISmartCardProvisioning : IInspectable
            {
                [propget] HRESULT SmartCard([out] [retval] Windows.Devices.SmartCards.SmartCard** value);
                HRESULT GetIdAsync([out] [retval] Windows.Foundation.IAsyncOperation<GUID>** result);
                HRESULT GetNameAsync([out] [retval] Windows.Foundation.IAsyncOperation<HSTRING>** result);
                HRESULT GetChallengeContextAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardChallengeContext*>** result);
                HRESULT RequestPinChangeAsync([out] [retval] Windows.Foundation.IAsyncOperation<boolean>** result);
                HRESULT RequestPinResetAsync([in] Windows.Devices.SmartCards.SmartCardPinResetHandler* handler, [out] [retval] Windows.Foundation.IAsyncOperation<boolean>** result);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinResetRequest)]
            [uuid(12FE3C4D-5FB9-4E8E-9FF6-61F475124FEF)]
            [version(0x06030000)]
            interface ISmartCardPinResetRequest : IInspectable
            {
                [propget] HRESULT Challenge([out] [retval] Windows.Storage.Streams.IBuffer** value);
                [propget] HRESULT Deadline([out] [retval] Windows.Foundation.DateTime* value);
                HRESULT GetDeferral([out] [retval] Windows.Devices.SmartCards.SmartCardPinResetDeferral** result);
                HRESULT SetResponse([in] Windows.Storage.Streams.IBuffer* response);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinResetDeferral)]
            [uuid(18C94AAC-7805-4004-85E4-BBEFAC8F6884)]
            [version(0x06030000)]
            interface ISmartCardPinResetDeferral : IInspectable
            {
                HRESULT Complete();
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinPolicy)]
            [uuid(183CE184-4DB6-4841-AC9E-2AC1F39B7304)]
            [version(0x06030000)]
            interface ISmartCardPinPolicy : IInspectable
            {
                [propget] HRESULT MinLength([out] [retval] UINT32* value);
                [propput] HRESULT MinLength([in] UINT32 value);
                [propget] HRESULT MaxLength([out] [retval] UINT32* value);
                [propput] HRESULT MaxLength([in] UINT32 value);
                [propget] HRESULT UppercaseLetters([out] [retval] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption* value);
                [propput] HRESULT UppercaseLetters([in] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption value);
                [propget] HRESULT LowercaseLetters([out] [retval] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption* value);
                [propput] HRESULT LowercaseLetters([in] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption value);
                [propget] HRESULT Digits([out] [retval] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption* value);
                [propput] HRESULT Digits([in] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption value);
                [propget] HRESULT SpecialCharacters([out] [retval] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption* value);
                [propput] HRESULT SpecialCharacters([in] Windows.Devices.SmartCards.SmartCardPinCharacterPolicyOption value);
            }

            [exclusiveto(Windows.Devices.SmartCards.SmartCardChallengeContext)]
            [uuid(192A5319-C9C4-4947-81CC-44794A61EF91)]
            [version(0x06030000)]
            interface ISmartCardChallengeContext : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Challenge([out] [retval] Windows.Storage.Streams.IBuffer** value);
                HRESULT VerifyResponseAsync([in] Windows.Storage.Streams.IBuffer* response, [out] [retval] Windows.Foundation.IAsyncOperation<boolean>** result);
                [overload("ProvisionAsync")] HRESULT ProvisionAsync([in] Windows.Storage.Streams.IBuffer* response, [in] boolean formatCard, [out] [retval] Windows.Foundation.IAsyncAction** result);
                [overload("ProvisionAsync")] HRESULT ProvisionAsyncWithNewCardId([in] Windows.Storage.Streams.IBuffer* response, [in] boolean formatCard, [in] GUID newCardId, [out] [retval] Windows.Foundation.IAsyncAction** result);
                HRESULT ChangeAdministrativeKeyAsync([in] Windows.Storage.Streams.IBuffer* response, [in] Windows.Storage.Streams.IBuffer* newAdministrativeKey, [out] [retval] Windows.Foundation.IAsyncAction** result);
            }

            [marshaling_behavior(agile)]
            [static(Windows.Devices.SmartCards.ISmartCardReaderStatics, 0x06030000)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardReader
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardReader;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCard
            {
                [default] interface Windows.Devices.SmartCards.ISmartCard;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass CardAddedEventArgs
            {
                [default] interface Windows.Devices.SmartCards.ICardAddedEventArgs;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass CardRemovedEventArgs
            {
                [default] interface Windows.Devices.SmartCards.ICardRemovedEventArgs;
            }

            [marshaling_behavior(agile)]
            [static(Windows.Devices.SmartCards.ISmartCardProvisioningStatics, 0x06030000)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardProvisioning
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardProvisioning;
            }

            [activatable(0x06030000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardPinPolicy
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinPolicy;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardChallengeContext
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardChallengeContext;
                interface Windows.Foundation.IClosable;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardPinResetRequest
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinResetRequest;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x06030000)]
            runtimeclass SmartCardPinResetDeferral
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinResetDeferral;
            }
        }
    }
}
