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