29 using System.Collections.Generic;
30 using System.Reflection;
34 using OpenSim.Framework;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.Framework.Scenes;
37 using OpenSim.Server.Base;
38 using OpenSim.Services.Interfaces;
44 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"LocalAvatarServicesConnector")]
47 private static readonly ILog m_log =
49 MethodBase.GetCurrentMethod().DeclaringType);
53 private bool m_Enabled =
false;
55 #region ISharedRegionModule
57 public Type ReplaceableInterface
64 get {
return "LocalAvatarServicesConnector"; }
69 IConfig moduleConfig = source.Configs[
"Modules"];
70 if (moduleConfig != null)
72 string name = moduleConfig.GetString(
"AvatarServices",
"");
75 IConfig userConfig = source.Configs[
"AvatarService"];
76 if (userConfig == null)
78 m_log.Error(
"[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini");
82 string serviceDll = userConfig.GetString(
"LocalServiceModule",
85 if (serviceDll ==
String.Empty)
87 m_log.Error(
"[AVATAR CONNECTOR]: No LocalServiceModule named in section AvatarService");
96 if (m_AvatarService == null)
98 m_log.Error(
"[AVATAR CONNECTOR]: Can't load user account service");
102 m_log.Info(
"[AVATAR CONNECTOR]: Local avatar connector enabled");
141 #region IAvatarService
145 return m_AvatarService.GetAppearance(userID);
150 return m_AvatarService.SetAppearance(userID,appearance);
155 return m_AvatarService.GetAvatar(userID);
160 return m_AvatarService.SetAvatar(userID, avatar);
165 return m_AvatarService.ResetAvatar(userID);
168 public bool SetItems(UUID userID,
string[] names,
string[] values)
170 return m_AvatarService.SetItems(userID, names, values);
175 return m_AvatarService.RemoveItems(userID, names);
bool SetItems(UUID userID, string[] names, string[] values)
These methods raison d'etre: No need to send the entire avatar data (SetAvatar) for changing attachme...
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
Contains the Avatar's Appearance and methods to manipulate the appearance.
bool RemoveItems(UUID userID, string[] names)
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void PostInitialise()
This is called exactly once after all the shared region-modules have been instanciated and IRegionMod...
bool SetAppearance(UUID userID, AvatarAppearance appearance)
Called by everyone who can change the avatar data (so, regions)
Interactive OpenSim region server
AvatarAppearance GetAppearance(UUID userID)
Called by the login service
Each region/client that uses avatars will have a data structure of this type representing the avatars...
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
bool SetAvatar(UUID userID, AvatarData avatar)
Called by everyone who can change the avatar data (so, regions)
AvatarData GetAvatar(UUID userID)
Called by the login service
bool ResetAvatar(UUID userID)
Not sure if it's needed
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...