MockGroupsServicesConnector.cs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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 System.Reflection;
  30. using log4net;
  31. using Mono.Addins;
  32. using Nini.Config;
  33. using OpenMetaverse;
  34. using OpenSim.Framework;
  35. using OpenSim.Region.Framework.Interfaces;
  36. using OpenSim.Region.Framework.Scenes;
  37. using OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups;
  38. namespace OpenSim.Tests.Common.Mock
  39. {
  40. [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
  41. public class MockGroupsServicesConnector : ISharedRegionModule, IGroupsServicesConnector
  42. {
  43. private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  44. public string Name
  45. {
  46. get { return "MockGroupsServicesConnector"; }
  47. }
  48. public Type ReplaceableInterface
  49. {
  50. get { return null; }
  51. }
  52. public void Initialise(IConfigSource config)
  53. {
  54. }
  55. public void Close()
  56. {
  57. }
  58. public void AddRegion(Scene scene)
  59. {
  60. m_log.DebugFormat("[MOCK GROUPS SERVICES CONNECTOR]: Adding to region {0}", scene.RegionInfo.RegionName);
  61. scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
  62. }
  63. public void RemoveRegion(Scene scene)
  64. {
  65. }
  66. public void RegionLoaded(Scene scene)
  67. {
  68. }
  69. public void PostInitialise()
  70. {
  71. }
  72. public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
  73. int membershipFee, bool openEnrollment, bool allowPublish,
  74. bool maturePublish, UUID founderID)
  75. {
  76. return UUID.Zero;
  77. }
  78. public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
  79. UUID insigniaID, int membershipFee, bool openEnrollment,
  80. bool allowPublish, bool maturePublish)
  81. {
  82. }
  83. public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
  84. string title, ulong powers)
  85. {
  86. }
  87. public void RemoveGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID)
  88. {
  89. }
  90. public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
  91. string title, ulong powers)
  92. {
  93. }
  94. public GroupRecord GetGroupRecord(UUID requestingAgentID, UUID GroupID, string GroupName)
  95. {
  96. return null;
  97. }
  98. public GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID)
  99. {
  100. return default(GroupProfileData);
  101. }
  102. public void SetAgentActiveGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID)
  103. {
  104. }
  105. public void SetAgentActiveGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
  106. {
  107. }
  108. public void SetAgentGroupInfo(UUID requestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile)
  109. {
  110. }
  111. public void AddAgentToGroupInvite(UUID requestingAgentID, UUID inviteID, UUID groupID, UUID roleID, UUID agentID)
  112. {
  113. }
  114. public GroupInviteInfo GetAgentToGroupInvite(UUID requestingAgentID, UUID inviteID)
  115. {
  116. return null;
  117. }
  118. public void RemoveAgentToGroupInvite(UUID requestingAgentID, UUID inviteID)
  119. {
  120. }
  121. public void AddAgentToGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
  122. {
  123. }
  124. public void RemoveAgentFromGroup(UUID requestingAgentID, UUID AgentID, UUID GroupID)
  125. {
  126. }
  127. public void AddAgentToGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
  128. {
  129. }
  130. public void RemoveAgentFromGroupRole(UUID requestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID)
  131. {
  132. }
  133. public List<DirGroupsReplyData> FindGroups(UUID requestingAgentID, string search)
  134. {
  135. return null;
  136. }
  137. public GroupMembershipData GetAgentGroupMembership(UUID requestingAgentID, UUID AgentID, UUID GroupID)
  138. {
  139. return null;
  140. }
  141. public GroupMembershipData GetAgentActiveMembership(UUID requestingAgentID, UUID AgentID)
  142. {
  143. return null;
  144. }
  145. public List<GroupMembershipData> GetAgentGroupMemberships(UUID requestingAgentID, UUID AgentID)
  146. {
  147. return new List<GroupMembershipData>();
  148. }
  149. public List<GroupRolesData> GetAgentGroupRoles(UUID requestingAgentID, UUID AgentID, UUID GroupID)
  150. {
  151. return null;
  152. }
  153. public List<GroupRolesData> GetGroupRoles(UUID requestingAgentID, UUID GroupID)
  154. {
  155. return null;
  156. }
  157. public List<GroupMembersData> GetGroupMembers(UUID requestingAgentID, UUID GroupID)
  158. {
  159. return null;
  160. }
  161. public List<GroupRoleMembersData> GetGroupRoleMembers(UUID requestingAgentID, UUID GroupID)
  162. {
  163. return null;
  164. }
  165. public List<GroupNoticeData> GetGroupNotices(UUID requestingAgentID, UUID GroupID)
  166. {
  167. return null;
  168. }
  169. public GroupNoticeInfo GetGroupNotice(UUID requestingAgentID, UUID noticeID)
  170. {
  171. return null;
  172. }
  173. public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket)
  174. {
  175. }
  176. public void ResetAgentGroupChatSessions(UUID agentID)
  177. {
  178. }
  179. public bool hasAgentBeenInvitedToGroupChatSession(UUID agentID, UUID groupID)
  180. {
  181. return false;
  182. }
  183. public bool hasAgentDroppedGroupChatSession(UUID agentID, UUID groupID)
  184. {
  185. return false;
  186. }
  187. public void AgentDroppedFromGroupChatSession(UUID agentID, UUID groupID)
  188. {
  189. }
  190. public void AgentInvitedToGroupChatSession(UUID agentID, UUID groupID)
  191. {
  192. }
  193. }
  194. }