aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
diff options
context:
space:
mode:
authorMW2007-06-08 16:49:24 +0000
committerMW2007-06-08 16:49:24 +0000
commita8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93 (patch)
treed9c04b9241c67f892285bc2b9fb05b1e70e40576 /OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
parentprebuild.xml should be fixed/updated. (diff)
downloadopensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.zip
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.gz
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.bz2
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.xz
Deleted OpenGridServices folder as the easiest way to reimport the latest version from trunk
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs100
1 files changed, 0 insertions, 100 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
deleted file mode 100644
index b95219c..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
+++ /dev/null
@@ -1,100 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenGrid.Framework.Data;
5using libsecondlife;
6
7namespace OpenGrid.Framework.Data.DB4o
8{
9 public class DB4oUserData : IUserData
10 {
11 DB4oUserManager manager;
12
13 public void Initialise()
14 {
15 manager = new DB4oUserManager("userprofiles.yap");
16 }
17
18 public UserProfileData getUserByUUID(LLUUID uuid)
19 {
20 if(manager.userProfiles.ContainsKey(uuid))
21 return manager.userProfiles[uuid];
22 return null;
23 }
24
25 public UserProfileData getUserByName(string name)
26 {
27 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
28 }
29
30 public UserProfileData getUserByName(string fname, string lname)
31 {
32 foreach (UserProfileData profile in manager.userProfiles.Values)
33 {
34 if (profile.username == fname && profile.surname == lname)
35 return profile;
36 }
37 return null;
38 }
39
40 public UserAgentData getAgentByUUID(LLUUID uuid)
41 {
42 try
43 {
44 return getUserByUUID(uuid).currentAgent;
45 }
46 catch (Exception e)
47 {
48 return null;
49 }
50 }
51
52 public UserAgentData getAgentByName(string name)
53 {
54 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
55 }
56
57 public UserAgentData getAgentByName(string fname, string lname)
58 {
59 try
60 {
61 return getUserByName(fname,lname).currentAgent;
62 }
63 catch (Exception e)
64 {
65 return null;
66 }
67 }
68
69 public void addNewUserProfile(UserProfileData user)
70 {
71 manager.AddRow(user);
72 }
73
74 public void addNewUserAgent(UserAgentData agent)
75 {
76 // Do nothing. yet.
77 }
78
79 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
80 {
81 return true;
82 }
83
84 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
85 {
86 return true;
87 }
88
89
90 public string getName()
91 {
92 return "DB4o Userdata";
93 }
94
95 public string getVersion()
96 {
97 return "0.1";
98 }
99 }
100}