#include <LightweightDatabaseServer.h>
Inheritance diagram for LightweightDatabaseServer:
Public Member Functions | |
LightweightDatabaseServer () | |
Constructor. | |
~LightweightDatabaseServer () | |
Destructor. | |
DataStructures::Table * | GetTable (char *tableName) |
DataStructures::Table * | AddTable (char *tableName, bool allowRemoteQuery, bool allowRemoteUpdate, bool allowRemoteRemove, char queryPassword[_SIMPLE_DATABASE_PASSWORD_LENGTH], char updatePassword[_SIMPLE_DATABASE_PASSWORD_LENGTH], char removePassword[_SIMPLE_DATABASE_PASSWORD_LENGTH], bool oneRowPerSystemId, bool onlyUpdateOwnRows, bool removeRowOnPingFailure, bool removeRowOnDisconnect, bool autogenerateRowIDs) |
bool | RemoveTable (char *tableName) |
void | Clear (void) |
Clears all memory. | |
unsigned | GetAndIncrementRowID (char *tableName) |
DataStructures::Page< unsigned, DataStructures::Table::Row *, _TABLE_BPLUS_TREE_ORDER > * | GetTableRows (char *tableName) |
virtual void | OnAttach (RakPeerInterface *peer) |
virtual void | Update (RakPeerInterface *peer) |
virtual PluginReceiveResult | OnReceive (RakPeerInterface *peer, Packet *packet) |
virtual void | OnDisconnect (RakPeerInterface *peer) |
virtual void | OnCloseConnection (RakPeerInterface *peer, PlayerID playerId) |
Static Public Member Functions | |
static int | DatabaseTableComp (char *const &key1, char *const &key2) |
Protected Member Functions | |
void | OnQueryRequest (RakPeerInterface *peer, Packet *packet) |
void | OnUpdateRow (RakPeerInterface *peer, Packet *packet) |
void | OnRemoveRow (RakPeerInterface *peer, Packet *packet) |
void | OnPong (RakPeerInterface *peer, Packet *packet) |
DatabaseTable * | DeserializeClientHeader (RakNet::BitStream *inBitstream, RakPeerInterface *peer, Packet *packet, int mode) |
DataStructures::Table::Row * | GetRowFromIP (DatabaseTable *databaseTable, PlayerID playerId, unsigned *rowId) |
bool | RowHasIP (DataStructures::Table::Row *row, PlayerID playerId, unsigned systemIdColumnIndex) |
DataStructures::Table::Row * | AddRow (LightweightDatabaseServer::DatabaseTable *databaseTable, PlayerID playerId, bool hasRowId, unsigned rowId) |
void | RemoveRowsFromIP (PlayerID playerId) |
Protected Attributes | |
DataStructures::Map< char *, LightweightDatabaseServer::DatabaseTable *, LightweightDatabaseServer::DatabaseTableComp > | database |
Classes | |
struct | DatabaseTable |
|
Adds a new table It is valid to read and write to the returned pointer.
|
|
Returns a table by name. It is valid to read and write to the returned pointer.
|
|
Returns a linked list of ordered lists containing the rows of a table, by name. The returned structure is internal to the BPlus tree. See DS_BPlusTree This is a convenience accessor, as you can also get this from the table returned from GetTable()
|
|
Called when the interface is attached
Reimplemented from PluginInterface. |
|
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
Reimplemented from PluginInterface. |
|
Called when RakPeer is shutdown
Reimplemented from PluginInterface. |
|
OnReceive is called for every packet.
Reimplemented from PluginInterface. |
|
Removes a table by name.
|
|
Update is called every time a packet is checked for .
Reimplemented from PluginInterface. |