| 8 |
using OpenMetaverse; |
using OpenMetaverse; |
| 9 |
using OpenSim.Framework; |
using OpenSim.Framework; |
| 10 |
using OpenSim.Framework.Communications.Cache; |
using OpenSim.Framework.Communications.Cache; |
| 11 |
|
using OpenSim.Region.ClientStack; |
| 12 |
using OpenSim.Region.ClientStack.LindenUDP; |
using OpenSim.Region.ClientStack.LindenUDP; |
| 13 |
|
|
| 14 |
namespace ModularRex.RexNetwork |
namespace ModularRex.RexNetwork |
| 17 |
|
|
| 18 |
public delegate void RexFaceExpressionDelegate(RexClientView sender, List<string> vParams); |
public delegate void RexFaceExpressionDelegate(RexClientView sender, List<string> vParams); |
| 19 |
|
|
| 20 |
|
public delegate void RexAvatarProperties(RexClientView sender, List<string> parameters); |
| 21 |
|
|
| 22 |
public class RexClientView : LLClientView, IClientRexFaceExpression, IClientRexAppearance |
public class RexClientView : LLClientView, IClientRexFaceExpression, IClientRexAppearance |
| 23 |
{ |
{ |
| 24 |
private static readonly ILog m_log = |
private static readonly ILog m_log = |
| 30 |
|
|
| 31 |
public event RexAppearanceDelegate OnRexAppearance; |
public event RexAppearanceDelegate OnRexAppearance; |
| 32 |
public event RexFaceExpressionDelegate OnRexFaceExpression; |
public event RexFaceExpressionDelegate OnRexFaceExpression; |
| 33 |
|
public event RexAvatarProperties OnRexAvatarProperties; |
| 34 |
|
|
| 35 |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
| 36 |
LLPacketServer packServer, AgentCircuitManager authenSessions, UUID agentId, |
LLPacketServer packServer, AgentCircuitManager authenSessions, UUID agentId, |
| 37 |
UUID sessionId, uint circuitCode, EndPoint proxyEP) |
UUID sessionId, uint circuitCode, EndPoint proxyEP, ClientStackUserSettings userSettings) |
| 38 |
: base(remoteEP, scene, assetCache, packServer, authenSessions, agentId, |
: base(remoteEP, scene, assetCache, packServer, authenSessions, agentId, |
| 39 |
sessionId, circuitCode, proxyEP) |
sessionId, circuitCode, proxyEP, userSettings) |
| 40 |
{ |
{ |
| 41 |
OnGenericMessage += RealXtendClientView_OnGenericMessage; |
OnGenericMessage += RealXtendClientView_OnGenericMessage; |
| 42 |
} |
} |
| 43 |
|
|
| 44 |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
| 45 |
LLPacketServer packServer, AgentCircuitManager authenSessions, UUID agentId, |
LLPacketServer packServer, AgentCircuitManager authenSessions, UUID agentId, |
| 46 |
UUID sessionId, uint circuitCode, EndPoint proxyEP, string rexAvatarURL, string rexAuthURL) |
UUID sessionId, uint circuitCode, EndPoint proxyEP, string rexAvatarURL, string rexAuthURL, ClientStackUserSettings userSettings) |
| 47 |
: base(remoteEP, scene, assetCache, packServer, authenSessions, agentId, |
: base(remoteEP, scene, assetCache, packServer, authenSessions, agentId, |
| 48 |
sessionId, circuitCode, proxyEP) |
sessionId, circuitCode, proxyEP, userSettings) |
| 49 |
{ |
{ |
| 50 |
OnGenericMessage += RealXtendClientView_OnGenericMessage; |
OnGenericMessage += RealXtendClientView_OnGenericMessage; |
| 51 |
|
|
| 101 |
if (OnRexFaceExpression != null) |
if (OnRexFaceExpression != null) |
| 102 |
{ |
{ |
| 103 |
OnRexFaceExpression(this, args); |
OnRexFaceExpression(this, args); |
| 104 |
|
return; |
| 105 |
|
} |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
if (method == "RexAvatarProp") |
| 109 |
|
{ |
| 110 |
|
if(OnRexAvatarProperties != null) |
| 111 |
|
{ |
| 112 |
|
OnRexAvatarProperties(this, args); |
| 113 |
|
return; |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
m_log.Warn("[REXCLIENTVIEW] Unhandled GenericMessage (" + method + ") {"); |
| 118 |
|
foreach (string s in args) |
| 119 |
|
{ |
| 120 |
|
m_log.Warn("\t" + s); |
| 121 |
} |
} |
| 122 |
|
m_log.Warn("}"); |
| 123 |
|
|
| 124 |
} |
} |
| 125 |
|
|
| 126 |
|
public void SendRexScriptCommand(string unit, string command, string parameters) |
| 127 |
|
{ |
| 128 |
|
List<string> pack = new List<string>(); |
| 129 |
|
|
| 130 |
|
pack.Add(unit); |
| 131 |
|
pack.Add(command); |
| 132 |
|
|
| 133 |
|
if (!string.IsNullOrEmpty(parameters)) |
| 134 |
|
pack.Add(parameters); |
| 135 |
|
|
| 136 |
|
SendGenericMessage("RexScr", pack); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public void SendRexInventoryMessage(string message) |
| 140 |
|
{ |
| 141 |
|
SendRexScriptCommand("hud", "ShowInventoryMessage(\"" + message + "\")", ""); |
| 142 |
} |
} |
| 143 |
|
|
| 144 |
public void SendRexFaceExpression(List<string> expressionData) |
public void SendRexFaceExpression(List<string> expressionData) |