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

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.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;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            interface IBuffer;
        }
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace SmartCards
        {
            typedef enum SmartCardPinCharacterPolicyOption SmartCardPinCharacterPolicyOption;

            typedef enum SmartCardReaderKind SmartCardReaderKind;

            typedef enum SmartCardReaderStatus SmartCardReaderStatus;

            typedef enum SmartCardStatus SmartCardStatus;

            delegate SmartCardPinResetHandler;

            interface ICardAddedEventArgs;

            interface ICardRemovedEventArgs;

            interface ISmartCard;

            interface ISmartCardChallengeContext;

            interface ISmartCardConnect;

            interface ISmartCardConnection;

            interface ISmartCardPinPolicy;

            interface ISmartCardPinResetDeferral;

            interface ISmartCardPinResetRequest;

            interface ISmartCardProvisioning;

            interface ISmartCardProvisioning2;

            interface ISmartCardProvisioningStatics;

            interface ISmartCardProvisioningStatics2;

            interface ISmartCardReader;

            interface ISmartCardReaderStatics;

            runtimeclass CardAddedEventArgs;

            runtimeclass CardRemovedEventArgs;

            runtimeclass SmartCard;

            runtimeclass SmartCardChallengeContext;

            runtimeclass SmartCardConnection;

            runtimeclass SmartCardPinPolicy;

            runtimeclass SmartCardPinResetDeferral;

            runtimeclass SmartCardPinResetRequest;

            runtimeclass SmartCardProvisioning;

            runtimeclass SmartCardReader;
        }
    }
}

// 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.SmartCardConnection*>;

                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
        {
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum SmartCardPinCharacterPolicyOption
            {
                Allow             = 0,
                RequireAtLeastOne = 1,
                Disallow          = 2
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum SmartCardReaderKind
            {
                Any        = 0,
                Generic    = 1,
                Tpm        = 2,
                Nfc        = 3,
                Uicc       = 4,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                EmbeddedSE = 5
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum SmartCardReaderStatus
            {
                Disconnected = 0,
                Ready        = 1,
                Exclusive    = 2
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum SmartCardStatus
            {
                Disconnected = 0,
                Ready        = 1,
                Shared       = 2,
                Exclusive    = 3,
                Unresponsive = 4
            };

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

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

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

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCard)]
            [uuid(1B718871-6434-43F4-B55A-6A29623870AA)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardChallengeContext)]
            [uuid(192A5319-C9C4-4947-81CC-44794A61EF91)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCard)]
            [uuid(2FDF87E5-028D-491E-A058-3382C3986F40)]
            interface ISmartCardConnect : IInspectable
            {
                HRESULT ConnectAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.SmartCards.SmartCardConnection*>** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardConnection)]
            [uuid(7EDB991A-A81A-47BC-A649-156BE6B7F231)]
            interface ISmartCardConnection : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                HRESULT TransmitAsync([in] Windows.Storage.Streams.IBuffer* command, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer*>** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinPolicy)]
            [uuid(183CE184-4DB6-4841-AC9E-2AC1F39B7304)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinResetDeferral)]
            [uuid(18C94AAC-7805-4004-85E4-BBEFAC8F6884)]
            interface ISmartCardPinResetDeferral : IInspectable
            {
                HRESULT Complete();
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardPinResetRequest)]
            [uuid(12FE3C4D-5FB9-4E8E-9FF6-61F475124FEF)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(19EEEDBD-1FAB-477C-B712-1A2C5AF1FD6E)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(10FD28EB-3F79-4B66-9B7C-11C149B7D0BC)]
            interface ISmartCardProvisioning2 : IInspectable
            {
                HRESULT GetAuthorityKeyContainerNameAsync([out] [retval] Windows.Foundation.IAsyncOperation<HSTRING>** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(13882848-0D13-4E70-9735-51DAECA5254F)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardProvisioning)]
            [uuid(3447C6A8-C9A0-4BD6-B50D-251F4E8D3A62)]
            interface ISmartCardProvisioningStatics2 : IInspectable
            {
                [overload("RequestAttestedVirtualSmartCardCreationAsync")] HRESULT RequestAttestedVirtualSmartCardCreationAsync([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("RequestAttestedVirtualSmartCardCreationAsync")] HRESULT RequestAttestedVirtualSmartCardCreationAsyncWithCardId([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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardReader)]
            [uuid(1074B4E0-54C2-4DF0-817A-14C14378F06C)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Devices.SmartCards.SmartCardReader)]
            [uuid(103C04E1-A1CA-48F2-A281-5B6F669AF107)]
            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);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass CardAddedEventArgs
            {
                [default] interface Windows.Devices.SmartCards.ICardAddedEventArgs;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass CardRemovedEventArgs
            {
                [default] interface Windows.Devices.SmartCards.ICardRemovedEventArgs;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCard
            {
                [default] interface Windows.Devices.SmartCards.ISmartCard;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.SmartCards.ISmartCardConnect;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCardChallengeContext
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardChallengeContext;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCardConnection
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardConnection;
                interface Windows.Foundation.IClosable;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCardPinPolicy
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinPolicy;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCardPinResetDeferral
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinResetDeferral;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass SmartCardPinResetRequest
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardPinResetRequest;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.SmartCards.ISmartCardProvisioningStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [static(Windows.Devices.SmartCards.ISmartCardProvisioningStatics2, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass SmartCardProvisioning
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardProvisioning;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.SmartCards.ISmartCardProvisioning2;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.SmartCards.ISmartCardReaderStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass SmartCardReader
            {
                [default] interface Windows.Devices.SmartCards.ISmartCardReader;
            }
        }
    }
}
