From e41232bac56eb095ba9690aa47259642db94ae50 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 1 May 2008 20:36:43 +0000 Subject: create pass through of UserManagerBase to plugin calls --- .../Framework/Communications/UserManagerBase.cs | 59 ++++++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index dbbc58f..0a877f6 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -600,28 +600,79 @@ namespace OpenSim.Framework.Communications /// TODO: stubs for now to get us to a compiling state gently public UserAppearance GetUserAppearance(LLUUID user) { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.GetUserAppearance(user); + } + catch (Exception e) + { + m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); + } + } return new UserAppearance(); } public void UpdateUserAppearance(LLUUID user, UserAppearance appearance) { - return; + foreach (KeyValuePair plugin in _plugins) + { + try + { + plugin.Value.UpdateUserAppearance(user, appearance); + } + catch (Exception e) + { + m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); + } + } } public void AddAttachment(LLUUID user, LLUUID item) { - return; + foreach (KeyValuePair plugin in _plugins) + { + try + { + plugin.Value.AddAttachment(user, item); + } + catch (Exception e) + { + m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString()); + } + } } public void RemoveAttachment(LLUUID user, LLUUID item) { - return; + foreach (KeyValuePair plugin in _plugins) + { + try + { + plugin.Value.RemoveAttachment(user, item); + } + catch (Exception e) + { + m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString()); + } + } } public List GetAttachments(LLUUID user) { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.GetAttachments(user); + } + catch (Exception e) + { + m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString()); + } + } return new List(); } - } } \ No newline at end of file -- cgit v1.1