#include <LANAPI.h>
Inherits LANAPIInterface.
Public Member Functions | |
| LANAPI () | |
| virtual | ~LANAPI () |
| virtual void | init (void) |
| Initialize or re-initialize the instance. | |
| virtual void | reset (void) |
| reset the logic system | |
| virtual void | update (void) |
| update the world | |
| virtual void | setIsActive (Bool isActive) |
| tell TheLAN whether or not | |
| virtual void | RequestLocations (void) |
| Request everybody to respond with where they are. | |
| virtual void | RequestGameJoin (LANGameInfo *game, UnsignedInt ip=0) |
| Request to join a game. | |
| virtual void | RequestGameJoinDirectConnect (UnsignedInt ipaddress) |
| Request to join a game at an IP address. | |
| virtual void | RequestGameLeave (void) |
| Tell everyone we're leaving. | |
| virtual void | RequestAccept (void) |
| Indicate we're OK with the game options. | |
| virtual void | RequestHasMap (void) |
| Send our map status. | |
| virtual void | RequestChat (UnicodeString message, ChatType format) |
| Send a chat message. | |
| virtual void | RequestGameStart (void) |
| Tell everyone the game is starting. | |
| virtual void | RequestGameStartTimer (Int seconds) |
| virtual void | RequestGameOptions (AsciiString gameOptions, Bool isPublic, UnsignedInt ip=0) |
| Change the game options. | |
| virtual void | RequestGameCreate (UnicodeString gameName, Bool isDirectConnect) |
| Try to host a game. | |
| virtual void | RequestGameAnnounce (void) |
| Send out game info if host. | |
| virtual void | RequestSetName (UnicodeString newName) |
| Pick a new name. | |
| virtual void | RequestLobbyLeave (Bool forced) |
| Announce that we're leaving the lobby. | |
| virtual void | ResetGameStartTimer (void) |
| virtual void | OnGameList (LANGameInfo *gameList) |
| List of games. | |
| virtual void | OnPlayerList (LANPlayer *playerList) |
| List of players in the Lobby. | |
| virtual void | OnGameJoin (ReturnType ret, LANGameInfo *theGame) |
| Did we get in the game? | |
| virtual void | OnPlayerJoin (Int slot, UnicodeString playerName) |
| Someone else joined our game (host only; joiners get a slotlist) | |
| virtual void | OnHostLeave (void) |
| Host left the game. | |
| virtual void | OnPlayerLeave (UnicodeString player) |
| Someone left the game. | |
| virtual void | OnAccept (UnsignedInt playerIP, Bool status) |
| Someone's accept status changed. | |
| virtual void | OnHasMap (UnsignedInt playerIP, Bool status) |
| Someone's map status changed. | |
| virtual void | OnChat (UnicodeString player, UnsignedInt ip, UnicodeString message, ChatType format) |
| Chat message from someone. | |
| virtual void | OnGameStart (void) |
| The game is starting. | |
| virtual void | OnGameStartTimer (Int seconds) |
| virtual void | OnGameOptions (UnsignedInt playerIP, Int playerSlot, AsciiString options) |
| Someone sent game options. | |
| virtual void | OnGameCreate (ReturnType ret) |
| Your game is created. | |
| virtual void | OnNameChange (UnsignedInt IP, UnicodeString newName) |
| Someone has morphed. | |
| virtual void | OnInActive (UnsignedInt IP) |
| Someone has alt-tabbed out. | |
| virtual LANGameInfo * | LookupGame (UnicodeString gameName) |
| return a pointer to a game we know about | |
| virtual LANGameInfo * | LookupGameByListOffset (Int offset) |
| return a pointer to a game we know about | |
| virtual LANPlayer * | LookupPlayer (UnsignedInt playerIP) |
| return a pointer to a player we know about | |
| virtual Bool | SetLocalIP (UnsignedInt localIP) |
| For multiple NIC machines. | |
| virtual void | SetLocalIP (AsciiString localIP) |
| For multiple NIC machines. | |
| virtual Bool | AmIHost (void) |
| Am I hosting a game? | |
| virtual UnicodeString | GetMyName (void) |
| What's my name? | |
| virtual LANGameInfo * | GetMyGame (void) |
| What's my Game? | |
| virtual UnsignedInt | GetLocalIP (void) |
| What's my IP? | |
| virtual void | fillInLANMessage (LANMessage *msg) |
| Fill in default params. | |
| virtual void | checkMOTD (void) |
Public Member Functions inherited from LANAPIInterface | |
| virtual | ~LANAPIInterface () |
| UnicodeString | getErrorStringFromReturnType (ReturnType ret) |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Protected Types | |
| enum | PendingActionType { ACT_NONE = 0 , ACT_JOIN , ACT_JOINDIRECTCONNECT , ACT_LEAVE , ACT_MAX } |
Protected Attributes | |
| LANPlayer * | m_lobbyPlayers |
| List of players in the lobby. | |
| LANGameInfo * | m_games |
| List of games. | |
| UnicodeString | m_name |
| Who do we think we are? | |
| AsciiString | m_userName |
| login name | |
| AsciiString | m_hostName |
| machine name | |
| UnsignedInt | m_gameStartTime |
| Int | m_gameStartSeconds |
| PendingActionType | m_pendingAction |
| What action are we performing? | |
| UnsignedInt | m_expiration |
| When should we give up on our action? | |
| UnsignedInt | m_actionTimeout |
| UnsignedInt | m_directConnectRemoteIP |
| The IP address of the game we are direct connecting to. | |
| UnsignedInt | m_lastResendTime |
| Bool | m_isInLANMenu |
| true while we are in a LAN menu (lobby, game options, direct connect) | |
| Bool | m_inLobby |
| Are we in the lobby (not in a game)? | |
| LANGameInfo * | m_currentGame |
| Pointer to game (setup screen) we are currently in (NULL for lobby) | |
| UnsignedInt | m_localIP |
| Transport * | m_transport |
| UnsignedInt | m_broadcastAddr |
| UnsignedInt | m_lastUpdate |
| AsciiString | m_lastGameopt |
| Bool | m_isActive |
| is the game currently active? | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Static Protected Attributes | |
| static const UnsignedInt | s_resendDelta = 10 * 1000 |
| This is how often we announce ourselves to the world. | |
Additional Inherited Members | |
Public Types inherited from LANAPIInterface | |
| enum | ChatType { LANCHAT_NORMAL = 0 , LANCHAT_EMOTE , LANCHAT_SYSTEM , LANCHAT_MAX } |
| enum | ReturnType { RET_OK , RET_TIMEOUT , RET_GAME_FULL , RET_DUPLICATE_NAME , RET_CRC_MISMATCH , RET_SERIAL_DUPE , RET_GAME_STARTED , RET_GAME_EXISTS , RET_GAME_GONE , RET_BUSY , RET_UNKNOWN , RET_MAX } |
The LANAPI class is used to instantiate a singleton which implements the interface to all LAN broadcast communications.
|
protected |
| LANAPI::LANAPI | ( | void | ) |
Definition at line 73 of file LANAPI.cpp.
|
virtual |
Definition at line 97 of file LANAPI.cpp.
|
protected |
Definition at line 1200 of file LANAPI.cpp.
|
protected |
Definition at line 1230 of file LANAPI.cpp.
|
virtual |
|
virtual |
Implements LANAPIInterface.
Definition at line 264 of file LANAPI.cpp.
|
protected |
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
protected |
Definition at line 575 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 99 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 626 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 610 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 618 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 550 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 642 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 381 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 431 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 163 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 185 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 444 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 208 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 516 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 43 of file LANAPIhandlers.cpp.
|
protected |
Definition at line 534 of file LANAPIhandlers.cpp.
|
virtual |
Initialize or re-initialize the instance.
Implements LANAPIInterface.
Definition at line 104 of file LANAPI.cpp.
|
virtual |
return a pointer to a game we know about
Implements LANAPIInterface.
Definition at line 1103 of file LANAPI.cpp.
|
virtual |
return a pointer to a game we know about
Implements LANAPIInterface.
Definition at line 1115 of file LANAPI.cpp.
|
virtual |
return a pointer to a player we know about
Definition at line 1159 of file LANAPI.cpp.
|
virtual |
Someone's accept status changed.
Implements LANAPIInterface.
Definition at line 103 of file LANAPICallbacks.cpp.
|
virtual |
Chat message from someone.
Implements LANAPIInterface.
Definition at line 673 of file LANAPICallbacks.cpp.
|
virtual |
Your game is created.
Implements LANAPIInterface.
Definition at line 601 of file LANAPICallbacks.cpp.
|
virtual |
Did we get in the game?
Implements LANAPIInterface.
Definition at line 511 of file LANAPICallbacks.cpp.
|
virtual |
|
virtual |
Someone sent game options.
Implements LANAPIInterface.
Definition at line 272 of file LANAPICallbacks.cpp.
|
virtual |
The game is starting.
Implements LANAPIInterface.
Definition at line 190 of file LANAPICallbacks.cpp.
|
virtual |
Implements LANAPIInterface.
Definition at line 180 of file LANAPICallbacks.cpp.
|
virtual |
Someone's map status changed.
Implements LANAPIInterface.
Definition at line 137 of file LANAPICallbacks.cpp.
|
virtual |
|
virtual |
Someone has alt-tabbed out.
Definition at line 669 of file LANAPICallbacks.cpp.
|
virtual |
Someone has morphed.
Implements LANAPIInterface.
Definition at line 664 of file LANAPICallbacks.cpp.
|
virtual |
Someone else joined our game (host only; joiners get a slotlist)
Implements LANAPIInterface.
Definition at line 497 of file LANAPICallbacks.cpp.
|
virtual |
Someone left the game.
Implements LANAPIInterface.
Definition at line 552 of file LANAPICallbacks.cpp.
|
virtual |
List of players in the Lobby.
Implements LANAPIInterface.
Definition at line 632 of file LANAPICallbacks.cpp.
|
protected |
Definition at line 1130 of file LANAPI.cpp.
|
protected |
Definition at line 1171 of file LANAPI.cpp.
|
virtual |
Indicate we're OK with the game options.
Implements LANAPIInterface.
Definition at line 727 of file LANAPI.cpp.
|
virtual |
|
virtual |
|
virtual |
Try to host a game.
Implements LANAPIInterface.
Definition at line 869 of file LANAPI.cpp.
|
virtual |
|
virtual |
Request to join a game at an IP address.
Implements LANAPIInterface.
Definition at line 650 of file LANAPI.cpp.
|
virtual |
|
virtual |
|
virtual |
Tell everyone the game is starting.
Implements LANAPIInterface.
Definition at line 799 of file LANAPI.cpp.
|
virtual |
Implements LANAPIInterface.
Definition at line 819 of file LANAPI.cpp.
|
virtual |
|
virtual |
Announce that we're leaving the lobby.
Implements LANAPIInterface.
Definition at line 1091 of file LANAPI.cpp.
|
virtual |
Request everybody to respond with where they are.
Implements LANAPIInterface.
Definition at line 610 of file LANAPI.cpp.
|
virtual |
|
virtual |
|
virtual |
Implements LANAPIInterface.
Definition at line 813 of file LANAPI.cpp.
|
protected |
Definition at line 180 of file LANAPI.cpp.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |