aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-02-03 00:15:14 +0000
committerMelanie2010-02-03 00:15:14 +0000
commitfa121951d297e03b41bf4e22b5f1a28f0dc6cf5a (patch)
tree2af43dc78768193286c23194fff01afc59b4492e /OpenSim
parentallow terrain collision events after regular collision check (diff)
parentminor: copy some method doc from the WorldComm implementation to the interface (diff)
downloadopensim-SC_OLD-fa121951d297e03b41bf4e22b5f1a28f0dc6cf5a.zip
opensim-SC_OLD-fa121951d297e03b41bf4e22b5f1a28f0dc6cf5a.tar.gz
opensim-SC_OLD-fa121951d297e03b41bf4e22b5f1a28f0dc6cf5a.tar.bz2
opensim-SC_OLD-fa121951d297e03b41bf4e22b5f1a28f0dc6cf5a.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWorldComm.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs5
4 files changed, 57 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
index 74526c4..948b9dc 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
@@ -49,10 +49,49 @@ namespace OpenSim.Region.Framework.Interfaces
49 49
50 public interface IWorldComm 50 public interface IWorldComm
51 { 51 {
52 /// <summary>
53 /// Create a listen event callback with the specified filters.
54 /// The parameters localID,itemID are needed to uniquely identify
55 /// the script during 'peek' time. Parameter hostID is needed to
56 /// determine the position of the script.
57 /// </summary>
58 /// <param name="localID">localID of the script engine</param>
59 /// <param name="itemID">UUID of the script engine</param>
60 /// <param name="hostID">UUID of the SceneObjectPart</param>
61 /// <param name="channel">channel to listen on</param>
62 /// <param name="name">name to filter on</param>
63 /// <param name="id">key to filter on (user given, could be totally faked)</param>
64 /// <param name="msg">msg to filter on</param>
65 /// <returns>number of the scripts handle</returns>
52 int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg); 66 int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
67
68 /// <summary>
69 /// This method scans over the objects which registered an interest in listen callbacks.
70 /// For everyone it finds, it checks if it fits the given filter. If it does, then
71 /// enqueue the message for delivery to the objects listen event handler.
72 /// The enqueued ListenerInfo no longer has filter values, but the actually trigged values.
73 /// Objects that do an llSay have their messages delivered here and for nearby avatars,
74 /// the OnChatFromClient event is used.
75 /// </summary>
76 /// <param name="type">type of delvery (whisper,say,shout or regionwide)</param>
77 /// <param name="channel">channel to sent on</param>
78 /// <param name="name">name of sender (object or avatar)</param>
79 /// <param name="id">key of sender (object or avatar)</param>
80 /// <param name="msg">msg to sent</param>
53 void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg); 81 void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg);
82
83 /// <summary>
84 /// Are there any listen events ready to be dispatched?
85 /// </summary>
86 /// <returns>boolean indication</returns>
54 bool HasMessages(); 87 bool HasMessages();
88
89 /// <summary>
90 /// Pop the first availlable listen event from the queue
91 /// </summary>
92 /// <returns>ListenerInfo with filter filled in</returns>
55 IWorldCommListenerInfo GetNextMessage(); 93 IWorldCommListenerInfo GetNextMessage();
94
56 void ListenControl(UUID itemID, int handle, int active); 95 void ListenControl(UUID itemID, int handle, int active);
57 void ListenRemove(UUID itemID, int handle); 96 void ListenRemove(UUID itemID, int handle);
58 void DeleteListener(UUID itemID); 97 void DeleteListener(UUID itemID);
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 464ead8..a4a1abc 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -92,8 +92,7 @@ namespace OpenSim.Region.Framework.Scenes
92 public delegate void OnShutdownDelegate(); 92 public delegate void OnShutdownDelegate();
93 93
94 public event OnShutdownDelegate OnShutdown; 94 public event OnShutdownDelegate OnShutdown;
95 95
96 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
97 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 96 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
98 public delegate void ScriptResetDelegate(uint localID, UUID itemID); 97 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
99 98
@@ -103,7 +102,14 @@ namespace OpenSim.Region.Framework.Scenes
103 102
104 public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; 103 public event OnSetRootAgentSceneDelegate OnSetRootAgentScene;
105 104
105 /// <summary>
106 /// Called when an object is touched/grabbed.
107 /// </summary>
108 /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of
109 /// the root part.
110 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
106 public event ObjectGrabDelegate OnObjectGrab; 111 public event ObjectGrabDelegate OnObjectGrab;
112
107 public event ObjectGrabDelegate OnObjectGrabbing; 113 public event ObjectGrabDelegate OnObjectGrabbing;
108 public event ObjectDeGrabDelegate OnObjectDeGrab; 114 public event ObjectDeGrabDelegate OnObjectDeGrab;
109 public event ScriptResetDelegate OnScriptReset; 115 public event ScriptResetDelegate OnScriptReset;
@@ -111,55 +117,42 @@ namespace OpenSim.Region.Framework.Scenes
111 public event OnPermissionErrorDelegate OnPermissionError; 117 public event OnPermissionErrorDelegate OnPermissionError;
112 118
113 public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); 119 public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource);
114
115 public event NewRezScript OnRezScript; 120 public event NewRezScript OnRezScript;
116 121
117 public delegate void RemoveScript(uint localID, UUID itemID); 122 public delegate void RemoveScript(uint localID, UUID itemID);
118
119 public event RemoveScript OnRemoveScript; 123 public event RemoveScript OnRemoveScript;
120 124
121 public delegate void StartScript(uint localID, UUID itemID); 125 public delegate void StartScript(uint localID, UUID itemID);
122
123 public event StartScript OnStartScript; 126 public event StartScript OnStartScript;
124 127
125 public delegate void StopScript(uint localID, UUID itemID); 128 public delegate void StopScript(uint localID, UUID itemID);
126
127 public event StopScript OnStopScript; 129 public event StopScript OnStopScript;
128 130
129 public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); 131 public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta);
130
131 public event SceneGroupMoved OnSceneGroupMove; 132 public event SceneGroupMoved OnSceneGroupMove;
132 133
133 public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); 134 public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID);
134
135 public event SceneGroupGrabed OnSceneGroupGrab; 135 public event SceneGroupGrabed OnSceneGroupGrab;
136 136
137 public delegate bool SceneGroupSpinStarted(UUID groupID); 137 public delegate bool SceneGroupSpinStarted(UUID groupID);
138
139 public event SceneGroupSpinStarted OnSceneGroupSpinStart; 138 public event SceneGroupSpinStarted OnSceneGroupSpinStart;
140 139
141 public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); 140 public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation);
142
143 public event SceneGroupSpun OnSceneGroupSpin; 141 public event SceneGroupSpun OnSceneGroupSpin;
144 142
145 public delegate void LandObjectAdded(ILandObject newParcel); 143 public delegate void LandObjectAdded(ILandObject newParcel);
146
147 public event LandObjectAdded OnLandObjectAdded; 144 public event LandObjectAdded OnLandObjectAdded;
148 145
149 public delegate void LandObjectRemoved(UUID globalID); 146 public delegate void LandObjectRemoved(UUID globalID);
150
151 public event LandObjectRemoved OnLandObjectRemoved; 147 public event LandObjectRemoved OnLandObjectRemoved;
152 148
153 public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); 149 public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID);
154
155 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 150 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
156 151
157 public delegate void SignificantClientMovement(IClientAPI remote_client); 152 public delegate void SignificantClientMovement(IClientAPI remote_client);
158
159 public event SignificantClientMovement OnSignificantClientMovement; 153 public event SignificantClientMovement OnSignificantClientMovement;
160 154
161 public delegate void IncomingInstantMessage(GridInstantMessage message); 155 public delegate void IncomingInstantMessage(GridInstantMessage message);
162
163 public event IncomingInstantMessage OnIncomingInstantMessage; 156 public event IncomingInstantMessage OnIncomingInstantMessage;
164 157
165 public event IncomingInstantMessage OnUnhandledInstantMessage; 158 public event IncomingInstantMessage OnUnhandledInstantMessage;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index ec41ac7..8c56870 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -235,6 +235,9 @@ namespace OpenSim.Region.Framework.Scenes
235 set { m_rootPart.GroupID = value; } 235 set { m_rootPart.GroupID = value; }
236 } 236 }
237 237
238 /// <value>
239 /// The parts of this scene object group. You must lock this property before using it.
240 /// </value>
238 public Dictionary<UUID, SceneObjectPart> Children 241 public Dictionary<UUID, SceneObjectPart> Children
239 { 242 {
240 get { return m_parts; } 243 get { return m_parts; }
@@ -2097,7 +2100,7 @@ namespace OpenSim.Region.Framework.Scenes
2097 } 2100 }
2098 2101
2099 /// <summary> 2102 /// <summary>
2100 /// Get a child part with a given UUID 2103 /// Get a part with a given UUID
2101 /// </summary> 2104 /// </summary>
2102 /// <param name="primID"></param> 2105 /// <param name="primID"></param>
2103 /// <returns>null if a child part with the primID was not found</returns> 2106 /// <returns>null if a child part with the primID was not found</returns>
@@ -2112,7 +2115,7 @@ namespace OpenSim.Region.Framework.Scenes
2112 } 2115 }
2113 2116
2114 /// <summary> 2117 /// <summary>
2115 /// Get a child part with a given local ID 2118 /// Get a part with a given local ID
2116 /// </summary> 2119 /// </summary>
2117 /// <param name="localID"></param> 2120 /// <param name="localID"></param>
2118 /// <returns>null if a child part with the local ID was not found</returns> 2121 /// <returns>null if a child part with the local ID was not found</returns>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b1c6fb9..61ba4da 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3178,6 +3178,11 @@ namespace OpenSim.Region.Framework.Scenes
3178 } 3178 }
3179 } 3179 }
3180 3180
3181 /// <summary>
3182 /// Set the events that this part will pass on to listeners.
3183 /// </summary>
3184 /// <param name="scriptid"></param>
3185 /// <param name="events"></param>
3181 public void SetScriptEvents(UUID scriptid, int events) 3186 public void SetScriptEvents(UUID scriptid, int events)
3182 { 3187 {
3183 // scriptEvents oldparts; 3188 // scriptEvents oldparts;