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 --- OGS/ServerConsole/Properties/AssemblyInfo.cs | 33 ++++++++++ OGS/ServerConsole/ServerConsole.cs | 98 ++++++++++++++++++++++++++++ OGS/ServerConsole/ServerConsole.csproj | 40 ++++++++++++ OGS/ServerConsole/default.build | 48 ++++++++++++++ 4 files changed, 219 insertions(+) create mode 100644 OGS/ServerConsole/Properties/AssemblyInfo.cs create mode 100644 OGS/ServerConsole/ServerConsole.cs create mode 100644 OGS/ServerConsole/ServerConsole.csproj create mode 100644 OGS/ServerConsole/default.build (limited to 'OGS/ServerConsole') diff --git a/OGS/ServerConsole/Properties/AssemblyInfo.cs b/OGS/ServerConsole/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0028e2a --- /dev/null +++ b/OGS/ServerConsole/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ServerConsole")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ServerConsole")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c4d85def-4c2e-449d-bf4a-449b8cf03736")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OGS/ServerConsole/ServerConsole.cs b/OGS/ServerConsole/ServerConsole.cs new file mode 100644 index 0000000..d50a7e2 --- /dev/null +++ b/OGS/ServerConsole/ServerConsole.cs @@ -0,0 +1,98 @@ +/* +* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System; + +namespace ServerConsole +{ + public class MainConsole { + + private static ConsoleBase instance; + + public static ConsoleBase Instance + { + get + { + return instance; + } + set + { + instance = value; + } + } + + public MainConsole() + { + + } + } + + public abstract class conscmd_callback { + public abstract void RunCmd(string cmd, string[] cmdparams); + public abstract void Show(string ShowWhat); + } + + 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(); + + // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here + public abstract void WriteLine(string Line) ; + + public abstract string ReadLine(); + + public abstract int Read() ; + + public abstract void Write(string Line) ; + + public abstract string PasswdPrompt(string prompt); + + // 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() ; + } +} diff --git a/OGS/ServerConsole/ServerConsole.csproj b/OGS/ServerConsole/ServerConsole.csproj new file mode 100644 index 0000000..d23ca52 --- /dev/null +++ b/OGS/ServerConsole/ServerConsole.csproj @@ -0,0 +1,40 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {7667E6E2-F227-41A2-B1B2-315613E1BAFC} + Library + Properties + ServerConsole + ServerConsole + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\common\bin\ + TRACE + prompt + 4 + + + + + + + + + + + + \ No newline at end of file diff --git a/OGS/ServerConsole/default.build b/OGS/ServerConsole/default.build new file mode 100644 index 0000000..64a4f04 --- /dev/null +++ b/OGS/ServerConsole/default.build @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1