Added more infrastructure for OGS
parent
9653210db7
commit
1182375b8f
|
@ -116,7 +116,22 @@ namespace OpenGridServices.GridServer
|
||||||
}
|
}
|
||||||
|
|
||||||
static string ParseREST(string requestBody, string requestURL) {
|
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 "";
|
return "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
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();
|
SimProfileBase newprofile = new SimProfileBase();
|
||||||
newprofile.regionname=regionname;
|
newprofile.regionname=regionname;
|
||||||
|
|
Loading…
Reference in New Issue