diff options
author | lbsa71 | 2007-09-18 09:59:33 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-18 09:59:33 +0000 |
commit | a963b3057bdc80fc403e2b8402d0666c3d3f5c97 (patch) | |
tree | e2395d69fd3a7ef9fd4002498d9ebad914235645 /OpenSim/Region/ClientStack/ClientView.cs | |
parent | * Merged ClientViewBase into ClientView for great justice (diff) | |
download | opensim-SC_OLD-a963b3057bdc80fc403e2b8402d0666c3d3f5c97.zip opensim-SC_OLD-a963b3057bdc80fc403e2b8402d0666c3d3f5c97.tar.gz opensim-SC_OLD-a963b3057bdc80fc403e2b8402d0666c3d3f5c97.tar.bz2 opensim-SC_OLD-a963b3057bdc80fc403e2b8402d0666c3d3f5c97.tar.xz |
* Replaced usage of ClientView with IClientAPI
* Some propertification and hideousness of fields.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 1d92cca..2bff88a 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -45,7 +45,7 @@ using Timer = System.Timers.Timer; | |||
45 | 45 | ||
46 | namespace OpenSim.Region.ClientStack | 46 | namespace OpenSim.Region.ClientStack |
47 | { | 47 | { |
48 | public delegate bool PacketMethod(ClientView simClient, Packet packet); | 48 | public delegate bool PacketMethod(IClientAPI simClient, Packet packet); |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Handles new client connections | 51 | /// Handles new client connections |
@@ -58,8 +58,7 @@ namespace OpenSim.Region.ClientStack | |||
58 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients | 58 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients |
59 | protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance | 59 | protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance |
60 | 60 | ||
61 | public LLUUID AgentID; | 61 | private LLUUID m_sessionId; |
62 | public LLUUID SessionID; | ||
63 | public LLUUID SecureSessionID = LLUUID.Zero; | 62 | public LLUUID SecureSessionID = LLUUID.Zero; |
64 | public string firstName; | 63 | public string firstName; |
65 | public string lastName; | 64 | public string lastName; |
@@ -72,7 +71,7 @@ namespace OpenSim.Region.ClientStack | |||
72 | private LLUUID newAssetFolder = LLUUID.Zero; | 71 | private LLUUID newAssetFolder = LLUUID.Zero; |
73 | private int debug = 0; | 72 | private int debug = 0; |
74 | protected IScene m_scene; | 73 | protected IScene m_scene; |
75 | private Dictionary<uint, ClientView> m_clientThreads; | 74 | private Dictionary<uint, IClientAPI> m_clientThreads; |
76 | private AssetCache m_assetCache; | 75 | private AssetCache m_assetCache; |
77 | // private InventoryCache m_inventoryCache; | 76 | // private InventoryCache m_inventoryCache; |
78 | private int cachedtextureserial = 0; | 77 | private int cachedtextureserial = 0; |
@@ -84,7 +83,7 @@ namespace OpenSim.Region.ClientStack | |||
84 | private int probesWithNoIngressPackets = 0; | 83 | private int probesWithNoIngressPackets = 0; |
85 | private int lastPacketsReceived = 0; | 84 | private int lastPacketsReceived = 0; |
86 | 85 | ||
87 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) | 86 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, IClientAPI> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) |
88 | { | 87 | { |
89 | m_moneyBalance = 1000; | 88 | m_moneyBalance = 1000; |
90 | 89 | ||
@@ -116,6 +115,11 @@ namespace OpenSim.Region.ClientStack | |||
116 | ClientThread.Start(); | 115 | ClientThread.Start(); |
117 | } | 116 | } |
118 | 117 | ||
118 | public LLUUID SessionId | ||
119 | { | ||
120 | get { return m_sessionId; } | ||
121 | } | ||
122 | |||
119 | public void SetDebug(int newDebug) | 123 | public void SetDebug(int newDebug) |
120 | { | 124 | { |
121 | debug = newDebug; | 125 | debug = newDebug; |
@@ -285,7 +289,7 @@ namespace OpenSim.Region.ClientStack | |||
285 | 289 | ||
286 | protected virtual void AuthUser() | 290 | protected virtual void AuthUser() |
287 | { | 291 | { |
288 | // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); | 292 | // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.m_sessionId, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); |
289 | AuthenticateResponse sessionInfo = this.m_authenticateSessionsHandler.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); | 293 | AuthenticateResponse sessionInfo = this.m_authenticateSessionsHandler.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); |
290 | if (!sessionInfo.Authorised) | 294 | if (!sessionInfo.Authorised) |
291 | { | 295 | { |
@@ -297,8 +301,8 @@ namespace OpenSim.Region.ClientStack | |||
297 | { | 301 | { |
298 | MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); | 302 | MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); |
299 | //session is authorised | 303 | //session is authorised |
300 | this.AgentID = cirpack.CircuitCode.ID; | 304 | m_agentId = cirpack.CircuitCode.ID; |
301 | this.SessionID = cirpack.CircuitCode.SessionID; | 305 | this.m_sessionId = cirpack.CircuitCode.SessionID; |
302 | this.CircuitCode = cirpack.CircuitCode.Code; | 306 | this.CircuitCode = cirpack.CircuitCode.Code; |
303 | this.firstName = sessionInfo.LoginInfo.First; | 307 | this.firstName = sessionInfo.LoginInfo.First; |
304 | this.lastName = sessionInfo.LoginInfo.Last; | 308 | this.lastName = sessionInfo.LoginInfo.Last; |