View of /trunk/ModularRex/RexNetwork/RexClientViewLegacy.cs
Parent Directory
|
Revision Log
Revision 156 -
(download)
(annotate)
Wed May 20 07:05:03 2009 UTC (4 years ago) by mikkopa
File size: 2271 byte(s)
Wed May 20 07:05:03 2009 UTC (4 years ago) by mikkopa
File size: 2271 byte(s)
* Refactored RexClientView to RexClientViewBase and RexClientViewLegacy. * Moved Skype releated stuff from IRexClientCore and RexClientViewBase to RexClientViewLegacy.
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using OpenSim.Framework;
using OpenMetaverse;
using OpenSim.Region.ClientStack.LindenUDP;
using OpenSim.Region.ClientStack;
namespace ModularRex.RexNetwork
{
public delegate void ReceiveRexSkypeStore(RexClientViewLegacy remoteClient);
/// <summary>
/// Legacy client only differs from RexClientView base by having RexSkypeUrl feature.
/// More will will be later
/// </summary>
public class RexClientViewLegacy : RexClientViewBase
{
private string m_rexSkypeURL;
public event ReceiveRexSkypeStore OnNewRexSkypeUrl;
/// <summary>
/// Skype username of the avatar
/// eg: Skypeuser
/// </summary>
public string RexSkypeURL
{
get { return m_rexSkypeURL; }
set
{
m_rexSkypeURL = value;
if (OnNewRexSkypeUrl != null)
{
OnNewRexSkypeUrl(this);
}
}
}
public RexClientViewLegacy(EndPoint remoteEP, IScene scene, IAssetCache assetCache,
LLPacketServer packServer, AuthenticateResponse authenSessions, UUID agentId,
UUID sessionId, uint circuitCode, EndPoint proxyEP, ClientStackUserSettings userSettings)
: base(remoteEP, scene, assetCache, packServer, authenSessions, agentId,
sessionId, circuitCode, proxyEP, userSettings)
{
AddGenericPacketHandler("RexSkypeStore", HandleOnSkypeStore);
}
private void HandleOnSkypeStore(object sender, string method, List<string> args)
{
if (method.ToLower() == "rexskypestore")
{
string skypeAddr = args[0];
this.RexSkypeURL = skypeAddr;
}
}
public void SendSkypeAddress(UUID agentID, string skypeAddress)
{
List<string> pack = new List<string>();
pack.Add(skypeAddress);
pack.Add(agentID.ToString());
SendGenericMessage("SkypeAdderss", pack);
}
}
}
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

