00001 #ifndef FCAM_N900_BUTTON_LISTENER_H
00002 #define FCAM_N900_BUTTON_LISTENER_H
00003
00004 #include <pthread.h>
00005 #include "../Event.h"
00006
00007 namespace FCam {
00008 namespace N900 {
00009
00010 class ButtonListener : public EventGenerator {
00011 public:
00012
00013 static ButtonListener *instance();
00014
00015 private:
00016 ButtonListener();
00017 ~ButtonListener();
00018
00019 void run();
00020
00021 std::string getEventString(const Event &) const;
00022
00023 static ButtonListener *_instance;
00024
00025 pthread_t thread;
00026
00027 friend void *button_listener_thread_(void *arg);
00028
00029 bool stop;
00030 };
00031
00032 }
00033 }
00034
00035 #endif