/
WindowsApplicationModelExtendedExecutionForeground.h
107 lines (87 loc) · 4.4 KB
/
WindowsApplicationModelExtendedExecutionForeground.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//******************************************************************************
//
// Copyright (c) Microsoft. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//******************************************************************************
// WindowsApplicationModelExtendedExecutionForeground.h
// Generated from winmd2objc
#pragma once
#ifndef OBJCUWPWINDOWSAPPLICATIONMODELEXTENDEDEXECUTIONFOREGROUNDEXPORT
#define OBJCUWPWINDOWSAPPLICATIONMODELEXTENDEDEXECUTIONFOREGROUNDEXPORT __declspec(dllimport)
#ifndef IN_WinObjC_Frameworks_UWP_BUILD
#pragma comment(lib, "ObjCUWPWindowsApplicationModelExtendedExecutionForeground.lib")
#endif
#endif
#include <UWP/interopBase.h>
@class WAEFExtendedExecutionForegroundRevokedEventArgs, WAEFExtendedExecutionForegroundSession;
@protocol WAEFIExtendedExecutionForegroundRevokedEventArgs, WAEFIExtendedExecutionForegroundSession;
// Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult
enum _WAEFExtendedExecutionForegroundResult {
WAEFExtendedExecutionForegroundResultAllowed = 0,
WAEFExtendedExecutionForegroundResultDenied = 1,
};
typedef unsigned WAEFExtendedExecutionForegroundResult;
// Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedReason
enum _WAEFExtendedExecutionForegroundRevokedReason {
WAEFExtendedExecutionForegroundRevokedReasonResumed = 0,
WAEFExtendedExecutionForegroundRevokedReasonSystemPolicy = 1,
};
typedef unsigned WAEFExtendedExecutionForegroundRevokedReason;
// Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason
enum _WAEFExtendedExecutionForegroundReason {
WAEFExtendedExecutionForegroundReasonUnspecified = 0,
WAEFExtendedExecutionForegroundReasonSavingData = 1,
WAEFExtendedExecutionForegroundReasonBackgroundAudio = 2,
WAEFExtendedExecutionForegroundReasonUnconstrained = 3,
};
typedef unsigned WAEFExtendedExecutionForegroundReason;
#include "WindowsFoundation.h"
#import <Foundation/Foundation.h>
// Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs
#ifndef __WAEFExtendedExecutionForegroundRevokedEventArgs_DEFINED__
#define __WAEFExtendedExecutionForegroundRevokedEventArgs_DEFINED__
OBJCUWPWINDOWSAPPLICATIONMODELEXTENDEDEXECUTIONFOREGROUNDEXPORT
@interface WAEFExtendedExecutionForegroundRevokedEventArgs : RTObject
#if defined(__cplusplus)
+ (instancetype)createWith:(IInspectable*)obj __attribute__ ((ns_returns_autoreleased));
#endif
@property (readonly) WAEFExtendedExecutionForegroundRevokedReason reason;
@end
#endif // __WAEFExtendedExecutionForegroundRevokedEventArgs_DEFINED__
// Windows.Foundation.IClosable
#ifndef __WFIClosable_DEFINED__
#define __WFIClosable_DEFINED__
@protocol WFIClosable
- (void)close;
@end
OBJCUWPWINDOWSAPPLICATIONMODELEXTENDEDEXECUTIONFOREGROUNDEXPORT
@interface WFIClosable : RTObject <WFIClosable>
@end
#endif // __WFIClosable_DEFINED__
// Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession
#ifndef __WAEFExtendedExecutionForegroundSession_DEFINED__
#define __WAEFExtendedExecutionForegroundSession_DEFINED__
OBJCUWPWINDOWSAPPLICATIONMODELEXTENDEDEXECUTIONFOREGROUNDEXPORT
@interface WAEFExtendedExecutionForegroundSession : RTObject <WFIClosable>
+ (instancetype)make __attribute__ ((ns_returns_retained));
#if defined(__cplusplus)
+ (instancetype)createWith:(IInspectable*)obj __attribute__ ((ns_returns_autoreleased));
#endif
@property WAEFExtendedExecutionForegroundReason reason;
@property (retain) NSString * Description;
- (EventRegistrationToken)addRevokedEvent:(void(^)(RTObject*, WAEFExtendedExecutionForegroundRevokedEventArgs*))del;
- (void)removeRevokedEvent:(EventRegistrationToken)tok;
- (void)requestExtensionAsyncWithSuccess:(void (^)(WAEFExtendedExecutionForegroundResult))success failure:(void (^)(NSError*))failure;
- (void)close;
@end
#endif // __WAEFExtendedExecutionForegroundSession_DEFINED__