//
// 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";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        interface IClosable;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace ApplicationModel
    {
        namespace ExtendedExecution
        {
            namespace Foreground
            {
                typedef enum ExtendedExecutionForegroundReason ExtendedExecutionForegroundReason;

                typedef enum ExtendedExecutionForegroundResult ExtendedExecutionForegroundResult;

                typedef enum ExtendedExecutionForegroundRevokedReason ExtendedExecutionForegroundRevokedReason;

                interface IExtendedExecutionForegroundRevokedEventArgs;

                interface IExtendedExecutionForegroundSession;

                runtimeclass ExtendedExecutionForegroundRevokedEventArgs;

                runtimeclass ExtendedExecutionForegroundSession;
            }
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace ApplicationModel
    {
        namespace ExtendedExecution
        {
            namespace Foreground
            {
                declare
                {
                    interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult>;

                    interface Windows.Foundation.TypedEventHandler<IInspectable*, Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs*>;
                }
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace ApplicationModel
    {
        namespace ExtendedExecution
        {
            namespace Foreground
            {
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                enum ExtendedExecutionForegroundReason
                {
                    Unspecified     = 0,
                    SavingData      = 1,
                    BackgroundAudio = 2,
                    Unconstrained   = 3
                };

                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                enum ExtendedExecutionForegroundResult
                {
                    Allowed = 0,
                    Denied  = 1
                };

                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                enum ExtendedExecutionForegroundRevokedReason
                {
                    Resumed      = 0,
                    SystemPolicy = 1
                };

                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                [exclusiveto(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs)]
                [uuid(B07CD940-9557-AEA4-2C99-BDD56D9BE461)]
                interface IExtendedExecutionForegroundRevokedEventArgs : IInspectable
                {
                    [propget] HRESULT Reason([out] [retval] Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedReason* value);
                }

                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                [exclusiveto(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession)]
                [uuid(FBF440E1-9D10-4201-B01E-C83275296F2E)]
                interface IExtendedExecutionForegroundSession : IInspectable
                    requires
                        Windows.Foundation.IClosable
                {
                    [propget] HRESULT Description([out] [retval] HSTRING* value);
                    [propput] HRESULT Description([in] HSTRING value);
                    [eventadd] HRESULT Revoked([in] Windows.Foundation.TypedEventHandler<IInspectable*, Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs*>* handler, [out] [retval] EventRegistrationToken* token);
                    [eventremove] HRESULT Revoked([in] EventRegistrationToken token);
                    HRESULT RequestExtensionAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult>** operation);
                    [propget] HRESULT Reason([out] [retval] Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason* value);
                    [propput] HRESULT Reason([in] Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason value);
                }

                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                [marshaling_behavior(agile)]
                [threading(both)]
                runtimeclass ExtendedExecutionForegroundRevokedEventArgs
                {
                    [default] interface Windows.ApplicationModel.ExtendedExecution.Foreground.IExtendedExecutionForegroundRevokedEventArgs;
                }

                [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                [marshaling_behavior(agile)]
                [threading(both)]
                runtimeclass ExtendedExecutionForegroundSession
                {
                    [default] interface Windows.ApplicationModel.ExtendedExecution.Foreground.IExtendedExecutionForegroundSession;
                    interface Windows.Foundation.IClosable;
                }
            }
        }
    }
}
