1
0

IEventQueue.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System.Collections.Generic;
  28. using System.Text;
  29. using System.Net;
  30. using OpenMetaverse;
  31. using OpenMetaverse.Packets;
  32. using OpenMetaverse.Messages.Linden;
  33. using OpenMetaverse.StructuredData;
  34. using OpenSim.Framework;
  35. namespace OpenSim.Region.Framework.Interfaces
  36. {
  37. public struct GroupChatListAgentUpdateData
  38. {
  39. public UUID agentID;
  40. public bool enterOrLeave; // true means enter
  41. public bool isModerator;
  42. public bool mutedText;
  43. public bool canVoice;
  44. public GroupChatListAgentUpdateData(UUID ID)
  45. {
  46. agentID = ID;
  47. canVoice = false;
  48. isModerator = false;
  49. mutedText = false;
  50. enterOrLeave = true;
  51. }
  52. public GroupChatListAgentUpdateData(UUID ID, bool eOL)
  53. {
  54. agentID = ID;
  55. canVoice = false;
  56. isModerator = false;
  57. mutedText = false;
  58. enterOrLeave = eOL;
  59. }
  60. public GroupChatListAgentUpdateData(UUID ID, bool cv, bool isMod, bool mtd, bool eOrL)
  61. {
  62. agentID = ID;
  63. enterOrLeave = eOrL;
  64. isModerator = isMod;
  65. mutedText = mtd;
  66. canVoice = cv;
  67. }
  68. }
  69. public interface IEventQueue
  70. {
  71. bool Enqueue(OSD o, UUID avatarID);
  72. bool Enqueue(byte[] o, UUID avatarID);
  73. bool Enqueue(osUTF8 o, UUID avatarID);
  74. // void DisableSimulator(ulong handle, UUID avatarID);
  75. void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY);
  76. void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint,
  77. string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY);
  78. void TeleportFinishEvent(ulong regionHandle, byte simAccess,
  79. IPEndPoint regionExternalEndPoint,
  80. uint locationID, uint flags, string capsURL,
  81. UUID agentID, int regionSizeX, int regionSizeY);
  82. void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
  83. IPEndPoint newRegionExternalEndPoint,
  84. string capsURL, UUID avatarID, UUID sessionID,
  85. int regionSizeX, int regionSizeY);
  86. void ChatterboxInvitation(UUID sessionID, string sessionName,
  87. UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
  88. uint timeStamp, bool offline, int parentEstateID, Vector3 position,
  89. uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket);
  90. void ChatterBoxSessionStartReply(UUID sessionID, string sessionName, int type,
  91. bool voiceEnabled, bool voiceModerated, UUID tmpSessionID,
  92. bool sucess, string error,
  93. UUID toAgent);
  94. void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID toAgent, List<GroupChatListAgentUpdateData> updates);
  95. void ChatterBoxForceClose(UUID toAgent, UUID sessionID, string reason);
  96. //void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID);
  97. void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data);
  98. void ScriptRunningEvent(UUID objectID, UUID itemID, bool running, UUID avatarID);
  99. byte[] BuildEvent(string eventName, OSD eventBody);
  100. void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID);
  101. void WindlightRefreshEvent(int interpolate, UUID avatarID);
  102. osUTF8 StartEvent(string eventName);
  103. osUTF8 StartEvent(string eventName, int cap);
  104. byte[] EndEventToBytes(osUTF8 sb);
  105. }
  106. }