#ifndef TIMEOUT_H
#define TIMEOUT_H
+#include <sigc++/signal_system.h>
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Signal0;
+#endif
+
/** This class executes the callback when the timeout expires.
This class currently uses a regular callback, later it will use
signals and slots to provide the same.
*/
class Timeout {
public:
- ///
- typedef void (*TimeoutCallback)(void *);
-
///
enum Type {
ONETIME,
///
void restart();
///
- void callback(TimeoutCallback cb, void * data);
+ Signal0<void> timeout;
///
- void callback();
+ void emit();
///
void setType(Type t);
///
///
Type type;
///
- int timeout;
+ int timeout_ms;
///
int timeout_id;
- ///
- TimeoutCallback callback_;
- ///
- void * data_;
};
#endif