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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
|
/*
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
#ifndef DO_NO_IMPORTS
import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";
import "windows.applicationmodel.activation.idl";
import "windows.storage.idl";
import "windows.system.idl";
#endif
namespace Windows.ApplicationModel.Activation {
runtimeclass BackgroundActivatedEventArgs;
}
namespace Windows.ApplicationModel.Background {
runtimeclass BackgroundTaskRegistrationGroup;
}
namespace Windows.ApplicationModel.Activation {
declare {
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
}
}
namespace Windows.ApplicationModel.Background {
typedef enum BackgroundTaskCancellationReason BackgroundTaskCancellationReason;
interface IBackgroundTaskCompletedEventArgs;
interface IBackgroundTaskDeferral;
interface IBackgroundTaskProgressEventArgs;
interface IBackgroundTaskInstance;
interface IBackgroundTaskRegistration;
interface IBackgroundTaskRegistration2;
interface IBackgroundTaskRegistration3;
interface IBackgroundTaskRegistrationGroup;
interface IBackgroundTaskRegistrationGroupFactory;
interface IBackgroundTaskRegistrationStatics;
interface IBackgroundTaskRegistrationStatics2;
interface IBackgroundTrigger;
runtimeclass BackgroundTaskCompletedEventArgs;
runtimeclass BackgroundTaskDeferral;
runtimeclass BackgroundTaskProgressEventArgs;
runtimeclass BackgroundTaskRegistration;
runtimeclass BackgroundTaskRegistrationGroup;
declare {
interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *>;
interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *>;
interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum BackgroundTaskCancellationReason
{
Abort = 0,
Terminating = 1,
LoggingOff = 2,
ServicingUpdate = 3,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] IdleTask = 4,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] Uninstall = 5,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ConditionLoss = 6,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] SystemPolicy = 7,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] QuietHoursEntered = 8,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ExecutionTimeExceeded = 9,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ResourceRevocation = 10,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] EnergySaver = 11
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(a6c4bac0-51f8-4c57-ac3f-156dd1680c4f)
]
delegate
HRESULT BackgroundTaskCanceledEventHandler([in] Windows.ApplicationModel.Background.IBackgroundTaskInstance *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCancellationReason reason);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(5B38E929-A086-46A7-A678-439135822BCF)
]
delegate
HRESULT BackgroundTaskCompletedEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs *args);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(46e0683c-8a88-4c99-804c-76897f6277a6)
]
delegate
HRESULT BackgroundTaskProgressEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs *args);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs),
uuid(565d25cf-f209-48f4-9967-2b184f7bfbf0)
]
interface IBackgroundTaskCompletedEventArgs : IInspectable
{
[propget] HRESULT InstanceId([out, retval] GUID *value);
HRESULT CheckResult();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskDeferral),
uuid(93cc156d-af27-4dd3-846e-24ee40cadd25)
]
interface IBackgroundTaskDeferral : IInspectable
{
HRESULT Complete();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs),
uuid(fb1468ac-8332-4d0a-9532-03eae684da31)
]
interface IBackgroundTaskProgressEventArgs : IInspectable
{
[propget] HRESULT InstanceId([out, retval] GUID *value);
[propget] HRESULT Progress([out, retval] UINT32 *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(865bda7a-21d8-4573-8f32-928a1b0641f6)
]
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 **details);
[eventadd] HRESULT Canceled([in] Windows.ApplicationModel.Background.BackgroundTaskCanceledEventHandler *handler, [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);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(10654cc2-a26e-43bf-8c12-1fb40dbfbfa0)
]
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 cancel_task);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(6138c703-bb86-4112-afc3-7f939b166e3b)
]
interface IBackgroundTaskRegistration2 : IInspectable
requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration
{
[propget] HRESULT Trigger([out, retval] Windows.ApplicationModel.Background.IBackgroundTrigger **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
uuid(fe338195-9423-4d8b-830d-b1dd2c7badd5)
]
interface IBackgroundTaskRegistration3 : IInspectable
requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration
{
[propget] HRESULT TaskGroup([out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup),
uuid(2ab1919a-871b-4167-8a76-055cd67b5b23)
]
interface IBackgroundTaskRegistrationGroup : IInspectable
{
[propget] HRESULT Id([out, retval] HSTRING *value);
[propget] HRESULT Name([out, retval] HSTRING *value);
[eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token);
[propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *> **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup),
uuid(83d92b69-44cf-4631-9740-03c7d8741bc5)
]
interface IBackgroundTaskRegistrationGroupFactory : IInspectable
{
HRESULT Create([in] HSTRING id, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group);
HRESULT CreateWithName([in] HSTRING id, [in] HSTRING name, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration),
uuid(4c542f69-b000-42ba-a093-6a563c65e3f8)
]
interface IBackgroundTaskRegistrationStatics : IInspectable
{
[propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *> **tasks);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration),
uuid(174b671e-b20d-4fa9-ad9a-e93ad6c71e01)
]
interface IBackgroundTaskRegistrationStatics2 : IInspectable
{
[propget] HRESULT AllTaskGroups([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *> **value);
HRESULT GetTaskGroup([in] HSTRING groupId, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(84b3a058-6027-4b87-9790-bdf3f757dbd7)
]
interface IBackgroundTrigger : IInspectable
{
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskCompletedEventArgs
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskCompletedEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(mta)
]
runtimeclass BackgroundTaskDeferral
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskDeferral;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskProgressEventArgs
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskProgressEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics2, Windows.Foundation.UniversalApiContract, 4.0),
threading(both)
]
runtimeclass BackgroundTaskRegistration
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration2;
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration3;
}
[
activatable(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroupFactory, Windows.Foundation.UniversalApiContract, 4.0),
contract(Windows.Foundation.UniversalApiContract, 4.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskRegistrationGroup
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroup;
}
}
|