diff options
author | MW | 2007-07-11 17:47:25 +0000 |
---|---|---|
committer | MW | 2007-07-11 17:47:25 +0000 |
commit | 2ceff87a02d9862497d1d8fa965851ae2d9c9b1b (patch) | |
tree | 47cbd7a3fe7678c9ac2d56ace21ea4ebf8f628ef /OpenSim/Region/Caches | |
parent | updated libsecondlife.dll to a 1.18 version (from the libsecondlife aditi bra... (diff) | |
download | opensim-SC-2ceff87a02d9862497d1d8fa965851ae2d9c9b1b.zip opensim-SC-2ceff87a02d9862497d1d8fa965851ae2d9c9b1b.tar.gz opensim-SC-2ceff87a02d9862497d1d8fa965851ae2d9c9b1b.tar.bz2 opensim-SC-2ceff87a02d9862497d1d8fa965851ae2d9c9b1b.tar.xz |
More work on UserProfile and inventory cache (still currently not enabled).
Asset uploading over CAPS now works, and although inventory isn't really working yet, this should now at least enables texturing of prims.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/caches/InventoryFolder.cs (renamed from OpenSim/Region/Caches/InventoryFolder.cs) | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/caches/UserProfileCache.cs (renamed from OpenSim/Region/Caches/UserProfileCache.cs) | 42 | ||||
-rw-r--r-- | OpenSim/Region/Caches/CachedUserInfo.cs | 20 |
3 files changed, 38 insertions, 26 deletions
diff --git a/OpenSim/Region/Caches/InventoryFolder.cs b/OpenSim/Framework/Communications/caches/InventoryFolder.cs index 364a184..eaddf19 100644 --- a/OpenSim/Region/Caches/InventoryFolder.cs +++ b/OpenSim/Framework/Communications/caches/InventoryFolder.cs | |||
@@ -4,7 +4,7 @@ using System.Text; | |||
4 | using libsecondlife; | 4 | using libsecondlife; |
5 | using OpenSim.Framework.Data; | 5 | using OpenSim.Framework.Data; |
6 | 6 | ||
7 | namespace OpenSim.Region.Caches | 7 | namespace OpenSim.Framework.Communications.Caches |
8 | { | 8 | { |
9 | public class InventoryFolder : InventoryFolderBase | 9 | public class InventoryFolder : InventoryFolderBase |
10 | { | 10 | { |
diff --git a/OpenSim/Region/Caches/UserProfileCache.cs b/OpenSim/Framework/Communications/caches/UserProfileCache.cs index 0717e55..0ee63ba 100644 --- a/OpenSim/Region/Caches/UserProfileCache.cs +++ b/OpenSim/Framework/Communications/caches/UserProfileCache.cs | |||
@@ -3,16 +3,19 @@ using System.Collections.Generic; | |||
3 | using System.Text; | 3 | using System.Text; |
4 | using libsecondlife; | 4 | using libsecondlife; |
5 | using OpenSim.Framework.Data; | 5 | using OpenSim.Framework.Data; |
6 | using OpenSim.Framework.Communications; | ||
6 | 7 | ||
7 | namespace OpenSim.Region.Caches | 8 | namespace OpenSim.Framework.Communications.Caches |
8 | { | 9 | { |
9 | public class UserProfileCache | 10 | public class UserProfileCache |
10 | { | 11 | { |
11 | public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>(); | 12 | public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>(); |
12 | 13 | ||
13 | public UserProfileCache() | 14 | private CommunicationsManager m_parent; |
14 | { | ||
15 | 15 | ||
16 | public UserProfileCache(CommunicationsManager parent) | ||
17 | { | ||
18 | m_parent = parent; | ||
16 | } | 19 | } |
17 | 20 | ||
18 | /// <summary> | 21 | /// <summary> |
@@ -22,7 +25,36 @@ namespace OpenSim.Region.Caches | |||
22 | /// <param name="userID"></param> | 25 | /// <param name="userID"></param> |
23 | public void AddNewUser(LLUUID userID) | 26 | public void AddNewUser(LLUUID userID) |
24 | { | 27 | { |
28 | if (!this.UserProfiles.ContainsKey(userID)) | ||
29 | { | ||
30 | CachedUserInfo userInfo = new CachedUserInfo(); | ||
31 | userInfo.UserProfile = this.RequestUserProfileForUser(userID); | ||
32 | this.m_parent.InventoryServer.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); | ||
33 | if (userInfo.UserProfile != null) | ||
34 | { | ||
35 | this.UserProfiles.Add(userID, userInfo); | ||
36 | } | ||
37 | else | ||
38 | { | ||
39 | //no profile for this user, what do we do now? | ||
40 | } | ||
41 | } | ||
42 | else | ||
43 | { | ||
44 | //already have a cached profile for this user | ||
45 | //we should make sure its upto date with the user server version | ||
46 | } | ||
47 | } | ||
25 | 48 | ||
49 | /// <summary> | ||
50 | /// A new user has moved into a region in this instance | ||
51 | /// so get info from servers | ||
52 | /// </summary> | ||
53 | /// <param name="firstName"></param> | ||
54 | /// <param name="lastName"></param> | ||
55 | public void AddNewUser(string firstName, string lastName) | ||
56 | { | ||
57 | |||
26 | } | 58 | } |
27 | 59 | ||
28 | /// <summary> | 60 | /// <summary> |
@@ -40,9 +72,9 @@ namespace OpenSim.Region.Caches | |||
40 | /// Request the user profile from User server | 72 | /// Request the user profile from User server |
41 | /// </summary> | 73 | /// </summary> |
42 | /// <param name="userID"></param> | 74 | /// <param name="userID"></param> |
43 | private void RequestUserProfileForUser(LLUUID userID) | 75 | private UserProfileData RequestUserProfileForUser(LLUUID userID) |
44 | { | 76 | { |
45 | 77 | return this.m_parent.UserServer.GetUserProfile(userID); | |
46 | } | 78 | } |
47 | 79 | ||
48 | /// <summary> | 80 | /// <summary> |
diff --git a/OpenSim/Region/Caches/CachedUserInfo.cs b/OpenSim/Region/Caches/CachedUserInfo.cs deleted file mode 100644 index 08a7848..0000000 --- a/OpenSim/Region/Caches/CachedUserInfo.cs +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Data; | ||
5 | using libsecondlife; | ||
6 | |||
7 | namespace OpenSim.Region.Caches | ||
8 | { | ||
9 | public class CachedUserInfo | ||
10 | { | ||
11 | public UserProfileData UserProfile; | ||
12 | //public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>(); | ||
13 | public InventoryFolder RootFolder; | ||
14 | |||
15 | public CachedUserInfo() | ||
16 | { | ||
17 | |||
18 | } | ||
19 | } | ||
20 | } | ||