aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ChatFromViewerArgs.cs
diff options
context:
space:
mode:
authorlbsa712008-07-08 11:25:18 +0000
committerlbsa712008-07-08 11:25:18 +0000
commitd9b802bb26ee659a68270ac05ea0406389afc883 (patch)
tree54a53c343d14e15a6236a0c36daa228f07ae57b6 /OpenSim/Framework/ChatFromViewerArgs.cs
parentRegionInfo.configMember can be null for dynamically created regions (diff)
downloadopensim-SC_OLD-d9b802bb26ee659a68270ac05ea0406389afc883.zip
opensim-SC_OLD-d9b802bb26ee659a68270ac05ea0406389afc883.tar.gz
opensim-SC_OLD-d9b802bb26ee659a68270ac05ea0406389afc883.tar.bz2
opensim-SC_OLD-d9b802bb26ee659a68270ac05ea0406389afc883.tar.xz
* Split out various classes from IClientAPI into their own files, in accordance with code standards
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ChatFromViewerArgs.cs118
1 files changed, 118 insertions, 0 deletions
diff --git a/OpenSim/Framework/ChatFromViewerArgs.cs b/OpenSim/Framework/ChatFromViewerArgs.cs
new file mode 100644
index 0000000..5000fc6
--- /dev/null
+++ b/OpenSim/Framework/ChatFromViewerArgs.cs
@@ -0,0 +1,118 @@
1using System;
2using libsecondlife;
3
4namespace 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 ChatFromViewerArgs : 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 ChatFromViewerArgs()
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