aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework.Console
diff options
context:
space:
mode:
authorgareth2007-03-22 10:11:15 +0000
committergareth2007-03-22 10:11:15 +0000
commit7daa3955bc3a1918e40962851f9e8d38597a245e (patch)
treebee3e1372a7eed0c1b220a8a49f7bee7d29a6b91 /OpenSim.Framework.Console
parentLoad XML for neighbourinfo from grid (diff)
downloadopensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.zip
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.gz
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.bz2
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.xz
brought zircon branch into trunk
Diffstat (limited to 'OpenSim.Framework.Console')
-rw-r--r--OpenSim.Framework.Console/AssemblyInfo.cs31
-rw-r--r--OpenSim.Framework.Console/ConsoleBase.cs45
-rw-r--r--OpenSim.Framework.Console/MainConsole.cs48
-rw-r--r--OpenSim.Framework.Console/OpenSim.Framework.Console.csproj85
-rw-r--r--OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build41
5 files changed, 250 insertions, 0 deletions
diff --git a/OpenSim.Framework.Console/AssemblyInfo.cs b/OpenSim.Framework.Console/AssemblyInfo.cs
new file mode 100644
index 0000000..00a9b7d
--- /dev/null
+++ b/OpenSim.Framework.Console/AssemblyInfo.cs
@@ -0,0 +1,31 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// Information about this assembly is defined by the following
6// attributes.
7//
8// change them to the information which is associated with the assembly
9// you compile.
10
11[assembly: AssemblyTitle("ServerConsole")]
12[assembly: AssemblyDescription("")]
13[assembly: AssemblyConfiguration("")]
14[assembly: AssemblyCompany("")]
15[assembly: AssemblyProduct("ServerConsole")]
16[assembly: AssemblyCopyright("")]
17[assembly: AssemblyTrademark("")]
18[assembly: AssemblyCulture("")]
19
20// This sets the default COM visibility of types in the assembly to invisible.
21// If you need to expose a type to COM, use [ComVisible(true)] on that type.
22[assembly: ComVisible(false)]
23
24// The assembly version has following format :
25//
26// Major.Minor.Build.Revision
27//
28// You can specify all values by your own or you can build default build and revision
29// numbers with the '*' character (the default):
30
31[assembly: AssemblyVersion("1.0.*")]
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 @@
1using System;
2
3namespace OpenSim.Framework.Console
4{
5 public abstract class ConsoleBase
6 {
7
8 public enum ConsoleType
9 {
10 Local, // Use stdio
11 TCP, // Use TCP/telnet
12 SimChat // Use in-world chat (for gods)
13 }
14
15 public abstract void Close();
16
17 public abstract void Write(string format, params object[] args);
18
19 public abstract void WriteLine(string format, params object[] args);
20
21 public abstract string ReadLine();
22
23 public abstract int Read();
24
25 // Displays a command prompt and waits for the user to enter a string, then returns that string
26 public abstract string CmdPrompt(string prompt);
27
28 // Displays a command prompt and returns a default value if the user simply presses enter
29 public abstract string CmdPrompt(string prompt, string defaultresponse);
30
31 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
32 public abstract string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB);
33
34 // Runs a command with a number of parameters
35 public abstract Object RunCmd(string Cmd, string[] cmdparams);
36
37 // Shows data about something
38 public abstract void ShowCommands(string ShowWhat);
39
40 // Displays a prompt to the user and then runs the command they entered
41 public abstract void MainConsolePrompt();
42
43 public abstract void SetStatus(string status);
44 }
45}
diff --git a/OpenSim.Framework.Console/MainConsole.cs b/OpenSim.Framework.Console/MainConsole.cs
new file mode 100644
index 0000000..02c4ae8
--- /dev/null
+++ b/OpenSim.Framework.Console/MainConsole.cs
@@ -0,0 +1,48 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27using System;
28
29namespace OpenSim.Framework.Console
30{
31 public class MainConsole {
32
33 private static ConsoleBase instance;
34
35 public static ConsoleBase Instance
36 {
37 get
38 {
39 return instance;
40 }
41 set
42 {
43 instance = value;
44 }
45 }
46 }
47
48}
diff --git a/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj b/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
new file mode 100644
index 0000000..1f0da56
--- /dev/null
+++ b/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
@@ -0,0 +1,85 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{C8405E1A-EC19-48B6-9C8C-CA03624B9916}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework.Console</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework.Console</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="System" >
62 <HintPath>\System.dll</HintPath>
63 </Reference>
64 </ItemGroup>
65 <ItemGroup>
66 </ItemGroup>
67 <ItemGroup>
68 <Compile Include="AssemblyInfo.cs">
69 <SubType>Code</SubType>
70 </Compile>
71 <Compile Include="ConsoleBase.cs">
72 <SubType>Code</SubType>
73 </Compile>
74 <Compile Include="MainConsole.cs">
75 <SubType>Code</SubType>
76 </Compile>
77 </ItemGroup>
78 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
79 <PropertyGroup>
80 <PreBuildEvent>
81 </PreBuildEvent>
82 <PostBuildEvent>
83 </PostBuildEvent>
84 </PropertyGroup>
85</Project>
diff --git a/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build b/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
new file mode 100644
index 0000000..9ceaea6
--- /dev/null
+++ b/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
@@ -0,0 +1,41 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Console" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="ConsoleBase.cs" />
16 <include name="MainConsole.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="System.dll" />
24 </references>
25 </csc>
26 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
27 <mkdir dir="${project::get-base-directory()}/../bin/"/>
28 <copy todir="${project::get-base-directory()}/../bin/">
29 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
30 <include name="*.dll"/>
31 <include name="*.exe"/>
32 </fileset>
33 </copy>
34 </target>
35 <target name="clean">
36 <delete dir="${bin.dir}" failonerror="false" />
37 <delete dir="${obj.dir}" failonerror="false" />
38 </target>
39 <target name="doc" description="Creates documentation.">
40 </target>
41</project>