• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • tdehw
tderootsystemdevice.h
1/* This file is part of the TDE libraries
2 Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
3 (C) 2013 Golubev Alexander <fatzer2@gmail.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef _TDEROOTSYSTEMDEVICE_H
21#define _TDEROOTSYSTEMDEVICE_H
22
23#include "tdegenericdevice.h"
24#include "tdehwcommontypes.h"
25
26namespace TDESystemFormFactor {
27enum TDESystemFormFactor {
28 Unclassified,
29 Desktop,
30 Laptop,
31 Server,
32 Other = 0x80000000
33};
34};
35
36namespace TDESystemPowerState {
37enum TDESystemPowerState {
38 Active,
39 Standby,
40 Freeze,
41 Suspend,
42 Hibernate,
43 PowerOff,
44 Reboot,
45 HybridSuspend,
46 Disk // Used temporarily to detect hibernation and hybrid suspend capability
47};
48};
49
50namespace TDESystemHibernationMethod {
51enum TDESystemHibernationMethod {
52 Unsupported,
53 Platform,
54 Shutdown,
55 Reboot,
56 TestProc,
57 Test,
58 Suspend
59};
60};
61
62typedef TQValueList<TDESystemPowerState::TDESystemPowerState> TDESystemPowerStateList;
63typedef TQValueList<TDESystemHibernationMethod::TDESystemHibernationMethod> TDESystemHibernationMethodList;
64
65class TDECORE_EXPORT TDERootSystemDevice : public TDEGenericDevice
66{
67 public:
72 TDERootSystemDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null);
73
77 ~TDERootSystemDevice();
78
82 TDESystemFormFactor::TDESystemFormFactor formFactor();
83
87 TDESystemPowerStateList powerStates();
88
92 TDESystemHibernationMethodList hibernationMethods();
93
97 TDESystemHibernationMethod::TDESystemHibernationMethod hibernationMethod();
98
102 unsigned long diskSpaceNeededForHibernation();
103
107 bool canSetHibernationMethod();
108
112 bool canStandby();
113
117 bool canFreeze();
118
122 bool canSuspend();
123
127 bool canHibernate();
128
132 bool canHybridSuspend();
133
137 bool canPowerOff();
138
142 bool canReboot();
143
147 void setHibernationMethod(TDESystemHibernationMethod::TDESystemHibernationMethod hm);
148
153 bool setPowerState(TDESystemPowerState::TDESystemPowerState ps);
154
155 protected:
160 void internalSetFormFactor(TDESystemFormFactor::TDESystemFormFactor ff);
161
166 void internalSetPowerStates(TDESystemPowerStateList ps);
167
172 void internalSetHibernationMethods(TDESystemHibernationMethodList hm);
173
178 void internalSetHibernationMethod(TDESystemHibernationMethod::TDESystemHibernationMethod hm);
179
184 void internalSetDiskSpaceNeededForHibernation(unsigned long sz);
185
186 private:
187 TDESystemFormFactor::TDESystemFormFactor m_formFactor;
188 TDESystemPowerStateList m_powerStates;
189 TDESystemHibernationMethodList m_hibernationMethods;
190 TDESystemHibernationMethod::TDESystemHibernationMethod m_hibernationMethod;
191 unsigned long m_hibernationSpace;
192
193 friend class TDEHardwareDevices;
194};
195
196#endif // _TDEROOTSYSTEMDEVICE_H
Test

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.