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

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.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(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace ApplicationModel
    {
        namespace Background
        {
            typedef enum BackgroundAccessStatus BackgroundAccessStatus;

            typedef enum BackgroundTaskCancellationReason BackgroundTaskCancellationReason;

            typedef enum SystemTriggerType SystemTriggerType;

            typedef enum SystemConditionType SystemConditionType;

            delegate BackgroundTaskCanceledEventHandler;

            delegate BackgroundTaskProgressEventHandler;

            delegate BackgroundTaskCompletedEventHandler;

            interface IBackgroundExecutionManagerStatics;

            interface IBackgroundTaskInstance;

            interface IBackgroundTaskDeferral;

            interface IBackgroundTask;

            interface IBackgroundTaskRegistration;

            interface IBackgroundTaskRegistrationStatics;

            interface IBackgroundTaskBuilder;

            interface IBackgroundTrigger;

            interface IBackgroundCondition;

            interface IBackgroundTaskCompletedEventArgs;

            interface IBackgroundTaskProgressEventArgs;

            interface ISystemTrigger;

            interface ISystemTriggerFactory;

            interface ISystemCondition;

            interface ISystemConditionFactory;

            interface INetworkOperatorNotificationTrigger;

            interface INetworkOperatorNotificationTriggerFactory;

            interface ITimeTrigger;

            interface ITimeTriggerFactory;

            interface IMaintenanceTrigger;

            interface IMaintenanceTriggerFactory;

            interface INetworkOperatorHotspotAuthenticationTrigger;

            interface IPushNotificationTriggerFactory;

            runtimeclass BackgroundExecutionManager;

            runtimeclass BackgroundTaskRegistration;

            runtimeclass BackgroundTaskDeferral;

            runtimeclass BackgroundTaskProgressEventArgs;

            runtimeclass BackgroundTaskCompletedEventArgs;

            runtimeclass BackgroundTaskBuilder;

            runtimeclass SystemTrigger;

            runtimeclass SystemCondition;

            runtimeclass NetworkOperatorNotificationTrigger;

            runtimeclass TimeTrigger;

            runtimeclass MaintenanceTrigger;

            runtimeclass NetworkOperatorHotspotAuthenticationTrigger;

            runtimeclass PushNotificationTrigger;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace ApplicationModel
    {
        namespace Background
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration*>*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration*>*>;

                interface Windows.Foundation.Collections.IKeyValuePair<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration*>;

                interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration*>;

                interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace ApplicationModel
    {
        namespace Background
        {
            [version(0x06020000)]
            enum BackgroundAccessStatus
            {
                Unspecified                             = 0,
                AllowedWithAlwaysOnRealTimeConnectivity = 1,
                AllowedMayUseActiveRealTimeConnectivity = 2,
                Denied                                  = 3
            };

            [version(0x06020000)]
            enum BackgroundTaskCancellationReason
            {
                Abort           = 0,
                Terminating     = 1,
                LoggingOff      = 2,
                ServicingUpdate = 3
            };

            [version(0x06020000)]
            enum SystemTriggerType
            {
                Invalid                      = 0,
                SmsReceived                  = 1,
                UserPresent                  = 2,
                UserAway                     = 3,
                NetworkStateChange           = 4,
                ControlChannelReset          = 5,
                InternetAvailable            = 6,
                SessionConnected             = 7,
                ServicingComplete            = 8,
                LockScreenApplicationAdded   = 9,
                LockScreenApplicationRemoved = 10,
                TimeZoneChange               = 11,
                OnlineIdConnectedStateChange = 12
            };

            [version(0x06020000)]
            enum SystemConditionType
            {
                Invalid              = 0,
                UserPresent          = 1,
                UserNotPresent       = 2,
                InternetAvailable    = 3,
                InternetNotAvailable = 4,
                SessionConnected     = 5,
                SessionDisconnected  = 6
            };

            [uuid(A6C4BAC0-51F8-4C57-AC3F-156DD1680C4F)]
            [version(0x06020000)]
            delegate
                HRESULT BackgroundTaskCanceledEventHandler([in] Windows.ApplicationModel.Background.IBackgroundTaskInstance* sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCancellationReason reason);

            [uuid(46E0683C-8A88-4C99-804C-76897F6277A6)]
            [version(0x06020000)]
            delegate
                HRESULT BackgroundTaskProgressEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration* sender, [in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs* args);

            [uuid(5B38E929-A086-46A7-A678-439135822BCF)]
            [version(0x06020000)]
            delegate
                HRESULT BackgroundTaskCompletedEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration* sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs* args);

            [uuid(E826EA58-66A9-4D41-83D4-B4C18C87B846)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundExecutionManager)]
            [version(0x06020000)]
            interface IBackgroundExecutionManagerStatics : IInspectable
            {
                [overload("RequestAccessAsync")] HRESULT RequestAccessAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>** operation);
                [overload("RequestAccessAsync")] HRESULT RequestAccessForApplicationAsync([in] HSTRING applicationId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>** operation);
                [overload("RemoveAccess")] HRESULT RemoveAccess();
                [overload("RemoveAccess")] HRESULT RemoveAccessForApplication([in] HSTRING applicationId);
                [overload("GetAccessStatus")] HRESULT GetAccessStatus([out] [retval] Windows.ApplicationModel.Background.BackgroundAccessStatus* status);
                [overload("GetAccessStatus")] HRESULT GetAccessStatusForApplication([in] HSTRING applicationId, [out] [retval] Windows.ApplicationModel.Background.BackgroundAccessStatus* status);
            }

            [uuid(865BDA7A-21D8-4573-8F32-928A1B0641F6)]
            [version(0x06020000)]
            interface IBackgroundTaskInstance : IInspectable
            {
                [propget] HRESULT InstanceId([out] [retval] GUID* value);
                [propget] HRESULT Task([out] [retval] Windows.ApplicationModel.Background.BackgroundTaskRegistration** task);
                [propget] HRESULT Progress([out] [retval] UINT32* value);
                [propput] HRESULT Progress([in] UINT32 value);
                [propget] HRESULT TriggerDetails([out] [retval] IInspectable** triggerDetails);
                [eventadd] HRESULT Canceled([in] Windows.ApplicationModel.Background.BackgroundTaskCanceledEventHandler* cancelHandler, [out] [retval] EventRegistrationToken* cookie);
                [eventremove] HRESULT Canceled([in] EventRegistrationToken cookie);
                [propget] HRESULT SuspendedCount([out] [retval] UINT32* value);
                HRESULT GetDeferral([out] [retval] Windows.ApplicationModel.Background.BackgroundTaskDeferral** deferral);
            }

            [uuid(93CC156D-AF27-4DD3-846E-24EE40CADD25)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskDeferral)]
            [version(0x06020000)]
            interface IBackgroundTaskDeferral : IInspectable
            {
                HRESULT Complete();
            }

            [uuid(7D13D534-FD12-43CE-8C22-EA1FF13C06DF)]
            [version(0x06020000)]
            interface IBackgroundTask : IInspectable
            {
                HRESULT Run([in] Windows.ApplicationModel.Background.IBackgroundTaskInstance* taskInstance);
            }

            [uuid(10654CC2-A26E-43BF-8C12-1FB40DBFBFA0)]
            [version(0x06020000)]
            interface IBackgroundTaskRegistration : IInspectable
            {
                [propget] HRESULT TaskId([out] [retval] GUID* value);
                [propget] HRESULT Name([out] [retval] HSTRING* value);
                [eventadd] HRESULT Progress([in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventHandler* handler, [out] [retval] EventRegistrationToken* cookie);
                [eventremove] HRESULT Progress([in] EventRegistrationToken cookie);
                [eventadd] HRESULT Completed([in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventHandler* handler, [out] [retval] EventRegistrationToken* cookie);
                [eventremove] HRESULT Completed([in] EventRegistrationToken cookie);
                HRESULT Unregister([in] boolean cancelTask);
            }

            [uuid(4C542F69-B000-42BA-A093-6A563C65E3F8)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration)]
            interface IBackgroundTaskRegistrationStatics : IInspectable
            {
                [propget] HRESULT AllTasks([out] [retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration*>** tasks);
            }

            [uuid(0351550E-3E64-4572-A93A-84075A37C917)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskBuilder)]
            interface IBackgroundTaskBuilder : IInspectable
            {
                [propput] HRESULT TaskEntryPoint([in] HSTRING value);
                [propget] HRESULT TaskEntryPoint([out] [retval] HSTRING* value);
                HRESULT SetTrigger([in] Windows.ApplicationModel.Background.IBackgroundTrigger* trigger);
                HRESULT AddCondition([in] Windows.ApplicationModel.Background.IBackgroundCondition* condition);
                [propput] HRESULT Name([in] HSTRING value);
                [propget] HRESULT Name([out] [retval] HSTRING* value);
                HRESULT Register([out] [retval] Windows.ApplicationModel.Background.BackgroundTaskRegistration** task);
            }

            [uuid(84B3A058-6027-4B87-9790-BDF3F757DBD7)]
            [version(0x06020000)]
            interface IBackgroundTrigger : IInspectable
            {
            }

            [uuid(AE48A1EE-8951-400A-8302-9C9C9A2A3A3B)]
            [version(0x06020000)]
            interface IBackgroundCondition : IInspectable
            {
            }

            [uuid(565D25CF-F209-48F4-9967-2B184F7BFBF0)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs)]
            interface IBackgroundTaskCompletedEventArgs : IInspectable
            {
                [propget] HRESULT InstanceId([out] [retval] GUID* value);
                HRESULT CheckResult();
            }

            [uuid(FB1468AC-8332-4D0A-9532-03EAE684DA31)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs)]
            interface IBackgroundTaskProgressEventArgs : IInspectable
            {
                [propget] HRESULT InstanceId([out] [retval] GUID* value);
                [propget] HRESULT Progress([out] [retval] UINT32* value);
            }

            [uuid(1D80C776-3748-4463-8D7E-276DC139AC1C)]
            [exclusiveto(Windows.ApplicationModel.Background.SystemTrigger)]
            [version(0x06020000)]
            interface ISystemTrigger : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundTrigger
            {
                [propget] HRESULT OneShot([out] [retval] boolean* oneShot);
                [propget] HRESULT TriggerType([out] [retval] Windows.ApplicationModel.Background.SystemTriggerType* triggerType);
            }

            [uuid(E80423D4-8791-4579-8126-87EC8AAA407A)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.SystemTrigger)]
            interface ISystemTriggerFactory : IInspectable
            {
                HRESULT Create([in] Windows.ApplicationModel.Background.SystemTriggerType triggerType, [in] boolean oneShot, [out] [retval] Windows.ApplicationModel.Background.SystemTrigger** trigger);
            }

            [uuid(C15FB476-89C5-420B-ABD3-FB3030472128)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.SystemCondition)]
            interface ISystemCondition : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundCondition
            {
                [propget] HRESULT ConditionType([out] [retval] Windows.ApplicationModel.Background.SystemConditionType* conditionType);
            }

            [uuid(D269D1F1-05A7-49AE-87D7-16B2B8B9A553)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.SystemCondition)]
            interface ISystemConditionFactory : IInspectable
            {
                HRESULT Create([in] Windows.ApplicationModel.Background.SystemConditionType conditionType, [out] [retval] Windows.ApplicationModel.Background.SystemCondition** condition);
            }

            [uuid(90089CC6-63CD-480C-95D1-6E6AEF801E4A)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.NetworkOperatorNotificationTrigger)]
            interface INetworkOperatorNotificationTrigger : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundTrigger
            {
                [propget] HRESULT NetworkAccountId([out] [retval] HSTRING* value);
            }

            [uuid(0A223E00-27D7-4353-ADB9-9265AAEA579D)]
            [exclusiveto(Windows.ApplicationModel.Background.NetworkOperatorNotificationTrigger)]
            [version(0x06020000)]
            interface INetworkOperatorNotificationTriggerFactory : IInspectable
            {
                HRESULT Create([in] HSTRING networkAccountId, [out] [retval] Windows.ApplicationModel.Background.NetworkOperatorNotificationTrigger** trigger);
            }

            [uuid(656E5556-0B2A-4377-BA70-3B45A935547F)]
            [exclusiveto(Windows.ApplicationModel.Background.TimeTrigger)]
            [version(0x06020000)]
            interface ITimeTrigger : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundTrigger
            {
                [propget] HRESULT FreshnessTime([out] [retval] UINT32* freshnessTime);
                [propget] HRESULT OneShot([out] [retval] boolean* oneShot);
            }

            [uuid(38C682FE-9B54-45E6-B2F3-269B87A6F734)]
            [exclusiveto(Windows.ApplicationModel.Background.TimeTrigger)]
            [version(0x06020000)]
            interface ITimeTriggerFactory : IInspectable
            {
                HRESULT Create([in] UINT32 freshnessTime, [in] boolean oneShot, [out] [retval] Windows.ApplicationModel.Background.TimeTrigger** trigger);
            }

            [uuid(68184C83-FC22-4CE5-841A-7239A9810047)]
            [exclusiveto(Windows.ApplicationModel.Background.MaintenanceTrigger)]
            [version(0x06020000)]
            interface IMaintenanceTrigger : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundTrigger
            {
                [propget] HRESULT FreshnessTime([out] [retval] UINT32* freshnessTime);
                [propget] HRESULT OneShot([out] [retval] boolean* oneShot);
            }

            [uuid(4B3DDB2E-97DD-4629-88B0-B06CF9482AE5)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.MaintenanceTrigger)]
            interface IMaintenanceTriggerFactory : IInspectable
            {
                HRESULT Create([in] UINT32 freshnessTime, [in] boolean oneShot, [out] [retval] Windows.ApplicationModel.Background.MaintenanceTrigger** trigger);
            }

            [uuid(E756C791-3001-4DE5-83C7-DE61D88831D0)]
            [exclusiveto(Windows.ApplicationModel.Background.NetworkOperatorHotspotAuthenticationTrigger)]
            [version(0x06020000)]
            interface INetworkOperatorHotspotAuthenticationTrigger : IInspectable
                requires
                    Windows.ApplicationModel.Background.IBackgroundTrigger
            {
            }

            [uuid(6DD8ED1B-458E-4FC2-BC2E-D5664F77ED19)]
            [version(0x06020000)]
            [exclusiveto(Windows.ApplicationModel.Background.PushNotificationTrigger)]
            interface IPushNotificationTriggerFactory : IInspectable
            {
                HRESULT Create([in] HSTRING applicationId, [out] [retval] Windows.ApplicationModel.Background.PushNotificationTrigger** trigger);
            }

            [static(Windows.ApplicationModel.Background.IBackgroundExecutionManagerStatics, 0x06020000)]
            [version(0x06020000)]
            runtimeclass BackgroundExecutionManager
            {
            }

            [version(0x06020000)]
            [static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics, 0x06020000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass BackgroundTaskRegistration
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration;
            }

            [version(0x06020000)]
            [threading(mta)]
            [marshaling_behavior(standard)]
            runtimeclass BackgroundTaskDeferral
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTaskDeferral;
            }

            [threading(both)]
            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass BackgroundTaskProgressEventArgs
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTaskProgressEventArgs;
            }

            [version(0x06020000)]
            [threading(both)]
            [marshaling_behavior(agile)]
            runtimeclass BackgroundTaskCompletedEventArgs
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTaskCompletedEventArgs;
            }

            [marshaling_behavior(standard)]
            [threading(mta)]
            [version(0x06020000)]
            [activatable(0x06020000)]
            runtimeclass BackgroundTaskBuilder
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTaskBuilder;
            }

            [version(0x06020000)]
            [marshaling_behavior(standard)]
            [activatable(Windows.ApplicationModel.Background.ISystemTriggerFactory, 0x06020000)]
            [threading(mta)]
            runtimeclass SystemTrigger
            {
                [default] interface Windows.ApplicationModel.Background.ISystemTrigger;
                interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }

            [activatable(Windows.ApplicationModel.Background.ISystemConditionFactory, 0x06020000)]
            [version(0x06020000)]
            [threading(mta)]
            [marshaling_behavior(standard)]
            runtimeclass SystemCondition
            {
                [default] interface Windows.ApplicationModel.Background.ISystemCondition;
                interface Windows.ApplicationModel.Background.IBackgroundCondition;
            }

            [marshaling_behavior(standard)]
            [activatable(Windows.ApplicationModel.Background.INetworkOperatorNotificationTriggerFactory, 0x06020000)]
            [threading(mta)]
            [version(0x06020000)]
            runtimeclass NetworkOperatorNotificationTrigger
            {
                [default] interface Windows.ApplicationModel.Background.INetworkOperatorNotificationTrigger;
                interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }

            [version(0x06020000)]
            [activatable(Windows.ApplicationModel.Background.ITimeTriggerFactory, 0x06020000)]
            [marshaling_behavior(standard)]
            [threading(mta)]
            runtimeclass TimeTrigger
            {
                [default] interface Windows.ApplicationModel.Background.ITimeTrigger;
                interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }

            [threading(mta)]
            [version(0x06020000)]
            [activatable(Windows.ApplicationModel.Background.IMaintenanceTriggerFactory, 0x06020000)]
            [marshaling_behavior(standard)]
            runtimeclass MaintenanceTrigger
            {
                [default] interface Windows.ApplicationModel.Background.IMaintenanceTrigger;
                interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }

            [threading(mta)]
            [marshaling_behavior(standard)]
            [activatable(0x06020000)]
            [version(0x06020000)]
            runtimeclass NetworkOperatorHotspotAuthenticationTrigger
            {
                [default] interface Windows.ApplicationModel.Background.INetworkOperatorHotspotAuthenticationTrigger;
                interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }

            [activatable(0x06020000)]
            [threading(mta)]
            [version(0x06020000)]
            [activatable(Windows.ApplicationModel.Background.IPushNotificationTriggerFactory, 0x06020000)]
            runtimeclass PushNotificationTrigger
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTrigger;
            }
        }
    }
}
