diff options
author | Adam Frisby | 2007-05-04 07:29:33 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-04 07:29:33 +0000 |
commit | 8795dc5ee5edc4ec7ee6076d73bfb7403e1195f1 (patch) | |
tree | bc3f3eb3afa6f1c611dc7c9b2ef2559ccbc5cc48 | |
parent | Sims can now load their datastore (their localworld class - prims/terrain/etc... (diff) | |
download | opensim-SC-8795dc5ee5edc4ec7ee6076d73bfb7403e1195f1.zip opensim-SC-8795dc5ee5edc4ec7ee6076d73bfb7403e1195f1.tar.gz opensim-SC-8795dc5ee5edc4ec7ee6076d73bfb7403e1195f1.tar.bz2 opensim-SC-8795dc5ee5edc4ec7ee6076d73bfb7403e1195f1.tar.xz |
Comments sucker!
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices.GridServer/GridManager.cs | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices.GridServer/GridManager.cs index 8de752d..b3b97a1 100644 --- a/OpenGridServices.GridServer/GridManager.cs +++ b/OpenGridServices.GridServer/GridManager.cs | |||
@@ -17,6 +17,10 @@ namespace OpenGridServices.GridServer | |||
17 | { | 17 | { |
18 | Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); | 18 | Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); |
19 | 19 | ||
20 | /// <summary> | ||
21 | /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. | ||
22 | /// </summary> | ||
23 | /// <param name="FileName">The filename to the grid server plugin DLL</param> | ||
20 | public void AddPlugin(string FileName) | 24 | public void AddPlugin(string FileName) |
21 | { | 25 | { |
22 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 26 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
@@ -44,7 +48,12 @@ namespace OpenGridServices.GridServer | |||
44 | 48 | ||
45 | pluginAssembly = null; | 49 | pluginAssembly = null; |
46 | } | 50 | } |
47 | 51 | ||
52 | /// <summary> | ||
53 | /// Returns a region by argument | ||
54 | /// </summary> | ||
55 | /// <param name="uuid">A UUID key of the region to return</param> | ||
56 | /// <returns>A SimProfileData for the region</returns> | ||
48 | public SimProfileData getRegion(libsecondlife.LLUUID uuid) | 57 | public SimProfileData getRegion(libsecondlife.LLUUID uuid) |
49 | { | 58 | { |
50 | foreach(KeyValuePair<string,IGridData> kvp in _plugins) { | 59 | foreach(KeyValuePair<string,IGridData> kvp in _plugins) { |
@@ -60,6 +69,11 @@ namespace OpenGridServices.GridServer | |||
60 | return null; | 69 | return null; |
61 | } | 70 | } |
62 | 71 | ||
72 | /// <summary> | ||
73 | /// Returns a region by argument | ||
74 | /// </summary> | ||
75 | /// <param name="uuid">A regionHandle of the region to return</param> | ||
76 | /// <returns>A SimProfileData for the region</returns> | ||
63 | public SimProfileData getRegion(ulong handle) | 77 | public SimProfileData getRegion(ulong handle) |
64 | { | 78 | { |
65 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | 79 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) |
@@ -104,6 +118,11 @@ namespace OpenGridServices.GridServer | |||
104 | return response; | 118 | return response; |
105 | } | 119 | } |
106 | 120 | ||
121 | /// <summary> | ||
122 | /// Performed when a region connects to the grid server initially. | ||
123 | /// </summary> | ||
124 | /// <param name="request">The XMLRPC Request</param> | ||
125 | /// <returns>Startup parameters</returns> | ||
107 | public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request) | 126 | public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request) |
108 | { | 127 | { |
109 | XmlRpcResponse response = new XmlRpcResponse(); | 128 | XmlRpcResponse response = new XmlRpcResponse(); |
@@ -174,18 +193,37 @@ namespace OpenGridServices.GridServer | |||
174 | return response; | 193 | return response; |
175 | } | 194 | } |
176 | 195 | ||
177 | 196 | /// <summary> | |
197 | /// Performs a REST Get Operation | ||
198 | /// </summary> | ||
199 | /// <param name="request"></param> | ||
200 | /// <param name="path"></param> | ||
201 | /// <param name="param"></param> | ||
202 | /// <returns></returns> | ||
178 | public string RestGetRegionMethod(string request, string path, string param) | 203 | public string RestGetRegionMethod(string request, string path, string param) |
179 | { | 204 | { |
180 | return RestGetSimMethod("", "/sims/", param); | 205 | return RestGetSimMethod("", "/sims/", param); |
181 | } | 206 | } |
182 | 207 | ||
208 | /// <summary> | ||
209 | /// Performs a REST Set Operation | ||
210 | /// </summary> | ||
211 | /// <param name="request"></param> | ||
212 | /// <param name="path"></param> | ||
213 | /// <param name="param"></param> | ||
214 | /// <returns></returns> | ||
183 | public string RestSetRegionMethod(string request, string path, string param) | 215 | public string RestSetRegionMethod(string request, string path, string param) |
184 | { | 216 | { |
185 | return RestSetSimMethod("", "/sims/", param); | 217 | return RestSetSimMethod("", "/sims/", param); |
186 | } | 218 | } |
187 | 219 | ||
188 | 220 | /// <summary> | |
221 | /// Returns information about a sim via a REST Request | ||
222 | /// </summary> | ||
223 | /// <param name="request"></param> | ||
224 | /// <param name="path"></param> | ||
225 | /// <param name="param"></param> | ||
226 | /// <returns>Information about the sim in XML</returns> | ||
189 | public string RestGetSimMethod(string request, string path, string param) | 227 | public string RestGetSimMethod(string request, string path, string param) |
190 | { | 228 | { |
191 | string respstring = String.Empty; | 229 | string respstring = String.Empty; |
@@ -213,7 +251,14 @@ namespace OpenGridServices.GridServer | |||
213 | return respstring; | 251 | return respstring; |
214 | } | 252 | } |
215 | 253 | ||
216 | 254 | /// <summary> | |
255 | /// Creates or updates a sim via a REST Method Request | ||
256 | /// BROKEN with SQL Update | ||
257 | /// </summary> | ||
258 | /// <param name="request"></param> | ||
259 | /// <param name="path"></param> | ||
260 | /// <param name="param"></param> | ||
261 | /// <returns>"OK" or an error</returns> | ||
217 | public string RestSetSimMethod(string request, string path, string param) | 262 | public string RestSetSimMethod(string request, string path, string param) |
218 | { | 263 | { |
219 | Console.WriteLine("SimProfiles.cs:RestSetSimMethod() - processing request......"); | 264 | Console.WriteLine("SimProfiles.cs:RestSetSimMethod() - processing request......"); |