diff options
author | Dr Scofield | 2008-07-25 10:09:02 +0000 |
---|---|---|
committer | Dr Scofield | 2008-07-25 10:09:02 +0000 |
commit | 2d727ebc633e19de094f764c5f0377444f4bd64e (patch) | |
tree | 59f9c593a28eaf6db2dc9ebd43c7c7ebbb0c1e4d /OpenSim/Framework/OSChatMessage.cs | |
parent | renaming the increasingly ill-named ChatFromViewerArgs to OSChatMessage (diff) | |
download | opensim-SC-2d727ebc633e19de094f764c5f0377444f4bd64e.zip opensim-SC-2d727ebc633e19de094f764c5f0377444f4bd64e.tar.gz opensim-SC-2d727ebc633e19de094f764c5f0377444f4bd64e.tar.bz2 opensim-SC-2d727ebc633e19de094f764c5f0377444f4bd64e.tar.xz |
completing rename of ChatFromViewerArgs to OSChatMessage
Diffstat (limited to 'OpenSim/Framework/OSChatMessage.cs')
-rw-r--r-- | OpenSim/Framework/OSChatMessage.cs | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/OpenSim/Framework/OSChatMessage.cs b/OpenSim/Framework/OSChatMessage.cs new file mode 100644 index 0000000..15113ed --- /dev/null +++ b/OpenSim/Framework/OSChatMessage.cs | |||
@@ -0,0 +1,118 @@ | |||
1 | using System; | ||
2 | using libsecondlife; | ||
3 | |||
4 | namespace OpenSim.Framework | ||
5 | { | ||
6 | public interface IEventArgs | ||
7 | { | ||
8 | IScene Scene { get; set; } | ||
9 | IClientAPI Sender { get; set; } | ||
10 | } | ||
11 | |||
12 | /// <summary> | ||
13 | /// ChatFromViewer Arguments | ||
14 | /// </summary> | ||
15 | public class OSChatMessage : EventArgs, IEventArgs | ||
16 | { | ||
17 | protected int m_channel; | ||
18 | protected string m_from; | ||
19 | protected string m_message; | ||
20 | protected LLVector3 m_position; | ||
21 | |||
22 | protected IScene m_scene; | ||
23 | protected IClientAPI m_sender; | ||
24 | protected object m_senderObject; | ||
25 | protected ChatTypeEnum m_type; | ||
26 | protected LLUUID m_fromID; | ||
27 | |||
28 | public OSChatMessage() | ||
29 | { | ||
30 | m_position = new LLVector3(); | ||
31 | } | ||
32 | |||
33 | /// <summary> | ||
34 | /// The message sent by the user | ||
35 | /// </summary> | ||
36 | public string Message | ||
37 | { | ||
38 | get { return m_message; } | ||
39 | set { m_message = value; } | ||
40 | } | ||
41 | |||
42 | /// <summary> | ||
43 | /// The type of message, eg say, shout, broadcast. | ||
44 | /// </summary> | ||
45 | public ChatTypeEnum Type | ||
46 | { | ||
47 | get { return m_type; } | ||
48 | set { m_type = value; } | ||
49 | } | ||
50 | |||
51 | /// <summary> | ||
52 | /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. | ||
53 | /// </summary> | ||
54 | public int Channel | ||
55 | { | ||
56 | get { return m_channel; } | ||
57 | set { m_channel = value; } | ||
58 | } | ||
59 | |||
60 | /// <summary> | ||
61 | /// The position of the sender at the time of the message broadcast. | ||
62 | /// </summary> | ||
63 | public LLVector3 Position | ||
64 | { | ||
65 | get { return m_position; } | ||
66 | set { m_position = value; } | ||
67 | } | ||
68 | |||
69 | /// <summary> | ||
70 | /// The name of the sender (needed for scripts) | ||
71 | /// </summary> | ||
72 | public string From | ||
73 | { | ||
74 | get { return m_from; } | ||
75 | set { m_from = value; } | ||
76 | } | ||
77 | |||
78 | #region IEventArgs Members | ||
79 | |||
80 | /// TODO: Sender and SenderObject should just be Sender and of | ||
81 | /// type IChatSender | ||
82 | |||
83 | /// <summary> | ||
84 | /// The client responsible for sending the message, or null. | ||
85 | /// </summary> | ||
86 | public IClientAPI Sender | ||
87 | { | ||
88 | get { return m_sender; } | ||
89 | set { m_sender = value; } | ||
90 | } | ||
91 | |||
92 | /// <summary> | ||
93 | /// The object responsible for sending the message, or null. | ||
94 | /// </summary> | ||
95 | public object SenderObject | ||
96 | { | ||
97 | get { return m_senderObject; } | ||
98 | set { m_senderObject = value; } | ||
99 | } | ||
100 | |||
101 | public LLUUID SenderUUID | ||
102 | { | ||
103 | get { return m_fromID; } | ||
104 | set { m_fromID = value; } | ||
105 | } | ||
106 | |||
107 | /// <summary> | ||
108 | /// | ||
109 | /// </summary> | ||
110 | public IScene Scene | ||
111 | { | ||
112 | get { return m_scene; } | ||
113 | set { m_scene = value; } | ||
114 | } | ||
115 | |||
116 | #endregion | ||
117 | } | ||
118 | } \ No newline at end of file | ||