This file is indexed.

/usr/i686-w64-mingw32/include/powrprof.h is in mingw-w64-i686-dev 2.0.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the w64 mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#ifdef __cplusplus
extern "C" {
#endif

  typedef struct _GLOBAL_MACHINE_POWER_POLICY{
    ULONG Revision;
    SYSTEM_POWER_STATE LidOpenWakeAc;
    SYSTEM_POWER_STATE LidOpenWakeDc;
    ULONG BroadcastCapacityResolution;
  } GLOBAL_MACHINE_POWER_POLICY,*PGLOBAL_MACHINE_POWER_POLICY;

  typedef struct _GLOBAL_USER_POWER_POLICY{
    ULONG Revision;
    POWER_ACTION_POLICY PowerButtonAc;
    POWER_ACTION_POLICY PowerButtonDc;
    POWER_ACTION_POLICY SleepButtonAc;
    POWER_ACTION_POLICY SleepButtonDc;
    POWER_ACTION_POLICY LidCloseAc;
    POWER_ACTION_POLICY LidCloseDc;
    SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
    ULONG GlobalFlags;
  } GLOBAL_USER_POWER_POLICY,*PGLOBAL_USER_POWER_POLICY;

  typedef struct _GLOBAL_POWER_POLICY{
    GLOBAL_USER_POWER_POLICY user;
    GLOBAL_MACHINE_POWER_POLICY mach;
  } GLOBAL_POWER_POLICY,*PGLOBAL_POWER_POLICY;

  typedef struct _MACHINE_POWER_POLICY{
    ULONG Revision;
    SYSTEM_POWER_STATE MinSleepAc;
    SYSTEM_POWER_STATE MinSleepDc;
    SYSTEM_POWER_STATE ReducedLatencySleepAc;
    SYSTEM_POWER_STATE ReducedLatencySleepDc;
    ULONG DozeTimeoutAc;
    ULONG DozeTimeoutDc;
    ULONG DozeS4TimeoutAc;
    ULONG DozeS4TimeoutDc;
    UCHAR MinThrottleAc;
    UCHAR MinThrottleDc;
    UCHAR pad1[2];
    POWER_ACTION_POLICY OverThrottledAc;
    POWER_ACTION_POLICY OverThrottledDc;
  } MACHINE_POWER_POLICY,*PMACHINE_POWER_POLICY;

  typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
    ULONG Revision;
    PROCESSOR_POWER_POLICY ProcessorPolicyAc;
    PROCESSOR_POWER_POLICY ProcessorPolicyDc;
  } MACHINE_PROCESSOR_POWER_POLICY,*PMACHINE_PROCESSOR_POWER_POLICY;

  typedef struct _USER_POWER_POLICY{
    ULONG Revision;
    POWER_ACTION_POLICY IdleAc;
    POWER_ACTION_POLICY IdleDc;
    ULONG IdleTimeoutAc;
    ULONG IdleTimeoutDc;
    UCHAR IdleSensitivityAc;
    UCHAR IdleSensitivityDc;
    UCHAR ThrottlePolicyAc;
    UCHAR ThrottlePolicyDc;
    SYSTEM_POWER_STATE MaxSleepAc;
    SYSTEM_POWER_STATE MaxSleepDc;
    ULONG Reserved[2];
    ULONG VideoTimeoutAc;
    ULONG VideoTimeoutDc;
    ULONG SpindownTimeoutAc;
    ULONG SpindownTimeoutDc;
    BOOLEAN OptimizeForPowerAc;
    BOOLEAN OptimizeForPowerDc;
    UCHAR FanThrottleToleranceAc;
    UCHAR FanThrottleToleranceDc;
    UCHAR ForcedThrottleAc;
    UCHAR ForcedThrottleDc;
  } USER_POWER_POLICY,*PUSER_POWER_POLICY;

  typedef struct _POWER_POLICY{
    USER_POWER_POLICY user;
    MACHINE_POWER_POLICY mach;
  } POWER_POLICY,*PPOWER_POLICY;

#define EnableSysTrayBatteryMeter 0x01
#define EnableMultiBatteryDisplay 0x02
#define EnablePasswordLogon 0x04
#define EnableWakeOnRing 0x08
#define EnableVideoDimDisplay 0x10

#define NEWSCHEME (UINT)-1

  typedef BOOLEAN (CALLBACK *PWRSCHEMESENUMPROC)(UINT,DWORD,LPTSTR,DWORD,LPTSTR,PPOWER_POLICY,LPARAM);
  typedef BOOLEAN (CALLBACK *PFNNTINITIATEPWRACTION)(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);

  BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT,PUINT);
  BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC,LPARAM);
  BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
  BOOLEAN WINAPI ReadPwrScheme(UINT,PPOWER_POLICY);
  BOOLEAN WINAPI WritePwrScheme(PUINT,LPTSTR,LPTSTR,PPOWER_POLICY);
  BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
  BOOLEAN WINAPI DeletePwrScheme(UINT);
  BOOLEAN WINAPI GetActivePwrScheme(PUINT);
  BOOLEAN WINAPI SetActivePwrScheme(UINT,PGLOBAL_POWER_POLICY,PPOWER_POLICY);
  BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
  BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
  BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
  BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
  BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
  BOOLEAN WINAPI SetSuspendState(BOOLEAN,BOOLEAN,BOOLEAN);
  BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY,PPOWER_POLICY);
  BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
  BOOLEAN WINAPI ReadProcessorPwrScheme(UINT,PMACHINE_PROCESSOR_POWER_POLICY);
  BOOLEAN WINAPI WriteProcessorPwrScheme(UINT,PMACHINE_PROCESSOR_POWER_POLICY);
  BOOLEAN WINAPI ValidatePowerPolicies(PGLOBAL_POWER_POLICY,PPOWER_POLICY);

#if (_WIN32_WINNT >= 0x0600)
#define DEVICEPOWER_HARDWAREID 0x80000000
#define DEVICEPOWER_FILTER_DEVICES_PRESENT 0x20000000
#define DEVICEPOWER_AND_OPERATION 0x40000000
#define DEVICEPOWER_FILTER_WAKEENABLED 0x08000000
#define DEVICEPOWER_FILTER_ON_NAME 0x02000000

#define PDCAP_D0_SUPPORTED 0x00000001
#define PDCAP_D1_SUPPORTED 0x00000002
#define PDCAP_D2_SUPPORTED 0x00000004
#define PDCAP_D3_SUPPORTED 0x00000008
#define PDCAP_S0_SUPPORTED 0x00010000
#define PDCAP_S1_SUPPORTED 0x00020000
#define PDCAP_S2_SUPPORTED 0x00040000
#define PDCAP_S3_SUPPORTED 0x00080000
#define PDCAP_S4_SUPPORTED 0x01000000
#define PDCAP_S5_SUPPORTED 0x02000000
#define PDCAP_WAKE_FROM_D0_SUPPORTED 0x00000010
#define PDCAP_WAKE_FROM_D1_SUPPORTED 0x00000020
#define PDCAP_WAKE_FROM_D2_SUPPORTED 0x00000040
#define PDCAP_WAKE_FROM_D3_SUPPORTED 0x00000080
#define PDCAP_WAKE_FROM_S0_SUPPORTED 0x00100000
#define PDCAP_WAKE_FROM_S1_SUPPORTED 0x00200000
#define PDCAP_WAKE_FROM_S2_SUPPORTED 0x00400000
#define PDCAP_WAKE_FROM_S3_SUPPORTED 0x00800000
#define PDCAP_WARM_EJECT_SUPPORTED 0x00000100

#define DEVICEPOWER_SET_WAKEENABLED 0x00000001
#define DEVICEPOWER_CLEAR_WAKEENABLED 0x00000002

typedef enum _POWER_DATA_ACCESSOR {
  ACCESS_AC_POWER_SETTING_INDEX   = 0,   // 0x0
  ACCESS_DC_POWER_SETTING_INDEX   = 1,   // 0x1
  ACCESS_SCHEME                   = 16,  // 0x10
  ACCESS_SUBGROUP                 = 17,  // 0x11
  ACCESS_INDIVIDUAL_SETTING       = 18,  // 0x12
  ACCESS_ACTIVE_SCHEME            = 19,  // 0x13
  ACCESS_CREATE_SCHEME            = 20   // 0x14
} POWER_DATA_ACCESSOR, *PPOWER_DATA_ACCESSOR;

BOOLEAN WINAPI DevicePowerClose(void);
BOOLEAN WINAPI DevicePowerEnumDevices(
  ULONG QueryIndex,
  ULONG QueryInterpretationFlags,
  ULONG QueryFlags,
  PBYTE pReturnBuffer,
  PULONG pBufferSize
);

BOOLEAN WINAPI DevicePowerOpen(
  ULONG Flags
);

DWORD WINAPI DevicePowerSetDeviceState(
  LPCWSTR DeviceDescription,
  ULONG SetFlags,
  LPCVOID SetData
);

DWORD WINAPI PowerCanRestoreIndividualDefaultPowerScheme(
  const GUID *SchemeGuid
);

DWORD WINAPI PowerCreatePossibleSetting(
  HKEY RootSystemPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG PossibleSettingIndex
);

DWORD WINAPI PowerCreateSetting(
  HKEY RootSystemPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid
);

DWORD WINAPI PowerDeleteScheme(
  HKEY RootPowerKey,
  const GUID *SchemeGuid
);

POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRole(void);

DWORD WINAPI PowerDuplicateScheme(
  HKEY RootPowerKey,
  const GUID *SourceSchemeGuid,
  GUID **DestinationSchemeGuid
);

DWORD WINAPI PowerEnumerate(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  POWER_DATA_ACCESSOR AccessFlags,
  ULONG Index,
  UCHAR *Buffer,
  DWORD *BufferSize
);

DWORD WINAPI PowerGetActiveScheme(
  HKEY UserRootPowerKey,
  GUID **ActivePolicyGuid
);

DWORD WINAPI PowerImportPowerScheme(
  HKEY RootPowerKey,
  LPCWSTR ImportFileNamePath,
  GUID **DestinationSchemeGuid
);

DWORD WINAPI PowerReadACDefaultIndex(
  HKEY RootPowerKey,
  const GUID *SchemePersonalityGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD AcDefaultIndex
);

DWORD WINAPI PowerReadACValue(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PULONG Type,
  LPBYTE Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadACValueIndex(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD AcValueIndex
);

DWORD WINAPI PowerReadDCDefaultIndex(
  HKEY RootPowerKey,
  const GUID *SchemePersonalityGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD DcDefaultIndex
);

DWORD WINAPI PowerReadDCValue(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PULONG Type,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadDCValueIndex(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD DcValueIndex
);

DWORD WINAPI PowerReadDescription(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadFriendlyName(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadIconResourceSpecifier(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadPossibleDescription(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG PossibleSettingIndex,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadPossibleFriendlyName(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG PossibleSettingIndex,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadPossibleValue(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  PULONG Type,
  ULONG PossibleSettingIndex,
  PUCHAR Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerReadSettingAttributes(
  const GUID *SubGroupGuid,
  const GUID *PowerSettingGuid
);

DWORD WINAPI PowerReadValueIncrement(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD ValueIncrement
);

DWORD WINAPI PowerReadValueMax(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD ValueMaximum
);

DWORD WINAPI PowerReadValueMin(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  LPDWORD ValueMinimum
);

DWORD WINAPI PowerReadValueUnitsSpecifier(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  UCHAR *Buffer,
  LPDWORD BufferSize
);

DWORD WINAPI PowerRemovePowerSetting(
  const GUID *PowerSettingSubKeyGuid,
  const GUID *PowerSettingGuid
);

DWORD WINAPI PowerReplaceDefaultPowerSchemes(void);

DWORD WINAPI PowerRestoreDefaultPowerSchemes(void);

DWORD WINAPI PowerRestoreIndividualDefaultPowerScheme(
  const GUID *SchemeGuid
);

DWORD WINAPI PowerSetActiveScheme(
  HKEY UserRootPowerKey,
  const GUID *SchemeGuid
);

DWORD WINAPI PowerSettingAccessCheck(
  POWER_DATA_ACCESSOR AccessFlags,
  const GUID *PowerGuid
);

DWORD WINAPI PowerWriteACDefaultIndex(
  HKEY RootSystemPowerKey,
  const GUID *SchemePersonalityGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD DefaultAcIndex
);

DWORD WINAPI PowerWriteACValueIndex(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD AcValueIndex
);

DWORD WINAPI PowerWriteDCDefaultIndex(
  HKEY RootSystemPowerKey,
  const GUID *SchemePersonalityGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD DefaultDcIndex
);

DWORD WINAPI PowerWriteDCValueIndex(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD DcValueIndex
);

DWORD WINAPI PowerWriteDescription(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  UCHAR *Buffer,
  DWORD BufferSize
);

DWORD WINAPI PowerWriteFriendlyName(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  UCHAR *Buffer,
  DWORD BufferSize
);

DWORD WINAPI PowerWriteIconResourceSpecifier(
  HKEY RootPowerKey,
  const GUID *SchemeGuid,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  UCHAR *Buffer,
  DWORD BufferSize
);

DWORD WINAPI PowerWritePossibleDescription(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG PossibleSettingIndex,
  UCHAR *Buffer,
  DWORD BufferSize
);

DWORD WINAPI PowerWritePossibleFriendlyName(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG PossibleSettingIndex,
  UCHAR *Buffer,
  DWORD BufferSize
);

DWORD WINAPI PowerWritePossibleValue(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  ULONG Type,
  ULONG PossibleSettingIndex,
  UCHAR *Buffer,
  DWORD BufferSize
);

#define POWER_ATTRIBUTE_HIDE 1

DWORD WINAPI PowerWriteSettingAttributes(
  const GUID *SubGroupGuid,
  const GUID *PowerSettingGuid,
  DWORD Attributes
);

DWORD WINAPI PowerWriteValueIncrement(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD ValueIncrement
);

DWORD WINAPI PowerWriteValueMax(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD ValueMaximum
);

DWORD WINAPI PowerWriteValueMin(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  DWORD ValueMinimum
);

DWORD WINAPI PowerWriteValueUnitsSpecifier(
  HKEY RootPowerKey,
  const GUID *SubGroupOfPowerSettingsGuid,
  const GUID *PowerSettingGuid,
  UCHAR *Buffer,
  DWORD BufferSize
);

#endif /*(_WIN32_WINNT >= 0x0600)*/

#ifndef NT_SUCCESS
#define NTSTATUS LONG
#define _OVERRIDE_NTSTATUS_
#endif

  NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);

#ifdef _OVERRIDE_NTSTATUS_
#undef NTSTATUS
#endif

#ifdef __cplusplus
}
#endif