From 7daa3955bc3a1918e40962851f9e8d38597a245e Mon Sep 17 00:00:00 2001 From: gareth Date: Thu, 22 Mar 2007 10:11:15 +0000 Subject: brought zircon branch into trunk --- OpenSim.Framework.Console/ConsoleBase.cs | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 OpenSim.Framework.Console/ConsoleBase.cs (limited to 'OpenSim.Framework.Console/ConsoleBase.cs') diff --git a/OpenSim.Framework.Console/ConsoleBase.cs b/OpenSim.Framework.Console/ConsoleBase.cs new file mode 100644 index 0000000..5343e71 --- /dev/null +++ b/OpenSim.Framework.Console/ConsoleBase.cs @@ -0,0 +1,45 @@ +using System; + +namespace OpenSim.Framework.Console +{ + public abstract class ConsoleBase + { + + public enum ConsoleType + { + Local, // Use stdio + TCP, // Use TCP/telnet + SimChat // Use in-world chat (for gods) + } + + public abstract void Close(); + + public abstract void Write(string format, params object[] args); + + public abstract void WriteLine(string format, params object[] args); + + public abstract string ReadLine(); + + public abstract int Read(); + + // Displays a command prompt and waits for the user to enter a string, then returns that string + public abstract string CmdPrompt(string prompt); + + // Displays a command prompt and returns a default value if the user simply presses enter + public abstract string CmdPrompt(string prompt, string defaultresponse); + + // Displays a command prompt and returns a default value, user may only enter 1 of 2 options + public abstract string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB); + + // Runs a command with a number of parameters + public abstract Object RunCmd(string Cmd, string[] cmdparams); + + // Shows data about something + public abstract void ShowCommands(string ShowWhat); + + // Displays a prompt to the user and then runs the command they entered + public abstract void MainConsolePrompt(); + + public abstract void SetStatus(string status); + } +} -- cgit v1.1