aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-06-22 12:18:04 +0000
committerMelanie Thielker2009-06-22 12:18:04 +0000
commit044446821b7d1d4550e43b0351c2611026874755 (patch)
tree2043005ce27cd5519b104c0d49e53ba78632b2bb
parentFormatting cleanup, ignore some generated files. (diff)
downloadopensim-SC_OLD-044446821b7d1d4550e43b0351c2611026874755.zip
opensim-SC_OLD-044446821b7d1d4550e43b0351c2611026874755.tar.gz
opensim-SC_OLD-044446821b7d1d4550e43b0351c2611026874755.tar.bz2
opensim-SC_OLD-044446821b7d1d4550e43b0351c2611026874755.tar.xz
Committing the meat of the user server interface and the bones of the service implementation
-rw-r--r--OpenSim/Framework/RegionInfo.cs10
-rw-r--r--OpenSim/Services/AssetService/AssetServiceBase.cs22
-rw-r--r--OpenSim/Services/Interfaces/IUserService.cs45
-rw-r--r--OpenSim/Services/UserService/UserService.cs24
4 files changed, 91 insertions, 10 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 7b65504..db23af9 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -71,6 +71,7 @@ namespace OpenSim.Framework
71 protected uint m_remotingPort; 71 protected uint m_remotingPort;
72 public UUID RegionID = UUID.Zero; 72 public UUID RegionID = UUID.Zero;
73 public string RemotingAddress; 73 public string RemotingAddress;
74 public UUID ScopeID = UUID.Zero;
74 75
75 public SimpleRegionInfo() 76 public SimpleRegionInfo()
76 { 77 {
@@ -470,6 +471,9 @@ namespace OpenSim.Framework
470 471
471 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 472 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
472 "Max objects this sim will hold", m_objectCapacity.ToString(), true); 473 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
474
475 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
476 "Scope ID for this region", ScopeID.ToString(), true);
473 } 477 }
474 478
475 public void loadConfigurationOptions() 479 public void loadConfigurationOptions()
@@ -530,6 +534,9 @@ namespace OpenSim.Framework
530 534
531 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 535 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
532 "Max objects this sim will hold", "0", true); 536 "Max objects this sim will hold", "0", true);
537
538 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
539 "Scope ID for this region", UUID.Zero.ToString(), true);
533 } 540 }
534 541
535 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) 542 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
@@ -607,6 +614,9 @@ namespace OpenSim.Framework
607 case "object_capacity": 614 case "object_capacity":
608 m_objectCapacity = (int)configuration_result; 615 m_objectCapacity = (int)configuration_result;
609 break; 616 break;
617 case "scope_id":
618 ScopeID = (UUID)configuration_result;
619 break;
610 } 620 }
611 621
612 return true; 622 return true;
diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs
index c42d469..c60dd1f 100644
--- a/OpenSim/Services/AssetService/AssetServiceBase.cs
+++ b/OpenSim/Services/AssetService/AssetServiceBase.cs
@@ -46,23 +46,25 @@ namespace OpenSim.Services.AssetService
46 string connString = String.Empty; 46 string connString = String.Empty;
47 47
48 // 48 //
49 // Try reading the [DatabaseService] section first, if it exists 49 // Try reading the [AssetService] section first, if it exists
50 // 50 //
51 IConfig dbConfig = config.Configs["DatabaseService"]; 51 IConfig assetConfig = config.Configs["AssetService"];
52 if (dbConfig != null) 52 if (assetConfig != null)
53 { 53 {
54 dllName = dbConfig.GetString("StorageProvider", String.Empty); 54 dllName = assetConfig.GetString("StorageProvider", dllName);
55 connString = dbConfig.GetString("ConnectionString", String.Empty); 55 connString = assetConfig.GetString("ConnectionString", connString);
56 } 56 }
57 57
58 // 58 //
59 // Try reading the more specific [AssetService] section, if it exists 59 // Try reading the [DatabaseService] section, if it exists
60 // 60 //
61 IConfig assetConfig = config.Configs["AssetService"]; 61 IConfig dbConfig = config.Configs["DatabaseService"];
62 if (assetConfig != null) 62 if (dbConfig != null)
63 { 63 {
64 dllName = assetConfig.GetString("StorageProvider", dllName); 64 if (dllName != String.Empty)
65 connString = assetConfig.GetString("ConnectionString", connString); 65 dllName = dbConfig.GetString("StorageProvider", String.Empty);
66 if (connString != String.Empty)
67 connString = dbConfig.GetString("ConnectionString", String.Empty);
66 } 68 }
67 69
68 // 70 //
diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs
index 051ee9a..823a86d 100644
--- a/OpenSim/Services/Interfaces/IUserService.cs
+++ b/OpenSim/Services/Interfaces/IUserService.cs
@@ -25,9 +25,54 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using OpenMetaverse;
30
28namespace OpenSim.Services.Interfaces 31namespace OpenSim.Services.Interfaces
29{ 32{
33 public class UserData
34 {
35 public string FirstName;
36 public string LastName;
37 public UUID UserID;
38 public UUID scopeID;
39
40 // For informational purposes only!
41 //
42 public string HomeRegionName;
43
44 public UUID HomeRegionID;
45 public float HomePositionX;
46 public float HomePositionY;
47 public float HomePositionZ;
48 public float HomeLookAtX;
49 public float HomeLookAtY;
50 public float HomeLookAtZ;
51
52 // There are here because they
53 // concern the account rather than
54 // the profile. They just happen to
55 // be used in the Linden profile as well
56 //
57 public int GodLevel;
58 public int UserFlags;
59 public string AccountType;
60 };
61
30 public interface IUserService 62 public interface IUserService
31 { 63 {
64 UserData GetUserData(UUID scopeID, UUID userID);
65 UserData GetUserData(UUID scopeID, string FirstName, string LastName);
66
67 // This will set only the home region portion of the data!
68 // Can't be used to set god level, flags, type or change the name!
69 //
70 bool SetUserData(UserData data);
71
72 // Returns the list of avatars that matches both the search
73 // criterion and the scope ID passed
74 // ONLY THE NAME, SCOPE ID and UUID will be filled in!
75 //
76 List<UserData> GetAvatarPickerData(UUID scopeID, string query);
32 } 77 }
33} 78}
diff --git a/OpenSim/Services/UserService/UserService.cs b/OpenSim/Services/UserService/UserService.cs
index a725683..3443643 100644
--- a/OpenSim/Services/UserService/UserService.cs
+++ b/OpenSim/Services/UserService/UserService.cs
@@ -30,6 +30,8 @@ using System.Reflection;
30using Nini.Config; 30using Nini.Config;
31using OpenSim.Data; 31using OpenSim.Data;
32using OpenSim.Services.Interfaces; 32using OpenSim.Services.Interfaces;
33using System.Collections.Generic;
34using OpenMetaverse;
33 35
34namespace OpenSim.Services.UserService 36namespace OpenSim.Services.UserService
35{ 37{
@@ -38,5 +40,27 @@ namespace OpenSim.Services.UserService
38 public UserService(IConfigSource config) : base(config) 40 public UserService(IConfigSource config) : base(config)
39 { 41 {
40 } 42 }
43
44 public UserData GetUserData(UUID scopeID, string firstName,
45 string lastName)
46 {
47 return null;
48 }
49
50 public UserData GetUserData(UUID scopeID, UUID userID)
51 {
52 return null;
53 }
54
55 public bool SetUserData(UserData data)
56 {
57 return false;
58 }
59
60 public List<UserData> GetAvatarPickerData(UUID scopeID,
61 string query)
62 {
63 return null;
64 }
41 } 65 }
42} 66}