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

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";
import "Windows.Security.Cryptography.Core.idl";
import "Windows.Storage.Streams.idl";
import "Windows.System.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        namespace Collections
        {
            interface IPropertySet;
        }
    }
}
namespace Windows
{
    namespace Foundation
    {
        interface IAsyncAction;

        apicontract UniversalApiContract;

        runtimeclass Uri;
    }
}
namespace Windows
{
    namespace Security
    {
        namespace Cryptography
        {
            namespace Core
            {
                typedef enum CryptographicPublicKeyBlobType CryptographicPublicKeyBlobType;
            }
        }
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            interface IBuffer;

            interface IRandomAccessStream;
        }
    }
}
namespace Windows
{
    namespace System
    {
        runtimeclass User;
    }
}
namespace Windows
{
    namespace Security
    {
        namespace Credentials
        {
            typedef enum KeyCredentialAttestationStatus KeyCredentialAttestationStatus;

            typedef enum KeyCredentialCreationOption KeyCredentialCreationOption;

            typedef enum KeyCredentialStatus KeyCredentialStatus;

            typedef enum WebAccountPictureSize WebAccountPictureSize;

            typedef enum WebAccountState WebAccountState;

            interface ICredentialFactory;

            interface IKeyCredential;

            interface IKeyCredentialAttestationResult;

            interface IKeyCredentialManagerStatics;

            interface IKeyCredentialOperationResult;

            interface IKeyCredentialRetrievalResult;

            interface IPasswordCredential;

            interface IPasswordVault;

            interface IWebAccount;

            interface IWebAccount2;

            interface IWebAccountFactory;

            interface IWebAccountProvider;

            interface IWebAccountProvider2;

            interface IWebAccountProvider3;

            interface IWebAccountProvider4;

            interface IWebAccountProviderFactory;

            runtimeclass KeyCredential;

            runtimeclass KeyCredentialAttestationResult;

            runtimeclass KeyCredentialManager;

            runtimeclass KeyCredentialOperationResult;

            runtimeclass KeyCredentialRetrievalResult;

            runtimeclass PasswordCredential;

            runtimeclass PasswordCredentialPropertyStore;

            runtimeclass PasswordVault;

            runtimeclass WebAccount;

            runtimeclass WebAccountProvider;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Security
    {
        namespace Credentials
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Security.Credentials.PasswordCredential*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Security.Credentials.WebAccount*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Security.Credentials.PasswordCredential*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Security.Credentials.WebAccount*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.PasswordCredential*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.WebAccount*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.WebAccount*>*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialAttestationResult*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialOperationResult*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialRetrievalResult*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.WebAccount*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.WebAccountProvider*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Security
    {
        namespace Credentials
        {
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum KeyCredentialAttestationStatus
            {
                Success          = 0,
                UnknownError     = 1,
                NotSupported     = 2,
                TemporaryFailure = 3
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum KeyCredentialCreationOption
            {
                ReplaceExisting = 0,
                FailIfExists    = 1
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum KeyCredentialStatus
            {
                Success                 = 0,
                UnknownError            = 1,
                NotFound                = 2,
                UserCanceled            = 3,
                UserPrefersPassword     = 4,
                CredentialAlreadyExists = 5,
                SecurityDeviceLocked    = 6
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum WebAccountPictureSize
            {
                Size64x64     = 64,
                Size208x208   = 208,
                Size424x424   = 424,
                Size1080x1080 = 1080
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum WebAccountState
            {
                None      = 0,
                Connected = 1,
                Error     = 2
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.PasswordCredential)]
            [uuid(54EF13A1-BF26-47B5-97DD-DE779B7CAD58)]
            interface ICredentialFactory : IInspectable
            {
                HRESULT CreatePasswordCredential([in] HSTRING resource, [in] HSTRING userName, [in] HSTRING password, [out] [retval] Windows.Security.Credentials.PasswordCredential** credential);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.KeyCredential)]
            [uuid(9585EF8D-457B-4847-B11A-FA960BBDB138)]
            interface IKeyCredential : IInspectable
            {
                [propget] HRESULT Name([out] [retval] HSTRING* value);
                [overload("RetrievePublicKey")] HRESULT RetrievePublicKeyWithDefaultBlobType([out] [retval] Windows.Storage.Streams.IBuffer** value);
                [overload("RetrievePublicKey")] HRESULT RetrievePublicKeyWithBlobType([in] Windows.Security.Cryptography.Core.CryptographicPublicKeyBlobType blobType, [out] [retval] Windows.Storage.Streams.IBuffer** value);
                HRESULT RequestSignAsync([in] Windows.Storage.Streams.IBuffer* data, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialOperationResult*>** value);
                HRESULT GetAttestationAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialAttestationResult*>** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.KeyCredentialAttestationResult)]
            [uuid(78AAB3A1-A3C1-4103-B6CC-472C44171CBB)]
            interface IKeyCredentialAttestationResult : IInspectable
            {
                [propget] HRESULT CertificateChainBuffer([out] [retval] Windows.Storage.Streams.IBuffer** value);
                [propget] HRESULT AttestationBuffer([out] [retval] Windows.Storage.Streams.IBuffer** value);
                [propget] HRESULT Status([out] [retval] Windows.Security.Credentials.KeyCredentialAttestationStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.KeyCredentialManager)]
            [uuid(6AAC468B-0EF1-4CE0-8290-4106DA6A63B5)]
            interface IKeyCredentialManagerStatics : IInspectable
            {
                HRESULT IsSupportedAsync([out] [retval] Windows.Foundation.IAsyncOperation<boolean>** value);
                HRESULT RenewAttestationAsync([out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT RequestCreateAsync([in] HSTRING name, [in] Windows.Security.Credentials.KeyCredentialCreationOption option, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialRetrievalResult*>** value);
                HRESULT OpenAsync([in] HSTRING name, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.KeyCredentialRetrievalResult*>** value);
                HRESULT DeleteAsync([in] HSTRING name, [out] [retval] Windows.Foundation.IAsyncAction** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.KeyCredentialOperationResult)]
            [uuid(F53786C1-5261-4CDD-976D-CC909AC71620)]
            interface IKeyCredentialOperationResult : IInspectable
            {
                [propget] HRESULT Result([out] [retval] Windows.Storage.Streams.IBuffer** value);
                [propget] HRESULT Status([out] [retval] Windows.Security.Credentials.KeyCredentialStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.KeyCredentialRetrievalResult)]
            [uuid(58CD7703-8D87-4249-9B58-F6598CC9644E)]
            interface IKeyCredentialRetrievalResult : IInspectable
            {
                [propget] HRESULT Credential([out] [retval] Windows.Security.Credentials.KeyCredential** value);
                [propget] HRESULT Status([out] [retval] Windows.Security.Credentials.KeyCredentialStatus* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.PasswordCredential)]
            [uuid(6AB18989-C720-41A7-A6C1-FEADB36329A0)]
            interface IPasswordCredential : IInspectable
            {
                [propget] HRESULT Resource([out] [retval] HSTRING* resource);
                [propput] HRESULT Resource([in] HSTRING resource);
                [propget] HRESULT UserName([out] [retval] HSTRING* userName);
                [propput] HRESULT UserName([in] HSTRING userName);
                [propget] HRESULT Password([out] [retval] HSTRING* password);
                [propput] HRESULT Password([in] HSTRING password);
                HRESULT RetrievePassword();
                [propget] HRESULT Properties([out] [retval] Windows.Foundation.Collections.IPropertySet** props);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.PasswordVault)]
            [uuid(61FD2C0B-C8D4-48C1-A54F-BC5A64205AF2)]
            interface IPasswordVault : IInspectable
            {
                HRESULT Add([in] Windows.Security.Credentials.PasswordCredential* credential);
                HRESULT Remove([in] Windows.Security.Credentials.PasswordCredential* credential);
                HRESULT Retrieve([in] HSTRING resource, [in] HSTRING userName, [out] [retval] Windows.Security.Credentials.PasswordCredential** credential);
                HRESULT FindAllByResource([in] HSTRING resource, [out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.PasswordCredential*>** credentials);
                HRESULT FindAllByUserName([in] HSTRING userName, [out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.PasswordCredential*>** credentials);
                HRESULT RetrieveAll([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Security.Credentials.PasswordCredential*>** credentials);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(69473EB2-8031-49BE-80BB-96CB46D99ABA)]
            interface IWebAccount : IInspectable
            {
                [propget] HRESULT WebAccountProvider([out] [retval] Windows.Security.Credentials.WebAccountProvider** value);
                [propget] HRESULT UserName([out] [retval] HSTRING* value);
                [propget] HRESULT State([out] [retval] Windows.Security.Credentials.WebAccountState* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccount)]
            [uuid(7B56D6F8-990B-4EB5-94A7-5621F3A8B824)]
            interface IWebAccount2 : IInspectable
                requires
                    Windows.Security.Credentials.IWebAccount
            {
                [propget] HRESULT Id([out] [retval] HSTRING* value);
                [propget] HRESULT Properties([out] [retval] Windows.Foundation.Collections.IMapView<HSTRING, HSTRING>** value);
                HRESULT GetPictureAsync([in] Windows.Security.Credentials.WebAccountPictureSize desizedSize, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>** asyncInfo);
                [overload("SignOutAsync")] HRESULT SignOutAsync([out] [retval] Windows.Foundation.IAsyncAction** asyncInfo);
                [overload("SignOutAsync")] HRESULT SignOutWithClientIdAsync([in] HSTRING clientId, [out] [retval] Windows.Foundation.IAsyncAction** asyncInfo);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccount)]
            [uuid(AC9AFB39-1DE9-4E92-B78F-0581A87F6E5C)]
            interface IWebAccountFactory : IInspectable
            {
                HRESULT CreateWebAccount([in] Windows.Security.Credentials.WebAccountProvider* webAccountProvider, [in] HSTRING userName, [in] Windows.Security.Credentials.WebAccountState state, [out] [retval] Windows.Security.Credentials.WebAccount** instance);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccountProvider)]
            [uuid(29DCC8C3-7AB9-4A7C-A336-B942F9DBF7C7)]
            interface IWebAccountProvider : IInspectable
            {
                [propget] HRESULT Id([out] [retval] HSTRING* value);
                [propget] HRESULT DisplayName([out] [retval] HSTRING* value);
                [deprecated("IconUri may be altered or unavailable for releases after Windows 8.2. Instead, use Icon.", deprecate, Windows.Foundation.UniversalApiContract, 1.0)] [propget] HRESULT IconUri([out] [retval] Windows.Foundation.Uri** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccountProvider)]
            [uuid(4A01EB05-4E42-41D4-B518-E008A5163614)]
            interface IWebAccountProvider2 : IInspectable
                requires
                    Windows.Security.Credentials.IWebAccountProvider
            {
                [propget] HRESULT DisplayPurpose([out] [retval] HSTRING* value);
                [propget] HRESULT Authority([out] [retval] HSTRING* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccountProvider)]
            [uuid(DA1C518B-970D-4D49-825C-F2706F8CA7FE)]
            interface IWebAccountProvider3 : IInspectable
                requires
                    Windows.Security.Credentials.IWebAccountProvider2,
                    Windows.Security.Credentials.IWebAccountProvider
            {
                [propget] HRESULT User([out] [retval] Windows.System.User** user);
            }

            [contract(Windows.Foundation.UniversalApiContract, 6.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccountProvider)]
            [uuid(718FD8DB-E796-4210-B74E-84D29894B080)]
            interface IWebAccountProvider4 : IInspectable
            {
                [propget] HRESULT IsSystemProvider([out] [retval] boolean* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Security.Credentials.WebAccountProvider)]
            [uuid(1D767DF1-E1E1-4B9A-A774-5C7C7E3BF371)]
            interface IWebAccountProviderFactory : IInspectable
            {
                HRESULT CreateWebAccountProvider([in] HSTRING id, [in] HSTRING displayName, [in] Windows.Foundation.Uri* iconUri, [out] [retval] Windows.Security.Credentials.WebAccountProvider** instance);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass KeyCredential
            {
                [default] interface Windows.Security.Credentials.IKeyCredential;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass KeyCredentialAttestationResult
            {
                [default] interface Windows.Security.Credentials.IKeyCredentialAttestationResult;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Security.Credentials.IKeyCredentialManagerStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass KeyCredentialManager
            {
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass KeyCredentialOperationResult
            {
                [default] interface Windows.Security.Credentials.IKeyCredentialOperationResult;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass KeyCredentialRetrievalResult
            {
                [default] interface Windows.Security.Credentials.IKeyCredentialRetrievalResult;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [activatable(Windows.Security.Credentials.ICredentialFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass PasswordCredential
            {
                [default] interface Windows.Security.Credentials.IPasswordCredential;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass PasswordCredentialPropertyStore
            {
                [default] interface Windows.Foundation.Collections.IPropertySet;
                interface Windows.Foundation.Collections.IObservableMap<HSTRING, IInspectable*>;
                interface Windows.Foundation.Collections.IMap<HSTRING, IInspectable*>;
                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, IInspectable*>*>;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass PasswordVault
            {
                [default] interface Windows.Security.Credentials.IPasswordVault;
            }

            [activatable(Windows.Security.Credentials.IWebAccountFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass WebAccount
            {
                [default] interface Windows.Security.Credentials.IWebAccount;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Security.Credentials.IWebAccount2;
            }

            [activatable(Windows.Security.Credentials.IWebAccountProviderFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass WebAccountProvider
            {
                [default] interface Windows.Security.Credentials.IWebAccountProvider;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Security.Credentials.IWebAccountProvider2;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Security.Credentials.IWebAccountProvider3;
                [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Security.Credentials.IWebAccountProvider4;
            }
        }
    }
}
