Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.8 KiB

  1. #ifndef __POWERCFG_H
  2. #define __POWERCFG_H
  3. /*++
  4. Copyright (c) 2001 Microsoft Corporation
  5. Module Name:
  6. powercfg.h
  7. Abstract:
  8. Allows users to view and modify power schemes and system power settings
  9. from the command line. May be useful in unattended configuration and
  10. for headless systems.
  11. Author:
  12. Ben Hertzberg (t-benher) 1-Jun-2001
  13. Revision History:
  14. Ben Hertzberg (t-benher) 4-Jun-2001 - import/export added
  15. Ben Hertzberg (t-benher) 1-Jun-2001 - created it.
  16. --*/
  17. #include <tchar.h>
  18. // main options
  19. #define CMDOPTION_LIST _T( "l|list" )
  20. #define CMDOPTION_QUERY _T( "q|query" )
  21. #define CMDOPTION_CREATE _T( "c|create" )
  22. #define CMDOPTION_DELETE _T( "d|delete" )
  23. #define CMDOPTION_SETACTIVE _T( "s|setactive" )
  24. #define CMDOPTION_CHANGE _T( "x|change" )
  25. #define CMDOPTION_HIBERNATE _T( "h|hibernate" )
  26. #define CMDOPTION_EXPORT _T( "e|export" )
  27. #define CMDOPTION_IMPORT _T( "i|import" )
  28. #define CMDOPTION_USAGE _T( "?|help" )
  29. // 'change' sub-options
  30. #define CMDOPTION_MONITOR_OFF_AC _T( "monitor-timeout-ac" )
  31. #define CMDOPTION_MONITOR_OFF_DC _T( "monitor-timeout-dc" )
  32. #define CMDOPTION_DISK_OFF_AC _T( "disk-timeout-ac" )
  33. #define CMDOPTION_DISK_OFF_DC _T( "disk-timeout-dc" )
  34. #define CMDOPTION_STANDBY_AC _T( "standby-timeout-ac" )
  35. #define CMDOPTION_STANDBY_DC _T( "standby-timeout-dc" )
  36. #define CMDOPTION_HIBER_AC _T( "hibernate-timeout-ac" )
  37. #define CMDOPTION_HIBER_DC _T( "hibernate-timeout-dc" )
  38. #define CMDOPTION_THROTTLE_AC _T( "processor-throttle-ac" )
  39. #define CMDOPTION_THROTTLE_DC _T( "processor-throttle-dc" )
  40. // 'import' / 'export' sub-options
  41. #define CMDOPTION_FILE _T( "f|file" )
  42. // main option indicies
  43. #define CMDINDEX_LIST 0
  44. #define CMDINDEX_QUERY 1
  45. #define CMDINDEX_CREATE 2
  46. #define CMDINDEX_DELETE 3
  47. #define CMDINDEX_SETACTIVE 4
  48. #define CMDINDEX_CHANGE 5
  49. #define CMDINDEX_HIBERNATE 6
  50. #define CMDINDEX_EXPORT 7
  51. #define CMDINDEX_IMPORT 8
  52. #define CMDINDEX_USAGE 9
  53. #define NUM_MAIN_CMDS 10 // max(main option CMDINDEX_xxx) + 1
  54. // 'change' sub-option indices
  55. #define CMDINDEX_MONITOR_OFF_AC 10
  56. #define CMDINDEX_MONITOR_OFF_DC 11
  57. #define CMDINDEX_DISK_OFF_AC 12
  58. #define CMDINDEX_DISK_OFF_DC 13
  59. #define CMDINDEX_STANDBY_AC 14
  60. #define CMDINDEX_STANDBY_DC 15
  61. #define CMDINDEX_HIBER_AC 16
  62. #define CMDINDEX_HIBER_DC 17
  63. #define CMDINDEX_THROTTLE_AC 18
  64. #define CMDINDEX_THROTTLE_DC 19
  65. #define CMDINDEX_FILE 20
  66. #define NUM_CMDS 21 // max(any CMDINDEX_xxx) + 1
  67. // Other constants
  68. // Exit values
  69. #define EXIT_SUCCESS 0
  70. #define EXIT_FAILURE 1
  71. #endif