1
0

IGroupsServicesConnector.cs 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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;
  28. using System.Collections.Generic;
  29. using OpenMetaverse;
  30. using OpenSim.Framework;
  31. namespace OpenSim.Groups
  32. {
  33. public interface IGroupsServicesConnector
  34. {
  35. UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
  36. bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID, out string reason);
  37. bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee,
  38. bool openEnrollment, bool allowPublish, bool maturePublish, out string reason);
  39. ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName);
  40. List<DirGroupsReplyData> FindGroups(string RequestingAgentID, string search);
  41. List<GroupMembersData> GetGroupMembers(string RequestingAgentID, UUID GroupID);
  42. bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason);
  43. bool UpdateGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers);
  44. void RemoveGroupRole(string RequestingAgentID, UUID groupID, UUID roleID);
  45. List<GroupRolesData> GetGroupRoles(string RequestingAgentID, UUID GroupID);
  46. List<GroupRoleMembersData> GetGroupRoleMembers(string RequestingAgentID, UUID GroupID);
  47. bool AddAgentToGroup(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID, string token, out string reason);
  48. void RemoveAgentFromGroup(string RequestingAgentID, string AgentID, UUID GroupID);
  49. bool AddAgentToGroupInvite(string RequestingAgentID, UUID inviteID, UUID groupID, UUID roleID, string agentID);
  50. GroupInviteInfo GetAgentToGroupInvite(string RequestingAgentID, UUID inviteID);
  51. void RemoveAgentToGroupInvite(string RequestingAgentID, UUID inviteID);
  52. void AddAgentToGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID);
  53. void RemoveAgentFromGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID);
  54. List<GroupRolesData> GetAgentGroupRoles(string RequestingAgentID, string AgentID, UUID GroupID);
  55. void SetAgentActiveGroup(string RequestingAgentID, string AgentID, UUID GroupID);
  56. ExtendedGroupMembershipData GetAgentActiveMembership(string RequestingAgentID, string AgentID);
  57. void SetAgentActiveGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID);
  58. void UpdateMembership(string RequestingAgentID, string AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile);
  59. /// <summary>
  60. /// Get information about a specific group to which the user belongs.
  61. /// </summary>
  62. /// <param name="RequestingAgentID">The agent requesting the information.</param>
  63. /// <param name="AgentID">The agent requested.</param>
  64. /// <param name="GroupID">The group requested.</param>
  65. /// <returns>
  66. /// If the user is a member of the group then the data structure is returned. If not, then null is returned.
  67. /// </returns>
  68. ExtendedGroupMembershipData GetAgentGroupMembership(string RequestingAgentID, string AgentID, UUID GroupID);
  69. /// <summary>
  70. /// Get information about the groups to which a user belongs.
  71. /// </summary>
  72. /// <param name="RequestingAgentID">The agent requesting the information.</param>
  73. /// <param name="AgentID">The agent requested.</param>
  74. /// <returns>
  75. /// Information about the groups to which the user belongs. If the user belongs to no groups then an empty
  76. /// list is returned.
  77. /// </returns>
  78. List<GroupMembershipData> GetAgentGroupMemberships(string RequestingAgentID, string AgentID);
  79. bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message,
  80. bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID);
  81. GroupNoticeInfo GetGroupNotice(string RequestingAgentID, UUID noticeID);
  82. List<ExtendedGroupNoticeData> GetGroupNotices(string RequestingAgentID, UUID GroupID);
  83. }
  84. public class GroupInviteInfo
  85. {
  86. public UUID GroupID = UUID.Zero;
  87. public UUID RoleID = UUID.Zero;
  88. public string AgentID = string.Empty;
  89. public UUID InviteID = UUID.Zero;
  90. }
  91. public class GroupNoticeInfo
  92. {
  93. public ExtendedGroupNoticeData noticeData = new ExtendedGroupNoticeData();
  94. public UUID GroupID = UUID.Zero;
  95. public string Message = string.Empty;
  96. }
  97. }