* Submitting 3 files for the messagingserver that I've kept to myself.

This commit is contained in:
Teravus Ovares
2008-06-02 16:37:28 +00:00
parent a1395b90be
commit f6ac7f7f61
3 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenSim.Grid.MessagingServer
{
// This is a wrapper for a List<LLUUID> so it can be happily stored in a hashtable.
public class PresenceBackreferenceEntry
{
List<LLUUID> AgentList = new List<LLUUID>();
public PresenceBackreferenceEntry()
{
}
public void Add(LLUUID item)
{
lock (AgentList)
{
AgentList.Add(item);
}
}
public LLUUID getitem(int index)
{
LLUUID result = null;
lock (AgentList)
{
if (index > 0 && index < AgentList.Count)
{
result = AgentList[index];
}
}
return result;
}
public int Count
{
get
{
int count = 0;
lock (AgentList)
{
count = AgentList.Count;
}
return count;
}
}
public void Remove(LLUUID item)
{
lock (AgentList)
{
if (AgentList.Contains(item))
AgentList.Remove(item);
}
}
public bool contains(LLUUID item)
{
bool result = false;
lock (AgentList)
{
result = AgentList.Contains(item);
}
return result;
}
}
}