aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data/UserData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGrid.Framework.Data/UserData.cs')
-rw-r--r--OpenGrid.Framework.Data/UserData.cs73
1 files changed, 69 insertions, 4 deletions
diff --git a/OpenGrid.Framework.Data/UserData.cs b/OpenGrid.Framework.Data/UserData.cs
index 6b4f2ba..1b37957 100644
--- a/OpenGrid.Framework.Data/UserData.cs
+++ b/OpenGrid.Framework.Data/UserData.cs
@@ -7,18 +7,83 @@ namespace OpenGrid.Framework.Data
7{ 7{
8 public interface IUserData 8 public interface IUserData
9 { 9 {
10 // Retrieval 10 /// <summary>
11 // User Profiles 11 /// Returns a user profile from a database via their UUID
12 /// </summary>
13 /// <param name="user">The accounts UUID</param>
14 /// <returns>The user data profile</returns>
12 UserProfileData getUserByUUID(LLUUID user); 15 UserProfileData getUserByUUID(LLUUID user);
16
17 /// <summary>
18 /// Returns a users profile by searching their username
19 /// </summary>
20 /// <param name="name">The users username</param>
21 /// <returns>The user data profile</returns>
13 UserProfileData getUserByName(string name); 22 UserProfileData getUserByName(string name);
23
24 /// <summary>
25 /// Returns a users profile by searching their username parts
26 /// </summary>
27 /// <param name="fname">Account firstname</param>
28 /// <param name="lname">Account lastname</param>
29 /// <returns>The user data profile</returns>
14 UserProfileData getUserByName(string fname, string lname); 30 UserProfileData getUserByName(string fname, string lname);
15 // User Agents 31
32 /// <summary>
33 /// Returns the current agent for a user searching by it's UUID
34 /// </summary>
35 /// <param name="user">The users UUID</param>
36 /// <returns>The current agent session</returns>
16 UserAgentData getAgentByUUID(LLUUID user); 37 UserAgentData getAgentByUUID(LLUUID user);
38
39 /// <summary>
40 /// Returns the current session agent for a user searching by username
41 /// </summary>
42 /// <param name="name">The users account name</param>
43 /// <returns>The current agent session</returns>
17 UserAgentData getAgentByName(string name); 44 UserAgentData getAgentByName(string name);
45
46 /// <summary>
47 /// Returns the current session agent for a user searching by username parts
48 /// </summary>
49 /// <param name="fname">The users first account name</param>
50 /// <param name="lname">The users account surname</param>
51 /// <returns>The current agent session</returns>
18 UserAgentData getAgentByName(string fname, string lname); 52 UserAgentData getAgentByName(string fname, string lname);
19 53
20 // Transactional 54 /// <summary>
55 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
56 /// </summary>
57 /// <param name="from">The account to transfer from</param>
58 /// <param name="to">The account to transfer to</param>
59 /// <param name="amount">The amount to transfer</param>
60 /// <returns>Successful?</returns>
21 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount); 61 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
62
63 /// <summary>
64 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
65 /// </summary>
66 /// <param name="from">User to transfer from</param>
67 /// <param name="to">User to transfer to</param>
68 /// <param name="inventory">Specified inventory item</param>
69 /// <returns>Successful?</returns>
22 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); 70 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
71
72 /// <summary>
73 /// Returns the plugin version
74 /// </summary>
75 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
76 string getVersion();
77
78 /// <summary>
79 /// Returns the plugin name
80 /// </summary>
81 /// <returns>Plugin name, eg MySQL User Provider</returns>
82 string getName();
83
84 /// <summary>
85 /// Initialises the plugin (artificial constructor)
86 /// </summary>
87 void Initialise();
23 } 88 }
24} 89}