diff options
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices.GridServer/GridHttp.cs | 15 | ||||
-rw-r--r-- | OpenGridServices.GridServer/SimProfiles.cs | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/OpenGridServices.GridServer/GridHttp.cs b/OpenGridServices.GridServer/GridHttp.cs index 758d761..c9cda61 100644 --- a/OpenGridServices.GridServer/GridHttp.cs +++ b/OpenGridServices.GridServer/GridHttp.cs | |||
@@ -116,7 +116,22 @@ namespace OpenGridServices.GridServer | |||
116 | } | 116 | } |
117 | 117 | ||
118 | static string ParseREST(string requestBody, string requestURL) { | 118 | static string ParseREST(string requestBody, string requestURL) { |
119 | char[] splitter = {'/'}; | ||
120 | string[] rest_params = requestURL.Split(splitter); | ||
121 | string req_type = rest_params[1]; // First part of the URL is the type of request - | ||
122 | switch(req_type) { | ||
123 | case "regions": | ||
124 | ulong regionhandle = (ulong)Convert.ToInt64(rest_params[2]); // get usersessions/sessionid | ||
125 | switch(rest_params[3]) { | ||
126 | case "neighbours": | ||
127 | return OpenGrid_Main.thegrid._regionmanager.GetXMLNeighbours(regionhandle); | ||
128 | break; | ||
129 | } | ||
130 | return "OK"; | ||
131 | break; | ||
132 | } | ||
119 | return ""; | 133 | return ""; |
134 | |||
120 | } | 135 | } |
121 | 136 | ||
122 | 137 | ||
diff --git a/OpenGridServices.GridServer/SimProfiles.cs b/OpenGridServices.GridServer/SimProfiles.cs index 4971b4b..535f5a9 100644 --- a/OpenGridServices.GridServer/SimProfiles.cs +++ b/OpenGridServices.GridServer/SimProfiles.cs | |||
@@ -72,6 +72,10 @@ namespace OpenGridServices.GridServer | |||
72 | 72 | ||
73 | } | 73 | } |
74 | 74 | ||
75 | public string GetXMLNeighbours(ulong reqhandle) { | ||
76 | return ""; | ||
77 | } | ||
78 | |||
75 | public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) { | 79 | public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) { |
76 | SimProfileBase newprofile = new SimProfileBase(); | 80 | SimProfileBase newprofile = new SimProfileBase(); |
77 | newprofile.regionname=regionname; | 81 | newprofile.regionname=regionname; |