Lobby.h

00001 #ifndef ERIS_LOBBY_H
00002 #define ERIS_LOBBY_H
00003 
00004 #include <Eris/Room.h>
00005 
00006 namespace Eris
00007 {
00008         
00009 class Account;
00010 class Person;
00011 class Connection;
00012 class OOGRouter;
00013 
00025 class Lobby : public Room
00026 {
00027 public: 
00030     Lobby(Account *acc); 
00031     
00033     virtual ~Lobby();
00034 
00037     Room* join(const std::string &roomID);
00038 
00040     Person* getPerson(const std::string &acc);
00041                 
00046     Room* getRoom(const std::string &id);
00047 
00049     Account* getAccount() const
00050     {
00051         return m_account;
00052     }
00053     
00055     Connection* getConnection() const;
00056 
00057 // callbacks
00059     sigc::signal<void, Person*> SightPerson;
00060     
00066     sigc::signal<void, Person*, const std::string&> PrivateTalk;
00067         
00068 protected:
00069     friend class Room;
00070     friend class OOGRouter;
00071     
00072     void look(const std::string &id);
00073                 
00074     void sightPerson(const Atlas::Objects::Entity::Account &ac);
00075     Router::RouterResult recvTalk(const Atlas::Objects::Operation::Talk& tk);
00076     void recvInitialSight(const Atlas::Objects::Entity::RootEntity& ent);
00077         
00078     void recvAppearance(const Atlas::Objects::Root& obj);
00079     void recvDisappearance(const Atlas::Objects::Root& obj);
00080     
00081     Router::RouterResult recvImaginary(const Atlas::Objects::Operation::Imaginary& im);
00082     
00083 private:
00084     void onLoggedIn();
00085     void onLogout(bool clean);
00086     
00087     Account* m_account;    
00088     IdPersonMap m_people;
00089         
00090     typedef std::map<std::string, Room*> IdRoomMap;
00091     IdRoomMap m_rooms;
00092 
00093     OOGRouter* m_router;
00094 };
00095         
00096 } // of namespace Eris
00097 
00098 #endif

Generated on Mon Jan 29 21:37:18 2007 for Eris by  doxygen 1.5.1