aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OGS/gridserver/src/SimProfiles.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OGS/gridserver/src/SimProfiles.cs (renamed from ogs/gridserver/src/SimProfiles.cs)21
1 files changed, 12 insertions, 9 deletions
diff --git a/ogs/gridserver/src/SimProfiles.cs b/OGS/gridserver/src/SimProfiles.cs
index 91a92ea..6db8331 100644
--- a/ogs/gridserver/src/SimProfiles.cs
+++ b/OGS/gridserver/src/SimProfiles.cs
@@ -33,6 +33,8 @@ using System.Collections;
33using System.Collections.Generic; 33using System.Collections.Generic;
34using libsecondlife; 34using libsecondlife;
35using ServerConsole; 35using ServerConsole;
36using OpenSim.Framework.Utilities;
37using OpenSim.Framework.Sims;
36 38
37namespace OpenGridServices 39namespace OpenGridServices
38{ 40{
@@ -40,7 +42,7 @@ namespace OpenGridServices
40 /// </summary> 42 /// </summary>
41 public class SimProfileManager { 43 public class SimProfileManager {
42 44
43 public Dictionary<LLUUID, SimProfile> SimProfiles = new Dictionary<LLUUID, SimProfile>(); 45 public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>();
44 46
45 public SimProfileManager() { 47 public SimProfileManager() {
46 } 48 }
@@ -49,19 +51,19 @@ namespace OpenGridServices
49 // TODO: need to load from database 51 // TODO: need to load from database
50 } 52 }
51 53
52 public SimProfile GetProfileByHandle(ulong reqhandle) { 54 public SimProfileBase GetProfileByHandle(ulong reqhandle) {
53 foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) { 55 foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) {
54 if(SimProfiles[UUID].regionhandle==reqhandle) return SimProfiles[UUID]; 56 if(SimProfiles[UUID].regionhandle==reqhandle) return SimProfiles[UUID];
55 } 57 }
56 return null; 58 return null;
57 } 59 }
58 60
59 public SimProfile GetProfileByLLUUID(LLUUID ProfileLLUUID) { 61 public SimProfileBase GetProfileByLLUUID(LLUUID ProfileLLUUID) {
60 return SimProfiles[ProfileLLUUID]; 62 return SimProfiles[ProfileLLUUID];
61 } 63 }
62 64
63 public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey) { 65 public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey) {
64 SimProfile TheSim=GetProfileByHandle(regionhandle); 66 SimProfileBase TheSim=GetProfileByHandle(regionhandle);
65 if(TheSim != null) 67 if(TheSim != null)
66 if(TheSim.recvkey==simrecvkey) { 68 if(TheSim.recvkey==simrecvkey) {
67 return true; 69 return true;
@@ -71,8 +73,8 @@ namespace OpenGridServices
71 73
72 } 74 }
73 75
74 public SimProfile CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) { 76 public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) {
75 SimProfile newprofile = new SimProfile(); 77 SimProfileBase newprofile = new SimProfileBase();
76 newprofile.regionname=regionname; 78 newprofile.regionname=regionname;
77 newprofile.sim_ip=sim_ip; 79 newprofile.sim_ip=sim_ip;
78 newprofile.sim_port=sim_port; 80 newprofile.sim_port=sim_port;
@@ -89,7 +91,8 @@ namespace OpenGridServices
89 91
90 } 92 }
91 93
92 public class SimProfile { 94 /* is in OpenSim.Framework
95 public class SimProfileBase {
93 public LLUUID UUID; 96 public LLUUID UUID;
94 public ulong regionhandle; 97 public ulong regionhandle;
95 public string regionname; 98 public string regionname;
@@ -102,10 +105,10 @@ namespace OpenGridServices
102 public string recvkey; 105 public string recvkey;
103 106
104 107
105 public SimProfile() { 108 public SimProfileBase() {
106 } 109 }
107 110
108 111
109 } 112 }*/
110 113
111} 114}