Consolidate all kernel power management functions.
[wine/multimedia.git] / dlls / kernel / powermgnt.c
blobd1f3847e027913e47da45db99550f232cd29a565
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include "winbase.h"
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(powermgnt);
25 /******************************************************************************
26 * GetDevicePowerState (KERNEL32.@)
28 BOOL WINAPI GetDevicePowerState(HANDLE hDevice, BOOL* pfOn)
30 FIXME("(hDevice %p pfOn %p): stub\n", hDevice, pfOn);
31 return TRUE; /* no information */
34 /***********************************************************************
35 * GetSystemPowerStatus (KERNEL32.@)
37 BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr)
39 FIXME("(): stub, harmless.\n");
40 return FALSE; /* no power management support */
43 /***********************************************************************
44 * IsSystemResumeAutomatic (KERNEL32.@)
46 BOOL WINAPI IsSystemResumeAutomatic(void)
48 FIXME("(): stub, harmless.\n");
49 return FALSE;
52 /***********************************************************************
53 * RequestWakeupLatency (KERNEL32.@)
55 BOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency)
57 FIXME("(): stub, harmless.\n");
58 return TRUE;
61 /***********************************************************************
62 * SetSystemPowerState (KERNEL32.@)
64 BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
65 BOOL force_flag)
67 FIXME("(): stub, harmless.\n");
68 /* suspend_or_hibernate flag: w95 does not support
69 this feature anyway */
71 for ( ;0; )
73 if ( force_flag )
76 else
80 return TRUE;
83 /***********************************************************************
84 * SetThreadExecutionState (KERNEL32.@)
86 * Informs the system that activity is taking place for
87 * power management purposes.
89 EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags)
91 static EXECUTION_STATE current =
92 ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT;
93 EXECUTION_STATE old = current;
95 FIXME("(0x%lx): stub, harmless.\n", flags);
97 if (!(current & ES_CONTINUOUS) || (flags & ES_CONTINUOUS))
98 current = flags;
99 return old;