aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Interfaces
diff options
context:
space:
mode:
authorlbsa712007-10-05 10:14:42 +0000
committerlbsa712007-10-05 10:14:42 +0000
commit5a6552120395611e66a88821ce848a06c9ea4720 (patch)
treed23780998986524b160ba97292022809efcff0bc /OpenSim/Framework/General/Interfaces
parent* ignored ScriptServer/bin (diff)
downloadopensim-SC-5a6552120395611e66a88821ce848a06c9ea4720.zip
opensim-SC-5a6552120395611e66a88821ce848a06c9ea4720.tar.gz
opensim-SC-5a6552120395611e66a88821ce848a06c9ea4720.tar.bz2
opensim-SC-5a6552120395611e66a88821ce848a06c9ea4720.tar.xz
== The "right name and place" commit ==
* Moved InventoryData to Framework.Types/InventoryItemBase.cs * Moved UserData to Framework.Interfaces/IUserData.cs * Moved UserProfileData to Framework/Types/UserProfileData.cs * Deleted ass-backwards Framework dependency on Framework.Data (now it's the other way round) * Changed some namespaces to reflect file structure
Diffstat (limited to 'OpenSim/Framework/General/Interfaces')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim/Framework/General/Interfaces/IUserData.cs135
-rw-r--r--OpenSim/Framework/General/Interfaces/IUserService.cs2
3 files changed, 136 insertions, 2 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 344a55c..bedea9e 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -31,7 +31,6 @@ using System.Net;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34using OpenSim.Framework.Data;
35 34
36namespace OpenSim.Framework.Interfaces 35namespace OpenSim.Framework.Interfaces
37{ 36{
diff --git a/OpenSim/Framework/General/Interfaces/IUserData.cs b/OpenSim/Framework/General/Interfaces/IUserData.cs
new file mode 100644
index 0000000..bb3abe0
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IUserData.cs
@@ -0,0 +1,135 @@
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 libsecondlife;
29using OpenSim.Framework.Types;
30
31namespace OpenSim.Framework.Data
32{
33 /// <summary>
34 /// An interface for connecting to user storage servers.
35 /// </summary>
36 public interface IUserData
37 {
38 /// <summary>
39 /// Returns a user profile from a database via their UUID
40 /// </summary>
41 /// <param name="user">The accounts UUID</param>
42 /// <returns>The user data profile</returns>
43 UserProfileData GetUserByUUID(LLUUID user);
44
45 /// <summary>
46 /// Returns a users profile by searching their username
47 /// </summary>
48 /// <param name="name">The users username</param>
49 /// <returns>The user data profile</returns>
50 UserProfileData GetUserByName(string name);
51
52 /// <summary>
53 /// Returns a users profile by searching their username parts
54 /// </summary>
55 /// <param name="fname">Account firstname</param>
56 /// <param name="lname">Account lastname</param>
57 /// <returns>The user data profile</returns>
58 UserProfileData GetUserByName(string fname, string lname);
59
60 /// <summary>
61 /// Returns the current agent for a user searching by it's UUID
62 /// </summary>
63 /// <param name="user">The users UUID</param>
64 /// <returns>The current agent session</returns>
65 UserAgentData GetAgentByUUID(LLUUID user);
66
67 /// <summary>
68 /// Returns the current session agent for a user searching by username
69 /// </summary>
70 /// <param name="name">The users account name</param>
71 /// <returns>The current agent session</returns>
72 UserAgentData GetAgentByName(string name);
73
74 /// <summary>
75 /// Returns the current session agent for a user searching by username parts
76 /// </summary>
77 /// <param name="fname">The users first account name</param>
78 /// <param name="lname">The users account surname</param>
79 /// <returns>The current agent session</returns>
80 UserAgentData GetAgentByName(string fname, string lname);
81
82 /// <summary>
83 /// Adds a new User profile to the database
84 /// </summary>
85 /// <param name="user">UserProfile to add</param>
86 void AddNewUserProfile(UserProfileData user);
87
88 /// <summary>
89 /// Updates an existing user profile
90 /// </summary>
91 /// <param name="user">UserProfile to update</param>
92 bool UpdateUserProfile(UserProfileData user);
93
94 /// <summary>
95 /// Adds a new agent to the database
96 /// </summary>
97 /// <param name="agent">The agent to add</param>
98 void AddNewUserAgent(UserAgentData agent);
99
100 /// <summary>
101 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
102 /// </summary>
103 /// <param name="from">The account to transfer from</param>
104 /// <param name="to">The account to transfer to</param>
105 /// <param name="amount">The amount to transfer</param>
106 /// <returns>Successful?</returns>
107 bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount);
108
109 /// <summary>
110 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
111 /// </summary>
112 /// <param name="from">User to transfer from</param>
113 /// <param name="to">User to transfer to</param>
114 /// <param name="inventory">Specified inventory item</param>
115 /// <returns>Successful?</returns>
116 bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
117
118 /// <summary>
119 /// Returns the plugin version
120 /// </summary>
121 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
122 string GetVersion();
123
124 /// <summary>
125 /// Returns the plugin name
126 /// </summary>
127 /// <returns>Plugin name, eg MySQL User Provider</returns>
128 string getName();
129
130 /// <summary>
131 /// Initialises the plugin (artificial constructor)
132 /// </summary>
133 void Initialise();
134 }
135}
diff --git a/OpenSim/Framework/General/Interfaces/IUserService.cs b/OpenSim/Framework/General/Interfaces/IUserService.cs
index 974e025..461d4cb 100644
--- a/OpenSim/Framework/General/Interfaces/IUserService.cs
+++ b/OpenSim/Framework/General/Interfaces/IUserService.cs
@@ -26,7 +26,7 @@
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Data; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{