diff options
author | Sean Dague | 2008-05-01 20:17:57 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-01 20:17:57 +0000 |
commit | 62c663c37b248049e4c14ed1302fd9003a358026 (patch) | |
tree | 62d68628299a0447bdb7721e376743b420d0850d | |
parent | added stubs for appearance bits to all the db layers (diff) | |
download | opensim-SC_OLD-62c663c37b248049e4c14ed1302fd9003a358026.zip opensim-SC_OLD-62c663c37b248049e4c14ed1302fd9003a358026.tar.gz opensim-SC_OLD-62c663c37b248049e4c14ed1302fd9003a358026.tar.bz2 opensim-SC_OLD-62c663c37b248049e4c14ed1302fd9003a358026.tar.xz |
remove DB4o, we're pretty sure no one uses this, and
no core developer supports it anyway.
-rw-r--r-- | OpenSim/Data/DB4o/DB4oGridData.cs | 188 | ||||
-rw-r--r-- | OpenSim/Data/DB4o/DB4oManager.cs | 171 | ||||
-rw-r--r-- | OpenSim/Data/DB4o/DB4oUserData.cs | 271 | ||||
-rw-r--r-- | OpenSim/Data/DB4o/Properties/AssemblyInfo.cs | 65 | ||||
-rw-r--r-- | bin/Db4objects.Db4o.dll | bin | 593408 -> 0 bytes |
5 files changed, 0 insertions, 695 deletions
diff --git a/OpenSim/Data/DB4o/DB4oGridData.cs b/OpenSim/Data/DB4o/DB4oGridData.cs deleted file mode 100644 index c388cb6..0000000 --- a/OpenSim/Data/DB4o/DB4oGridData.cs +++ /dev/null | |||
@@ -1,188 +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 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using libsecondlife; | ||
31 | using OpenSim.Framework; | ||
32 | |||
33 | namespace OpenSim.Data.DB4o | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// A grid server storage mechanism employing the DB4o database system | ||
37 | /// </summary> | ||
38 | internal class DB4oGridData : GridDataBase | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// The database manager object | ||
42 | /// </summary> | ||
43 | private DB4oGridManager manager; | ||
44 | |||
45 | /// <summary> | ||
46 | /// Called when the plugin is first loaded (as constructors are not called) | ||
47 | /// </summary> | ||
48 | override public void Initialise() | ||
49 | { | ||
50 | manager = new DB4oGridManager("gridserver.yap"); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Returns a list of regions within the specified ranges | ||
55 | /// </summary> | ||
56 | /// <param name="a">minimum X coordinate</param> | ||
57 | /// <param name="b">minimum Y coordinate</param> | ||
58 | /// <param name="c">maximum X coordinate</param> | ||
59 | /// <param name="d">maximum Y coordinate</param> | ||
60 | /// <returns>An array of region profiles</returns> | ||
61 | override public RegionProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) | ||
62 | { | ||
63 | return null; | ||
64 | } | ||
65 | |||
66 | /// <summary> | ||
67 | /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned) | ||
68 | /// </summary> | ||
69 | /// <param name="handle">The handle to search for</param> | ||
70 | /// <returns>A region profile</returns> | ||
71 | override public RegionProfileData GetProfileByHandle(ulong handle) | ||
72 | { | ||
73 | lock (manager.simProfiles) | ||
74 | { | ||
75 | foreach (LLUUID UUID in manager.simProfiles.Keys) | ||
76 | { | ||
77 | if (manager.simProfiles[UUID].regionHandle == handle) | ||
78 | { | ||
79 | return manager.simProfiles[UUID]; | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")"); | ||
84 | } | ||
85 | |||
86 | /// <summary> | ||
87 | /// Returns a specific region | ||
88 | /// </summary> | ||
89 | /// <param name="uuid">The region ID code</param> | ||
90 | /// <returns>A region profile</returns> | ||
91 | override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) | ||
92 | { | ||
93 | lock (manager.simProfiles) | ||
94 | { | ||
95 | if (manager.simProfiles.ContainsKey(uuid)) | ||
96 | return manager.simProfiles[uuid]; | ||
97 | } | ||
98 | throw new Exception("Unable to find profile with UUID (" + uuid.ToString() + | ||
99 | "). Total Registered Regions: " + manager.simProfiles.Count); | ||
100 | } | ||
101 | |||
102 | override public RegionProfileData GetProfileByString(string regionName) | ||
103 | { | ||
104 | throw new Exception("GetProfileByString Not supported in DB4oGridData"); | ||
105 | //return null; | ||
106 | } | ||
107 | |||
108 | /// <summary> | ||
109 | /// Adds a new specified region to the database | ||
110 | /// </summary> | ||
111 | /// <param name="profile">The profile to add</param> | ||
112 | /// <returns>A dataresponse enum indicating success</returns> | ||
113 | override public DataResponse AddProfile(RegionProfileData profile) | ||
114 | { | ||
115 | lock (manager.simProfiles) | ||
116 | { | ||
117 | if (manager.AddRow(profile)) | ||
118 | { | ||
119 | return DataResponse.RESPONSE_OK; | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | return DataResponse.RESPONSE_ERROR; | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | |||
128 | override public DataResponse UpdateProfile(RegionProfileData profile) | ||
129 | { | ||
130 | return AddProfile(profile); | ||
131 | } | ||
132 | |||
133 | /// <summary> | ||
134 | /// Authenticates a new region using the shared secrets. NOT SECURE. | ||
135 | /// </summary> | ||
136 | /// <param name="uuid">The UUID the region is authenticating with</param> | ||
137 | /// <param name="handle">The location the region is logging into (unused in Db4o)</param> | ||
138 | /// <param name="key">The shared secret</param> | ||
139 | /// <returns>Authenticated?</returns> | ||
140 | override public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) | ||
141 | { | ||
142 | if (manager.simProfiles[uuid].regionRecvKey == key) | ||
143 | return true; | ||
144 | return false; | ||
145 | } | ||
146 | |||
147 | /// <summary> | ||
148 | /// Shuts down the database | ||
149 | /// </summary> | ||
150 | override public void Close() | ||
151 | { | ||
152 | manager = null; | ||
153 | } | ||
154 | |||
155 | /// <summary> | ||
156 | /// // Returns a list of avatar and UUIDs that match the query | ||
157 | /// </summary> | ||
158 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | ||
159 | { | ||
160 | //Do nothing yet | ||
161 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | ||
162 | return returnlist; | ||
163 | } | ||
164 | |||
165 | /// <summary> | ||
166 | /// Returns the providers name | ||
167 | /// </summary> | ||
168 | /// <returns>The name of the storage system</returns> | ||
169 | override public string getName() | ||
170 | { | ||
171 | return "DB4o Grid Provider"; | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Returns the providers version | ||
176 | /// </summary> | ||
177 | /// <returns>The version of the storage system</returns> | ||
178 | override public string getVersion() | ||
179 | { | ||
180 | return "0.1"; | ||
181 | } | ||
182 | |||
183 | override public ReservationData GetReservationAtPoint(uint x, uint y) | ||
184 | { | ||
185 | return null; | ||
186 | } | ||
187 | } | ||
188 | } | ||
diff --git a/OpenSim/Data/DB4o/DB4oManager.cs b/OpenSim/Data/DB4o/DB4oManager.cs deleted file mode 100644 index a9368d5..0000000 --- a/OpenSim/Data/DB4o/DB4oManager.cs +++ /dev/null | |||
@@ -1,171 +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 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using Db4objects.Db4o; | ||
31 | using libsecondlife; | ||
32 | using OpenSim.Framework; | ||
33 | |||
34 | namespace OpenSim.Data.DB4o | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// A Database manager for Db4o | ||
38 | /// </summary> | ||
39 | internal class DB4oGridManager | ||
40 | { | ||
41 | /// <summary> | ||
42 | /// A list of the current regions connected (in-memory cache) | ||
43 | /// </summary> | ||
44 | public Dictionary<LLUUID, RegionProfileData> simProfiles = new Dictionary<LLUUID, RegionProfileData>(); | ||
45 | |||
46 | /// <summary> | ||
47 | /// Database File Name | ||
48 | /// </summary> | ||
49 | private string dbfl; | ||
50 | |||
51 | /// <summary> | ||
52 | /// Creates a new grid storage manager | ||
53 | /// </summary> | ||
54 | /// <param name="db4odb">Filename to the database file</param> | ||
55 | public DB4oGridManager(string db4odb) | ||
56 | { | ||
57 | dbfl = db4odb; | ||
58 | IObjectContainer database; | ||
59 | database = Db4oFactory.OpenFile(dbfl); | ||
60 | IObjectSet result = database.Get(typeof (RegionProfileData)); | ||
61 | // Loads the file into the in-memory cache | ||
62 | foreach (RegionProfileData row in result) | ||
63 | { | ||
64 | simProfiles.Add(row.UUID, row); | ||
65 | } | ||
66 | database.Close(); | ||
67 | } | ||
68 | |||
69 | /// <summary> | ||
70 | /// Adds a new profile to the database (Warning: Probably slow.) | ||
71 | /// </summary> | ||
72 | /// <param name="row">The profile to add</param> | ||
73 | /// <returns>Successful?</returns> | ||
74 | public bool AddRow(RegionProfileData row) | ||
75 | { | ||
76 | if (simProfiles.ContainsKey(row.UUID)) | ||
77 | { | ||
78 | simProfiles[row.UUID] = row; | ||
79 | } | ||
80 | else | ||
81 | { | ||
82 | simProfiles.Add(row.UUID, row); | ||
83 | } | ||
84 | |||
85 | try | ||
86 | { | ||
87 | IObjectContainer database; | ||
88 | database = Db4oFactory.OpenFile(dbfl); | ||
89 | database.Set(row); | ||
90 | database.Close(); | ||
91 | return true; | ||
92 | } | ||
93 | catch (Exception) | ||
94 | { | ||
95 | return false; | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | |||
100 | /// <summary> | ||
101 | /// A manager for the DB4o database (user profiles) | ||
102 | /// </summary> | ||
103 | internal class DB4oUserManager | ||
104 | { | ||
105 | /// <summary> | ||
106 | /// A list of the user profiles (in memory cache) | ||
107 | /// </summary> | ||
108 | public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>(); | ||
109 | |||
110 | /// <summary> | ||
111 | /// Database filename | ||
112 | /// </summary> | ||
113 | private string dbfl; | ||
114 | |||
115 | /// <summary> | ||
116 | /// Initialises a new DB manager | ||
117 | /// </summary> | ||
118 | /// <param name="db4odb">The filename to the database</param> | ||
119 | public DB4oUserManager(string db4odb) | ||
120 | { | ||
121 | dbfl = db4odb; | ||
122 | IObjectContainer database; | ||
123 | database = Db4oFactory.OpenFile(dbfl); | ||
124 | // Load to cache | ||
125 | IObjectSet result = database.Get(typeof (UserProfileData)); | ||
126 | foreach (UserProfileData row in result) | ||
127 | { | ||
128 | if (userProfiles.ContainsKey(row.ID)) | ||
129 | userProfiles[row.ID] = row; | ||
130 | else | ||
131 | userProfiles.Add(row.ID, row); | ||
132 | } | ||
133 | database.Close(); | ||
134 | } | ||
135 | |||
136 | /// <summary> | ||
137 | /// Adds or updates a record to the user database. Do this when changes are needed | ||
138 | /// in the user profile that need to be persistant. | ||
139 | /// | ||
140 | /// TODO: the logic here is not ACID, the local cache will be | ||
141 | /// updated even if the persistant data is not. This may lead | ||
142 | /// to unexpected results. | ||
143 | /// </summary> | ||
144 | /// <param name="record">The profile to update</param> | ||
145 | /// <returns>true on success, false on fail to persist to db</returns> | ||
146 | public bool UpdateRecord(UserProfileData record) | ||
147 | { | ||
148 | if (userProfiles.ContainsKey(record.ID)) | ||
149 | { | ||
150 | userProfiles[record.ID] = record; | ||
151 | } | ||
152 | else | ||
153 | { | ||
154 | userProfiles.Add(record.ID, record); | ||
155 | } | ||
156 | |||
157 | try | ||
158 | { | ||
159 | IObjectContainer database; | ||
160 | database = Db4oFactory.OpenFile(dbfl); | ||
161 | database.Set(record); | ||
162 | database.Close(); | ||
163 | return true; | ||
164 | } | ||
165 | catch (Exception) | ||
166 | { | ||
167 | return false; | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | } | ||
diff --git a/OpenSim/Data/DB4o/DB4oUserData.cs b/OpenSim/Data/DB4o/DB4oUserData.cs deleted file mode 100644 index 4a2fc9c..0000000 --- a/OpenSim/Data/DB4o/DB4oUserData.cs +++ /dev/null | |||
@@ -1,271 +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 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.IO; | ||
31 | using libsecondlife; | ||
32 | using OpenSim.Framework; | ||
33 | |||
34 | namespace OpenSim.Data.DB4o | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// A User storage interface for the DB4o database system | ||
38 | /// </summary> | ||
39 | public class DB4oUserData : IUserData | ||
40 | { | ||
41 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
43 | /// <summary> | ||
44 | /// The database manager | ||
45 | /// </summary> | ||
46 | private DB4oUserManager manager; | ||
47 | |||
48 | /// <summary> | ||
49 | /// Artificial constructor called upon plugin load | ||
50 | /// </summary> | ||
51 | public void Initialise() | ||
52 | { | ||
53 | manager = new DB4oUserManager(Path.Combine(Util.dataDir(), "userprofiles.yap")); | ||
54 | } | ||
55 | |||
56 | /// <summary> | ||
57 | /// Loads a specified user profile from a UUID | ||
58 | /// </summary> | ||
59 | /// <param name="uuid">The users UUID</param> | ||
60 | /// <returns>A user profile</returns> | ||
61 | public UserProfileData GetUserByUUID(LLUUID uuid) | ||
62 | { | ||
63 | if (manager.userProfiles.ContainsKey(uuid)) | ||
64 | return manager.userProfiles[uuid]; | ||
65 | return null; | ||
66 | } | ||
67 | |||
68 | /// <summary> | ||
69 | /// Returns a user by searching for its name | ||
70 | /// </summary> | ||
71 | /// <param name="name">The users account name</param> | ||
72 | /// <returns>A matching users profile</returns> | ||
73 | public UserProfileData GetUserByName(string name) | ||
74 | { | ||
75 | return GetUserByName(name.Split(' ')[0], name.Split(' ')[1]); | ||
76 | } | ||
77 | |||
78 | /// <summary> | ||
79 | /// Returns a user by searching for its name | ||
80 | /// </summary> | ||
81 | /// <param name="fname">The first part of the users account name</param> | ||
82 | /// <param name="lname">The second part of the users account name</param> | ||
83 | /// <returns>A matching users profile</returns> | ||
84 | public UserProfileData GetUserByName(string fname, string lname) | ||
85 | { | ||
86 | foreach (UserProfileData profile in manager.userProfiles.Values) | ||
87 | { | ||
88 | if (profile.FirstName == fname && profile.SurName == lname) | ||
89 | return profile; | ||
90 | } | ||
91 | return null; | ||
92 | } | ||
93 | |||
94 | /// <summary> | ||
95 | /// Returns a user by UUID direct | ||
96 | /// </summary> | ||
97 | /// <param name="uuid">The users account ID</param> | ||
98 | /// <returns>A matching users profile</returns> | ||
99 | public UserAgentData GetAgentByUUID(LLUUID uuid) | ||
100 | { | ||
101 | try | ||
102 | { | ||
103 | return GetUserByUUID(uuid).CurrentAgent; | ||
104 | } | ||
105 | catch (Exception) | ||
106 | { | ||
107 | return null; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | /// <summary> | ||
112 | /// Returns a session by account name | ||
113 | /// </summary> | ||
114 | /// <param name="name">The account name</param> | ||
115 | /// <returns>The users session agent</returns> | ||
116 | public UserAgentData GetAgentByName(string name) | ||
117 | { | ||
118 | return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); | ||
119 | } | ||
120 | |||
121 | /// <summary> | ||
122 | /// Returns a session by account name | ||
123 | /// </summary> | ||
124 | /// <param name="fname">The first part of the users account name</param> | ||
125 | /// <param name="lname">The second part of the users account name</param> | ||
126 | /// <returns>A user agent</returns> | ||
127 | public UserAgentData GetAgentByName(string fname, string lname) | ||
128 | { | ||
129 | try | ||
130 | { | ||
131 | return GetUserByName(fname, lname).CurrentAgent; | ||
132 | } | ||
133 | catch (Exception) | ||
134 | { | ||
135 | return null; | ||
136 | } | ||
137 | } | ||
138 | public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) | ||
139 | { | ||
140 | UserProfileData user = GetUserByUUID(AgentID); | ||
141 | user.WebLoginKey = WebLoginKey; | ||
142 | UpdateUserProfile(user); | ||
143 | |||
144 | } | ||
145 | #region User Friends List Data | ||
146 | |||
147 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | ||
148 | { | ||
149 | //m_log.Info("[FRIEND]: Stub AddNewUserFriend called"); | ||
150 | } | ||
151 | |||
152 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) | ||
153 | { | ||
154 | //m_log.Info("[FRIEND]: Stub RemoveUserFriend called"); | ||
155 | } | ||
156 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) | ||
157 | { | ||
158 | //m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called"); | ||
159 | } | ||
160 | |||
161 | |||
162 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | ||
163 | { | ||
164 | //m_log.Info("[FRIEND]: Stub GetUserFriendList called"); | ||
165 | return new List<FriendListItem>(); | ||
166 | } | ||
167 | |||
168 | #endregion | ||
169 | |||
170 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) | ||
171 | { | ||
172 | //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); | ||
173 | } | ||
174 | |||
175 | |||
176 | |||
177 | public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | ||
178 | { | ||
179 | //Do nothing yet | ||
180 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | ||
181 | return returnlist; | ||
182 | } | ||
183 | |||
184 | /// <summary> | ||
185 | /// Creates a new user profile | ||
186 | /// </summary> | ||
187 | /// <param name="user">The profile to add to the database</param> | ||
188 | public void AddNewUserProfile(UserProfileData user) | ||
189 | { | ||
190 | try | ||
191 | { | ||
192 | manager.UpdateRecord(user); | ||
193 | } | ||
194 | catch (Exception e) | ||
195 | { | ||
196 | Console.WriteLine(e.ToString()); | ||
197 | } | ||
198 | } | ||
199 | |||
200 | /// <summary> | ||
201 | /// Creates a new user profile | ||
202 | /// </summary> | ||
203 | /// <param name="user">The profile to add to the database</param> | ||
204 | /// <returns>True on success, false on error</returns> | ||
205 | public bool UpdateUserProfile(UserProfileData user) | ||
206 | { | ||
207 | try | ||
208 | { | ||
209 | return manager.UpdateRecord(user); | ||
210 | } | ||
211 | catch (Exception e) | ||
212 | { | ||
213 | Console.WriteLine(e.ToString()); | ||
214 | return false; | ||
215 | } | ||
216 | } | ||
217 | |||
218 | |||
219 | /// <summary> | ||
220 | /// Creates a new user agent | ||
221 | /// </summary> | ||
222 | /// <param name="agent">The agent to add to the database</param> | ||
223 | public void AddNewUserAgent(UserAgentData agent) | ||
224 | { | ||
225 | // Do nothing. yet. | ||
226 | } | ||
227 | |||
228 | /// <summary> | ||
229 | /// Transfers money between two user accounts | ||
230 | /// </summary> | ||
231 | /// <param name="from">Starting account</param> | ||
232 | /// <param name="to">End account</param> | ||
233 | /// <param name="amount">The amount to move</param> | ||
234 | /// <returns>Success?</returns> | ||
235 | public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) | ||
236 | { | ||
237 | return true; | ||
238 | } | ||
239 | |||
240 | /// <summary> | ||
241 | /// Transfers inventory between two accounts | ||
242 | /// </summary> | ||
243 | /// <remarks>Move to inventory server</remarks> | ||
244 | /// <param name="from">Senders account</param> | ||
245 | /// <param name="to">Receivers account</param> | ||
246 | /// <param name="item">Inventory item</param> | ||
247 | /// <returns>Success?</returns> | ||
248 | public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) | ||
249 | { | ||
250 | return true; | ||
251 | } | ||
252 | |||
253 | /// <summary> | ||
254 | /// Returns the name of the storage provider | ||
255 | /// </summary> | ||
256 | /// <returns>Storage provider name</returns> | ||
257 | public string getName() | ||
258 | { | ||
259 | return "DB4o Userdata"; | ||
260 | } | ||
261 | |||
262 | /// <summary> | ||
263 | /// Returns the version of the storage provider | ||
264 | /// </summary> | ||
265 | /// <returns>Storage provider version</returns> | ||
266 | public string GetVersion() | ||
267 | { | ||
268 | return "0.1"; | ||
269 | } | ||
270 | } | ||
271 | } | ||
diff --git a/OpenSim/Data/DB4o/Properties/AssemblyInfo.cs b/OpenSim/Data/DB4o/Properties/AssemblyInfo.cs deleted file mode 100644 index 5bfffd7..0000000 --- a/OpenSim/Data/DB4o/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,65 +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 | |||
28 | using System.Reflection; | ||
29 | using System.Runtime.InteropServices; | ||
30 | |||
31 | // General Information about an assembly is controlled through the following | ||
32 | // set of attributes. Change these attribute values to modify the information | ||
33 | // associated with an assembly. | ||
34 | |||
35 | [assembly : AssemblyTitle("OpenSim.Data.DB4o")] | ||
36 | [assembly : AssemblyDescription("")] | ||
37 | [assembly : AssemblyConfiguration("")] | ||
38 | [assembly : AssemblyCompany("")] | ||
39 | [assembly : AssemblyProduct("OpenSim.Data.DB4o")] | ||
40 | [assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2008")] | ||
41 | [assembly : AssemblyTrademark("")] | ||
42 | [assembly : AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | |||
48 | [assembly : ComVisible(false)] | ||
49 | |||
50 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
51 | |||
52 | [assembly : Guid("57991e15-79da-41b7-aa06-2e6b49165a63")] | ||
53 | |||
54 | // Version information for an assembly consists of the following four values: | ||
55 | // | ||
56 | // Major Version | ||
57 | // Minor Version | ||
58 | // Build Number | ||
59 | // Revision | ||
60 | // | ||
61 | // You can specify all the values or you can default the Revision and Build Numbers | ||
62 | // by using the '*' as shown below: | ||
63 | |||
64 | [assembly : AssemblyVersion("1.0.0.0")] | ||
65 | [assembly : AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/bin/Db4objects.Db4o.dll b/bin/Db4objects.Db4o.dll deleted file mode 100644 index be976a1..0000000 --- a/bin/Db4objects.Db4o.dll +++ /dev/null | |||
Binary files differ | |||