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
|
public interface IClientInventory
|
||||||
{
|
{
|
||||||
void SendRemoveInventoryFolders(UUID[] folders);
|
void SendRemoveInventoryFolders(UUID[] folders);
|
||||||
|
void SendRemoveInventoryItems(UUID[] folders);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12423,6 +12423,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(reply, ThrottleOutPacketType.Task);
|
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)
|
public void SendRemoveInventoryFolders(UUID[] folders)
|
||||||
{
|
{
|
||||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
|
|
@ -72,9 +72,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate void OnNewClientDelegate(IClientAPI client);
|
public delegate void OnNewClientDelegate(IClientAPI client);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deprecated in favour of OnClientConnect.
|
/// Triggered when a new client is added to the scene.
|
||||||
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Triggered before OnClientLogin.
|
||||||
|
/// </remarks>
|
||||||
public event OnNewClientDelegate OnNewClient;
|
public event OnNewClientDelegate OnNewClient;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -192,6 +194,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
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 event ClientClosed OnClientClosed;
|
||||||
|
|
||||||
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
|
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)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
lock (vlock)
|
lock (vlock)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelId;
|
string channelId;
|
||||||
|
|
||||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||||
|
@ -273,23 +270,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create a dictionary entry unconditionally. This eliminates the
|
// Create a dictionary entry unconditionally. This eliminates the
|
||||||
// need to check for a parent in the core code. The end result is
|
// 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
|
// the same, if the parent table entry is an empty string, then
|
||||||
// region channels will be created as first-level channels.
|
// region channels will be created as first-level channels.
|
||||||
|
lock (m_parents)
|
||||||
lock (m_parents)
|
{
|
||||||
if (m_parents.ContainsKey(sceneUUID))
|
if (m_parents.ContainsKey(sceneUUID))
|
||||||
{
|
{
|
||||||
RemoveRegion(scene);
|
RemoveRegion(scene);
|
||||||
m_parents.Add(sceneUUID, channelId);
|
m_parents.Add(sceneUUID, channelId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_parents.Add(sceneUUID, channelId);
|
m_parents.Add(sceneUUID, channelId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to capture scene in an anonymous method
|
// we need to capture scene in an anonymous method
|
||||||
|
@ -298,26 +294,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
{
|
{
|
||||||
OnRegisterCaps(scene, agentID, caps);
|
OnRegisterCaps(scene, agentID, caps);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to indicate that all loadable modules have now been added
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to indicate that the region is going away.
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
lock (vlock)
|
lock (vlock)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelId;
|
string channelId;
|
||||||
|
|
||||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||||
|
@ -328,10 +318,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// iteration over the set of chidren identified.
|
// iteration over the set of chidren identified.
|
||||||
// This assumes that there is just one directory per
|
// This assumes that there is just one directory per
|
||||||
// region.
|
// region.
|
||||||
|
|
||||||
if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
|
if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
|
||||||
{
|
{
|
||||||
|
|
||||||
m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
|
m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
|
||||||
sceneName, sceneUUID, channelId);
|
sceneName, sceneUUID, channelId);
|
||||||
|
|
||||||
|
@ -360,7 +348,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
|
|
||||||
lock (m_parents)
|
lock (m_parents)
|
||||||
{
|
{
|
||||||
if (m_parents.ContainsKey(sceneUUID))
|
if (m_parents.ContainsKey(sceneUUID))
|
||||||
{
|
{
|
||||||
m_parents.Remove(sceneUUID);
|
m_parents.Remove(sceneUUID);
|
||||||
}
|
}
|
||||||
|
@ -459,11 +447,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
ScenePresence avatar = null;
|
ScenePresence avatar = null;
|
||||||
string avatarName = 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);
|
avatar = scene.GetScenePresence(agentID);
|
||||||
while (avatar == null)
|
while (avatar == null)
|
||||||
|
@ -566,7 +554,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (retry);
|
}
|
||||||
|
while (retry);
|
||||||
|
|
||||||
if (code != "OK")
|
if (code != "OK")
|
||||||
{
|
{
|
||||||
|
@ -676,7 +665,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback for a client request for a private chat channel
|
/// Callback for a client request for a private chat channel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -698,10 +686,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
return "<llsd>true</llsd>";
|
return "<llsd>true</llsd>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private string RegionGetOrCreateChannel(Scene scene, LandData land)
|
private string RegionGetOrCreateChannel(Scene scene, LandData land)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelUri = null;
|
string channelUri = null;
|
||||||
string channelId = null;
|
string channelId = null;
|
||||||
|
|
||||||
|
@ -709,11 +695,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
string landName;
|
string landName;
|
||||||
string parentId;
|
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
|
// 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.
|
// as the directory ID. Otherwise, it reflects the parcel's ID.
|
||||||
|
|
||||||
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
|
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
|
||||||
{
|
{
|
||||||
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
|
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} ",
|
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
|
||||||
landName, parentId, channelUri);
|
landName, parentId, channelUri);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return channelUri;
|
return channelUri;
|
||||||
|
@ -761,7 +745,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
return VivoxCall(requrl, false);
|
return VivoxCall(requrl, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
|
private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -828,7 +811,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
///
|
///
|
||||||
/// In this case the call handles parent and description as optional values.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
|
private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
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.
|
/// channel name space.
|
||||||
/// The parent and description are optional values.
|
/// The parent and description are optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryCreateDirectory(string dirId, string description, out string channelId)
|
private bool VivoxTryCreateDirectory(string dirId, string description, out string channelId)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", dirId, m_authToken);
|
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.
|
/// are required in a later phase.
|
||||||
/// In this case the call handles parent and description as optional values.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryGetChannel(string channelParent, string channelName,
|
private bool VivoxTryGetChannel(string channelParent, string channelName,
|
||||||
out string channelId, out string channelUri)
|
out string channelId, out string channelUri)
|
||||||
{
|
{
|
||||||
|
@ -1044,6 +1024,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// return VivoxCall(requrl, true);
|
// 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>
|
/// <summary>
|
||||||
/// Delete a channel.
|
/// Delete a channel.
|
||||||
/// Once again, there a multitude of options possible. In the simplest case
|
/// 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.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </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)
|
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
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);
|
return VivoxCall(requrl, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return information on channels in the given directory
|
/// Return information on channels in the given directory
|
||||||
/// </summary>
|
/// </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)
|
private XmlElement VivoxListChildren(string channelid)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
|
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
|
/// The outcome of the call can be determined by examining the
|
||||||
/// status value in the hash table.
|
/// status value in the hash table.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private XmlElement VivoxCall(string requrl, bool admin)
|
private XmlElement VivoxCall(string requrl, bool admin)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1164,7 +1143,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Just say if it worked.
|
/// Just say if it worked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool IsOK(XmlElement resp)
|
private bool IsOK(XmlElement resp)
|
||||||
{
|
{
|
||||||
string status;
|
string status;
|
||||||
|
|
Loading…
Reference in New Issue