OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

IOnlineChatBE Class Reference
[Networking layer]

This is a backend class which implements communication services with the MortalNet backend. More...

#include <OnlineChatBE.h>

Inheritance diagram for IOnlineChatBE:

COnlineChatBEImpl List of all members.

Public Types

enum  ConnectionStateEnum { CS_Disconnected, CS_Connecting, CS_Connected, CS_Disconnecting }
enum  ClientModeEnum { CM_Chatroom, CM_Game, CM_Away, CM_WaitingForChallenge }
enum  ChatEventEnum {
  CE_Nothing, CE_MyNick, CE_Challenge, CE_Message,
  CE_Joins, CE_Leaves, CE_NickChange, CE_ServerMessage
}

Public Member Functions

virtual void connect (std::string a_sNick)=0
virtual void disconnect ()=0
virtual ConnectionStateEnum getConnectionState () const =0
virtual std::string getMyNick () const =0
virtual void setMyNick (std::string a_sNick)=0
virtual ClientModeEnum getMyClientMode () const =0
virtual void setMyClientMode (ClientModeEnum a_enClientMode)=0
virtual const UserInfogetMyUserInfo () const =0
 Same as getUserInfo(0).
virtual int getUserCount () const =0
virtual const UserInfogetUserInfo (int a_iUserNumber) const =0
virtual ClientModeEnum getClientMode () const =0
virtual void setClientMode (ClientModeEnum a_newMode)=0
virtual void addEventSink (IOnlineEventSink *a_poSink)=0
virtual void removeEventSink (IOnlineEventSink *a_poSink)=0
virtual void removeAllEventSinks ()=0

Static Public Member Functions

static void create ()

Protected Member Functions

 IOnlineChatBE ()
virtual ~IOnlineChatBE ()

Classes

struct  SChatEvent
struct  UserInfo

Detailed Description

This is a backend class which implements communication services with the MortalNet backend.

The backend doesn't provide any frontend or interactivity and is meant to run independently in its own thread.

Author:
upi


Member Enumeration Documentation

enum IOnlineChatBE::ChatEventEnum
 

Enumeration values:
CE_Nothing 
CE_MyNick  You are now known as...
CE_Challenge  Challenged by user X.
CE_Message  Message from user X.
CE_Joins  User X has joined MortalNet.
CE_Leaves  User X has left MortalNet.
CE_NickChange  User X is now known as Y.
CE_ServerMessage  Miscellaneous info from server.

enum IOnlineChatBE::ClientModeEnum
 

Enumeration values:
CM_Chatroom  The user is rotting away in the chatroom.
CM_Game  The user is playing a game. He'll be back.
CM_Away  The user is not at all here, he just left his client running.
CM_WaitingForChallenge  The user is not running the game, but is waiting for a challenge.

enum IOnlineChatBE::ConnectionStateEnum
 

Enumeration values:
CS_Disconnected  The backend is not connected to the server.
CS_Connecting  The backend is trying to connect to the server.
CS_Connected  Connected.
CS_Disconnecting 


Constructor & Destructor Documentation

IOnlineChatBE::IOnlineChatBE  )  [inline, protected]
 

virtual IOnlineChatBE::~IOnlineChatBE  )  [inline, protected, virtual]
 


Member Function Documentation

virtual void IOnlineChatBE::addEventSink IOnlineEventSink a_poSink  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual void IOnlineChatBE::connect std::string  a_sNick  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

static void IOnlineChatBE::create  )  [static]
 

virtual void IOnlineChatBE::disconnect  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual ClientModeEnum IOnlineChatBE::getClientMode  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual ConnectionStateEnum IOnlineChatBE::getConnectionState  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual ClientModeEnum IOnlineChatBE::getMyClientMode  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual std::string IOnlineChatBE::getMyNick  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual const UserInfo& IOnlineChatBE::getMyUserInfo  )  const [pure virtual]
 

Same as getUserInfo(0).

Implemented in COnlineChatBEImpl.

virtual int IOnlineChatBE::getUserCount  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual const UserInfo& IOnlineChatBE::getUserInfo int  a_iUserNumber  )  const [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual void IOnlineChatBE::removeAllEventSinks  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual void IOnlineChatBE::removeEventSink IOnlineEventSink a_poSink  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual void IOnlineChatBE::setClientMode ClientModeEnum  a_newMode  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.

virtual void IOnlineChatBE::setMyClientMode ClientModeEnum  a_enClientMode  )  [pure virtual]
 

virtual void IOnlineChatBE::setMyNick std::string  a_sNick  )  [pure virtual]
 

Implemented in COnlineChatBEImpl.


The documentation for this class was generated from the following file: