kernel32: Move MODULE_get_binary_info implementation to process.c.
[wine.git] / dlls / kernel32 / powermgnt.c
blob81e43b4ecf778f45b25e5bd7637e8fb04297d717
1 /*
2 * Copyright 1995 Thomas Sandford (tdgsandf@prds-grn.demon.co.uk)
3 * Copyright 2003 Dimitrie O. Paun
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <stdarg.h>
22 #include "windef.h"
23 #include "winbase.h"
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(powermgnt);
28 /******************************************************************************
29 * GetDevicePowerState (KERNEL32.@)
31 BOOL WINAPI GetDevicePowerState(HANDLE hDevice, BOOL* pfOn)
33 WARN("(hDevice %p pfOn %p): stub\n", hDevice, pfOn);
34 return TRUE; /* no information */
37 /***********************************************************************
38 * GetSystemPowerStatus (KERNEL32.@)
40 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS ps)
42 WARN("(%p): stub, harmless.\n", ps);
44 if (ps)
46 ps->ACLineStatus = 255;
47 ps->BatteryFlag = 255;
48 ps->BatteryLifePercent = 255;
49 ps->Reserved1 = 0;
50 ps->BatteryLifeTime = ~0u;
51 ps->BatteryFullLifeTime = ~0u;
52 return TRUE;
54 return FALSE;
57 /***********************************************************************
58 * IsSystemResumeAutomatic (KERNEL32.@)
60 BOOL WINAPI IsSystemResumeAutomatic(void)
62 WARN("(): stub, harmless.\n");
63 return FALSE;
66 /***********************************************************************
67 * RequestWakeupLatency (KERNEL32.@)
69 BOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency)
71 WARN("(): stub, harmless.\n");
72 return TRUE;
75 /***********************************************************************
76 * RequestDeviceWakeup (KERNEL32.@)
78 BOOL WINAPI RequestDeviceWakeup(HANDLE device)
80 FIXME("(%p): stub\n", device);
81 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
82 return FALSE;
85 /***********************************************************************
86 * SetSystemPowerState (KERNEL32.@)
88 BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
89 BOOL force_flag)
91 WARN("(): stub, harmless.\n");
92 return TRUE;
95 /***********************************************************************
96 * SetThreadExecutionState (KERNEL32.@)
98 * Informs the system that activity is taking place for
99 * power management purposes.
101 EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags)
103 static EXECUTION_STATE current =
104 ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT;
105 EXECUTION_STATE old = current;
107 WARN("(0x%x): stub, harmless.\n", flags);
109 if (!(current & ES_CONTINUOUS) || (flags & ES_CONTINUOUS))
110 current = flags;
111 return old;
114 /***********************************************************************
115 * PowerCreateRequest (KERNEL32.@)
117 HANDLE WINAPI PowerCreateRequest(REASON_CONTEXT *context)
119 FIXME("(%p): stub\n", context);
121 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
122 return INVALID_HANDLE_VALUE;
125 /***********************************************************************
126 * PowerSetRequest (KERNEL32.@)
128 BOOL WINAPI PowerSetRequest(HANDLE request, POWER_REQUEST_TYPE type)
130 FIXME("(%p, %u): stub\n", request, type);
132 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
133 return FALSE;
136 /***********************************************************************
137 * PowerClearRequest (KERNEL32.@)
139 BOOL WINAPI PowerClearRequest(HANDLE request, POWER_REQUEST_TYPE type)
141 FIXME("(%p, %u): stub\n", request, type);
143 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
144 return FALSE;