aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
diff options
context:
space:
mode:
authordiva2009-06-14 19:44:56 +0000
committerdiva2009-06-14 19:44:56 +0000
commit6abffedab5646c0c9d76a308cb9d7a722613fe14 (patch)
tree01f56713f19ed6157f496fd7ff86086e63e18d55 /OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
parentThank you kindly, M1sha, for a patch that improves the treePopulator module: (diff)
downloadopensim-SC_OLD-6abffedab5646c0c9d76a308cb9d7a722613fe14.zip
opensim-SC_OLD-6abffedab5646c0c9d76a308cb9d7a722613fe14.tar.gz
opensim-SC_OLD-6abffedab5646c0c9d76a308cb9d7a722613fe14.tar.bz2
opensim-SC_OLD-6abffedab5646c0c9d76a308cb9d7a722613fe14.tar.xz
Renamed Region/CoreModules/ServiceConnectors to Region/CoreModules/ServiceConnectorsOut. No functional changes.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs126
1 files changed, 0 insertions, 126 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
deleted file mode 100644
index daf7a38..0000000
--- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
+++ /dev/null
@@ -1,126 +0,0 @@
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
28using System;
29using System.Reflection;
30using log4net;
31using Nini.Config;
32using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes;
34using OpenSim.Server.Base;
35using OpenSim.Services.Interfaces;
36
37namespace OpenSim.Region.CoreModules.ServiceConnectors.User
38{
39 public class LocalUserServicesConnector : ISharedRegionModule
40 {
41 private static readonly ILog m_log =
42 LogManager.GetLogger(
43 MethodBase.GetCurrentMethod().DeclaringType);
44
45 private IUserService m_UserService;
46
47 private bool m_Enabled = false;
48
49 public string Name
50 {
51 get { return "LocalUserServicesConnector"; }
52 }
53
54 public void Initialise(IConfigSource source)
55 {
56 IConfig moduleConfig = source.Configs["Modules"];
57 if (moduleConfig != null)
58 {
59 string name = moduleConfig.GetString("UserServices", "");
60 if (name == Name)
61 {
62 IConfig userConfig = source.Configs["UserService"];
63 if (userConfig == null)
64 {
65 m_log.Error("[USER CONNECTOR]: UserService missing from OpenSim.ini");
66 return;
67 }
68
69 string serviceDll = userConfig.GetString("LocalServiceModule",
70 String.Empty);
71
72 if (serviceDll == String.Empty)
73 {
74 m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section UserService");
75 return;
76 }
77
78 Object[] args = new Object[] { source };
79 m_UserService =
80 ServerUtils.LoadPlugin<IUserService>(serviceDll,
81 args);
82
83 if (m_UserService == null)
84 {
85 m_log.Error("[USER CONNECTOR]: Can't load user service");
86 return;
87 }
88 m_Enabled = true;
89 m_log.Info("[USER CONNECTOR]: Local user connector enabled");
90 }
91 }
92 }
93
94 public void PostInitialise()
95 {
96 if (!m_Enabled)
97 return;
98 }
99
100 public void Close()
101 {
102 if (!m_Enabled)
103 return;
104 }
105
106 public void AddRegion(Scene scene)
107 {
108 if (!m_Enabled)
109 return;
110
111 scene.RegisterModuleInterface<IUserService>(m_UserService);
112 }
113
114 public void RemoveRegion(Scene scene)
115 {
116 if (!m_Enabled)
117 return;
118 }
119
120 public void RegionLoaded(Scene scene)
121 {
122 if (!m_Enabled)
123 return;
124 }
125 }
126}