OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IGroupsServicesConnector.cs
Go to the documentation of this file.
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 
77  ExtendedGroupMembershipData GetAgentGroupMembership(string RequestingAgentID, string AgentID, UUID GroupID);
78 
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  {
108  public UUID GroupID = UUID.Zero;
109  public string Message = string.Empty;
110  }
111 
112 }