Added more infrastructure for OGS

0.1-prestable
gareth 2007-03-28 21:06:46 +00:00
parent 9653210db7
commit 1182375b8f
2 changed files with 19 additions and 0 deletions

View File

@ -116,7 +116,22 @@ namespace OpenGridServices.GridServer
}
static string ParseREST(string requestBody, string requestURL) {
char[] splitter = {'/'};
string[] rest_params = requestURL.Split(splitter);
string req_type = rest_params[1]; // First part of the URL is the type of request -
switch(req_type) {
case "regions":
ulong regionhandle = (ulong)Convert.ToInt64(rest_params[2]); // get usersessions/sessionid
switch(rest_params[3]) {
case "neighbours":
return OpenGrid_Main.thegrid._regionmanager.GetXMLNeighbours(regionhandle);
break;
}
return "OK";
break;
}
return "";
}

View File

@ -72,6 +72,10 @@ namespace OpenGridServices.GridServer
}
public string GetXMLNeighbours(ulong reqhandle) {
return "";
}
public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) {
SimProfileBase newprofile = new SimProfileBase();
newprofile.regionname=regionname;