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