| 15 |
{ |
{ |
| 16 |
public delegate void RexAppearanceDelegate(RexClientView sender); |
public delegate void RexAppearanceDelegate(RexClientView sender); |
| 17 |
|
|
| 18 |
public delegate void RexFaceExpressionDelegate(RexClientView sender, List<string> vParams); |
public delegate void RexFaceExpressionDelegate(RexClientView sender, List<string> parameters); |
| 19 |
|
|
| 20 |
public delegate void RexAvatarProperties(RexClientView sender, List<string> parameters); |
public delegate void RexAvatarProperties(RexClientView sender, List<string> parameters); |
| 21 |
|
|
| 22 |
|
public delegate void ReceiveRexStartUp(RexClientView remoteClient, UUID agentID, string status); |
| 23 |
|
|
| 24 |
|
public delegate void ReceiveRexClientScriptCmd(RexClientView remoteClient, UUID agentID, List<string> parameters); |
| 25 |
|
|
| 26 |
/// <summary> |
/// <summary> |
| 27 |
/// Inherits from LLClientView the majority of functionality |
/// Inherits from LLClientView the majority of functionality |
| 28 |
/// Overrides and extends for Rex-specific functionality. |
/// Overrides and extends for Rex-specific functionality. |
| 48 |
public event RexAppearanceDelegate OnRexAppearance; |
public event RexAppearanceDelegate OnRexAppearance; |
| 49 |
public event RexFaceExpressionDelegate OnRexFaceExpression; |
public event RexFaceExpressionDelegate OnRexFaceExpression; |
| 50 |
public event RexAvatarProperties OnRexAvatarProperties; |
public event RexAvatarProperties OnRexAvatarProperties; |
| 51 |
|
public event ReceiveRexStartUp OnReceiveRexStartUp; |
| 52 |
|
public event ReceiveRexClientScriptCmd OnReceiveRexClientScriptCmd; |
| 53 |
|
|
| 54 |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, |
| 55 |
LLPacketServer packServer, AuthenticateResponse authenSessions, UUID agentId, |
LLPacketServer packServer, AuthenticateResponse authenSessions, UUID agentId, |
| 152 |
get { return m_rexAuthURL; } |
get { return m_rexAuthURL; } |
| 153 |
set |
set |
| 154 |
{ |
{ |
| 155 |
|
if (value.Contains("@")) |
| 156 |
|
{ |
| 157 |
|
m_rexAuthURL = "http://" + value.Split('@')[1]; |
| 158 |
|
} |
| 159 |
|
else |
| 160 |
|
{ |
| 161 |
m_rexAuthURL = value; |
m_rexAuthURL = value; |
| 162 |
|
} |
| 163 |
// Request Agent Properties Asynchronously |
// Request Agent Properties Asynchronously |
| 164 |
ThreadPool.QueueUserWorkItem(RequestProperties); |
ThreadPool.QueueUserWorkItem(RequestProperties); |
| 165 |
} |
} |
| 201 |
} |
} |
| 202 |
} |
} |
| 203 |
|
|
| 204 |
|
if (method == "rexscr") |
| 205 |
|
{ |
| 206 |
|
if (OnReceiveRexClientScriptCmd != null) |
| 207 |
|
{ |
| 208 |
|
OnReceiveRexClientScriptCmd(this, AgentId, args); |
| 209 |
|
} |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
if (method == "RexStartup") |
| 213 |
|
{ |
| 214 |
|
if (OnReceiveRexStartUp != null) |
| 215 |
|
{ |
| 216 |
|
OnReceiveRexStartUp(this, AgentId, args[0]); |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
|
| 220 |
m_log.Warn("[REXCLIENTVIEW] Unhandled GenericMessage (" + method + ") {"); |
m_log.Warn("[REXCLIENTVIEW] Unhandled GenericMessage (" + method + ") {"); |
| 221 |
foreach (string s in args) |
foreach (string s in args) |
| 222 |
{ |
{ |
| 310 |
|
|
| 311 |
m_log.Info("[REXCLIENT] Sending XMLRPC Request to " + RexAuthURL); |
m_log.Info("[REXCLIENT] Sending XMLRPC Request to " + RexAuthURL); |
| 312 |
XmlRpcResponse authreply = req.Send(RexAuthURL, 9000); |
XmlRpcResponse authreply = req.Send(RexAuthURL, 9000); |
| 313 |
|
if (!((Hashtable)authreply.Value).ContainsKey("error_type")) |
| 314 |
|
{ |
| 315 |
string rexAsAddress = ((Hashtable)authreply.Value)["as_address"].ToString(); |
string rexAsAddress = ((Hashtable)authreply.Value)["as_address"].ToString(); |
| 316 |
string rexSkypeURL = ((Hashtable)authreply.Value)["skype_url"].ToString(); |
string rexSkypeURL = ((Hashtable)authreply.Value)["skype_url"].ToString(); |
| 317 |
UUID userID = new UUID(((Hashtable) authreply.Value)["uuid"].ToString()); |
UUID userID = new UUID(((Hashtable) authreply.Value)["uuid"].ToString()); |
| 323 |
RexSkypeURL = rexSkypeURL; |
RexSkypeURL = rexSkypeURL; |
| 324 |
} |
} |
| 325 |
} |
} |
| 326 |
|
else |
| 327 |
|
{ |
| 328 |
|
//Error has occurred |
| 329 |
|
m_log.Warn("[REXCLIENT]: User not found"); |
| 330 |
|
} |
| 331 |
|
} |
| 332 |
|
|
| 333 |
internal void SendRexFog(float vStart, float vEnd, float vR, float vG, float vB) |
internal void SendRexFog(float vStart, float vEnd, float vR, float vG, float vB) |
| 334 |
{ |
{ |