This class is implements the user input and output console for the server.
More...
#include <serverconsole.h>
|
static void | ExecuteScript (const char *script) |
| Executes a script of commands. More...
|
|
static ConsoleOutMsgClass | GetMaximumOutputClassFile () |
|
static ConsoleOutMsgClass | GetMaximumOutputClassStdout () |
|
static void | Intern_Printf (ConsoleOutMsgClass con, const char *arg,...) |
| Used to print things to the console. More...
|
|
static void | Intern_Printf_LogOnly (ConsoleOutMsgClass con, const char *arg,...) |
| Used to print things to the console. More...
|
|
static void | Intern_VPrintf (ConsoleOutMsgClass con, const char *arg, va_list ap) |
| Used to print things to the console. More...
|
|
static void | Intern_VPrintf_LogOnly (ConsoleOutMsgClass con, const char *arg, va_list args) |
| Used to print things to the console. More...
|
|
static void | SetMaximumOutputClassFile (ConsoleOutMsgClass con) |
| Set the maximum message class that we want to show on the output file. More...
|
|
static void | SetMaximumOutputClassStdout (ConsoleOutMsgClass con) |
| Set the maximum message class that we want to show on standard output. More...
|
|
static void | SetOutputFile (const char *filename, bool append) |
| Setup the console to additionally write to some file instead of only stdout. More...
|
|
static void | SetPrompt (const char *format,...) |
| Set the prompt to be used for stdout. More...
|
|
static void | SetStringBuffer (csString *buffer) |
| Set or clear the string buffer. More...
|
|
static void | Shift () |
|
static void | Unshift () |
|
|
const char * | appname |
| The name of this application. Only used for printing & readline. More...
|
|
iCommandCatcher * | cmdcatcher |
| CommandCatcher intercepts typed commands without processing them here. More...
|
|
iObjectRegistry * | objreg |
|
bool | stop |
| If true, the server is shutting down, and the main loop should stop. More...
|
|
csRef< CS::Threading::Thread > | thread |
| The server console runs in its own thread. More...
|
|
This class is implements the user input and output console for the server.
Definition at line 67 of file serverconsole.h.
ServerConsole::ServerConsole |
( |
iObjectRegistry * |
oreg, |
|
|
const char * |
appname, |
|
|
const char * |
prompt |
|
) |
| |
ServerConsole::~ServerConsole |
( |
| ) |
|
static void ServerConsole::ExecuteScript |
( |
const char * |
script | ) |
|
|
static |
Executes a script of commands.
The script is passed in as a char array buffer (NOT a filename). This function goes through the char array script line at a time and executes the given server command. It also allows for commenting the script using the #comment...
void ServerConsole::MainLoop |
( |
| ) |
|
The main server console loop.
This waits for a user to enter a line of data and executes the command that the user entered.
void ServerConsole::Run |
( |
| ) |
|
Starts the server console, first looking if there's a script passed via -run=file on the command line, then entering the main loop.
const char* ServerConsole::appname |
|
protected |
The name of this application. Only used for printing & readline.
Definition at line 107 of file serverconsole.h.
CommandCatcher intercepts typed commands without processing them here.
Definition at line 116 of file serverconsole.h.
iObjectRegistry* ServerConsole::objreg |
|
protected |
const char* ServerConsole::prompt |
|
static |
If true, the server is shutting down, and the main loop should stop.
Definition at line 113 of file serverconsole.h.
csRef<CS::Threading::Thread> ServerConsole::thread |
|
protected |
The server console runs in its own thread.
Definition at line 110 of file serverconsole.h.
The documentation for this class was generated from the following file: