#include <Lobby.h>
Inheritance diagram for Eris::Lobby:
Public Member Functions | |
Lobby (Connection *c) | |
Room * | join (const std::string &roomID) |
Join the specified room; throws if not allowed or not found. | |
Person * | getPerson (const std::string &acc) |
obtain a person's info, given their account ID; may return NULL! | |
Room * | getRoom (const std::string &id) |
obtain a Room object, given the id | |
const std::string & | getAccountID () |
get the player's account ID | |
Connection * | getConnection () const |
The underlying connection for the lobby. | |
Static Public Member Functions | |
static Lobby * | getPrimary () |
Access the global Lobby instance. | |
static Lobby * | instance () |
deprecated | |
Public Attributes | |
SigC::Signal1< void, Person * > | SightPerson |
Emitted when sight of a person is received. | |
SigC::Signal2< void, const std::string &, const std::string & > | PrivateTalk |
Emitted when sight of a room is recieved. | |
SigC::Signal1< void, const Atlas::Objects::Entity::Player & > | LoggedIn |
Emitted when initial login completes. | |
Protected Types | |
typedef std::map< std::string, Person * > | PersonDict |
typedef std::map< std::string, Room * > | RoomDict |
typedef std::map< int, Room * > | PendingCreateMap |
Protected Member Functions | |
void | look (const std::string &id) |
void | expectInfoRefno (long ref) |
void | recvInfoAccount (const Atlas::Objects::Operation::Info &ifo, const Atlas::Objects::Entity::Account &account) |
void | recvSightPerson (const Atlas::Objects::Entity::Account &ac) |
void | recvSightRoom (const Atlas::Objects::Entity::RootEntity &room) |
void | recvSightLobby (const Atlas::Objects::Entity::RootEntity &lobby) |
void | recvPrivateChat (const Atlas::Objects::Operation::Talk &tk) |
void | recvSightCreate (const Atlas::Objects::Operation::Create &cr, const Atlas::Objects::Entity::RootEntity &ent) |
void | processRoomCreate (const Atlas::Objects::Operation::Create &cr, const Atlas::Objects::Entity::RootEntity &ent) |
internal helper when a room creation is observed | |
void | registerCallbacks () |
delayed registration of callbacks (until we have a valid account ID) | |
void | addPendingCreate (Room *r, int serialno) |
register that the lobby should expect to observer the creation of a room with the given refno, and it should pass the data on the the given Room object. | |
void | netFailure (const std::string &msg) |
void | netConnected () |
void | netDisconnected () |
Protected Attributes | |
std::string | _account |
Connection * | _con |
bool | _reconnect |
set if reconnecting (for INFO processing) | |
long | _infoRefno |
refno of the INFO op we're looking for | |
PersonDict | _peopleDict |
RoomDict | _roomDict |
PendingCreateMap | _pendingCreate |
map from the serialno of a CREATE operation to the corresponding Room instance it applies to | |
Friends | |
class | Room |
class | Player |
class | TestLobby |
allows tests to set things up |
|
register that the lobby should expect to observer the creation of a room with the given refno, and it should pass the data on the the given Room object. This is an internal helpfer for Room::createChild |
|
Access the global Lobby instance. Do not call this prior to creating a Connection object, or InvalidOperation will be thrown; the Lobby needs to be bound to a connection when it is initalised, and this method creates the Lobby if an existing instance is not found. |