aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-23 18:24:39 +0000
committerJustin Clarke Casey2009-04-23 18:24:39 +0000
commitef9d140022b57b175f41602731ec73775bdf2d9c (patch)
treed7a561e3ce85b3064b3f84b06d2e3f2fb4f4301e /OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
parentfix up contributors list to have 3 contributors sections (diff)
downloadopensim-SC_OLD-ef9d140022b57b175f41602731ec73775bdf2d9c.zip
opensim-SC_OLD-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.gz
opensim-SC_OLD-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.bz2
opensim-SC_OLD-ef9d140022b57b175f41602731ec73775bdf2d9c.tar.xz
* Add user data plugin to store temporary profiles (which are distinct from cached)
* Plugin not yet used * Existing functionality should not be affected in any way
Diffstat (limited to 'OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs')
-rw-r--r--OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs88
1 files changed, 88 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
new file mode 100644
index 0000000..1cfeaf1
--- /dev/null
+++ b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
@@ -0,0 +1,88 @@
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 OpenSim 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.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Data;
32
33namespace OpenSim.Framework.Communications
34{
35 /// <summary>
36 /// Plugin for managing temporary user profiles.
37 /// </summary>
38 public class TemporaryUserProfilePlugin : IUserDataPlugin
39 {
40 protected Dictionary<UUID, UserProfileData> m_profiles = new Dictionary<UUID, UserProfileData>();
41
42 public string Name { get { return "TemporaryUserProfilePlugin"; } }
43 public string Version { get { return "0.1"; } }
44 public void Initialise() {}
45 public void Initialise(string connect) {}
46 public void Dispose() {}
47
48 public UserProfileData GetUserByUUID(UUID user)
49 {
50 lock (m_profiles)
51 {
52 if (m_profiles.ContainsKey(user))
53 return m_profiles[user];
54 else
55 return null;
56 }
57 }
58
59 public UserProfileData GetUserByName(string fname, string lname)
60 {
61 // We deliberately don't look up a temporary profile by name so that we don't obscure non-temporary
62 // profiles.
63
64 return null;
65 }
66
67 public UserProfileData GetUserByUri(Uri uri) { return null; }
68 public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query) { return null; }
69 public UserAgentData GetAgentByUUID(UUID user) { return null; }
70 public UserAgentData GetAgentByName(string name) { return null; }
71 public UserAgentData GetAgentByName(string fname, string lname) { return null; }
72 public void StoreWebLoginKey(UUID agentID, UUID webLoginKey) {}
73 public void AddNewUserProfile(UserProfileData user) {}
74 public bool UpdateUserProfile(UserProfileData user) { return false; }
75 public void AddNewUserAgent(UserAgentData agent) {}
76 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) {}
77 public void RemoveUserFriend(UUID friendlistowner, UUID friend) {}
78 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) {}
79 public List<FriendListItem> GetUserFriendList(UUID friendlistowner) { return null; }
80 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids) { return null; }
81 public bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; }
82 public bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return false; }
83 public AvatarAppearance GetUserAppearance(UUID user) { return null; }
84 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {}
85 public void ResetAttachments(UUID userID) {}
86 public void LogoutUsers(UUID regionID) {}
87 }
88}