diff options
author | Adam Frisby | 2007-10-19 22:02:07 +0000 |
---|---|---|
committer | Adam Frisby | 2007-10-19 22:02:07 +0000 |
commit | 1313544ac7761ec7d84c14009fc95d5d7316004d (patch) | |
tree | 39a7bd27f07bb96859f5d09436d7e81e99f951a9 /OpenSim/Framework/General/Interfaces | |
parent | enable IRC bridge via runtime configuration (diff) | |
download | opensim-SC_OLD-1313544ac7761ec7d84c14009fc95d5d7316004d.zip opensim-SC_OLD-1313544ac7761ec7d84c14009fc95d5d7316004d.tar.gz opensim-SC_OLD-1313544ac7761ec7d84c14009fc95d5d7316004d.tar.bz2 opensim-SC_OLD-1313544ac7761ec7d84c14009fc95d5d7316004d.tar.xz |
* Major structural change: Begun converting Events to use (caller, args) syntax to conform with .NET guidelines.
* OnChatFromViewer has been converted as an example.
* Bug: SimpleApp's NPC client does not implement a Scene property and will likely crash with a NullReferenceException when it attempts to chat.
Diffstat (limited to 'OpenSim/Framework/General/Interfaces')
-rw-r--r-- | OpenSim/Framework/General/Interfaces/IClientAPI.cs | 102 |
1 files changed, 101 insertions, 1 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index bedea9e..0dad91f 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -34,8 +34,108 @@ using OpenSim.Framework.Types; | |||
34 | 34 | ||
35 | namespace OpenSim.Framework.Interfaces | 35 | namespace OpenSim.Framework.Interfaces |
36 | { | 36 | { |
37 | // Base Args Interface | ||
38 | public interface IEventArgs | ||
39 | { | ||
40 | IScene Scene | ||
41 | { | ||
42 | get; | ||
43 | set; | ||
44 | } | ||
45 | |||
46 | IClientAPI Sender | ||
47 | { | ||
48 | get; | ||
49 | set; | ||
50 | } | ||
51 | } | ||
52 | |||
37 | public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); | 53 | public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); |
38 | public delegate void ChatFromViewer(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 54 | |
55 | public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); | ||
56 | |||
57 | public enum ChatTypeEnum { Whisper = 0, Say = 1, Shout = 2, Broadcast = 0xFF }; | ||
58 | |||
59 | /// <summary> | ||
60 | /// ChatFromViewer Arguments | ||
61 | /// </summary> | ||
62 | public class ChatFromViewerArgs : EventArgs, IEventArgs | ||
63 | { | ||
64 | protected string m_message; | ||
65 | protected ChatTypeEnum m_type; | ||
66 | protected int m_channel; | ||
67 | protected LLVector3 m_position; | ||
68 | protected string m_from; | ||
69 | |||
70 | protected IClientAPI m_sender; | ||
71 | protected IScene m_scene; | ||
72 | |||
73 | /// <summary> | ||
74 | /// The message sent by the user | ||
75 | /// </summary> | ||
76 | public string Message | ||
77 | { | ||
78 | get { return m_message; } | ||
79 | set { m_message = value; } | ||
80 | } | ||
81 | |||
82 | /// <summary> | ||
83 | /// The type of message, eg say, shout, broadcast. | ||
84 | /// </summary> | ||
85 | public ChatTypeEnum Type | ||
86 | { | ||
87 | get { return m_type; } | ||
88 | set { m_type = value; } | ||
89 | } | ||
90 | |||
91 | /// <summary> | ||
92 | /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. | ||
93 | /// </summary> | ||
94 | public int Channel | ||
95 | { | ||
96 | get { return m_channel; } | ||
97 | set { m_channel = value; } | ||
98 | } | ||
99 | |||
100 | /// <summary> | ||
101 | /// The position of the sender at the time of the message broadcast. | ||
102 | /// </summary> | ||
103 | public LLVector3 Position | ||
104 | { | ||
105 | get { return m_position; } | ||
106 | set { m_position = value; } | ||
107 | } | ||
108 | |||
109 | /// <summary> | ||
110 | /// The name of the sender (needed for scripts) | ||
111 | /// </summary> | ||
112 | public string From | ||
113 | { | ||
114 | get { return m_from; } | ||
115 | set { m_from = value; } | ||
116 | } | ||
117 | |||
118 | /// <summary> | ||
119 | /// The client responsible for sending the message, or null. | ||
120 | /// </summary> | ||
121 | public IClientAPI Sender | ||
122 | { | ||
123 | get { return m_sender; } | ||
124 | set { m_sender = value; } | ||
125 | } | ||
126 | |||
127 | public IScene Scene | ||
128 | { | ||
129 | get { return m_scene; } | ||
130 | set { m_scene = value; } | ||
131 | } | ||
132 | |||
133 | public ChatFromViewerArgs() | ||
134 | { | ||
135 | m_position = new LLVector3(); | ||
136 | } | ||
137 | } | ||
138 | |||
39 | public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list | 139 | public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list |
40 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); | 140 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); |
41 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); | 141 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); |