• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

qmheartbeat.h

Go to the documentation of this file.
00001 
00032 #ifndef QMHEARTBEAT_H
00033 #define QMHEARTBEAT_H
00034 #include <QtCore/qobject.h>
00035 #include <QtCore/qdatetime.h>
00036 
00037 #include "system_global.h"
00038 
00039 QT_BEGIN_HEADER
00040 
00041 namespace MeeGo {
00042 
00043 class QmHeartbeatPrivate;
00044 
00072 class QmHeartbeat : public QObject
00073 {
00074     Q_OBJECT
00075     Q_ENUMS(SignalNeed)
00076     Q_ENUMS(WaitMode)
00077 
00078 public:
00080     enum SignalNeed
00081     {
00082         NoSignalNeeded = 0,      
00083         SignalNeeded             
00084     };
00085 
00087     enum WaitMode
00088     {
00089         DoNotWaitHeartbeat = 0,  
00090         WaitHeartbeat            
00091     };
00092 
00096     static const unsigned short WAKEUP_SLOT_30_SEC;
00100     static const unsigned short WAKEUP_SLOT_2_5_MINS;
00104     static const unsigned short WAKEUP_SLOT_5_MINS;
00110     static const unsigned short WAKEUP_SLOT_10_MINS;
00114     static const unsigned short WAKEUP_SLOT_30_MINS;
00118     static const unsigned short WAKEUP_SLOT_1_HOUR;
00122     static const unsigned short WAKEUP_SLOT_2_HOURS;
00126     static const unsigned short WAKEUP_SLOT_10_HOURS;
00127 
00132     QmHeartbeat(QObject *parent = 0);
00133     ~QmHeartbeat();
00134 
00135 
00141     bool open(QmHeartbeat::SignalNeed signalNeed);
00142 
00143 
00147     void close(void);
00148 
00149 
00154     int  getFD();
00155 
00173     QTime wait(unsigned short mintime, unsigned short maxtime, QmHeartbeat::WaitMode wait);
00174 
00175 
00176 
00185     bool  IWokeUp(void);
00186 
00187 Q_SIGNALS:
00192     void wakeUp(QTime time);
00193 
00194 private:
00195     Q_DISABLE_COPY(QmHeartbeat)
00196     MEEGO_DECLARE_PRIVATE(QmHeartbeat)
00197 };
00198 
00199 } // MeeGo namespace
00200 
00201 QT_END_HEADER
00202 
00203 #endif /* QMHEARTBEAT_H */
00204 
00205 // End of file

Generated on Mon Jul 4 2011 14:27:35 for QmSystem by  doxygen 1.7.1