Additional adjustments for Poller
[libs/core.git] / source / io / poll.h
index fdb68c515bbe35e0e05cafdde93e59c625a7bced..40c15a70cb84389caa0d9df7a0273383dbc87ac2 100644 (file)
@@ -35,37 +35,39 @@ inline PollEvent operator~(PollEvent e)
 class Poller: private NonCopyable
 {
 public:
-       struct Slot
+       struct PolledObject
        {
                EventObject *object;
                PollEvent events;
 
-               Slot(EventObject *o, PollEvent e): object(o), events(e) { }
+               PolledObject(EventObject *o, PollEvent e): object(o), events(e) { }
        };
 
-       typedef std::vector<Slot> SlotList DEPRECATED;
+       typedef PolledObject Slot DEPRECATED;
+
+       typedef std::vector<PolledObject> SlotList DEPRECATED;
 private:
        struct Private;
 
-       std::vector<Slot> objects;
+       std::vector<PolledObject> objects;
        Private *priv;
        bool events_changed;
        bool objs_changed;
-       std::vector<Slot> poll_result;
+       std::vector<PolledObject> poll_result;
 
 public:
        Poller();
        ~Poller();
 
        void set_object(EventObject &, PollEvent);
-       int poll();
-       int poll(const Time::TimeDelta &);
+       unsigned poll();
+       unsigned poll(const Time::TimeDelta &);
 private:
        void rebuild_array();
-       int do_poll(int);
+       unsigned do_poll(int);
        void platform_poll(int);
 public:
-       const std::vector<Slot> &get_result() const { return poll_result; }
+       const std::vector<PolledObject> &get_result() const { return poll_result; }
 };
 
 PollEvent poll(EventObject &, PollEvent);