X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpoller.h;fp=source%2Fcore%2Fpoller.h;h=0000000000000000000000000000000000000000;hb=fe77fc6b869a71bf94d501a0762579f4ddbc5094;hp=dcd36587054b2d10599918adc84a0c6ef10f880c;hpb=7292f4413397b7f2e4689f7597f4b9e73435352e;p=libs%2Fcore.git diff --git a/source/core/poller.h b/source/core/poller.h deleted file mode 100644 index dcd3658..0000000 --- a/source/core/poller.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -This file is part of libmspframework -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ -#ifndef MSP_FRAMEWORK_POLLER_H_ -#define MSP_FRAMEWORK_POLLER_H_ - -#ifdef WIN32 -#include "win32poll.h" -#else -#include -#endif -#include -#include -#include "mutex.h" - -namespace Msp { - -class Pollable; - -class Poller -{ -public: - class Slot - { - public: - sigc::signal signal_event; - - Slot(Pollable *, short); - Pollable *get_object() const { return obj; } - short get_events() const { return events; } - private: - Pollable *obj; - short events; - - void obj_deleted() { obj=0; } - }; - - Slot &add_pollable(Pollable *, short); - int poll(int =0); -private: - std::list slots; - std::vector pfd; - Mutex slots_mutex; - Mutex pfd_mutex; - bool dirty; - - void remove_stale_slots(); - void rebuild_pfd(); - void pollable_deleted(Pollable *); -}; - -}; - -#endif