aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/IUserData.cs
diff options
context:
space:
mode:
authorDiva Canto2010-02-21 15:38:52 -0800
committerDiva Canto2010-02-21 15:38:52 -0800
commitbb171717ceaef37b022a135209c2e0bf031d21f9 (patch)
tree2239ad031280027839b22c4f3c9df1a598a63228 /OpenSim/Data/IUserData.cs
parentBug fixes on field names in order to make data import work from old users tab... (diff)
downloadopensim-SC_OLD-bb171717ceaef37b022a135209c2e0bf031d21f9.zip
opensim-SC_OLD-bb171717ceaef37b022a135209c2e0bf031d21f9.tar.gz
opensim-SC_OLD-bb171717ceaef37b022a135209c2e0bf031d21f9.tar.bz2
opensim-SC_OLD-bb171717ceaef37b022a135209c2e0bf031d21f9.tar.xz
Deleted obsolete files in the Data layer. Compiles.
Diffstat (limited to 'OpenSim/Data/IUserData.cs')
-rw-r--r--OpenSim/Data/IUserData.cs209
1 files changed, 0 insertions, 209 deletions
diff --git a/OpenSim/Data/IUserData.cs b/OpenSim/Data/IUserData.cs
deleted file mode 100644
index e9a1e81..0000000
--- a/OpenSim/Data/IUserData.cs
+++ /dev/null
@@ -1,209 +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.Collections.Generic;
30using OpenMetaverse;
31using OpenSim.Framework;
32
33namespace OpenSim.Data
34{
35 /// <summary>
36 /// An interface for connecting to user storage servers.
37 /// </summary>
38 public interface IUserDataPlugin : IPlugin
39 {
40 /// <summary>
41 /// Returns a user profile from a database via their UUID
42 /// </summary>
43 /// <param name="user">The user's UUID</param>
44 /// <returns>The user data profile. Returns null if no user is found</returns>
45 UserProfileData GetUserByUUID(UUID user);
46
47 /// <summary>
48 /// Returns a users profile by searching their username parts
49 /// </summary>
50 /// <param name="fname">Account firstname</param>
51 /// <param name="lname">Account lastname</param>
52 /// <returns>The user data profile. Null if no user is found</returns>
53 UserProfileData GetUserByName(string fname, string lname);
54
55 /// <summary>
56 /// Get a user from a given uri.
57 /// </summary>
58 /// <param name="uri"></param>
59 /// <returns>The user data profile. Null if no user is found.</returns>
60 UserProfileData GetUserByUri(Uri uri);
61
62 /// <summary>
63 /// Returns a list of UUIDs firstnames and lastnames that match string query entered into the avatar picker.
64 /// </summary>
65 /// <param name="queryID">ID associated with the user's query. This must match what the client sent</param>
66 /// <param name="query">The filtered contents of the search box when the user hit search.</param>
67 /// <returns>A list of user details. If there are no results than either an empty list or null</returns>
68 List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query);
69
70 /// <summary>
71 /// Returns the current agent for a user searching by it's UUID
72 /// </summary>
73 /// <param name="user">The users UUID</param>
74 /// <returns>The current agent session. Null if no session was found</returns>
75 UserAgentData GetAgentByUUID(UUID user);
76
77 /// <summary>
78 /// Returns the current session agent for a user searching by username
79 /// </summary>
80 /// <param name="name">The users account name</param>
81 /// <returns>The current agent session</returns>
82 UserAgentData GetAgentByName(string name);
83
84 /// <summary>
85 /// Returns the current session agent for a user searching by username parts
86 /// </summary>
87 /// <param name="fname">The users first account name</param>
88 /// <param name="lname">The users account surname</param>
89 /// <returns>The current agent session</returns>
90 UserAgentData GetAgentByName(string fname, string lname);
91
92 /// <summary>
93 /// Stores new web-login key for user during web page login
94 /// </summary>
95 /// <param name="webLoginKey"></param>
96 void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
97
98 /// <summary>
99 /// Adds a new User profile to the database
100 /// </summary>
101 /// <param name="user">UserProfile to add</param>
102 void AddNewUserProfile(UserProfileData user);
103
104 /// <summary>
105 /// Adds a temporary user profile. A temporary userprofile is one that should exist only for the lifetime of
106 /// the process.
107 /// </summary>
108 /// <param name="userProfile"></param>
109 void AddTemporaryUserProfile(UserProfileData userProfile);
110
111 /// <summary>
112 /// Updates an existing user profile
113 /// </summary>
114 /// <param name="user">UserProfile to update</param>
115 bool UpdateUserProfile(UserProfileData user);
116
117 /// <summary>
118 /// Adds a new agent to the database
119 /// </summary>
120 /// <param name="agent">The agent to add</param>
121 void AddNewUserAgent(UserAgentData agent);
122
123 /// <summary>
124 /// Adds a new friend to the database for XUser
125 /// </summary>
126 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
127 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
128 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
129 void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
130
131 /// <summary>
132 /// Delete friend on friendlistowner's friendlist.
133 /// </summary>
134 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
135 /// <param name="friend">The Ex-friend agent</param>
136 void RemoveUserFriend(UUID friendlistowner, UUID friend);
137
138 /// <summary>
139 /// Update permissions for friend on friendlistowner's friendlist.
140 /// </summary>
141 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
142 /// <param name="friend">The agent that is getting or loosing permissions</param>
143 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
144 void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
145
146 /// <summary>
147 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
148 /// </summary>
149 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
150 /// <returns>The user's friends. If there are no results than either an empty list or null</returns>
151 List<FriendListItem> GetUserFriendList(UUID friendlistowner);
152
153 /// <summary>
154 /// Returns a list of <see cref="FriendRegionInfo/>s for the specified UUIDs.
155 /// </summary>
156 /// <param name="uuids">
157 /// A <see cref="List"/> of <see cref="UUID/>s to fetch info for
158 /// </param>
159 /// <returns>
160 /// A <see cref="Dictionary"/>, mapping the <see cref="UUID"/>s to <see cref="FriendRegionInfo"/>s.
161 /// </returns>
162 Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids);
163
164 /// <summary>
165 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
166 /// </summary>
167 /// <param name="from">The account to transfer from</param>
168 /// <param name="to">The account to transfer to</param>
169 /// <param name="amount">The amount to transfer</param>
170 /// <returns>Successful?</returns>
171 bool MoneyTransferRequest(UUID from, UUID to, uint amount);
172
173 /// <summary>
174 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
175 /// </summary>
176 /// <param name="from">User to transfer from</param>
177 /// <param name="to">User to transfer to</param>
178 /// <param name="inventory">Specified inventory item</param>
179 /// <returns>Successful?</returns>
180 bool InventoryTransferRequest(UUID from, UUID to, UUID inventory);
181
182 /// <summary>
183 /// Initialises the plugin (artificial constructor)
184 /// </summary>
185 void Initialise(string connect);
186
187 /// <summary>
188 /// Gets the user appearance
189 /// </summer>
190 AvatarAppearance GetUserAppearance(UUID user);
191
192 void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
193
194 void ResetAttachments(UUID userID);
195
196 void LogoutUsers(UUID regionID);
197 }
198
199 public class UserDataInitialiser : PluginInitialiserBase
200 {
201 private string connect;
202 public UserDataInitialiser (string s) { connect = s; }
203 public override void Initialise (IPlugin plugin)
204 {
205 IUserDataPlugin p = plugin as IUserDataPlugin;
206 p.Initialise (connect);
207 }
208 }
209}