• 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 
26 namespace TDESystemFormFactor {
27 enum TDESystemFormFactor {
28  Unclassified,
29  Desktop,
30  Laptop,
31  Server,
32  Other = 0x80000000
33 };
34 };
35 
36 namespace TDESystemPowerState {
37 enum TDESystemPowerState {
38  Active,
39  Standby,
40  Freeze,
41  Suspend,
42  Hibernate,
43  PowerOff,
44  Reboot
45 };
46 };
47 
48 namespace TDESystemHibernationMethod {
49 enum TDESystemHibernationMethod {
50  Unsupported,
51  Platform,
52  Shutdown,
53  Reboot,
54  TestProc,
55  Test
56 };
57 };
58 
59 typedef TQValueList<TDESystemPowerState::TDESystemPowerState> TDESystemPowerStateList;
60 typedef TQValueList<TDESystemHibernationMethod::TDESystemHibernationMethod> TDESystemHibernationMethodList;
61 
62 class TDECORE_EXPORT TDERootSystemDevice : public TDEGenericDevice
63 {
64  public:
69  TDERootSystemDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null);
70 
74  ~TDERootSystemDevice();
75 
79  TDESystemFormFactor::TDESystemFormFactor formFactor();
80 
84  TDESystemPowerStateList powerStates();
85 
89  TDESystemHibernationMethodList hibernationMethods();
90 
94  TDESystemHibernationMethod::TDESystemHibernationMethod hibernationMethod();
95 
99  unsigned long diskSpaceNeededForHibernation();
100 
104  bool canSetHibernationMethod();
105 
109  bool canStandby();
110 
114  bool canFreeze();
115 
119  bool canSuspend();
120 
124  bool canHibernate();
125 
129  bool canPowerOff();
130 
134  bool canReboot();
135 
139  void setHibernationMethod(TDESystemHibernationMethod::TDESystemHibernationMethod hm);
140 
145  bool setPowerState(TDESystemPowerState::TDESystemPowerState ps);
146 
147  protected:
152  void internalSetFormFactor(TDESystemFormFactor::TDESystemFormFactor ff);
153 
158  void internalSetPowerStates(TDESystemPowerStateList ps);
159 
164  void internalSetHibernationMethods(TDESystemHibernationMethodList hm);
165 
170  void internalSetHibernationMethod(TDESystemHibernationMethod::TDESystemHibernationMethod hm);
171 
176  void internalSetDiskSpaceNeededForHibernation(unsigned long sz);
177 
178  private:
179  TDESystemFormFactor::TDESystemFormFactor m_formFactor;
180  TDESystemPowerStateList m_powerStates;
181  TDESystemHibernationMethodList m_hibernationMethods;
182  TDESystemHibernationMethod::TDESystemHibernationMethod m_hibernationMethod;
183  unsigned long m_hibernationSpace;
184 
185  friend class TDEHardwareDevices;
186 };
187 
188 #endif // _TDEROOTSYSTEMDEVICE_H
TDESystemHibernationMethod
Definition: tderootsystemdevice.h:48
TDESystemFormFactor
Definition: tderootsystemdevice.h:26
Test
TDESystemPowerState
Definition: tderootsystemdevice.h:36

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.