Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/Client/IClientInventory.cs OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.csavinationmerge
commit
b519cf6383
|
@ -33,5 +33,6 @@ namespace OpenSim.Framework.Client
|
|||
public interface IClientInventory
|
||||
{
|
||||
void SendRemoveInventoryFolders(UUID[] folders);
|
||||
void SendRemoveInventoryItems(UUID[] folders);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12423,6 +12423,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
OutPacket(reply, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendRemoveInventoryItems(UUID[] items)
|
||||
{
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
|
||||
if (eq == null)
|
||||
{
|
||||
m_log.DebugFormat("[LLCLIENT]: Null event queue");
|
||||
return;
|
||||
}
|
||||
|
||||
OSDMap llsd = new OSDMap(3);
|
||||
|
||||
OSDMap AgentDataMap = new OSDMap(1);
|
||||
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
|
||||
|
||||
OSDArray AgentData = new OSDArray(1);
|
||||
AgentData.Add(AgentDataMap);
|
||||
|
||||
llsd.Add("AgentData", AgentData);
|
||||
|
||||
OSDArray ItemData = new OSDArray();
|
||||
|
||||
foreach (UUID item in items)
|
||||
{
|
||||
OSDMap ItemDataMap = new OSDMap(2);
|
||||
ItemDataMap.Add("ItemID", OSD.FromUUID(item));
|
||||
ItemDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||
|
||||
ItemData.Add(ItemDataMap);
|
||||
}
|
||||
|
||||
llsd.Add("ItemData", ItemData);
|
||||
|
||||
eq.Enqueue(BuildEvent("RemoveInventoryItem",
|
||||
llsd), AgentId);
|
||||
}
|
||||
|
||||
public void SendRemoveInventoryFolders(UUID[] folders)
|
||||
{
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
|
|
|
@ -72,9 +72,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public delegate void OnNewClientDelegate(IClientAPI client);
|
||||
|
||||
/// <summary>
|
||||
/// Deprecated in favour of OnClientConnect.
|
||||
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
|
||||
/// Triggered when a new client is added to the scene.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Triggered before OnClientLogin.
|
||||
/// </remarks>
|
||||
public event OnNewClientDelegate OnNewClient;
|
||||
|
||||
/// <summary>
|
||||
|
@ -192,6 +194,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a client is removed from a scene.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// At the point of firing, the scene still contains the client's scene presence.
|
||||
/// </remarks>
|
||||
public event ClientClosed OnClientClosed;
|
||||
|
||||
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
|
||||
|
|
|
@ -221,15 +221,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
}
|
||||
}
|
||||
|
||||
// Called to indicate that the module has been added to the region
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
|
||||
if (m_pluginEnabled)
|
||||
{
|
||||
lock (vlock)
|
||||
{
|
||||
|
||||
string channelId;
|
||||
|
||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||
|
@ -273,13 +270,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Create a dictionary entry unconditionally. This eliminates the
|
||||
// need to check for a parent in the core code. The end result is
|
||||
// the same, if the parent table entry is an empty string, then
|
||||
// region channels will be created as first-level channels.
|
||||
|
||||
lock (m_parents)
|
||||
{
|
||||
if (m_parents.ContainsKey(sceneUUID))
|
||||
{
|
||||
RemoveRegion(scene);
|
||||
|
@ -289,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
{
|
||||
m_parents.Add(sceneUUID, channelId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// we need to capture scene in an anonymous method
|
||||
|
@ -298,26 +294,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
{
|
||||
OnRegisterCaps(scene, agentID, caps);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Called to indicate that all loadable modules have now been added
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
// Called to indicate that the region is going away.
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
|
||||
if (m_pluginEnabled)
|
||||
{
|
||||
lock (vlock)
|
||||
{
|
||||
|
||||
string channelId;
|
||||
|
||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||
|
@ -328,10 +318,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
// iteration over the set of chidren identified.
|
||||
// This assumes that there is just one directory per
|
||||
// region.
|
||||
|
||||
if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
|
||||
{
|
||||
|
||||
m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
|
||||
sceneName, sceneUUID, channelId);
|
||||
|
||||
|
@ -459,11 +447,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
{
|
||||
try
|
||||
{
|
||||
|
||||
ScenePresence avatar = null;
|
||||
string avatarName = null;
|
||||
|
||||
if (scene == null) throw new Exception("[VivoxVoice][PROVISIONVOICE] Invalid scene");
|
||||
if (scene == null)
|
||||
throw new Exception("[VivoxVoice][PROVISIONVOICE]: Invalid scene");
|
||||
|
||||
avatar = scene.GetScenePresence(agentID);
|
||||
while (avatar == null)
|
||||
|
@ -566,7 +554,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
}
|
||||
}
|
||||
}
|
||||
} while (retry);
|
||||
}
|
||||
while (retry);
|
||||
|
||||
if (code != "OK")
|
||||
{
|
||||
|
@ -676,7 +665,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Callback for a client request for a private chat channel
|
||||
/// </summary>
|
||||
|
@ -698,10 +686,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
return "<llsd>true</llsd>";
|
||||
}
|
||||
|
||||
|
||||
private string RegionGetOrCreateChannel(Scene scene, LandData land)
|
||||
{
|
||||
|
||||
string channelUri = null;
|
||||
string channelId = null;
|
||||
|
||||
|
@ -709,11 +695,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
string landName;
|
||||
string parentId;
|
||||
|
||||
lock (m_parents) parentId = m_parents[scene.RegionInfo.RegionID.ToString()];
|
||||
lock (m_parents)
|
||||
parentId = m_parents[scene.RegionInfo.RegionID.ToString()];
|
||||
|
||||
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
|
||||
// as the directory ID. Otherwise, it reflects the parcel's ID.
|
||||
|
||||
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
|
||||
{
|
||||
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
|
||||
|
@ -741,8 +727,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
|
||||
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
|
||||
landName, parentId, channelUri);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return channelUri;
|
||||
|
@ -761,7 +745,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
return VivoxCall(requrl, false);
|
||||
}
|
||||
|
||||
|
||||
private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
|
||||
|
||||
/// <summary>
|
||||
|
@ -828,7 +811,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
///
|
||||
/// In this case the call handles parent and description as optional values.
|
||||
/// </summary>
|
||||
|
||||
private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
|
||||
{
|
||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
||||
|
@ -864,7 +846,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
/// channel name space.
|
||||
/// The parent and description are optional values.
|
||||
/// </summary>
|
||||
|
||||
private bool VivoxTryCreateDirectory(string dirId, string description, out string channelId)
|
||||
{
|
||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", dirId, m_authToken);
|
||||
|
@ -901,7 +882,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
/// are required in a later phase.
|
||||
/// In this case the call handles parent and description as optional values.
|
||||
/// </summary>
|
||||
|
||||
private bool VivoxTryGetChannel(string channelParent, string channelName,
|
||||
out string channelId, out string channelUri)
|
||||
{
|
||||
|
@ -1044,6 +1024,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
// return VivoxCall(requrl, true);
|
||||
// }
|
||||
|
||||
private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
|
||||
|
||||
/// <summary>
|
||||
/// Delete a channel.
|
||||
/// Once again, there a multitude of options possible. In the simplest case
|
||||
|
@ -1056,8 +1038,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
/// In this case the call handles parent and description as optional values.
|
||||
/// </summary>
|
||||
|
||||
private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
|
||||
|
||||
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
||||
{
|
||||
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
||||
|
@ -1068,12 +1048,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
return VivoxCall(requrl, true);
|
||||
}
|
||||
|
||||
private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
|
||||
|
||||
/// <summary>
|
||||
/// Return information on channels in the given directory
|
||||
/// </summary>
|
||||
|
||||
private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
|
||||
|
||||
private XmlElement VivoxListChildren(string channelid)
|
||||
{
|
||||
string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
|
||||
|
@ -1118,7 +1098,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
/// The outcome of the call can be determined by examining the
|
||||
/// status value in the hash table.
|
||||
/// </summary>
|
||||
|
||||
private XmlElement VivoxCall(string requrl, bool admin)
|
||||
{
|
||||
|
||||
|
@ -1164,7 +1143,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
|||
/// <summary>
|
||||
/// Just say if it worked.
|
||||
/// </summary>
|
||||
|
||||
private bool IsOK(XmlElement resp)
|
||||
{
|
||||
string status;
|
||||
|
|
Loading…
Reference in New Issue