OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Static Protected Attributes | Properties | List of all members
OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule Class Reference
Inheritance diagram for OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule:
Collaboration graph
[legend]

Public Member Functions

void Initialise (IConfigSource config)
 This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created. More...
 
void PostInitialise ()
 
void AddRegion (Scene scene)
 This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called. More...
 
void RegionLoaded (Scene scene)
 This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module. More...
 
void RemoveRegion (Scene scene)
 This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed. More...
 
void Close ()
 This is the inverse to Initialise. After a Close(), this instance won't be usable anymore. More...
 
int Listen (uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg)
 Create a listen event callback with the specified filters. The parameters localID,itemID are needed to uniquely identify the script during 'peek' time. Parameter hostID is needed to determine the position of the script. More...
 
int Listen (uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg, int regexBitfield)
 Create a listen event callback with the specified filters. The parameters localID,itemID are needed to uniquely identify the script during 'peek' time. Parameter hostID is needed to determine the position of the script. More...
 
void ListenControl (UUID itemID, int handle, int active)
 Sets the listen event with handle as active (active = TRUE) or inactive (active = FALSE). The handle used is returned from Listen() More...
 
void ListenRemove (UUID itemID, int handle)
 Removes the listen event callback with handle More...
 
void DeleteListener (UUID itemID)
 Removes all listen event callbacks for the given itemID (script engine) More...
 
void DeliverMessage (ChatTypeEnum type, int channel, string name, UUID id, string msg)
 This method scans over the objects which registered an interest in listen callbacks. For everyone it finds, it checks if it fits the given filter. If it does, then enqueue the message for delivery to the objects listen event handler. The enqueued ListenerInfo no longer has filter values, but the actually trigged values. Objects that do an llSay have their messages delivered here and for nearby avatars, the OnChatFromClient event is used. More...
 
void DeliverMessage (ChatTypeEnum type, int channel, string name, UUID id, string msg, Vector3 position)
 This method scans over the objects which registered an interest in listen callbacks. For everyone it finds, it checks if it fits the given filter. If it does, then enqueue the message for delivery to the objects listen event handler. The enqueued ListenerInfo no longer has filter values, but the actually trigged values. Objects that do an llSay have their messages delivered here and for nearby avatars, the OnChatFromClient event is used. More...
 
void DeliverMessageTo (UUID target, int channel, Vector3 pos, string name, UUID id, string msg)
 Delivers the message to a scene entity. More...
 
bool HasMessages ()
 Are there any listen events ready to be dispatched? More...
 
IWorldCommListenerInfo GetNextMessage ()
 Pop the first availlable listen event from the queue More...
 
Object[] GetSerializationData (UUID itemID)
 
void CreateFromData (uint localID, UUID itemID, UUID hostID, Object[] data)
 

Protected Member Functions

void QueueMessage (ListenerInfo li)
 

Static Protected Attributes

static Vector3 CenterOfRegion = new Vector3(128, 128, 20)
 

Properties

string Name [get]
 
Type ReplaceableInterface [get]
 
int ListenerCount [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IWorldComm
int ListenerCount [get]
 Total number of listeners More...
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IRegionModuleBase
string Name [get]
 
Type ReplaceableInterface [get]
 If this returns non-null, it is the type of an interface that this module intends to register. This will cause the loader to defer loading of this module until all other modules have been loaded. If no other module has registered the interface by then, this module will be activated, else it will remain inactive, letting the other module take over. This should return non-null ONLY in modules that are intended to be easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party provided modules. More...
 

Detailed Description

Definition at line 94 of file WorldCommModule.cs.

Member Function Documentation

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.AddRegion ( Scene  scene)
inline

This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 144 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.Close ( )
inline

This is the inverse to Initialise. After a Close(), this instance won't be usable anymore.

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 164 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.CreateFromData ( uint  localID,
UUID  itemID,
UUID  hostID,
Object[]  data 
)
inline
void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.DeleteListener ( UUID  itemID)
inline

Removes all listen event callbacks for the given itemID (script engine)

Parameters
itemIDUUID of the script engine

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 266 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.DeliverMessage ( ChatTypeEnum  type,
int  channel,
string  name,
UUID  id,
string  msg 
)
inline

This method scans over the objects which registered an interest in listen callbacks. For everyone it finds, it checks if it fits the given filter. If it does, then enqueue the message for delivery to the objects listen event handler. The enqueued ListenerInfo no longer has filter values, but the actually trigged values. Objects that do an llSay have their messages delivered here and for nearby avatars, the OnChatFromClient event is used.

Parameters
typetype of delvery (whisper,say,shout or regionwide)
channelchannel to sent on
namename of sender (object or avatar)
idkey of sender (object or avatar)
msgmsg to sent

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 274 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.DeliverMessage ( ChatTypeEnum  type,
int  channel,
string  name,
UUID  id,
string  msg,
Vector3  position 
)
inline

This method scans over the objects which registered an interest in listen callbacks. For everyone it finds, it checks if it fits the given filter. If it does, then enqueue the message for delivery to the objects listen event handler. The enqueued ListenerInfo no longer has filter values, but the actually trigged values. Objects that do an llSay have their messages delivered here and for nearby avatars, the OnChatFromClient event is used.

Parameters
typetype of delvery (whisper,say,shout or regionwide)
channelchannel to sent on
namename of sender (object or avatar)
idkey of sender (object or avatar)
msgmsg to sent

Definition at line 305 of file WorldCommModule.cs.

Here is the call graph for this function:

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.DeliverMessageTo ( UUID  target,
int  channel,
Vector3  pos,
string  name,
UUID  id,
string  msg 
)
inline

Delivers the message to a scene entity.

Parameters
targetTarget.
channelChannel.
nameName.
idIdentifier.
msgMessage.

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 372 of file WorldCommModule.cs.

Here is the call graph for this function:

IWorldCommListenerInfo OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.GetNextMessage ( )
inline

Pop the first availlable listen event from the queue

Returns
ListenerInfo with filter filled in

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 467 of file WorldCommModule.cs.

Object [] OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.GetSerializationData ( UUID  itemID)
inline
bool OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.HasMessages ( )
inline

Are there any listen events ready to be dispatched?

Returns
boolean indication

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 458 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.Initialise ( IConfigSource  source)
inline

This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created.

Parameters
sourceA IConfigSource

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 111 of file WorldCommModule.cs.

int OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.Listen ( uint  localID,
UUID  itemID,
UUID  hostID,
int  channel,
string  name,
UUID  id,
string  msg 
)
inline

Create a listen event callback with the specified filters. The parameters localID,itemID are needed to uniquely identify the script during 'peek' time. Parameter hostID is needed to determine the position of the script.

Parameters
localIDlocalID of the script engine
itemIDUUID of the script engine
hostIDUUID of the SceneObjectPart
channelchannel to listen on
namename to filter on
idkey to filter on (user given, could be totally faked)
msgmsg to filter on
Returns
number of the scripts handle

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 203 of file WorldCommModule.cs.

int OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.Listen ( uint  localID,
UUID  itemID,
UUID  hostID,
int  channel,
string  name,
UUID  id,
string  msg,
int  regexBitfield 
)
inline

Create a listen event callback with the specified filters. The parameters localID,itemID are needed to uniquely identify the script during 'peek' time. Parameter hostID is needed to determine the position of the script.

Parameters
localIDlocalID of the script engine
itemIDUUID of the script engine
hostIDUUID of the SceneObjectPart
channelchannel to listen on
namename to filter on
idkey to filter on (user given, could be totally faked)
msgmsg to filter on
regexBitfieldBitfield indicating which strings should be processed as regex.
Returns
number of the scripts handle

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 229 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.ListenControl ( UUID  itemID,
int  handle,
int  active 
)
inline

Sets the listen event with handle as active (active = TRUE) or inactive (active = FALSE). The handle used is returned from Listen()

Parameters
itemIDUUID of the script engine
handlehandle returned by Listen()
activetemp. activate or deactivate the Listen()

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 243 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.ListenRemove ( UUID  itemID,
int  handle 
)
inline

Removes the listen event callback with handle

Parameters
itemIDUUID of the script engine
handlehandle returned by Listen()

Implements OpenSim.Region.Framework.Interfaces.IWorldComm.

Definition at line 256 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.PostInitialise ( )
inline

Definition at line 140 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.QueueMessage ( ListenerInfo  li)
inlineprotected

Definition at line 446 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.RegionLoaded ( Scene  scene)
inline

This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 152 of file WorldCommModule.cs.

void OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.RemoveRegion ( Scene  scene)
inline

This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 154 of file WorldCommModule.cs.

Member Data Documentation

Vector3 OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.CenterOfRegion = new Vector3(128, 128, 20)
staticprotected

Definition at line 272 of file WorldCommModule.cs.

Property Documentation

int OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.ListenerCount
get

Definition at line 180 of file WorldCommModule.cs.

string OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.Name
get

Definition at line 169 of file WorldCommModule.cs.

Type OpenSim.Region.CoreModules.Scripting.WorldComm.WorldCommModule.ReplaceableInterface
get

Definition at line 173 of file WorldCommModule.cs.


The documentation for this class was generated from the following file: