00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <boost/shared_ptr.hpp>
00010 #include <boost/function.hpp>
00011
00012 #include <Swiften/EventLoop/EventOwner.h>
00013
00014 namespace Swift {
00015 class Event {
00016 public:
00017 Event(boost::shared_ptr<EventOwner> owner, const boost::function<void()>& callback) : id(~0U), owner(owner), callback(callback) {
00018 }
00019
00020 bool operator==(const Event& o) const {
00021 return o.id == id;
00022 }
00023
00024 unsigned int id;
00025 boost::shared_ptr<EventOwner> owner;
00026 boost::function<void()> callback;
00027 };
00028 }
00029
00030 std::ostream& operator<<(std::ostream& os, const Swift::Event& e);