aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs97
1 files changed, 97 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
new file mode 100644
index 0000000..7dc1552
--- /dev/null
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
@@ -0,0 +1,97 @@
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
28using System;
29using OpenMetaverse;
30using OpenSim.Framework;
31
32namespace OpenSim.Region.Framework.Interfaces
33{
34 /// <summary>
35 /// Provide mechanisms for messaging groups.
36 /// </summary>
37 ///
38 /// TODO: Provide a mechanism for receiving group messages as well as sending them
39 ///
40 public interface IGroupsMessagingModule
41 {
42 /// <summary>
43 /// Start a group chat session.
44 /// </summary>
45 /// You must call this before calling SendMessageToGroup(). If a chat session for this group is already taking
46 /// place then the agent will added to that session.
47 /// <param name="agentID">
48 /// A UUID that represents the agent being added. If you are agentless (e.g. you are
49 /// a region module), then you can use any random ID.
50 /// </param>
51 /// <param name="groupID">
52 /// The ID for the group to join. Currently, the session ID used is identical to the
53 /// group ID.
54 /// </param>
55 /// <returns>
56 /// True if the chat session was started successfully, false otherwise.
57 /// </returns>
58 bool StartGroupChatSession(UUID agentID, UUID groupID);
59
60 /// <summary>
61 /// Send a message to each member of a group whose chat session is active.
62 /// </summary>
63 /// <param name="im">
64 /// The message itself. The fields that must be populated are
65 ///
66 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
67 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
68 /// message - The message itself
69 /// dialog - This must be (byte)InstantMessageDialog.SessionSend
70 /// </param>
71 /// <param name="groupID"></param>
72 void SendMessageToGroup(GridInstantMessage im, UUID groupID);
73
74 /// <summary>
75 /// Send a message to all the members of a group that fulfill a condition.
76 /// </summary>
77 /// <param name="im">
78 /// The message itself. The fields that must be populated are
79 ///
80 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
81 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
82 /// message - The message itself
83 /// dialog - This must be (byte)InstantMessageDialog.SessionSend
84 /// </param>
85 /// <param name="groupID"></param>
86 /// <param name="sendingAgentForGroupCalls">
87 /// The requesting agent to use when querying the groups service. Sometimes this is different from
88 /// im.fromAgentID, with group notices, for example.
89 /// </param>
90 /// <param name="sendCondition">
91 /// The condition that must be met by a member for the message to be sent. If null then the message is sent
92 /// if the chat session is active.
93 /// </param>
94 void SendMessageToGroup(
95 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition);
96 }
97} \ No newline at end of file