diff options
author | Adam Frisby | 2007-07-11 08:10:25 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-11 08:10:25 +0000 |
commit | e2ff441e31328e60c8bb1d4bb32fa4ac64f91978 (patch) | |
tree | 8405b6cef57b66a58f31a24c859846085d0b81f7 /OpenSim/Framework/Servers/BaseStreamHandler.cs | |
parent | * Wiping trunk in prep for Sugilite (diff) | |
parent | * Applying dalien's patches from bug#177 and #179 (diff) | |
download | opensim-SC_OLD-e2ff441e31328e60c8bb1d4bb32fa4ac64f91978.zip opensim-SC_OLD-e2ff441e31328e60c8bb1d4bb32fa4ac64f91978.tar.gz opensim-SC_OLD-e2ff441e31328e60c8bb1d4bb32fa4ac64f91978.tar.bz2 opensim-SC_OLD-e2ff441e31328e60c8bb1d4bb32fa4ac64f91978.tar.xz |
* Bringing Sugilite in to trunk
Diffstat (limited to 'OpenSim/Framework/Servers/BaseStreamHandler.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseStreamHandler.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseStreamHandler.cs b/OpenSim/Framework/Servers/BaseStreamHandler.cs new file mode 100644 index 0000000..0d9c674 --- /dev/null +++ b/OpenSim/Framework/Servers/BaseStreamHandler.cs | |||
@@ -0,0 +1,40 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using System.IO; | ||
5 | |||
6 | namespace OpenSim.Framework.Servers | ||
7 | { | ||
8 | public abstract class BaseStreamHandler : IStreamHandler | ||
9 | { | ||
10 | virtual public string ContentType | ||
11 | { | ||
12 | get { return "application/xml"; } | ||
13 | } | ||
14 | |||
15 | private string m_httpMethod; | ||
16 | virtual public string HttpMethod | ||
17 | { | ||
18 | get { return m_httpMethod; } | ||
19 | } | ||
20 | |||
21 | private string m_path; | ||
22 | virtual public string Path | ||
23 | { | ||
24 | get { return m_path; } | ||
25 | } | ||
26 | |||
27 | protected string GetParam( string path ) | ||
28 | { | ||
29 | return path.Substring( m_path.Length ); | ||
30 | } | ||
31 | |||
32 | public abstract byte[] Handle(string path, Stream request); | ||
33 | |||
34 | protected BaseStreamHandler(string httpMethod, string path) | ||
35 | { | ||
36 | m_httpMethod = httpMethod; | ||
37 | m_path = path; | ||
38 | } | ||
39 | } | ||
40 | } | ||