opensim – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 eva 1 /*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27  
28 using System;
29 using Mono.Addins;
30 using Nini.Config;
31 using OpenSim.Region.Framework.Scenes;
32  
33 namespace OpenSim.Region.Framework.Interfaces
34 {
35 public interface IRegionModuleBase
36 {
37 /// <value>
38 /// The name of the module
39 /// </value>
40 string Name { get; }
41  
42 /// <summary>
43 /// If this returns non-null, it is the type of an interface that
44 /// this module intends to register.
45 /// This will cause the loader to defer loading of this module
46 /// until all other modules have been loaded. If no other module
47 /// has registered the interface by then, this module will be
48 /// activated, else it will remain inactive, letting the other module
49 /// take over. This should return non-null ONLY in modules that are
50 /// intended to be easily replaceable, e.g. stub implementations
51 /// that the developer expects to be replaced by third party provided
52 /// modules.
53 /// </summary>
54 Type ReplaceableInterface { get; }
55  
56 /// <summary>
57 /// This is called to initialize the region module. For shared modules, this is called
58 /// exactly once, after creating the single (shared) instance. For non-shared modules,
59 /// this is called once on each instance, after the instace for the region has been created.
60 /// </summary>
61 /// <param name="source">
62 /// A <see cref="IConfigSource"/>
63 /// </param>
64 void Initialise(IConfigSource source);
65  
66 /// <summary>
67 /// This is the inverse to <see cref="Initialise"/>. After a Close(), this instance won't be usable anymore.
68 /// </summary>
69 void Close();
70  
71 /// <summary>
72 /// This is called whenever a <see cref="Scene"/> is added. For shared modules, this can happen several times.
73 /// For non-shared modules, this happens exactly once, after <see cref="Initialise"/> has been called.
74 /// </summary>
75 /// <param name="scene">
76 /// A <see cref="Scene"/>
77 /// </param>
78 void AddRegion(Scene scene);
79  
80 /// <summary>
81 /// This is called whenever a <see cref="Scene"/> is removed. For shared modules, this can happen several times.
82 /// For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.
83 /// </summary>
84 /// <param name="scene">
85 /// A <see cref="Scene"/>
86 /// </param>
87 void RemoveRegion(Scene scene);
88  
89 /// <summary>
90 /// This will be called once for every scene loaded. In a shared module
91 /// this will be multiple times in one instance, while a nonshared
92 /// module instance will only be called once.
93 /// This method is called after AddRegion has been called in all
94 /// modules for that scene, providing an opportunity to request
95 /// another module's interface, or hook an event from another module.
96 /// </summary>
97 /// <param name="scene">
98 /// A <see cref="Scene"/>
99 /// </param>
100 void RegionLoaded(Scene scene);
101 }
102  
103 }