Annotation of /trunk/ModularRex/RexNetwork/RexClientView.cs
Parent Directory
|
Revision Log
Revision 2 - (view) (download)
| 1 : | afrisby | 2 | using System.Collections.Generic; |
| 2 : | using System.Net; | ||
| 3 : | using OpenMetaverse; | ||
| 4 : | using OpenSim.Framework; | ||
| 5 : | using OpenSim.Framework.Communications.Cache; | ||
| 6 : | using OpenSim.Region.ClientStack.LindenUDP; | ||
| 7 : | |||
| 8 : | namespace ModularRex.RexNetwork | ||
| 9 : | { | ||
| 10 : | public delegate void RexAppearanceDelegate(RexClientView sender); | ||
| 11 : | |||
| 12 : | public delegate void RexFaceExpressionDelegate(RexClientView sender, List<string> vParams); | ||
| 13 : | |||
| 14 : | public class RexClientView : LLClientView | ||
| 15 : | { | ||
| 16 : | public event RexAppearanceDelegate OnRexAppearance; | ||
| 17 : | public event RexFaceExpressionDelegate OnRexFaceExpression; | ||
| 18 : | |||
| 19 : | public RexClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, | ||
| 20 : | LLPacketServer packServer, AgentCircuitManager authenSessions, UUID agentId, | ||
| 21 : | UUID sessionId, uint circuitCode, EndPoint proxyEP) | ||
| 22 : | : base(remoteEP, scene, assetCache, packServer, authenSessions, agentId, | ||
| 23 : | sessionId, circuitCode, proxyEP) | ||
| 24 : | { | ||
| 25 : | OnGenericMessage += RealXtendClientView_OnGenericMessage; | ||
| 26 : | } | ||
| 27 : | |||
| 28 : | void RealXtendClientView_OnGenericMessage(object sender, string method, List<string> args) | ||
| 29 : | { | ||
| 30 : | //TODO: Convert to Dictionary<Method, GenericMessageHandler> | ||
| 31 : | |||
| 32 : | if (method == "RexAppearance") | ||
| 33 : | if (OnRexAppearance != null) | ||
| 34 : | { | ||
| 35 : | OnRexAppearance(this); | ||
| 36 : | return; | ||
| 37 : | } | ||
| 38 : | |||
| 39 : | if(method == "RexFaceExpression") | ||
| 40 : | { | ||
| 41 : | if(OnRexFaceExpression != null) | ||
| 42 : | { | ||
| 43 : | OnRexFaceExpression(this, args); | ||
| 44 : | } | ||
| 45 : | } | ||
| 46 : | } | ||
| 47 : | |||
| 48 : | public void SendRexFaceExpression(List<string> expressionData) | ||
| 49 : | { | ||
| 50 : | expressionData.Insert(0, AgentId.ToString()); | ||
| 51 : | SendGenericMessage("RexFaceExpression", expressionData); | ||
| 52 : | } | ||
| 53 : | |||
| 54 : | public void SendRexAppearance(UUID agentID, string avatarURL) | ||
| 55 : | { | ||
| 56 : | List<string> pack = new List<string>(); | ||
| 57 : | pack.Add(avatarURL); | ||
| 58 : | pack.Add(agentID.ToString()); | ||
| 59 : | |||
| 60 : | SendGenericMessage("RexAppearance", pack); | ||
| 61 : | } | ||
| 62 : | } | ||
| 63 : | } |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

