From 982e3ff5d927df498c1d14111e2c61f0251c09d4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Dec 2009 01:27:51 +0000 Subject: Presence Step 1 --- OpenSim/Services/Interfaces/IPresenceService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index aa1c5bf..4de57e3 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using OpenSim.Framework; using System.Collections.Generic; using OpenMetaverse; @@ -35,7 +36,13 @@ namespace OpenSim.Services.Interfaces { public UUID PrincipalID; public UUID RegionID; - public Dictionary Data; + public UUID SessionID; + public UUID SecureSessionID; + public bool Online; + public DateTime Login; + public DateTime Logout; + public Vector3 Position; + public Vector3 LookAt; } public interface IPresenceService -- cgit v1.1 From dc80d13466e77f4eafc80a686126baabeba463ff Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 26 Dec 2009 18:11:13 -0800 Subject: More beef to the IPresenceService interface. --- OpenSim/Services/Interfaces/IPresenceService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 4de57e3..e8babbf 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -47,6 +47,17 @@ namespace OpenSim.Services.Interfaces public interface IPresenceService { - bool Report(PresenceInfo presence); + // this should really be: + //bool LoginAgent(UUID userID, UUID agentID, UUID sessionID, UUID secureSessionID); + // but we'd have to add userID to the agents table + bool LoginAgent(UUID agentID, UUID sessionID, UUID secureSessionID); + bool LogoutAgent(UUID agentID); + bool LogoutAllAgents(UUID regionID); + + bool AgentArriving(UUID agentID, UUID regionID); + bool AgentLeaving(UUID agentID, UUID regionID); + + bool TryGetAgent(UUID agentID, out PresenceInfo presence); + bool TryGetAgents(UUID[] agentIDs, out PresenceInfo[] presences); } } -- cgit v1.1 From 101f60ea882f9cb623156ab11f1e9163d6bb02a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Dec 2009 01:54:53 +0000 Subject: Interface changes --- OpenSim/Services/Interfaces/IPresenceService.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index e8babbf..d86e50c 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -47,17 +47,13 @@ namespace OpenSim.Services.Interfaces public interface IPresenceService { - // this should really be: - //bool LoginAgent(UUID userID, UUID agentID, UUID sessionID, UUID secureSessionID); - // but we'd have to add userID to the agents table - bool LoginAgent(UUID agentID, UUID sessionID, UUID secureSessionID); - bool LogoutAgent(UUID agentID); - bool LogoutAllAgents(UUID regionID); + bool LoginAgent(UUID principalID, UUID sessionID, UUID secureSessionID); + bool LogoutAgent(UUID sessionID); + bool LogoutRegionAgents(UUID regionID); - bool AgentArriving(UUID agentID, UUID regionID); - bool AgentLeaving(UUID agentID, UUID regionID); + bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); - bool TryGetAgent(UUID agentID, out PresenceInfo presence); - bool TryGetAgents(UUID[] agentIDs, out PresenceInfo[] presences); + PresenceInfo GetAgent(UUID sessionID); + PresenceInfo[] GetAgents(UUID[] PrincipalIDs); } } -- cgit v1.1 From 2f717fc796fcb2641369dc132d1fbc7a70d43d72 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Dec 2009 18:03:59 +0000 Subject: Remove the sesion from returned presence info --- OpenSim/Services/Interfaces/IPresenceService.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index d86e50c..70d4b28 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -36,8 +36,6 @@ namespace OpenSim.Services.Interfaces { public UUID PrincipalID; public UUID RegionID; - public UUID SessionID; - public UUID SecureSessionID; public bool Online; public DateTime Login; public DateTime Logout; -- cgit v1.1 From b8dfccb2272e12942f5364fa327ffd721292d8ad Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Dec 2009 16:07:16 -0800 Subject: Changed GetAgents to take string[] instead of UUID[] --- OpenSim/Services/Interfaces/IPresenceService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 70d4b28..1cda13c 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -52,6 +52,6 @@ namespace OpenSim.Services.Interfaces bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); PresenceInfo GetAgent(UUID sessionID); - PresenceInfo[] GetAgents(UUID[] PrincipalIDs); + PresenceInfo[] GetAgents(string[] principalIDs); } } -- cgit v1.1 From 3ef513e863097bdccffa8c84283ab8ffc0915a8f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Dec 2009 20:34:42 -0800 Subject: Presence remote connector and handler. Presence HG Broker. Nothing tested, just compiles. --- OpenSim/Services/Interfaces/IPresenceService.cs | 39 ++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 1cda13c..56d8f15 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -41,6 +41,43 @@ namespace OpenSim.Services.Interfaces public DateTime Logout; public Vector3 Position; public Vector3 LookAt; + + public PresenceInfo() + { + } + + public PresenceInfo(Dictionary kvp) + { + if (kvp.ContainsKey("PrincipalID")) + UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); + if (kvp.ContainsKey("RegionID")) + UUID.TryParse(kvp["RegionID"].ToString(), out RegionID); + if (kvp.ContainsKey("login")) + DateTime.TryParse(kvp["login"].ToString(), out Login); + if (kvp.ContainsKey("logout")) + DateTime.TryParse(kvp["logout"].ToString(), out Logout); + if (kvp.ContainsKey("lookAt")) + Vector3.TryParse(kvp["lookAt"].ToString(), out LookAt); + if (kvp.ContainsKey("online")) + Boolean.TryParse(kvp["online"].ToString(), out Online); + if (kvp.ContainsKey("position")) + Vector3.TryParse(kvp["position"].ToString(), out Position); + + } + + public Dictionary ToKeyValuePairs() + { + Dictionary result = new Dictionary(); + result["PrincipalID"] = PrincipalID.ToString(); + result["RegionID"] = RegionID.ToString(); + result["online"] = Online.ToString(); + result["login"] = Login.ToString(); + result["logout"] = Logout.ToString(); + result["position"] = Position.ToString(); + result["lookAt"] = LookAt.ToString(); + + return result; + } } public interface IPresenceService @@ -52,6 +89,6 @@ namespace OpenSim.Services.Interfaces bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); PresenceInfo GetAgent(UUID sessionID); - PresenceInfo[] GetAgents(string[] principalIDs); + PresenceInfo[] GetAgents(string[] userIDs); } } -- cgit v1.1 From 92a40129b5dfde0d8ef798941f5efb31ca3a73fd Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 28 Dec 2009 17:34:42 +0000 Subject: Database and presence changes. Untested --- OpenSim/Services/Interfaces/IPresenceService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 56d8f15..de3813a 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -34,7 +34,7 @@ namespace OpenSim.Services.Interfaces { public class PresenceInfo { - public UUID PrincipalID; + public string UserID; public UUID RegionID; public bool Online; public DateTime Login; @@ -48,8 +48,8 @@ namespace OpenSim.Services.Interfaces public PresenceInfo(Dictionary kvp) { - if (kvp.ContainsKey("PrincipalID")) - UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); + if (kvp.ContainsKey("UserID")) + UserID = kvp["UserID"].ToString(); if (kvp.ContainsKey("RegionID")) UUID.TryParse(kvp["RegionID"].ToString(), out RegionID); if (kvp.ContainsKey("login")) @@ -68,7 +68,7 @@ namespace OpenSim.Services.Interfaces public Dictionary ToKeyValuePairs() { Dictionary result = new Dictionary(); - result["PrincipalID"] = PrincipalID.ToString(); + result["UserID"] = UserID; result["RegionID"] = RegionID.ToString(); result["online"] = Online.ToString(); result["login"] = Login.ToString(); @@ -82,7 +82,7 @@ namespace OpenSim.Services.Interfaces public interface IPresenceService { - bool LoginAgent(UUID principalID, UUID sessionID, UUID secureSessionID); + bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); bool LogoutAgent(UUID sessionID); bool LogoutRegionAgents(UUID regionID); -- cgit v1.1 From e0fc854f05b137c353196356e5b26d11b6ee6867 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 28 Dec 2009 23:42:08 +0000 Subject: Adding new fields and home location methid to presence. Adding cleanup (deleting all but one presence record) on logout so that they don't pile up. --- OpenSim/Services/Interfaces/IPresenceService.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index de3813a..2582648 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -41,6 +41,9 @@ namespace OpenSim.Services.Interfaces public DateTime Logout; public Vector3 Position; public Vector3 LookAt; + public UUID HomeRegionID; + public Vector3 HomePosition; + public Vector3 HomeLookAt; public PresenceInfo() { @@ -87,6 +90,7 @@ namespace OpenSim.Services.Interfaces bool LogoutRegionAgents(UUID regionID); bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); + bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt); PresenceInfo GetAgent(UUID sessionID); PresenceInfo[] GetAgents(string[] userIDs); -- cgit v1.1 From c164b85ea6351f7a00ea6ec2776101287976da10 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Dec 2009 20:26:44 -0800 Subject: * Added packing/unpacking of the Home fields in PresenceInfo * Cleaned up IUserService and beefed up UserAccoutData --- OpenSim/Services/Interfaces/IPresenceService.cs | 9 ++++ OpenSim/Services/Interfaces/IUserService.cs | 66 ++++++++++++++----------- 2 files changed, 47 insertions(+), 28 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 2582648..2dad7e6 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -65,6 +65,12 @@ namespace OpenSim.Services.Interfaces Boolean.TryParse(kvp["online"].ToString(), out Online); if (kvp.ContainsKey("position")) Vector3.TryParse(kvp["position"].ToString(), out Position); + if (kvp.ContainsKey("HomeRegionID")) + UUID.TryParse(kvp["HomeRegionID"].ToString(), out HomeRegionID); + if (kvp.ContainsKey("HomePosition")) + Vector3.TryParse(kvp["HomePosition"].ToString(), out HomePosition); + if (kvp.ContainsKey("HomeLookAt")) + Vector3.TryParse(kvp["HomeLookAt"].ToString(), out HomeLookAt); } @@ -78,6 +84,9 @@ namespace OpenSim.Services.Interfaces result["logout"] = Logout.ToString(); result["position"] = Position.ToString(); result["lookAt"] = LookAt.ToString(); + result["HomeRegionID"] = HomeRegionID.ToString(); + result["HomePosition"] = HomePosition.ToString(); + result["HomeLookAt"] = HomeLookAt.ToString(); return result; } diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 92bd8ef..02d5459 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using OpenMetaverse; @@ -36,37 +37,17 @@ namespace OpenSim.Services.Interfaces { } - public UserAccount(UUID userID, UUID homeRegionID, float homePositionX, - float homePositionY, float homePositionZ, float homeLookAtX, - float homeLookAtY, float homeLookAtZ) + public UserAccount(UUID userID) { UserID = userID; - HomeRegionID = homeRegionID; - HomePositionX = homePositionX; - HomePositionY = homePositionY; - HomePositionZ = homePositionZ; - HomeLookAtX = homeLookAtX; - HomeLookAtY = homeLookAtY; - HomeLookAtZ = homeLookAtZ; } public string FirstName; public string LastName; + public string Email; public UUID UserID; public UUID ScopeID; - // For informational purposes only! - // - public string HomeRegionName; - - public UUID HomeRegionID; - public float HomePositionX; - public float HomePositionY; - public float HomePositionZ; - public float HomeLookAtX; - public float HomeLookAtY; - public float HomeLookAtZ; - // These are here because they // concern the account rather than // the profile. They just happen to @@ -76,6 +57,41 @@ namespace OpenSim.Services.Interfaces public int UserFlags; public string AccountType; + public UserAccount(Dictionary kvp) + { + if (kvp.ContainsKey("FirstName")) + FirstName = kvp["FirstName"].ToString(); + if (kvp.ContainsKey("LastName")) + LastName = kvp["LastName"].ToString(); + if (kvp.ContainsKey("Email")) + Email = kvp["Email"].ToString(); + if (kvp.ContainsKey("UserID")) + UUID.TryParse(kvp["UserID"].ToString(), out UserID); + if (kvp.ContainsKey("ScopeID")) + UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); + if (kvp.ContainsKey("GodLevel")) + Int32.TryParse(kvp["GodLevel"].ToString(), out GodLevel); + if (kvp.ContainsKey("UserFlags")) + Int32.TryParse(kvp["UserFlags"].ToString(), out UserFlags); + if (kvp.ContainsKey("AccountType")) + AccountType = kvp["AccountType"].ToString(); + + } + + public Dictionary ToKeyValuePairs() + { + Dictionary result = new Dictionary(); + result["FirstName"] = FirstName; + result["LastName"] = LastName; + result["Email"] = Email; + result["UserID"] = UserID.ToString(); + result["ScopeID"] = ScopeID.ToString(); + result["GodLevel"] = GodLevel.ToString(); + result["UserFlags"] = UserFlags.ToString(); + result["AccountType"] = AccountType.ToString(); + + return result; + } }; public interface IUserAccountService @@ -87,12 +103,6 @@ namespace OpenSim.Services.Interfaces // List GetUserAccount(UUID scopeID, string query); - - // This will set only the home region portion of the data! - // Can't be used to set god level, flags, type or change the name! - // - bool SetHomePosition(UserAccount data, UUID RegionID, UUID RegionSecret); - // Update all updatable fields // bool SetUserAccount(UserAccount data, UUID PrincipalID, string token); -- cgit v1.1 From 18d93c2ceed3d74dfdcd7c482a3db664b5a13e04 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Dec 2009 20:29:52 -0800 Subject: * Added Created field to UserAccountData --- OpenSim/Services/Interfaces/IUserService.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 02d5459..6742758 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -57,6 +57,8 @@ namespace OpenSim.Services.Interfaces public int UserFlags; public string AccountType; + public DateTime Created; + public UserAccount(Dictionary kvp) { if (kvp.ContainsKey("FirstName")) @@ -75,6 +77,8 @@ namespace OpenSim.Services.Interfaces Int32.TryParse(kvp["UserFlags"].ToString(), out UserFlags); if (kvp.ContainsKey("AccountType")) AccountType = kvp["AccountType"].ToString(); + if (kvp.ContainsKey("Created")) + DateTime.TryParse(kvp["Created"].ToString(), out Created); } @@ -89,6 +93,7 @@ namespace OpenSim.Services.Interfaces result["GodLevel"] = GodLevel.ToString(); result["UserFlags"] = UserFlags.ToString(); result["AccountType"] = AccountType.ToString(); + result["Created"] = Created.ToString(); return result; } -- cgit v1.1 From 3cb68d1c8b4d7f5960b50db0040fe4e5f4ea6f77 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Dec 2009 20:37:21 -0800 Subject: Removed AccountType, GodLevel and UserFlags from UserAccountData. Doesn't belong there. --- OpenSim/Services/Interfaces/IUserService.cs | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 6742758..e458178 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -48,15 +48,6 @@ namespace OpenSim.Services.Interfaces public UUID UserID; public UUID ScopeID; - // These are here because they - // concern the account rather than - // the profile. They just happen to - // be used in the Linden profile as well - // - public int GodLevel; - public int UserFlags; - public string AccountType; - public DateTime Created; public UserAccount(Dictionary kvp) @@ -71,12 +62,6 @@ namespace OpenSim.Services.Interfaces UUID.TryParse(kvp["UserID"].ToString(), out UserID); if (kvp.ContainsKey("ScopeID")) UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); - if (kvp.ContainsKey("GodLevel")) - Int32.TryParse(kvp["GodLevel"].ToString(), out GodLevel); - if (kvp.ContainsKey("UserFlags")) - Int32.TryParse(kvp["UserFlags"].ToString(), out UserFlags); - if (kvp.ContainsKey("AccountType")) - AccountType = kvp["AccountType"].ToString(); if (kvp.ContainsKey("Created")) DateTime.TryParse(kvp["Created"].ToString(), out Created); @@ -90,9 +75,6 @@ namespace OpenSim.Services.Interfaces result["Email"] = Email; result["UserID"] = UserID.ToString(); result["ScopeID"] = ScopeID.ToString(); - result["GodLevel"] = GodLevel.ToString(); - result["UserFlags"] = UserFlags.ToString(); - result["AccountType"] = AccountType.ToString(); result["Created"] = Created.ToString(); return result; -- cgit v1.1 From f40001f8eddd2bb2c1023e4c6eb1f3a7ae820720 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Dec 2009 20:53:20 -0800 Subject: Added the ServiceURLs field to UserAccountData --- OpenSim/Services/Interfaces/IUserService.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index e458178..ecbb344 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -48,6 +48,8 @@ namespace OpenSim.Services.Interfaces public UUID UserID; public UUID ScopeID; + public Dictionary ServiceURLs; + public DateTime Created; public UserAccount(Dictionary kvp) @@ -64,6 +66,17 @@ namespace OpenSim.Services.Interfaces UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); if (kvp.ContainsKey("Created")) DateTime.TryParse(kvp["Created"].ToString(), out Created); + if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null) + { + if (kvp["ServiceURLs"] is Dictionary) + { + ServiceURLs = new Dictionary(); + foreach (KeyValuePair urls in (Dictionary)kvp["ServiceURLs"]) + { + ServiceURLs.Add(urls.Key, urls.Value); + } + } + } } @@ -76,6 +89,7 @@ namespace OpenSim.Services.Interfaces result["UserID"] = UserID.ToString(); result["ScopeID"] = ScopeID.ToString(); result["Created"] = Created.ToString(); + result["ServiceURLs"] = ServiceURLs; return result; } -- cgit v1.1 From a462e440d5b5dca97f9b32fa41e24d763456ce97 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Dec 2009 08:06:07 -0800 Subject: Better way of setting ServiceURLs --- OpenSim/Services/Interfaces/IUserService.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index ecbb344..8279b9a 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -66,18 +66,8 @@ namespace OpenSim.Services.Interfaces UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); if (kvp.ContainsKey("Created")) DateTime.TryParse(kvp["Created"].ToString(), out Created); - if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null) - { - if (kvp["ServiceURLs"] is Dictionary) - { - ServiceURLs = new Dictionary(); - foreach (KeyValuePair urls in (Dictionary)kvp["ServiceURLs"]) - { - ServiceURLs.Add(urls.Key, urls.Value); - } - } - } - + if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) + ServiceURLs = (Dictionary)kvp["ServiceURLs"]; } public Dictionary ToKeyValuePairs() -- cgit v1.1 From 6eb5754f5a4b9707f43572ce1e5743054d784818 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Dec 2009 13:27:21 -0800 Subject: Polished the IUserService interface. --- OpenSim/Services/Interfaces/IUserService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 8279b9a..b6f8774 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -89,10 +89,11 @@ namespace OpenSim.Services.Interfaces { UserAccount GetUserAccount(UUID scopeID, UUID userID); UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName); + UserAccount GetUserAccount(UUID scopeID, string Email); // Returns the list of avatars that matches both the search // criterion and the scope ID passed // - List GetUserAccount(UUID scopeID, string query); + List GetUserAccounts(UUID scopeID, string query); // Update all updatable fields // -- cgit v1.1 From 2294683f0747fd5691437ed4e10a73ae45c7650c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Dec 2009 13:39:21 -0800 Subject: Tighten up the IUserService interface again. No need for auth tokens at this level. --- OpenSim/Services/Interfaces/IUserService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index b6f8774..1089c6c 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -97,9 +97,9 @@ namespace OpenSim.Services.Interfaces // Update all updatable fields // - bool SetUserAccount(UserAccount data, UUID PrincipalID, string token); + bool SetUserAccount(UserAccount data); // Creates a user data record - bool CreateUserAccount(UserAccount data, UUID PrincipalID, string token); + bool CreateUserAccount(UserAccount data); } } -- cgit v1.1 From b4483df2701483aabd43fc7d03ebd74770d70170 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Dec 2009 15:58:40 -0800 Subject: * All modules and connectors for user account service are in place. Untested. * Cleaned up a few things on presence connectors --- OpenSim/Services/Interfaces/IUserService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 1089c6c..e4e4bec 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -48,7 +48,7 @@ namespace OpenSim.Services.Interfaces public UUID UserID; public UUID ScopeID; - public Dictionary ServiceURLs; + public Dictionary ServiceURLs; public DateTime Created; @@ -67,7 +67,7 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("Created")) DateTime.TryParse(kvp["Created"].ToString(), out Created); if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) - ServiceURLs = (Dictionary)kvp["ServiceURLs"]; + ServiceURLs = (Dictionary)kvp["ServiceURLs"]; } public Dictionary ToKeyValuePairs() -- cgit v1.1 From b6097ae9a8a4566330d882213179feba6d05da62 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Dec 2009 22:23:17 +0000 Subject: Some modifications to user service. Query by name is implemented now --- OpenSim/Services/Interfaces/IUserService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index e4e4bec..1bdaaab 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs @@ -37,20 +37,20 @@ namespace OpenSim.Services.Interfaces { } - public UserAccount(UUID userID) + public UserAccount(UUID principalID) { - UserID = userID; + PrincipalID = principalID; } public string FirstName; public string LastName; public string Email; - public UUID UserID; + public UUID PrincipalID; public UUID ScopeID; public Dictionary ServiceURLs; - public DateTime Created; + public int Created; public UserAccount(Dictionary kvp) { @@ -60,12 +60,12 @@ namespace OpenSim.Services.Interfaces LastName = kvp["LastName"].ToString(); if (kvp.ContainsKey("Email")) Email = kvp["Email"].ToString(); - if (kvp.ContainsKey("UserID")) - UUID.TryParse(kvp["UserID"].ToString(), out UserID); + if (kvp.ContainsKey("PrincipalID")) + UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); if (kvp.ContainsKey("ScopeID")) UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); if (kvp.ContainsKey("Created")) - DateTime.TryParse(kvp["Created"].ToString(), out Created); + Convert.ToInt32(kvp["Created"].ToString()); if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) ServiceURLs = (Dictionary)kvp["ServiceURLs"]; } @@ -76,7 +76,7 @@ namespace OpenSim.Services.Interfaces result["FirstName"] = FirstName; result["LastName"] = LastName; result["Email"] = Email; - result["UserID"] = UserID.ToString(); + result["PrincipalID"] = PrincipalID.ToString(); result["ScopeID"] = ScopeID.ToString(); result["Created"] = Created.ToString(); result["ServiceURLs"] = ServiceURLs; -- cgit v1.1 From 3507005d9decdbf579fb2b7b9928a7d97bd6cf5b Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 31 Dec 2009 01:16:16 +0000 Subject: Remove CreateUserAccount. Rename SetUserAccount to StoreUserAccount. Implement the fetch operations fully. Rename one last UserService file to UserAccountService --- OpenSim/Services/Interfaces/IUserAccountService.cs | 103 ++++++++++++++++++++ OpenSim/Services/Interfaces/IUserService.cs | 105 --------------------- 2 files changed, 103 insertions(+), 105 deletions(-) create mode 100644 OpenSim/Services/Interfaces/IUserAccountService.cs delete mode 100644 OpenSim/Services/Interfaces/IUserService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs new file mode 100644 index 0000000..b2d5d48 --- /dev/null +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -0,0 +1,103 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using OpenMetaverse; + +namespace OpenSim.Services.Interfaces +{ + public class UserAccount + { + public UserAccount() + { + } + + public UserAccount(UUID principalID) + { + PrincipalID = principalID; + } + + public string FirstName; + public string LastName; + public string Email; + public UUID PrincipalID; + public UUID ScopeID; + + public Dictionary ServiceURLs; + + public int Created; + + public UserAccount(Dictionary kvp) + { + if (kvp.ContainsKey("FirstName")) + FirstName = kvp["FirstName"].ToString(); + if (kvp.ContainsKey("LastName")) + LastName = kvp["LastName"].ToString(); + if (kvp.ContainsKey("Email")) + Email = kvp["Email"].ToString(); + if (kvp.ContainsKey("PrincipalID")) + UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); + if (kvp.ContainsKey("ScopeID")) + UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); + if (kvp.ContainsKey("Created")) + Convert.ToInt32(kvp["Created"].ToString()); + if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) + ServiceURLs = (Dictionary)kvp["ServiceURLs"]; + } + + public Dictionary ToKeyValuePairs() + { + Dictionary result = new Dictionary(); + result["FirstName"] = FirstName; + result["LastName"] = LastName; + result["Email"] = Email; + result["PrincipalID"] = PrincipalID.ToString(); + result["ScopeID"] = ScopeID.ToString(); + result["Created"] = Created.ToString(); + result["ServiceURLs"] = ServiceURLs; + + return result; + } + }; + + public interface IUserAccountService + { + UserAccount GetUserAccount(UUID scopeID, UUID userID); + UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName); + UserAccount GetUserAccount(UUID scopeID, string Email); + // Returns the list of avatars that matches both the search + // criterion and the scope ID passed + // + List GetUserAccounts(UUID scopeID, string query); + + // Store the data given, wich replaces the sotred data, therefore + // must be complete. + // + bool StoreUserAccount(UserAccount data); + } +} diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs deleted file mode 100644 index 1bdaaab..0000000 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using OpenMetaverse; - -namespace OpenSim.Services.Interfaces -{ - public class UserAccount - { - public UserAccount() - { - } - - public UserAccount(UUID principalID) - { - PrincipalID = principalID; - } - - public string FirstName; - public string LastName; - public string Email; - public UUID PrincipalID; - public UUID ScopeID; - - public Dictionary ServiceURLs; - - public int Created; - - public UserAccount(Dictionary kvp) - { - if (kvp.ContainsKey("FirstName")) - FirstName = kvp["FirstName"].ToString(); - if (kvp.ContainsKey("LastName")) - LastName = kvp["LastName"].ToString(); - if (kvp.ContainsKey("Email")) - Email = kvp["Email"].ToString(); - if (kvp.ContainsKey("PrincipalID")) - UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); - if (kvp.ContainsKey("ScopeID")) - UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); - if (kvp.ContainsKey("Created")) - Convert.ToInt32(kvp["Created"].ToString()); - if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) - ServiceURLs = (Dictionary)kvp["ServiceURLs"]; - } - - public Dictionary ToKeyValuePairs() - { - Dictionary result = new Dictionary(); - result["FirstName"] = FirstName; - result["LastName"] = LastName; - result["Email"] = Email; - result["PrincipalID"] = PrincipalID.ToString(); - result["ScopeID"] = ScopeID.ToString(); - result["Created"] = Created.ToString(); - result["ServiceURLs"] = ServiceURLs; - - return result; - } - }; - - public interface IUserAccountService - { - UserAccount GetUserAccount(UUID scopeID, UUID userID); - UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName); - UserAccount GetUserAccount(UUID scopeID, string Email); - // Returns the list of avatars that matches both the search - // criterion and the scope ID passed - // - List GetUserAccounts(UUID scopeID, string query); - - // Update all updatable fields - // - bool SetUserAccount(UserAccount data); - - // Creates a user data record - bool CreateUserAccount(UserAccount data); - } -} -- cgit v1.1 From b29ae7246076126e8e39827564438db6e53eac8a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 30 Dec 2009 21:00:16 -0800 Subject: First pass at the new login service. Still incomplete, but doesn't disrupt the existing code. --- OpenSim/Services/Interfaces/ILoginService.cs | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 OpenSim/Services/Interfaces/ILoginService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs new file mode 100644 index 0000000..5397b10 --- /dev/null +++ b/OpenSim/Services/Interfaces/ILoginService.cs @@ -0,0 +1,49 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace OpenSim.Services.Interfaces +{ + public abstract class LoginResponse + { + public abstract Hashtable ToHashtable(); + } + + public abstract class FailedLoginResponse : LoginResponse + { + } + + public interface ILoginService + { + LoginResponse Login(string firstName, string lastName, string passwd, string startLocation); + } + + +} -- cgit v1.1 From a8901a40f4526720f68049706cabd34cf9717172 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 31 Dec 2009 09:25:16 -0800 Subject: Simulation handlers (agents & objects) completed. --- OpenSim/Services/Interfaces/ISimulationService.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index a169ab7..7ba3e66 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -33,9 +33,11 @@ namespace OpenSim.Services.Interfaces { public interface ISimulationService { + IScene GetScene(ulong regionHandle); + #region Agents - bool CreateAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason); + bool CreateAgent(ulong regionHandle, AgentCircuitData aCircuit, uint flags, out string reason); /// /// Full child agent update. @@ -98,11 +100,5 @@ namespace OpenSim.Services.Interfaces #endregion Objects - #region Regions - - bool HelloNeighbour(ulong regionHandle, RegionInfo thisRegion); - - #endregion Regions - } } -- cgit v1.1 From 0ce9be653d2194877cb972cbce261eecb0cd58a8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 31 Dec 2009 14:59:26 -0800 Subject: * Added the Login server handlers that were lost in yesterday's commit grief * More beef to the LLLoginService * Better design for handling local simulation service --- OpenSim/Services/Interfaces/ILoginService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs index 5397b10..0f82de5 100644 --- a/OpenSim/Services/Interfaces/ILoginService.cs +++ b/OpenSim/Services/Interfaces/ILoginService.cs @@ -29,11 +29,14 @@ using System; using System.Collections; using System.Collections.Generic; +using OpenMetaverse.StructuredData; + namespace OpenSim.Services.Interfaces { public abstract class LoginResponse { public abstract Hashtable ToHashtable(); + public abstract OSD ToOSDMap(); } public abstract class FailedLoginResponse : LoginResponse -- cgit v1.1 From 130c80efe004fa06808cc639ad8e2ee31c35744b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 31 Dec 2009 17:18:55 -0800 Subject: A lot more beef on the login service. The LLLoginResponse is a MONSTER! Almost done... --- OpenSim/Services/Interfaces/ILoginService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs index 0f82de5..24bf342 100644 --- a/OpenSim/Services/Interfaces/ILoginService.cs +++ b/OpenSim/Services/Interfaces/ILoginService.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; using OpenMetaverse.StructuredData; @@ -45,7 +46,7 @@ namespace OpenSim.Services.Interfaces public interface ILoginService { - LoginResponse Login(string firstName, string lastName, string passwd, string startLocation); + LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, IPEndPoint clientIP); } -- cgit v1.1 From dbb16bf2db533d54d3be11a6a878909e237e3924 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 09:54:46 -0800 Subject: * Forgotten ILibraryService from yesterday * New IAvatarService -- first pass --- OpenSim/Services/Interfaces/IAvatarService.cs | 94 ++++++++++++++++++++++++++ OpenSim/Services/Interfaces/ILibraryService.cs | 43 ++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 OpenSim/Services/Interfaces/IAvatarService.cs create mode 100644 OpenSim/Services/Interfaces/ILibraryService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs new file mode 100644 index 0000000..7324c74 --- /dev/null +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -0,0 +1,94 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; + +using OpenSim.Framework; + +using OpenMetaverse; + +namespace OpenSim.Services.Interfaces +{ + public interface IAvatarService + { + /// + /// Called by the login service + /// + /// + /// + IAvatarData GetAvatar(UUID userID); + + /// + /// Called by everyone who can change the avatar data (so, regions) + /// + /// + /// + /// + bool SetAvatar(UUID userID, IAvatarData avatar); + + /// + /// Not sure if it's needed + /// + /// + /// + bool ResetAvatar(UUID userID); + + /// + /// These 3 methods raison d'etre: + /// No need to send the entire avatar data (SetAvatar) for changing attachments + /// + /// + /// + /// + bool SetAttachment(UUID userID, AttachmentData attach); + bool SetAttachments(UUID userID, List attachs); + bool Dettach(UUID userID, UUID id); + } + + /// + /// Each region/client that uses avatars will have a data structure + /// of this type representing the avatars. + /// + public interface IAvatarData + { + // Not sure what to do with the non-attachment data + // That data is highly dependent on the implementation of avatars + // and I doubt it can be abstracted into this interface. + // Maybe it will never be here. Maybe that data needs to + // be processed by a module instead of being processed in + // the Scenes core code. + + AttachmentData GetAttachment(int attachPoint); + List GetAttachments(); + int GetAttachmentPoint(UUID id); + + bool SetAttachment(AttachmentData attach); + bool SetAttachments(List attachs); + bool Dettach(UUID id); + } +} diff --git a/OpenSim/Services/Interfaces/ILibraryService.cs b/OpenSim/Services/Interfaces/ILibraryService.cs new file mode 100644 index 0000000..861cf0e --- /dev/null +++ b/OpenSim/Services/Interfaces/ILibraryService.cs @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; + +using OpenSim.Framework; +using OpenMetaverse; + +namespace OpenSim.Services.Interfaces +{ + public interface ILibraryService + { + InventoryFolderImpl LibraryRootFolder { get; } + + Dictionary GetAllFolders(); + } + +} -- cgit v1.1 From c5149fe229d1c8ab2cb1d50e906d2064e92ec8b5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 17:42:41 +0000 Subject: Minor interface changes --- OpenSim/Services/Interfaces/IAvatarService.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 7324c74..f87fcd8 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -65,9 +65,8 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool SetAttachment(UUID userID, AttachmentData attach); - bool SetAttachments(UUID userID, List attachs); - bool Dettach(UUID userID, UUID id); + bool SetAttachments(UUID userID, AttachmentData[] attachs); + bool Detach(UUID userID, UUID id); } /// @@ -83,12 +82,10 @@ namespace OpenSim.Services.Interfaces // be processed by a module instead of being processed in // the Scenes core code. - AttachmentData GetAttachment(int attachPoint); - List GetAttachments(); + AttachmentData[] GetAttachments(int[] attachPoints); int GetAttachmentPoint(UUID id); - bool SetAttachment(AttachmentData attach); - bool SetAttachments(List attachs); - bool Dettach(UUID id); + bool SetAttachments(AttachmentData[] attachs); + bool Detach(UUID id); } } -- cgit v1.1 From 78173996b92c1beee11ecae9ece196ac907bffa8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 17:50:15 +0000 Subject: First stab at avatar data. Very generic --- OpenSim/Services/Interfaces/IAvatarService.cs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index f87fcd8..dc56f4f 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -75,17 +75,26 @@ namespace OpenSim.Services.Interfaces /// public interface IAvatarData { - // Not sure what to do with the non-attachment data - // That data is highly dependent on the implementation of avatars - // and I doubt it can be abstracted into this interface. - // Maybe it will never be here. Maybe that data needs to - // be processed by a module instead of being processed in - // the Scenes core code. - AttachmentData[] GetAttachments(int[] attachPoints); int GetAttachmentPoint(UUID id); bool SetAttachments(AttachmentData[] attachs); bool Detach(UUID id); + + // This pretty much determines which name/value pairs will be + // present below. The name/value pair describe a part of + // the avatar. For SL avatars, these would be "shape", "texture1", + // etc. For other avatars, they might be "mesh", "skin", etc. + // The value portion is a URL that is expected to resolve to an + // asset of the type required by the handler for that field. + // It is required that regions can access these URLs. Allowing + // direct access by a viewer is not required, and, if provided, + // may be read-only. A "naked" UUID can be used to refer to an + // asset int he current region's asset service, which is not + // portable, but allows legacy appearance to continue to + // function. Closed, LL-based grids will never need URLs here. + + int AvatarType { get; set; } + Dictionary Data { get; set; } } } -- cgit v1.1 From 7c06634e520c69b169df414857ffcb1847d93382 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 11:43:29 -0800 Subject: Clarifying comments. --- OpenSim/Services/Interfaces/IAvatarService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index dc56f4f..d2b7ba4 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -59,7 +59,7 @@ namespace OpenSim.Services.Interfaces bool ResetAvatar(UUID userID); /// - /// These 3 methods raison d'etre: + /// These methods raison d'etre: /// No need to send the entire avatar data (SetAvatar) for changing attachments /// /// @@ -96,5 +96,11 @@ namespace OpenSim.Services.Interfaces int AvatarType { get; set; } Dictionary Data { get; set; } + + /// + /// This MUST at least define a pair "AvatarType" -> "dll:class" + /// + /// + Dictionary ToKeyValuePairs(); } } -- cgit v1.1 From 90b65338e6f6776eb2862bbdfe1e40264273e9ed Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 19:29:02 +0000 Subject: Strip the lindenisms from the interface --- OpenSim/Services/Interfaces/IAvatarService.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index d2b7ba4..bebd455 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -65,8 +65,8 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool SetAttachments(UUID userID, AttachmentData[] attachs); - bool Detach(UUID userID, UUID id); + bool SetItems(UUID userID, string[] names, string[] values); + bool RemoveItems(UUID userID, string[] names); } /// @@ -75,12 +75,6 @@ namespace OpenSim.Services.Interfaces /// public interface IAvatarData { - AttachmentData[] GetAttachments(int[] attachPoints); - int GetAttachmentPoint(UUID id); - - bool SetAttachments(AttachmentData[] attachs); - bool Detach(UUID id); - // This pretty much determines which name/value pairs will be // present below. The name/value pair describe a part of // the avatar. For SL avatars, these would be "shape", "texture1", -- cgit v1.1 From 3a19c858032490708e8c147947f56126cde536b0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 19:32:46 +0000 Subject: Change to a class --- OpenSim/Services/Interfaces/IAvatarService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index bebd455..ccf77c0 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -73,7 +73,7 @@ namespace OpenSim.Services.Interfaces /// Each region/client that uses avatars will have a data structure /// of this type representing the avatars. /// - public interface IAvatarData + public class AvatarData { // This pretty much determines which name/value pairs will be // present below. The name/value pair describe a part of @@ -88,13 +88,15 @@ namespace OpenSim.Services.Interfaces // portable, but allows legacy appearance to continue to // function. Closed, LL-based grids will never need URLs here. - int AvatarType { get; set; } - Dictionary Data { get; set; } + public int AvatarType; + public Dictionary Data; /// - /// This MUST at least define a pair "AvatarType" -> "dll:class" /// /// - Dictionary ToKeyValuePairs(); + public Dictionary ToKeyValuePairs() + { + return null; + } } } -- cgit v1.1 From e73eb55ad8c136efd34e2f5239856053d3cbef81 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 12:18:22 -0800 Subject: Changed the rest of references to IAvatarData to AvatarData --- OpenSim/Services/Interfaces/IAvatarService.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index ccf77c0..682616a 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -41,7 +41,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - IAvatarData GetAvatar(UUID userID); + AvatarData GetAvatar(UUID userID); /// /// Called by everyone who can change the avatar data (so, regions) @@ -49,7 +49,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool SetAvatar(UUID userID, IAvatarData avatar); + bool SetAvatar(UUID userID, AvatarData avatar); /// /// Not sure if it's needed @@ -91,6 +91,11 @@ namespace OpenSim.Services.Interfaces public int AvatarType; public Dictionary Data; + public AvatarData(Dictionary kvp) + { + // TODO + } + /// /// /// -- cgit v1.1 From 6da6b8d9c5821719302c355d21e94200586e25f1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 16:26:40 -0800 Subject: * Converters from new AvatarData to old AvatarAppearance and vice-versa * Login now retrieves AvatarData from AvatarService and sends it off with the agent data --- OpenSim/Services/Interfaces/IAvatarService.cs | 95 ++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 682616a..39368f1 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections; using System.Collections.Generic; using OpenSim.Framework; @@ -93,7 +94,16 @@ namespace OpenSim.Services.Interfaces public AvatarData(Dictionary kvp) { - // TODO + Data = new Dictionary(); + + if (kvp.ContainsKey("AvatarType")) + Int32.TryParse(kvp["AvatarType"].ToString(), out AvatarType); + + foreach (KeyValuePair _kvp in kvp) + { + if (_kvp.Value != null) + Data[_kvp.Key] = _kvp.Value.ToString(); + } } /// @@ -101,7 +111,90 @@ namespace OpenSim.Services.Interfaces /// public Dictionary ToKeyValuePairs() { + Dictionary result = new Dictionary(); + + result["AvatarType"] = AvatarType.ToString(); + foreach (KeyValuePair _kvp in Data) + { + if (_kvp.Value != null) + result[_kvp.Key] = _kvp.Value; + } return null; } + + public AvatarData(AvatarAppearance appearance) + { + AvatarType = 1; // SL avatars + Data = new Dictionary(); + + // Wearables + Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); + Data["BodyItem"] = appearance.BodyItem.ToString(); + Data["EyesItem"] = appearance.EyesItem.ToString(); + Data["GlovesItem"] = appearance.GlovesItem.ToString(); + Data["HairItem"] = appearance.HairItem.ToString(); + //Data["HipOffset"] = appearance.HipOffset.ToString(); + Data["JacketItem"] = appearance.JacketItem.ToString(); + Data["Owner"] = appearance.Owner.ToString(); + Data["PantsItem"] = appearance.PantsItem.ToString(); + Data["Serial"] = appearance.Serial.ToString(); + Data["ShirtItem"] = appearance.ShirtItem.ToString(); + Data["ShoesItem"] = appearance.ShoesItem.ToString(); + Data["SkinItem"] = appearance.SkinItem.ToString(); + Data["SkirtItem"] = appearance.SkirtItem.ToString(); + Data["SocksItem"] = appearance.SocksItem.ToString(); + Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); + Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); + + // Attachments + Hashtable attachs = appearance.GetAttachments(); + foreach (KeyValuePair kvp in attachs) + { + Data["_ap_" + kvp.Key] = kvp.Value["item"].ToString(); + } + } + + public AvatarAppearance ToAvatarAppearance() + { + AvatarAppearance appearance = new AvatarAppearance(); + // Wearables + appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); + appearance.BodyItem = UUID.Parse(Data["BodyItem"]); + appearance.EyesItem = UUID.Parse(Data["EyesItem"]); + appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); + appearance.HairItem = UUID.Parse(Data["HairItem"]); + //appearance.HipOffset = float.Parse(Data["HipOffset"]); + appearance.JacketItem = UUID.Parse(Data["JacketItem"]); + appearance.Owner = UUID.Parse(Data["Owner"]); + appearance.PantsItem = UUID.Parse(Data["PantsItem"]); + appearance.Serial = Int32.Parse(Data["Serial"]); + appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); + appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); + appearance.SkinItem = UUID.Parse(Data["SkinItem"]); + appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); + appearance.SocksItem = UUID.Parse(Data["SocksItem"]); + appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); + appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); + + // Attachments + Dictionary attchs = new Dictionary(); + foreach (KeyValuePair _kvp in Data) + if (_kvp.Key.StartsWith("_ap_")) + attchs[_kvp.Key] = _kvp.Value; + Hashtable aaAttachs = new Hashtable(); + foreach (KeyValuePair _kvp in attchs) + { + string pointStr = _kvp.Key.Substring(4); + int point = 0; + if (!Int32.TryParse(pointStr, out point)) + continue; + Hashtable tmp = new Hashtable(); + tmp["item"] = _kvp.Value; + tmp["asset"] = UUID.Zero.ToString(); + aaAttachs[point] = tmp; + } + + return appearance; + } } } -- cgit v1.1 From f8c79fe20acb165adc363c3a0565ad53810ae341 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 2 Jan 2010 20:11:59 -0800 Subject: Flattening the ServiceURLs --- OpenSim/Services/Interfaces/IUserAccountService.cs | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index b2d5d48..87f0e6c 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -66,8 +66,22 @@ namespace OpenSim.Services.Interfaces UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); if (kvp.ContainsKey("Created")) Convert.ToInt32(kvp["Created"].ToString()); - if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary)) - ServiceURLs = (Dictionary)kvp["ServiceURLs"]; + if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null) + { + ServiceURLs = new Dictionary(); + string str = kvp["ServiceURLs"].ToString(); + if (str != string.Empty) + { + string[] parts = str.Split(new char[] { '#' }); + Dictionary dic = new Dictionary(); + foreach (string s in parts) + { + string[] parts2 = s.Split(new char[] { '=' }); + if (parts2.Length == 2) + ServiceURLs[parts2[0]] = parts2[1]; + } + } + } } public Dictionary ToKeyValuePairs() @@ -79,10 +93,16 @@ namespace OpenSim.Services.Interfaces result["PrincipalID"] = PrincipalID.ToString(); result["ScopeID"] = ScopeID.ToString(); result["Created"] = Created.ToString(); - result["ServiceURLs"] = ServiceURLs; + string str = string.Empty; + foreach (KeyValuePair kvp in ServiceURLs) + { + str += kvp.Key + "=" + kvp.Value + "#"; + } + result["ServiceURLs"] = str; return result; } + }; public interface IUserAccountService -- cgit v1.1 From c268e342d19b6cc5969b1c1d94f20a3f4eb844ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 3 Jan 2010 09:35:12 -0800 Subject: * Changed ISimulation interface to take a GridRegion as input arg instead of a regionHandle. * Added the RemoteSimulationConnectorModule, which is the replacement for RESTComms. Scenes is not using this yet, only (standalone) Login uses these region modules for now. * Completed SimulationServiceConnector and corresponding handlers. --- OpenSim/Services/Interfaces/ISimulationService.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 7ba3e66..14f462c 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -29,6 +29,8 @@ using System; using OpenSim.Framework; using OpenMetaverse; +using GridRegion = OpenSim.Services.Interfaces.GridRegion; + namespace OpenSim.Services.Interfaces { public interface ISimulationService @@ -37,7 +39,7 @@ namespace OpenSim.Services.Interfaces #region Agents - bool CreateAgent(ulong regionHandle, AgentCircuitData aCircuit, uint flags, out string reason); + bool CreateAgent(GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason); /// /// Full child agent update. @@ -45,7 +47,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool UpdateAgent(ulong regionHandle, AgentData data); + bool UpdateAgent(GridRegion destination, AgentData data); /// /// Short child agent update, mostly for position. @@ -53,9 +55,9 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool UpdateAgent(ulong regionHandle, AgentPosition data); + bool UpdateAgent(GridRegion destination, AgentPosition data); - bool RetrieveAgent(ulong regionHandle, UUID id, out IAgentData agent); + bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent); /// /// Message from receiving region to departing region, telling it got contacted by the client. @@ -65,7 +67,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool ReleaseAgent(ulong regionHandle, UUID id, string uri); + bool ReleaseAgent(GridRegion destination, UUID id, string uri); /// /// Close agent. @@ -73,7 +75,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool CloseAgent(ulong regionHandle, UUID id); + bool CloseAgent(GridRegion destination, UUID id); #endregion Agents @@ -86,7 +88,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool CreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall); + bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall); /// /// Create an object from the user's inventory in the destination region. @@ -96,7 +98,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool CreateObject(ulong regionHandle, UUID userID, UUID itemID); + bool CreateObject(GridRegion destination, UUID userID, UUID itemID); #endregion Objects -- cgit v1.1 From 791c6188fd3b0347299c2bb0e88df90cc0747008 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 4 Jan 2010 02:07:31 +0000 Subject: Some work on avatar service. Retrieval and storage done --- OpenSim/Services/Interfaces/IAvatarService.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 39368f1..ea08ea5 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -92,6 +92,10 @@ namespace OpenSim.Services.Interfaces public int AvatarType; public Dictionary Data; + public AvatarData() + { + } + public AvatarData(Dictionary kvp) { Data = new Dictionary(); -- cgit v1.1 From f11a97f12d328af8bb39b92fec5cb5780983b66a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 7 Jan 2010 15:53:55 -0800 Subject: * Finished SimulationServiceConnector * Started rerouting calls to UserService. * Compiles. May run. --- OpenSim/Services/Interfaces/ISimulationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 14f462c..ec24d90 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs @@ -67,7 +67,7 @@ namespace OpenSim.Services.Interfaces /// /// /// - bool ReleaseAgent(GridRegion destination, UUID id, string uri); + bool ReleaseAgent(UUID originRegion, UUID id, string uri); /// /// Close agent. -- cgit v1.1 From b63405c1a796b44b58081857d01f726372467628 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 8 Jan 2010 10:43:34 -0800 Subject: Inching ahead... This compiles, but very likely does not run. --- OpenSim/Services/Interfaces/IPresenceService.cs | 20 ++++++++++++++++++++ OpenSim/Services/Interfaces/IUserAccountService.cs | 11 +++++++++++ 2 files changed, 31 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 2dad7e6..a010611 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -90,6 +90,26 @@ namespace OpenSim.Services.Interfaces return result; } + + public static PresenceInfo[] GetOnlinePresences(PresenceInfo[] pinfos) + { + if (pinfos == null) + return null; + + List lst = new List(pinfos); + lst = lst.FindAll(delegate(PresenceInfo each) { return each.Online; }); + + return lst.ToArray(); + } + + public static PresenceInfo GetOnlinePresence(PresenceInfo[] pinfos) + { + pinfos = GetOnlinePresences(pinfos); + if (pinfos != null && pinfos.Length >= 1) + return pinfos[0]; + + return null; + } } public interface IPresenceService diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index 87f0e6c..b1be64b 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -42,6 +42,17 @@ namespace OpenSim.Services.Interfaces PrincipalID = principalID; } + public UserAccount(UUID scopeID, string firstName, string lastName, string email) + { + PrincipalID = UUID.Random(); + ScopeID = scopeID; + FirstName = firstName; + LastName = lastName; + Email = email; + ServiceURLs = new Dictionary(); + // Created = ??? + } + public string FirstName; public string LastName; public string Email; -- cgit v1.1 From 28d6705358c2e383fb46c57f064de4dcff144e33 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 9 Jan 2010 20:46:32 +0000 Subject: Preliminary work on the new default region setting mechanism --- OpenSim/Services/Interfaces/IGridService.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index e69e4cd..5ea136f 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -90,6 +90,10 @@ namespace OpenSim.Services.Interfaces List GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax); + List GetDefaultRegions(UUID scopeID); + List GetFallbackRegions(UUID scopeID, int x, int y); + + int GetRegionFlags(UUID scopeID, UUID regionID); } public class GridRegion -- cgit v1.1 From 96ecdcf9c5ba35e589a599ad37cc6ce1a83f46f1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 9 Jan 2010 18:04:50 -0800 Subject: * Added SetPassword to IAuthenticationService. * Added create user command to UserAccountService. Works. * Deleted create user command from OpenSim. --- OpenSim/Services/Interfaces/IAuthenticationService.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs index 9225773..9de261b 100644 --- a/OpenSim/Services/Interfaces/IAuthenticationService.cs +++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs @@ -66,6 +66,17 @@ namespace OpenSim.Services.Interfaces bool Release(UUID principalID, string token); ////////////////////////////////////////////////////// + // SetPassword for a principal + // + // This method exists for the service, but may or may not + // be served remotely. That is, the authentication + // handlers may not include one handler for this, + // because it's a bit risky. Such handlers require + // authentication/authorization. + // + bool SetPassword(UUID principalID, string passwd); + + ////////////////////////////////////////////////////// // Grid // // We no longer need a shared secret between grid -- cgit v1.1 From 1e1b2ab221851efc414678b7ea52ef2ca788ce9f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 10:40:07 -0800 Subject: * OMG! All but one references to UserProfileCacheService have been rerouted! * HG is seriously broken here * Compiles. Untested. --- OpenSim/Services/Interfaces/IUserAccountService.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index b1be64b..942174c 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -58,11 +58,19 @@ namespace OpenSim.Services.Interfaces public string Email; public UUID PrincipalID; public UUID ScopeID; + public int UserLevel; + public int UserFlags; + public string UserTitle; public Dictionary ServiceURLs; public int Created; + public string Name + { + get { return FirstName + " " + LastName; } + } + public UserAccount(Dictionary kvp) { if (kvp.ContainsKey("FirstName")) @@ -75,6 +83,13 @@ namespace OpenSim.Services.Interfaces UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); if (kvp.ContainsKey("ScopeID")) UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); + if (kvp.ContainsKey("UserLevel")) + Convert.ToInt32(kvp["UserLevel"].ToString()); + if (kvp.ContainsKey("UserFlags")) + Convert.ToInt32(kvp["UserFlags"].ToString()); + if (kvp.ContainsKey("UserTitle")) + Email = kvp["UserTitle"].ToString(); + if (kvp.ContainsKey("Created")) Convert.ToInt32(kvp["Created"].ToString()); if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null) @@ -104,6 +119,10 @@ namespace OpenSim.Services.Interfaces result["PrincipalID"] = PrincipalID.ToString(); result["ScopeID"] = ScopeID.ToString(); result["Created"] = Created.ToString(); + result["UserLavel"] = UserLevel.ToString(); + result["UserFlags"] = UserFlags.ToString(); + result["UserTitle"] = UserTitle; + string str = string.Empty; foreach (KeyValuePair kvp in ServiceURLs) { -- cgit v1.1 From 3c90d834eac382af5edf091e83aea1ffcce91792 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 22:41:42 +0000 Subject: Remove all references to master avatar, replacing with estate owner where appropriate. This changes the behavior of the REST plugins and RemoteAdmin's region creation process. --- OpenSim/Services/Interfaces/IGridService.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 5ea136f..cd27145 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -204,12 +204,6 @@ namespace OpenSim.Services.Interfaces Maturity = ConvertFrom.RegionSettings.Maturity; RegionSecret = ConvertFrom.regionSecret; EstateOwner = ConvertFrom.EstateSettings.EstateOwner; - if (EstateOwner == UUID.Zero) - { - EstateOwner = ConvertFrom.MasterAvatarAssignedUUID; - ConvertFrom.EstateSettings.EstateOwner = EstateOwner; - ConvertFrom.EstateSettings.Save(); - } } public GridRegion(GridRegion ConvertFrom) -- cgit v1.1 From 4dd523b45d1e635c66eb4e556764fabe29dbfc58 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 15:34:56 -0800 Subject: * Changed IPresenceService Logout, so that it takes a position and a lookat * CommsManager.AvatarService rerouted --- OpenSim/Services/Interfaces/IPresenceService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index a010611..b4c1859 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -115,7 +115,7 @@ namespace OpenSim.Services.Interfaces public interface IPresenceService { bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); - bool LogoutAgent(UUID sessionID); + bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookAt); bool LogoutRegionAgents(UUID regionID); bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); -- cgit v1.1 From 77e43f480154b0a950d9d5f54df5c225fc64e77a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 11 Jan 2010 17:30:05 -0800 Subject: Fixed a couple of bugs with Appearance. Appearance is all good now. --- OpenSim/Services/Interfaces/IAvatarService.cs | 123 +++++++++++++++++--------- 1 file changed, 80 insertions(+), 43 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index ea08ea5..564c406 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -131,17 +131,15 @@ namespace OpenSim.Services.Interfaces AvatarType = 1; // SL avatars Data = new Dictionary(); + Data["Serial"] = appearance.Serial.ToString(); // Wearables Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); Data["BodyItem"] = appearance.BodyItem.ToString(); Data["EyesItem"] = appearance.EyesItem.ToString(); Data["GlovesItem"] = appearance.GlovesItem.ToString(); Data["HairItem"] = appearance.HairItem.ToString(); - //Data["HipOffset"] = appearance.HipOffset.ToString(); Data["JacketItem"] = appearance.JacketItem.ToString(); - Data["Owner"] = appearance.Owner.ToString(); Data["PantsItem"] = appearance.PantsItem.ToString(); - Data["Serial"] = appearance.Serial.ToString(); Data["ShirtItem"] = appearance.ShirtItem.ToString(); Data["ShoesItem"] = appearance.ShoesItem.ToString(); Data["SkinItem"] = appearance.SkinItem.ToString(); @@ -150,53 +148,92 @@ namespace OpenSim.Services.Interfaces Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); + Data["BodyAsset"] = appearance.BodyAsset.ToString(); + Data["EyesAsset"] = appearance.EyesAsset.ToString(); + Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); + Data["HairAsset"] = appearance.HairAsset.ToString(); + Data["JacketAsset"] = appearance.JacketAsset.ToString(); + Data["PantsAsset"] = appearance.PantsAsset.ToString(); + Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); + Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); + Data["SkinAsset"] = appearance.SkinAsset.ToString(); + Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); + Data["SocksAsset"] = appearance.SocksAsset.ToString(); + Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); + Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); + // Attachments Hashtable attachs = appearance.GetAttachments(); - foreach (KeyValuePair kvp in attachs) - { - Data["_ap_" + kvp.Key] = kvp.Value["item"].ToString(); - } + if (attachs != null) + foreach (DictionaryEntry dentry in attachs) + { + if (dentry.Value != null) + { + Hashtable tab = (Hashtable)dentry.Value; + if (tab.ContainsKey("item") && tab["item"] != null) + Data["_ap_" + dentry.Key] = tab["item"].ToString(); + } + } } - public AvatarAppearance ToAvatarAppearance() + public AvatarAppearance ToAvatarAppearance(UUID owner) { - AvatarAppearance appearance = new AvatarAppearance(); - // Wearables - appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); - appearance.BodyItem = UUID.Parse(Data["BodyItem"]); - appearance.EyesItem = UUID.Parse(Data["EyesItem"]); - appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); - appearance.HairItem = UUID.Parse(Data["HairItem"]); - //appearance.HipOffset = float.Parse(Data["HipOffset"]); - appearance.JacketItem = UUID.Parse(Data["JacketItem"]); - appearance.Owner = UUID.Parse(Data["Owner"]); - appearance.PantsItem = UUID.Parse(Data["PantsItem"]); - appearance.Serial = Int32.Parse(Data["Serial"]); - appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); - appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); - appearance.SkinItem = UUID.Parse(Data["SkinItem"]); - appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); - appearance.SocksItem = UUID.Parse(Data["SocksItem"]); - appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); - appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); - - // Attachments - Dictionary attchs = new Dictionary(); - foreach (KeyValuePair _kvp in Data) - if (_kvp.Key.StartsWith("_ap_")) - attchs[_kvp.Key] = _kvp.Value; - Hashtable aaAttachs = new Hashtable(); - foreach (KeyValuePair _kvp in attchs) + AvatarAppearance appearance = new AvatarAppearance(owner); + try { - string pointStr = _kvp.Key.Substring(4); - int point = 0; - if (!Int32.TryParse(pointStr, out point)) - continue; - Hashtable tmp = new Hashtable(); - tmp["item"] = _kvp.Value; - tmp["asset"] = UUID.Zero.ToString(); - aaAttachs[point] = tmp; + appearance.Serial = Int32.Parse(Data["Serial"]); + + // Wearables + appearance.BodyItem = UUID.Parse(Data["BodyItem"]); + appearance.EyesItem = UUID.Parse(Data["EyesItem"]); + appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); + appearance.HairItem = UUID.Parse(Data["HairItem"]); + appearance.JacketItem = UUID.Parse(Data["JacketItem"]); + appearance.PantsItem = UUID.Parse(Data["PantsItem"]); + appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); + appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); + appearance.SkinItem = UUID.Parse(Data["SkinItem"]); + appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); + appearance.SocksItem = UUID.Parse(Data["SocksItem"]); + appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); + appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); + + appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); + appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); + appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); + appearance.HairAsset = UUID.Parse(Data["HairAsset"]); + appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); + appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); + appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); + appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); + appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); + appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); + appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); + appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); + appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); + + // Attachments + Dictionary attchs = new Dictionary(); + foreach (KeyValuePair _kvp in Data) + if (_kvp.Key.StartsWith("_ap_")) + attchs[_kvp.Key] = _kvp.Value; + Hashtable aaAttachs = new Hashtable(); + foreach (KeyValuePair _kvp in attchs) + { + string pointStr = _kvp.Key.Substring(4); + int point = 0; + if (!Int32.TryParse(pointStr, out point)) + continue; + Hashtable tmp = new Hashtable(); + UUID uuid = UUID.Zero; + UUID.TryParse(_kvp.Value, out uuid); + tmp["item"] = uuid; + tmp["asset"] = UUID.Zero.ToString(); + aaAttachs[point] = tmp; + } + appearance.SetAttachments(aaAttachs); } + catch { } return appearance; } -- cgit v1.1 From 66920a9047b54db947d02f252e17409b7fc32ef0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 12 Jan 2010 09:22:58 -0800 Subject: Fixed more appearance woes that showed up using remote connectors. Appearance is now being passed with AgentCircuitData, as it should be. --- OpenSim/Services/Interfaces/IAvatarService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 564c406..de3bcf9 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -123,7 +123,7 @@ namespace OpenSim.Services.Interfaces if (_kvp.Value != null) result[_kvp.Key] = _kvp.Value; } - return null; + return result; } public AvatarData(AvatarAppearance appearance) -- cgit v1.1 From 7356860b487febd12c2e0de2f009a6df9ea0aeec Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 13 Jan 2010 09:17:30 -0800 Subject: Several more buglets removed. --- OpenSim/Services/Interfaces/IUserAccountService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index 942174c..3dacf53 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs @@ -98,11 +98,11 @@ namespace OpenSim.Services.Interfaces string str = kvp["ServiceURLs"].ToString(); if (str != string.Empty) { - string[] parts = str.Split(new char[] { '#' }); + string[] parts = str.Split(new char[] { ';' }); Dictionary dic = new Dictionary(); foreach (string s in parts) { - string[] parts2 = s.Split(new char[] { '=' }); + string[] parts2 = s.Split(new char[] { '*' }); if (parts2.Length == 2) ServiceURLs[parts2[0]] = parts2[1]; } @@ -119,14 +119,14 @@ namespace OpenSim.Services.Interfaces result["PrincipalID"] = PrincipalID.ToString(); result["ScopeID"] = ScopeID.ToString(); result["Created"] = Created.ToString(); - result["UserLavel"] = UserLevel.ToString(); + result["UserLevel"] = UserLevel.ToString(); result["UserFlags"] = UserFlags.ToString(); result["UserTitle"] = UserTitle; string str = string.Empty; foreach (KeyValuePair kvp in ServiceURLs) { - str += kvp.Key + "=" + kvp.Value + "#"; + str += kvp.Key + "*" + (kvp.Value == null ? "" : kvp.Value) + ";"; } result["ServiceURLs"] = str; -- cgit v1.1 From 686660650b4f5724fc0b4858d50ff4deeafb8ffe Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 15 Jan 2010 21:57:31 +0000 Subject: Implement region registration with authentication --- OpenSim/Services/Interfaces/IGridService.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index cd27145..6b6b347 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -159,6 +159,7 @@ namespace OpenSim.Services.Interfaces public byte Access; public int Maturity; public string RegionSecret; + public string Token; public GridRegion() { @@ -306,6 +307,7 @@ namespace OpenSim.Services.Interfaces kvp["access"] = Access.ToString(); kvp["regionSecret"] = RegionSecret; kvp["owner_uuid"] = EstateOwner.ToString(); + kvp["token"] = Token.ToString(); // Maturity doesn't seem to exist in the DB return kvp; } @@ -363,6 +365,9 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("owner_uuid")) EstateOwner = new UUID(kvp["owner_uuid"].ToString()); + if (kvp.ContainsKey("token")) + Token = kvp["token"].ToString(); + } } -- cgit v1.1 From bd6d1a24448dafea5be7ddbcd591b352040e4412 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 16 Jan 2010 07:46:07 -0800 Subject: Moved prim crossing to EntityTransferModule. Not complete yet. --- OpenSim/Services/Interfaces/IGridService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 6186d80..6a83f65 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -158,8 +158,8 @@ namespace OpenSim.Services.Interfaces public UUID TerrainImage = UUID.Zero; public byte Access; public int Maturity; - public string RegionSecret; - public string Token; + public string RegionSecret = string.Empty; + public string Token = string.Empty; public GridRegion() { -- cgit v1.1 From 5ce12c92d976fa32c076689bb3f937d8a8d60dc0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 16 Jan 2010 08:32:32 -0800 Subject: Fixed a missing field in the last regions table migration. --- OpenSim/Services/Interfaces/IGridService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 6a83f65..2f5e991 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -307,7 +307,7 @@ namespace OpenSim.Services.Interfaces kvp["access"] = Access.ToString(); kvp["regionSecret"] = RegionSecret; kvp["owner_uuid"] = EstateOwner.ToString(); - kvp["token"] = Token.ToString(); + kvp["Token"] = Token.ToString(); // Maturity doesn't seem to exist in the DB return kvp; } @@ -365,8 +365,8 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("owner_uuid")) EstateOwner = new UUID(kvp["owner_uuid"].ToString()); - if (kvp.ContainsKey("token")) - Token = kvp["token"].ToString(); + if (kvp.ContainsKey("Token")) + Token = kvp["Token"].ToString(); } } -- cgit v1.1 From 04e29c1bacbc1e2df980ae15896a847ce7535da2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 16 Jan 2010 21:42:44 -0800 Subject: Beginning of rewriting HG. Compiles, and runs, but HG functions not restored yet. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 13 +++++++ OpenSim/Services/Interfaces/IHypergridService.cs | 47 +++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 OpenSim/Services/Interfaces/IGatekeeperService.cs create mode 100644 OpenSim/Services/Interfaces/IHypergridService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs new file mode 100644 index 0000000..c4d1cbf --- /dev/null +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +using OpenMetaverse; + +namespace OpenSim.Services.Interfaces +{ + public interface IGatekeeperService + { + bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); + GridRegion GetHyperlinkRegion(UUID regionID); + } +} diff --git a/OpenSim/Services/Interfaces/IHypergridService.cs b/OpenSim/Services/Interfaces/IHypergridService.cs new file mode 100644 index 0000000..b49657a --- /dev/null +++ b/OpenSim/Services/Interfaces/IHypergridService.cs @@ -0,0 +1,47 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System.Collections.Generic; +using OpenSim.Framework; +using GridRegion = OpenSim.Services.Interfaces.GridRegion; + +using OpenMetaverse; + +namespace OpenSim.Services.Interfaces +{ + public interface IHypergridService + { + bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); + GridRegion GetHyperlinkRegion(UUID regionID); + + GridRegion GetRegionByUUID(UUID regionID); + GridRegion GetRegionByPosition(int x, int y); + GridRegion GetRegionByName(string name); + List GetRegionsByName(string name); + List GetRegionRange(int xmin, int xmax, int ymin, int ymax); + } +} -- cgit v1.1 From 724b1d152b816c3ddaa6624b1b182e6cae28863c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 08:42:08 -0800 Subject: Copyright notices. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 29 ++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index c4d1cbf..9904e20 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using OpenMetaverse; -- cgit v1.1 From f276ba57bf5bd732fbc6a255213c9bb7f5f5f148 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 11:33:47 -0800 Subject: HG agent transfers are starting to work. Gatekeeper handlers are missing. --- OpenSim/Services/Interfaces/IHypergridService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IHypergridService.cs b/OpenSim/Services/Interfaces/IHypergridService.cs index b49657a..f2a1983 100644 --- a/OpenSim/Services/Interfaces/IHypergridService.cs +++ b/OpenSim/Services/Interfaces/IHypergridService.cs @@ -36,7 +36,7 @@ namespace OpenSim.Services.Interfaces public interface IHypergridService { bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); - GridRegion GetHyperlinkRegion(UUID regionID); + GridRegion GetHyperlinkRegion(GridRegion gateway, UUID regionID); GridRegion GetRegionByUUID(UUID regionID); GridRegion GetRegionByPosition(int x, int y); -- cgit v1.1 From b2e6ec9e12ad07eb08496ebe8ca0476b793017d5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 18:04:55 -0800 Subject: Agent gets there through the Gatekeeper, but still a few quirks to fix. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 7 +++++++ OpenSim/Services/Interfaces/IHypergridService.cs | 1 + 2 files changed, 8 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index 9904e20..5e21804 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; +using OpenSim.Framework; using OpenMetaverse; namespace OpenSim.Services.Interfaces @@ -36,5 +37,11 @@ namespace OpenSim.Services.Interfaces { bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); GridRegion GetHyperlinkRegion(UUID regionID); + + bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); + bool UpdateAgent(GridRegion destination, AgentData agent); + void ReleaseAgent(UUID regionID, UUID agentID); + + bool LoginAttachment(GridRegion destination, ISceneObject sog); } } diff --git a/OpenSim/Services/Interfaces/IHypergridService.cs b/OpenSim/Services/Interfaces/IHypergridService.cs index f2a1983..dd3c053 100644 --- a/OpenSim/Services/Interfaces/IHypergridService.cs +++ b/OpenSim/Services/Interfaces/IHypergridService.cs @@ -44,4 +44,5 @@ namespace OpenSim.Services.Interfaces List GetRegionsByName(string name); List GetRegionRange(int xmin, int xmax, int ymin, int ymax); } + } -- cgit v1.1 From b5fcb5e872ec138ff7138906bffae193b6dae1a6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 20:10:42 -0800 Subject: HG teleports through gatekeeper are working. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index 5e21804..d41df75 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -39,9 +39,5 @@ namespace OpenSim.Services.Interfaces GridRegion GetHyperlinkRegion(UUID regionID); bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); - bool UpdateAgent(GridRegion destination, AgentData agent); - void ReleaseAgent(UUID regionID, UUID agentID); - - bool LoginAttachment(GridRegion destination, ISceneObject sog); } } -- cgit v1.1 From fd64823466ee667d0d827f95d3001ec8675512b2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 18 Jan 2010 10:37:11 -0800 Subject: * Added missing GatekeeperServiceConnector * Added basic machinery for teleporting users home. Untested. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index d41df75..59e0f82 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -39,5 +39,8 @@ namespace OpenSim.Services.Interfaces GridRegion GetHyperlinkRegion(UUID regionID); bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); + + GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); + } } -- cgit v1.1 From 3d536944153d4931cf891d6a788a47484f3e6f4d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 18 Jan 2010 16:34:23 -0800 Subject: Go Home works. With security!! --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 11 +++++++++++ OpenSim/Services/Interfaces/IHypergridService.cs | 1 + 2 files changed, 12 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index 59e0f82..5b5c9d1 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -26,6 +26,7 @@ */ using System; +using System.Net; using System.Collections.Generic; using OpenSim.Framework; @@ -43,4 +44,14 @@ namespace OpenSim.Services.Interfaces GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); } + + /// + /// HG1.5 only + /// + public interface IHomeUsersSecurityService + { + void SetEndPoint(UUID sessionID, IPEndPoint ep); + IPEndPoint GetEndPoint(UUID sessionID); + void RemoveEndPoint(UUID sessionID); + } } diff --git a/OpenSim/Services/Interfaces/IHypergridService.cs b/OpenSim/Services/Interfaces/IHypergridService.cs index dd3c053..86ef1b4 100644 --- a/OpenSim/Services/Interfaces/IHypergridService.cs +++ b/OpenSim/Services/Interfaces/IHypergridService.cs @@ -43,6 +43,7 @@ namespace OpenSim.Services.Interfaces GridRegion GetRegionByName(string name); List GetRegionsByName(string name); List GetRegionRange(int xmin, int xmax, int ymin, int ymax); + } } -- cgit v1.1 From 48b03c2c61a422c3ac9843892a2ae93b29a9f7b8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 24 Jan 2010 14:30:48 -0800 Subject: Integrated the hyperlinking with the GridService. --- OpenSim/Services/Interfaces/IHypergridService.cs | 49 ------------------------ 1 file changed, 49 deletions(-) delete mode 100644 OpenSim/Services/Interfaces/IHypergridService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IHypergridService.cs b/OpenSim/Services/Interfaces/IHypergridService.cs deleted file mode 100644 index 86ef1b4..0000000 --- a/OpenSim/Services/Interfaces/IHypergridService.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Collections.Generic; -using OpenSim.Framework; -using GridRegion = OpenSim.Services.Interfaces.GridRegion; - -using OpenMetaverse; - -namespace OpenSim.Services.Interfaces -{ - public interface IHypergridService - { - bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); - GridRegion GetHyperlinkRegion(GridRegion gateway, UUID regionID); - - GridRegion GetRegionByUUID(UUID regionID); - GridRegion GetRegionByPosition(int x, int y); - GridRegion GetRegionByName(string name); - List GetRegionsByName(string name); - List GetRegionRange(int xmin, int xmax, int ymin, int ymax); - - } - -} -- cgit v1.1 From 70465f4c9073033b87c781c35172656985fedccc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 24 Jan 2010 16:23:18 -0800 Subject: Removed obsolete interface IHyperlink. --- OpenSim/Services/Interfaces/IHyperlink.cs | 49 ------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 OpenSim/Services/Interfaces/IHyperlink.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IHyperlink.cs b/OpenSim/Services/Interfaces/IHyperlink.cs deleted file mode 100644 index ed3ff23..0000000 --- a/OpenSim/Services/Interfaces/IHyperlink.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using OpenSim.Framework; -using GridRegion = OpenSim.Services.Interfaces.GridRegion; - -using OpenMetaverse; - -namespace OpenSim.Services.Interfaces -{ - public interface IHyperlinkService - { - GridRegion TryLinkRegion(IClientAPI client, string regionDescriptor); - GridRegion GetHyperlinkRegion(ulong handle); - ulong FindRegionHandle(ulong handle); - - bool SendUserInformation(GridRegion region, AgentCircuitData aCircuit); - void AdjustUserInformation(AgentCircuitData aCircuit); - - bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome); - void AcceptUser(ForeignUserProfileData user, GridRegion home); - - bool IsLocalUser(UUID userID); - } -} -- cgit v1.1 From 7c00469cd210cfdda3dd835867469159d4c8b9d9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 27 Jan 2010 08:00:29 -0800 Subject: Added ExternalName config on Gatekeeper. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index 5b5c9d1..f8eb817 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -36,7 +36,7 @@ namespace OpenSim.Services.Interfaces { public interface IGatekeeperService { - bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string imageURL, out string reason); + bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason); GridRegion GetHyperlinkRegion(UUID regionID); bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); -- cgit v1.1 From 00f7d622cbc2c2e61d2efaacd8275da3f9821d8b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Jan 2010 19:19:42 -0800 Subject: HG 1.5 is in place. Tested in standalone only. --- OpenSim/Services/Interfaces/IGatekeeperService.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGatekeeperService.cs b/OpenSim/Services/Interfaces/IGatekeeperService.cs index f8eb817..ca7b9b3 100644 --- a/OpenSim/Services/Interfaces/IGatekeeperService.cs +++ b/OpenSim/Services/Interfaces/IGatekeeperService.cs @@ -41,17 +41,19 @@ namespace OpenSim.Services.Interfaces bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); - GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); - } /// /// HG1.5 only /// - public interface IHomeUsersSecurityService + public interface IUserAgentService { - void SetEndPoint(UUID sessionID, IPEndPoint ep); - IPEndPoint GetEndPoint(UUID sessionID); - void RemoveEndPoint(UUID sessionID); + bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, out string reason); + void LogoutAgent(UUID userID, UUID sessionID); + GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt); + + bool AgentIsComingHome(UUID sessionID, string thisGridExternalName); + bool VerifyAgent(UUID sessionID, string token); + bool VerifyClient(UUID sessionID, string token); } } -- cgit v1.1 From 0ab8dd61d787e2ed04cf0fd473be8ea6a97ec8d0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 4 Feb 2010 12:21:14 +0000 Subject: Finally cutting the gordian knot. Friends needs to be both a module and a service, and never the twain shall meet. This finally opens up the path to a working friends implementation --- OpenSim/Services/Interfaces/IFriendsService.cs | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 OpenSim/Services/Interfaces/IFriendsService.cs (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs new file mode 100644 index 0000000..ed77c1a --- /dev/null +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -0,0 +1,49 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using OpenMetaverse; +using OpenSim.Framework; +using System.Collections.Generic; + +namespace OpenSim.Region.Framework.Interfaces +{ + public struct FriendInfo + { + public UUID PrincipalID; + public string Friend; + int MyRights; + int TheirRights; + } + + public interface IFriendsService + { + FriendInfo[] GetFriends(UUID PrincipalID); + bool StoreFriend(UUID PrincipalID, string Friend, int flags); + bool SetFlags(UUID PrincipalID, int flags); + bool Delete(UUID PrincipalID, string Friend); + } +} -- cgit v1.1 From 1b44711ceb6f84c6eaa503d5d08ce30cb49a01e8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 5 Feb 2010 13:11:33 +0000 Subject: Clarify some names --- OpenSim/Services/Interfaces/IFriendsService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs index ed77c1a..4e665cd 100644 --- a/OpenSim/Services/Interfaces/IFriendsService.cs +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -35,15 +35,14 @@ namespace OpenSim.Region.Framework.Interfaces { public UUID PrincipalID; public string Friend; - int MyRights; - int TheirRights; + int MyFlags; + int TheirFlags; } public interface IFriendsService { FriendInfo[] GetFriends(UUID PrincipalID); bool StoreFriend(UUID PrincipalID, string Friend, int flags); - bool SetFlags(UUID PrincipalID, int flags); bool Delete(UUID PrincipalID, string Friend); } } -- cgit v1.1 From 1dfcf683307c24f4810961f52e0e643a59ef8d8c Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Feb 2010 07:05:38 +0000 Subject: Add the friends service skel and correct some namespace issues --- OpenSim/Services/Interfaces/IFriendsService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs index 4e665cd..dc5a812 100644 --- a/OpenSim/Services/Interfaces/IFriendsService.cs +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -29,7 +29,7 @@ using OpenMetaverse; using OpenSim.Framework; using System.Collections.Generic; -namespace OpenSim.Region.Framework.Interfaces +namespace OpenSim.Services.Interfaces { public struct FriendInfo { -- cgit v1.1 From 194837853854c91f22a27b3e2e557c3b5c6848a5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Feb 2010 17:08:36 +0000 Subject: Implement the methods needed for the login service to populate the friendslist on the friends service --- OpenSim/Services/Interfaces/IFriendsService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs index dc5a812..811203c 100644 --- a/OpenSim/Services/Interfaces/IFriendsService.cs +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -35,8 +35,8 @@ namespace OpenSim.Services.Interfaces { public UUID PrincipalID; public string Friend; - int MyFlags; - int TheirFlags; + public int MyFlags; + public int TheirFlags; } public interface IFriendsService -- cgit v1.1 From 3437605da6de1171c78ff1a6fc013fdb3597e2f8 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 22 Feb 2010 16:13:14 -0800 Subject: * Removed the broken and unused GridRegion.ExternalEndPoint setter --- OpenSim/Services/Interfaces/IGridService.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 2f5e991..ad49522 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -266,8 +266,6 @@ namespace OpenSim.Services.Interfaces return new IPEndPoint(ia, m_internalEndPoint.Port); } - - set { m_externalHostName = value.ToString(); } } public string ExternalHostName -- cgit v1.1 From d506449f6765ec7372615ffd4afefb0075d94af4 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 23 Feb 2010 00:59:24 -0800 Subject: * Removed the unused GridRegion.getInternalEndPointPort() (just use InternalEndPoint.Port). This class is complex enough as it is * Changed the failed to inform neighbor message from a warning to info, since this will fire for every empty neighbor space * Made the EnableSimulator/EstablishAgentCommunication log message more verbose and more clear about what is happening --- OpenSim/Services/Interfaces/IGridService.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index ad49522..e55b633 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -285,11 +285,6 @@ namespace OpenSim.Services.Interfaces get { return Util.UIntsToLong((uint)RegionLocX, (uint)RegionLocY); } } - public int getInternalEndPointPort() - { - return m_internalEndPoint.Port; - } - public Dictionary ToKeyValuePairs() { Dictionary kvp = new Dictionary(); -- cgit v1.1 From c745df007d1730e59fbdb4ebf8440654d1675ade Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 25 Feb 2010 17:42:51 -0800 Subject: Added server-side Friends in connector. Untested. --- OpenSim/Services/Interfaces/IFriendsService.cs | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs index 811203c..fc20224 100644 --- a/OpenSim/Services/Interfaces/IFriendsService.cs +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using OpenMetaverse; using OpenSim.Framework; using System.Collections.Generic; @@ -37,6 +38,33 @@ namespace OpenSim.Services.Interfaces public string Friend; public int MyFlags; public int TheirFlags; + + public FriendInfo(Dictionary kvp) + { + PrincipalID = UUID.Zero; + if (kvp.ContainsKey("PrincipalID") && kvp["PrincipalID"] != null) + UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID); + Friend = string.Empty; + if (kvp.ContainsKey("Friend") && kvp["Friend"] != null) + Friend = kvp["Friend"].ToString(); + MyFlags = 0; + if (kvp.ContainsKey("MyFlags") && kvp["MyFlags"] != null) + Int32.TryParse(kvp["MyFlags"].ToString(), out MyFlags); + TheirFlags = 0; + if (kvp.ContainsKey("TheirFlags") && kvp["TheirFlags"] != null) + Int32.TryParse(kvp["TheirFlags"].ToString(), out TheirFlags); + } + + public Dictionary ToKeyValuePairs() + { + Dictionary result = new Dictionary(); + result["PricipalID"] = PrincipalID.ToString(); + result["Friend"] = Friend; + result["MyFlags"] = MyFlags.ToString(); + result["TheirFlags"] = TheirFlags.ToString(); + + return result; + } } public interface IFriendsService -- cgit v1.1 From c6a5ff26fff6a1d0c3ab916a526cf0dd4e4142bc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 1 Mar 2010 21:32:55 -0800 Subject: Friends rights under control. --- OpenSim/Services/Interfaces/IFriendsService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs index fc20224..2692c48 100644 --- a/OpenSim/Services/Interfaces/IFriendsService.cs +++ b/OpenSim/Services/Interfaces/IFriendsService.cs @@ -32,13 +32,17 @@ using System.Collections.Generic; namespace OpenSim.Services.Interfaces { - public struct FriendInfo + public class FriendInfo { public UUID PrincipalID; public string Friend; public int MyFlags; public int TheirFlags; + public FriendInfo() + { + } + public FriendInfo(Dictionary kvp) { PrincipalID = UUID.Zero; -- cgit v1.1