Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Eris::Lobby Class Reference

Lobby is the Out-of-Game session object, valid from connection to the server until disconnection. More...

#include <Lobby.h>

Inheritance diagram for Eris::Lobby:

Eris::Room List of all members.

Public Member Functions

 Lobby (Connection *c)
Roomjoin (const std::string &roomID)
 Join the specified room; throws if not allowed or not found.

PersongetPerson (const std::string &acc)
 obtain a person's info, given their account ID; may return NULL!

RoomgetRoom (const std::string &id)
 obtain a Room object, given the id

const std::string & getAccountID ()
 get the player's account ID

ConnectiongetConnection () const
 The underlying connection for the lobby.


Static Public Member Functions

LobbygetPrimary ()
 Access the global Lobby instance.

Lobbyinstance ()
 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


Detailed Description

Lobby is the Out-of-Game session object, valid from connection to the server until disconnection.


Member Function Documentation

void Eris::Lobby::addPendingCreate Room r,
int  serialno
[protected]
 

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

Lobby* Eris::Lobby::getPrimary  )  [inline, static]
 

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.


The documentation for this class was generated from the following files:
Generated on Tue Jul 27 21:00:43 2004 for Eris by doxygen 1.3.7