From 320fbcb7b4179968994100d0819da2e0732451ef Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 19 Jun 2007 10:40:20 +0000 Subject: Made a base class from the Grid mode UserServer.UserManager and included that in the OpenSim solution. Included OpenGrid.Framework.Data in the OpenSim solution (and OpenGrid.Framework.Data.DB4O). Changed OpenSim.LocalCommunications.LocalUserServices so that it inherits from the UserManagement Base class. (still not finished implementing the CustomiseResponse() method) --- .../IUserServices.cs | 8 +- .../OpenGrid.Framework.Communications.csproj | 40 +- .../OpenGrid.Framework.Communications.dll.build | 1 + .../OpenGrid.Framework.Data.DB4o/DB4oGridData.cs | 161 +++++ Common/OpenGrid.Framework.Data.DB4o/DB4oManager.cs | 165 +++++ .../OpenGrid.Framework.Data.DB4o/DB4oUserData.cs | 205 ++++++ .../OpenGrid.Framework.Data.DB4o.csproj | 111 ++++ .../OpenGrid.Framework.Data.DB4o.csproj.mine | 111 ++++ .../OpenGrid.Framework.Data.DB4o.csproj.r858 | 111 ++++ .../OpenGrid.Framework.Data.DB4o.csproj.r921 | 111 ++++ .../OpenGrid.Framework.Data.DB4o.csproj.user | 12 + .../OpenGrid.Framework.Data.DB4o.dll.build | 47 ++ .../Properties/AssemblyInfo.cs | 35 + Common/OpenGrid.Framework.Data/GridData.cs | 110 ++++ Common/OpenGrid.Framework.Data/ILogData.cs | 94 +++ Common/OpenGrid.Framework.Data/IniConfig.cs | 100 +++ Common/OpenGrid.Framework.Data/InventoryData.cs | 187 ++++++ .../OpenGrid.Framework.Data.csproj | 113 ++++ .../OpenGrid.Framework.Data.csproj.mine | 113 ++++ .../OpenGrid.Framework.Data.csproj.r858 | 110 ++++ .../OpenGrid.Framework.Data.csproj.r921 | 113 ++++ .../OpenGrid.Framework.Data.csproj.user | 12 + .../OpenGrid.Framework.Data.dll.build | 49 ++ .../Properties/AssemblyInfo.cs | 35 + Common/OpenGrid.Framework.Data/SimProfileData.cs | 114 ++++ Common/OpenGrid.Framework.Data/UserData.cs | 131 ++++ Common/OpenGrid.Framework.Data/UserProfileData.cs | 182 ++++++ .../OpenGrid.Framework.UserManagement.csproj | 122 ++++ .../OpenGrid.Framework.UserManagement.csproj.user | 12 + .../OpenGrid.Framework.UserManagement.dll.build | 49 ++ .../OpenGrid.Framework.UserManager.csproj | 122 ++++ .../OpenGrid.Framework.UserManager.csproj.user | 12 + .../OpenGrid.Framework.UserManager.dll.build | 49 ++ .../UserManagerBase.cs | 721 +++++++++++++++++++++ .../Xml/OpenSim.GenericConfig.Xml.csproj | 2 +- OpenGridServices.build | 15 +- OpenGridServices.sln | 127 ++-- .../OpenGrid.Framework.Data.DB4o/DB4oGridData.cs | 161 ----- .../OpenGrid.Framework.Data.DB4o/DB4oManager.cs | 165 ----- .../OpenGrid.Framework.Data.DB4o/DB4oUserData.cs | 205 ------ .../OpenGrid.Framework.Data.DB4o.csproj | 111 ---- .../OpenGrid.Framework.Data.DB4o.csproj.mine | 111 ---- .../OpenGrid.Framework.Data.DB4o.csproj.r858 | 111 ---- .../OpenGrid.Framework.Data.DB4o.csproj.r921 | 111 ---- .../OpenGrid.Framework.Data.DB4o.dll.build | 47 -- .../Properties/AssemblyInfo.cs | 35 - .../OpenGrid.Framework.Data.MSSQL.csproj | 2 +- .../OpenGrid.Framework.Data.MySQL.csproj | 2 +- .../OpenGrid.Framework.Data.SQLite.csproj | 2 +- .../OpenGrid.Framework.Data/GridData.cs | 110 ---- .../OpenGrid.Framework.Data/ILogData.cs | 94 --- .../OpenGrid.Framework.Data/IniConfig.cs | 100 --- .../OpenGrid.Framework.Data/InventoryData.cs | 187 ------ .../OpenGrid.Framework.Data.csproj | 113 ---- .../OpenGrid.Framework.Data.csproj.mine | 113 ---- .../OpenGrid.Framework.Data.csproj.r858 | 110 ---- .../OpenGrid.Framework.Data.csproj.r921 | 113 ---- .../OpenGrid.Framework.Data.dll.build | 49 -- .../Properties/AssemblyInfo.cs | 35 - .../OpenGrid.Framework.Data/SimProfileData.cs | 114 ---- .../OpenGrid.Framework.Data/UserData.cs | 131 ---- .../OpenGrid.Framework.Data/UserProfileData.cs | 182 ------ .../OpenGridServices.GridServer.csproj | 2 +- .../OpenGridServices.UserServer.csproj | 6 +- .../OpenGridServices.UserServer.exe.build | 1 + .../OpenGridServices.UserServer/UserManager.cs | 668 +------------------ .../OpenUser.Config.UserConfigDb4o.csproj | 2 +- OpenSim.build | 19 +- OpenSim.sln | 285 +++++--- .../CommunicationsLocal.cs | 10 +- .../LocalUserManagement/LocalUserServices.cs | 36 - .../LocalUserManagement/UserProfileManager.cs | 42 -- .../LocalUserServices.cs | 43 ++ .../OpenSim.LocalCommunications.csproj | 54 +- .../OpenSim.LocalCommunications.csproj.user | 2 +- .../OpenSim.LocalCommunications.dll.build | 3 + .../OpenSim.Physics.BasicPhysicsPlugin.csproj | 2 +- .../OdePlugin/OpenSim.Physics.OdePlugin.csproj | 2 +- .../PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj | 2 +- OpenSim/OpenSim.Region/OpenSim.Region.csproj | 2 +- .../OpenSim.RegionServer.csproj | 2 +- .../OpenSim.Terrain.BasicTerrain.csproj | 2 +- OpenSim/OpenSim/OpenSim.csproj | 2 +- OpenSim/OpenSim/OpenSimMain.cs | 2 +- Prebuild/Prebuild.build | 7 + Prebuild/Prebuild.sln | 3 + Prebuild/src/Prebuild.csproj | 18 + prebuild.xml | 503 ++++++++------ 88 files changed, 4349 insertions(+), 3697 deletions(-) create mode 100644 Common/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs create mode 100644 Common/OpenGrid.Framework.Data.DB4o/DB4oManager.cs create mode 100644 Common/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user create mode 100644 Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build create mode 100644 Common/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs create mode 100644 Common/OpenGrid.Framework.Data/GridData.cs create mode 100644 Common/OpenGrid.Framework.Data/ILogData.cs create mode 100644 Common/OpenGrid.Framework.Data/IniConfig.cs create mode 100644 Common/OpenGrid.Framework.Data/InventoryData.cs create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user create mode 100644 Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build create mode 100644 Common/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs create mode 100644 Common/OpenGrid.Framework.Data/SimProfileData.cs create mode 100644 Common/OpenGrid.Framework.Data/UserData.cs create mode 100644 Common/OpenGrid.Framework.Data/UserProfileData.cs create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj.user create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.dll.build create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj.user create mode 100644 Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.dll.build create mode 100644 Common/OpenGrid.Framework.UserManager/UserManagerBase.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/GridData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/ILogData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/UserData.cs delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs delete mode 100644 OpenSim/OpenSim.LocalCommunications/LocalUserManagement/LocalUserServices.cs delete mode 100644 OpenSim/OpenSim.LocalCommunications/LocalUserManagement/UserProfileManager.cs create mode 100644 OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs diff --git a/Common/OpenGrid.Framework.Communications/IUserServices.cs b/Common/OpenGrid.Framework.Communications/IUserServices.cs index 798200a..4cb66e7 100644 --- a/Common/OpenGrid.Framework.Communications/IUserServices.cs +++ b/Common/OpenGrid.Framework.Communications/IUserServices.cs @@ -30,15 +30,15 @@ using System.Collections.Generic; using System.Text; using libsecondlife; -using OpenSim.Framework.User; +using OpenGrid.Framework.Data; namespace OpenGrid.Framework.Communications { public interface IUserServices { - UserProfile GetUserProfile(string first_name, string last_name); - UserProfile GetUserProfile(string name); - UserProfile GetUserProfile(LLUUID avatar_id); + UserProfileData GetUserProfile(string first_name, string last_name); + UserProfileData GetUserProfile(string name); + UserProfileData GetUserProfile(LLUUID avatar_id); } } diff --git a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj index 537151d..9a9568c 100644 --- a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj +++ b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.csproj @@ -1,4 +1,4 @@ - + Local 8.0.50727 @@ -6,8 +6,7 @@ {683344D5-0000-0000-0000-000000000000} Debug AnyCPU - - + OpenGrid.Framework.Communications @@ -16,11 +15,9 @@ IE50 false Library - - + OpenGrid.Framework.Communications - - + @@ -31,8 +28,7 @@ TRACE;DEBUG - - + True 4096 False @@ -41,8 +37,7 @@ False False 4 - - + False @@ -51,8 +46,7 @@ TRACE - - + False 4096 True @@ -61,30 +55,34 @@ False False 4 - - + - + ..\..\bin\libsecondlife.dll False - + System.dll False - - + System.Xml.dll False + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + OpenSim.Framework {8ACA2445-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False @@ -111,4 +109,4 @@ - \ No newline at end of file + diff --git a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build index fbb627c..392220b 100644 --- a/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build +++ b/Common/OpenGrid.Framework.Communications/OpenGrid.Framework.Communications.dll.build @@ -23,6 +23,7 @@ + diff --git a/Common/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs b/Common/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs new file mode 100644 index 0000000..2b23131 --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs @@ -0,0 +1,161 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using OpenGrid.Framework.Data; +using libsecondlife; + + +namespace OpenGrid.Framework.Data.DB4o +{ + /// + /// A grid server storage mechanism employing the DB4o database system + /// + class DB4oGridData : IGridData + { + /// + /// The database manager object + /// + DB4oGridManager manager; + + /// + /// Called when the plugin is first loaded (as constructors are not called) + /// + public void Initialise() { + manager = new DB4oGridManager("gridserver.yap"); + } + + /// + /// Returns a list of regions within the specified ranges + /// + /// minimum X coordinate + /// minimum Y coordinate + /// maximum X coordinate + /// maximum Y coordinate + /// An array of region profiles + public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) + { + return null; + } + + /// + /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned) + /// + /// The handle to search for + /// A region profile + public SimProfileData GetProfileByHandle(ulong handle) { + lock (manager.simProfiles) + { + foreach (LLUUID UUID in manager.simProfiles.Keys) + { + if (manager.simProfiles[UUID].regionHandle == handle) + { + return manager.simProfiles[UUID]; + } + } + } + throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")"); + } + + /// + /// Returns a specific region + /// + /// The region ID code + /// A region profile + public SimProfileData GetProfileByLLUUID(LLUUID uuid) + { + lock (manager.simProfiles) + { + if (manager.simProfiles.ContainsKey(uuid)) + return manager.simProfiles[uuid]; + } + throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + ")"); + } + + /// + /// Adds a new specified region to the database + /// + /// The profile to add + /// A dataresponse enum indicating success + public DataResponse AddProfile(SimProfileData profile) + { + lock (manager.simProfiles) + { + if (manager.AddRow(profile)) + { + return DataResponse.RESPONSE_OK; + } + else + { + return DataResponse.RESPONSE_ERROR; + } + } + } + + /// + /// Authenticates a new region using the shared secrets. NOT SECURE. + /// + /// The UUID the region is authenticating with + /// The location the region is logging into (unused in Db4o) + /// The shared secret + /// Authenticated? + public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) { + if (manager.simProfiles[uuid].regionRecvKey == key) + return true; + return false; + } + + /// + /// Shuts down the database + /// + public void Close() + { + manager = null; + } + + /// + /// Returns the providers name + /// + /// The name of the storage system + public string getName() + { + return "DB4o Grid Provider"; + } + + /// + /// Returns the providers version + /// + /// The version of the storage system + public string getVersion() + { + return "0.1"; + } + } +} diff --git a/Common/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/Common/OpenGrid.Framework.Data.DB4o/DB4oManager.cs new file mode 100644 index 0000000..356a49c --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/DB4oManager.cs @@ -0,0 +1,165 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using Db4objects.Db4o; +using OpenGrid.Framework.Data; +using libsecondlife; + +namespace OpenGrid.Framework.Data.DB4o +{ + /// + /// A Database manager for Db4o + /// + class DB4oGridManager + { + /// + /// A list of the current regions connected (in-memory cache) + /// + public Dictionary simProfiles = new Dictionary(); + /// + /// Database File Name + /// + string dbfl; + + /// + /// Creates a new grid storage manager + /// + /// Filename to the database file + public DB4oGridManager(string db4odb) + { + dbfl = db4odb; + IObjectContainer database; + database = Db4oFactory.OpenFile(dbfl); + IObjectSet result = database.Get(typeof(SimProfileData)); + // Loads the file into the in-memory cache + foreach(SimProfileData row in result) { + simProfiles.Add(row.UUID, row); + } + database.Close(); + } + + /// + /// Adds a new profile to the database (Warning: Probably slow.) + /// + /// The profile to add + /// Successful? + public bool AddRow(SimProfileData row) + { + if (simProfiles.ContainsKey(row.UUID)) + { + simProfiles[row.UUID] = row; + } + else + { + simProfiles.Add(row.UUID, row); + } + + try + { + IObjectContainer database; + database = Db4oFactory.OpenFile(dbfl); + database.Set(row); + database.Close(); + return true; + } + catch (Exception e) + { + return false; + } + } + + + } + + /// + /// A manager for the DB4o database (user profiles) + /// + class DB4oUserManager + { + /// + /// A list of the user profiles (in memory cache) + /// + public Dictionary userProfiles = new Dictionary(); + /// + /// Database filename + /// + string dbfl; + + /// + /// Initialises a new DB manager + /// + /// The filename to the database + public DB4oUserManager(string db4odb) + { + dbfl = db4odb; + IObjectContainer database; + database = Db4oFactory.OpenFile(dbfl); + // Load to cache + IObjectSet result = database.Get(typeof(UserProfileData)); + foreach (UserProfileData row in result) + { + userProfiles.Add(row.UUID, row); + } + database.Close(); + } + + /// + /// Adds a new profile to the database (Warning: Probably slow.) + /// + /// The profile to add + /// Successful? + public bool AddRow(UserProfileData row) + { + if (userProfiles.ContainsKey(row.UUID)) + { + userProfiles[row.UUID] = row; + } + else + { + userProfiles.Add(row.UUID, row); + } + + try + { + IObjectContainer database; + database = Db4oFactory.OpenFile(dbfl); + database.Set(row); + database.Close(); + return true; + } + catch (Exception e) + { + return false; + } + } + + + } +} diff --git a/Common/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/Common/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs new file mode 100644 index 0000000..315f48d --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs @@ -0,0 +1,205 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using OpenGrid.Framework.Data; +using libsecondlife; + +namespace OpenGrid.Framework.Data.DB4o +{ + /// + /// A User storage interface for the DB4o database system + /// + public class DB4oUserData : IUserData + { + /// + /// The database manager + /// + DB4oUserManager manager; + + /// + /// Artificial constructor called upon plugin load + /// + public void Initialise() + { + manager = new DB4oUserManager("userprofiles.yap"); + } + + /// + /// Loads a specified user profile from a UUID + /// + /// The users UUID + /// A user profile + public UserProfileData getUserByUUID(LLUUID uuid) + { + if(manager.userProfiles.ContainsKey(uuid)) + return manager.userProfiles[uuid]; + return null; + } + + /// + /// Returns a user by searching for its name + /// + /// The users account name + /// A matching users profile + public UserProfileData getUserByName(string name) + { + return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); + } + + /// + /// Returns a user by searching for its name + /// + /// The first part of the users account name + /// The second part of the users account name + /// A matching users profile + public UserProfileData getUserByName(string fname, string lname) + { + foreach (UserProfileData profile in manager.userProfiles.Values) + { + if (profile.username == fname && profile.surname == lname) + return profile; + } + return null; + } + + /// + /// Returns a user by UUID direct + /// + /// The users account ID + /// A matching users profile + public UserAgentData getAgentByUUID(LLUUID uuid) + { + try + { + return getUserByUUID(uuid).currentAgent; + } + catch (Exception e) + { + return null; + } + } + + /// + /// Returns a session by account name + /// + /// The account name + /// The users session agent + public UserAgentData getAgentByName(string name) + { + return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); + } + + /// + /// Returns a session by account name + /// + /// The first part of the users account name + /// The second part of the users account name + /// A user agent + public UserAgentData getAgentByName(string fname, string lname) + { + try + { + return getUserByName(fname,lname).currentAgent; + } + catch (Exception e) + { + return null; + } + } + + /// + /// Creates a new user profile + /// + /// The profile to add to the database + public void addNewUserProfile(UserProfileData user) + { + try + { + manager.AddRow(user); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + } + } + + /// + /// Creates a new user agent + /// + /// The agent to add to the database + public void addNewUserAgent(UserAgentData agent) + { + // Do nothing. yet. + } + + /// + /// Transfers money between two user accounts + /// + /// Starting account + /// End account + /// The amount to move + /// Success? + public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) + { + return true; + } + + /// + /// Transfers inventory between two accounts + /// + /// Move to inventory server + /// Senders account + /// Recievers account + /// Inventory item + /// Success? + public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) + { + return true; + } + + /// + /// Returns the name of the storage provider + /// + /// Storage provider name + public string getName() + { + return "DB4o Userdata"; + } + + /// + /// Returns the version of the storage provider + /// + /// Storage provider version + public string getVersion() + { + return "0.1"; + } + } +} diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj new file mode 100644 index 0000000..d2d6140 --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj @@ -0,0 +1,111 @@ + + + Local + 8.0.50727 + 2.0 + {39BD9497-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data.DB4o + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data.DB4o + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + ..\..\bin\Db4objects.Db4o.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + System.dll + False + + + System.Data.dll + False + + + System.Xml.dll + False + + + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine new file mode 100644 index 0000000..82d4f5f --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine @@ -0,0 +1,111 @@ + + + Local + 8.0.50727 + 2.0 + {39BD9497-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data.DB4o + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data.DB4o + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + ..\..\bin\Db4objects.Db4o.dll + False + + + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 new file mode 100644 index 0000000..d6dd03d --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 @@ -0,0 +1,111 @@ + + + Local + 8.0.50727 + 2.0 + {BC0F052F-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data.DB4o + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data.DB4o + + + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ../../bin/ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ../../bin/ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + ..\..\bin\Db4objects.Db4o.dll + False + + + + + OpenGrid.Framework.Data + {12DD8EB8-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 new file mode 100644 index 0000000..3b783ca --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 @@ -0,0 +1,111 @@ + + + Local + 8.0.50727 + 2.0 + {39BD9497-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data.DB4o + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data.DB4o + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + ..\..\bin\Db4objects.Db4o.dll + False + + + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user new file mode 100644 index 0000000..5941547 --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\Sugilite\bin\ + 8.0.50727 + ProjectFiles + 0 + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build new file mode 100644 index 0000000..d82d751 --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs b/Common/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..dc4a9a1 --- /dev/null +++ b/Common/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenGrid.Framework.Data.DB4o")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenGrid.Framework.Data.DB4o")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("57991e15-79da-41b7-aa06-2e6b49165a63")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Common/OpenGrid.Framework.Data/GridData.cs b/Common/OpenGrid.Framework.Data/GridData.cs new file mode 100644 index 0000000..e9fb215 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/GridData.cs @@ -0,0 +1,110 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; + +namespace OpenGrid.Framework.Data +{ + public enum DataResponse + { + RESPONSE_OK, + RESPONSE_AUTHREQUIRED, + RESPONSE_INVALIDCREDENTIALS, + RESPONSE_ERROR + } + + /// + /// A standard grid interface + /// + public interface IGridData + { + /// + /// Returns a sim profile from a regionHandle + /// + /// A 64bit Region Handle + /// A simprofile + SimProfileData GetProfileByHandle(ulong regionHandle); + + /// + /// Returns a sim profile from a UUID + /// + /// A 128bit UUID + /// A sim profile + SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID); + + /// + /// Returns all profiles within the specified range + /// + /// Minimum sim coordinate (X) + /// Minimum sim coordinate (Y) + /// Maximum sim coordinate (X) + /// Maximum sim coordinate (Y) + /// An array containing all the sim profiles in the specified range + SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); + + /// + /// Authenticates a sim by use of it's recv key. + /// WARNING: Insecure + /// + /// The UUID sent by the sim + /// The regionhandle sent by the sim + /// The recieving key sent by the sim + /// Whether the sim has been authenticated + bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); + + /// + /// Initialises the interface + /// + void Initialise(); + + /// + /// Closes the interface + /// + void Close(); + + /// + /// The plugin being loaded + /// + /// A string containing the plugin name + string getName(); + + /// + /// The plugins version + /// + /// A string containing the plugin version + string getVersion(); + + /// + /// Adds a new profile to the database + /// + /// The profile to add + /// RESPONSE_OK if successful, error if not. + DataResponse AddProfile(SimProfileData profile); + } +} diff --git a/Common/OpenGrid.Framework.Data/ILogData.cs b/Common/OpenGrid.Framework.Data/ILogData.cs new file mode 100644 index 0000000..2ac0bfe --- /dev/null +++ b/Common/OpenGrid.Framework.Data/ILogData.cs @@ -0,0 +1,94 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; + +namespace OpenGrid.Framework.Data +{ + /// + /// The severity of an individual log message + /// + public enum LogSeverity : int + { + /// + /// Critical: systems failure + /// + CRITICAL = 1, + /// + /// Major: warning prior to systems failure + /// + MAJOR = 2, + /// + /// Medium: an individual non-critical task failed + /// + MEDIUM = 3, + /// + /// Low: Informational warning + /// + LOW = 4, + /// + /// Info: Information + /// + INFO = 5, + /// + /// Verbose: Debug Information + /// + VERBOSE = 6 + } + + /// + /// An interface to a LogData storage system + /// + public interface ILogData + { + void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage); + /// + /// Initialises the interface + /// + void Initialise(); + + /// + /// Closes the interface + /// + void Close(); + + /// + /// The plugin being loaded + /// + /// A string containing the plugin name + string getName(); + + /// + /// The plugins version + /// + /// A string containing the plugin version + string getVersion(); + } + +} diff --git a/Common/OpenGrid.Framework.Data/IniConfig.cs b/Common/OpenGrid.Framework.Data/IniConfig.cs new file mode 100644 index 0000000..d17afac --- /dev/null +++ b/Common/OpenGrid.Framework.Data/IniConfig.cs @@ -0,0 +1,100 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using System.IO; +using System.Text.RegularExpressions; + +/* + Taken from public code listing at by Alex Pinsker + http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html + */ + +namespace OpenGrid.Framework.Data +{ + /// + /// Parse settings from ini-like files + /// + public class IniFile + { + static IniFile() + { + _iniKeyValuePatternRegex = new Regex( + @"((\s)*(?([^\=^\s^\n]+))[\s^\n]* + # key part (surrounding whitespace stripped) + \= + (\s)*(?([^\n^\s]+(\n){0,1}))) + # value part (surrounding whitespace stripped) + ", + RegexOptions.IgnorePatternWhitespace | + RegexOptions.Compiled | + RegexOptions.CultureInvariant); + } + static private Regex _iniKeyValuePatternRegex; + + public IniFile(string iniFileName) + { + _iniFileName = iniFileName; + } + + public string ParseFileReadValue(string key) + { + using (StreamReader reader = + new StreamReader(_iniFileName)) + { + do + { + string line = reader.ReadLine(); + Match match = + _iniKeyValuePatternRegex.Match(line); + if (match.Success) + { + string currentKey = + match.Groups["Key"].Value as string; + if (currentKey != null && + currentKey.Trim().CompareTo(key) == 0) + { + string value = + match.Groups["Value"].Value as string; + return value; + } + } + + } + while (reader.Peek() != -1); + } + return null; + } + + public string IniFileName + { + get { return _iniFileName; } + } private string _iniFileName; + } +} diff --git a/Common/OpenGrid.Framework.Data/InventoryData.cs b/Common/OpenGrid.Framework.Data/InventoryData.cs new file mode 100644 index 0000000..12f559b --- /dev/null +++ b/Common/OpenGrid.Framework.Data/InventoryData.cs @@ -0,0 +1,187 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using libsecondlife; + +namespace OpenGrid.Framework.Data +{ + /// + /// Inventory Item - contains all the properties associated with an individual inventory piece. + /// + public class InventoryItemBase + { + /// + /// A UUID containing the ID for the inventory item itself + /// + public LLUUID inventoryID; + /// + /// The UUID of the associated asset on the asset server + /// + public LLUUID assetID; + /// + /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) + /// + public int type; + /// + /// The folder this item is contained in (NULL_KEY = Inventory Root) + /// + public LLUUID parentFolderID; + /// + /// The owner of this inventory item + /// + public LLUUID avatarID; + /// + /// The name of the inventory item (must be less than 64 characters) + /// + public string inventoryName; + /// + /// The description of the inventory item (must be less than 64 characters) + /// + public string inventoryDescription; + /// + /// A mask containing the permissions for the next owner (cannot be enforced) + /// + public uint inventoryNextPermissions; + /// + /// A mask containing permissions for the current owner (cannot be enforced) + /// + public uint inventoryCurrentPermissions; + } + + /// + /// A Class for folders which contain users inventory + /// + public class InventoryFolderBase + { + /// + /// The name of the folder (64 characters or less) + /// + public string name; + /// + /// The agent who's inventory this is contained by + /// + public LLUUID agentID; + /// + /// The folder this folder is contained in (NULL_KEY for root) + /// + public LLUUID parentID; + /// + /// The UUID for this folder + /// + public LLUUID folderID; + } + + /// + /// An interface for accessing inventory data from a storage server + /// + public interface IInventoryData + { + /// + /// Initialises the interface + /// + void Initialise(); + + /// + /// Closes the interface + /// + void Close(); + + /// + /// The plugin being loaded + /// + /// A string containing the plugin name + string getName(); + + /// + /// The plugins version + /// + /// A string containing the plugin version + string getVersion(); + + /// + /// Returns a list of inventory items contained within the specified folder + /// + /// The UUID of the target folder + /// A List of InventoryItemBase items + List getInventoryInFolder(LLUUID folderID); + + /// + /// Returns a list of folders in the users inventory root. + /// + /// The UUID of the user who is having inventory being returned + /// A list of folders + List getUserRootFolders(LLUUID user); + + /// + /// Returns a list of inventory folders contained in the folder 'parentID' + /// + /// The folder to get subfolders for + /// A list of inventory folders + List getInventoryFolders(LLUUID parentID); + + /// + /// Returns an inventory item by its UUID + /// + /// The UUID of the item to be returned + /// A class containing item information + InventoryItemBase getInventoryItem(LLUUID item); + + /// + /// Returns a specified inventory folder by its UUID + /// + /// The UUID of the folder to be returned + /// A class containing folder information + InventoryFolderBase getInventoryFolder(LLUUID folder); + + /// + /// Creates a new inventory item based on item + /// + /// The item to be created + void addInventoryItem(InventoryItemBase item); + + /// + /// Updates an inventory item with item (updates based on ID) + /// + /// The updated item + void updateInventoryItem(InventoryItemBase item); + + /// + /// Adds a new folder specified by folder + /// + /// The inventory folder + void addInventoryFolder(InventoryFolderBase folder); + + /// + /// Updates a folder based on its ID with folder + /// + /// The inventory folder + void updateInventoryFolder(InventoryFolderBase folder); + } +} diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj new file mode 100644 index 0000000..0b53b02 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj @@ -0,0 +1,113 @@ + + + Local + 8.0.50727 + 2.0 + {62CDF671-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + ..\..\bin\libsecondlife.dll + False + + + System.dll + False + + + System.Data.dll + False + + + System.Xml.dll + False + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine new file mode 100644 index 0000000..a572204 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine @@ -0,0 +1,113 @@ + + + Local + 8.0.50727 + 2.0 + {62CDF671-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 new file mode 100644 index 0000000..3b6d24d --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 @@ -0,0 +1,110 @@ + + + Local + 8.0.50727 + 2.0 + {12DD8EB8-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data + + + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ../../bin/ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ../../bin/ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 new file mode 100644 index 0000000..990cd16 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 @@ -0,0 +1,113 @@ + + + Local + 8.0.50727 + 2.0 + {62CDF671-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.Data + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.Data + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + System.dll + False + + + System.Xml.dll + False + + + System.Data.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user new file mode 100644 index 0000000..5941547 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\Sugilite\bin\ + 8.0.50727 + ProjectFiles + 0 + + + + diff --git a/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build new file mode 100644 index 0000000..7abebeb --- /dev/null +++ b/Common/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs b/Common/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1446673 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenGrid.Framework.Data")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenGrid.Framework.Data")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Common/OpenGrid.Framework.Data/SimProfileData.cs b/Common/OpenGrid.Framework.Data/SimProfileData.cs new file mode 100644 index 0000000..a3e7cb7 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/SimProfileData.cs @@ -0,0 +1,114 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; + +namespace OpenGrid.Framework.Data +{ + /// + /// A class which contains information known to the grid server about a region + /// + public class SimProfileData + { + /// + /// The name of the region + /// + public string regionName = ""; + + /// + /// A 64-bit number combining map position into a (mostly) unique ID + /// + public ulong regionHandle; + + /// + /// OGS/OpenSim Specific ID for a region + /// + public libsecondlife.LLUUID UUID; + + /// + /// Coordinates of the region + /// + public uint regionLocX; + public uint regionLocY; + public uint regionLocZ; // Reserved (round-robin, layers, etc) + + /// + /// Authentication secrets + /// + /// Not very secure, needs improvement. + public string regionSendKey = ""; + public string regionRecvKey = ""; + public string regionSecret = ""; + + /// + /// Whether the region is online + /// + public bool regionOnline; + + /// + /// Information about the server that the region is currently hosted on + /// + public string serverIP = ""; + public uint serverPort; + public string serverURI = ""; + + /// + /// Set of optional overrides. Can be used to create non-eulicidean spaces. + /// + public ulong regionNorthOverrideHandle; + public ulong regionSouthOverrideHandle; + public ulong regionEastOverrideHandle; + public ulong regionWestOverrideHandle; + + /// + /// Optional: URI Location of the region database + /// + /// Used for floating sim pools where the region data is not nessecarily coupled to a specific server + public string regionDataURI = ""; + + /// + /// Region Asset Details + /// + public string regionAssetURI = ""; + public string regionAssetSendKey = ""; + public string regionAssetRecvKey = ""; + + /// + /// Region Userserver Details + /// + public string regionUserURI = ""; + public string regionUserSendKey = ""; + public string regionUserRecvKey = ""; + + /// + /// Region Map Texture Asset + /// + public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006"); + } +} diff --git a/Common/OpenGrid.Framework.Data/UserData.cs b/Common/OpenGrid.Framework.Data/UserData.cs new file mode 100644 index 0000000..c2d5a72 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/UserData.cs @@ -0,0 +1,131 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using libsecondlife; + +namespace OpenGrid.Framework.Data +{ + /// + /// An interface for connecting to user storage servers. + /// + public interface IUserData + { + /// + /// Returns a user profile from a database via their UUID + /// + /// The accounts UUID + /// The user data profile + UserProfileData getUserByUUID(LLUUID user); + + /// + /// Returns a users profile by searching their username + /// + /// The users username + /// The user data profile + UserProfileData getUserByName(string name); + + /// + /// Returns a users profile by searching their username parts + /// + /// Account firstname + /// Account lastname + /// The user data profile + UserProfileData getUserByName(string fname, string lname); + + /// + /// Returns the current agent for a user searching by it's UUID + /// + /// The users UUID + /// The current agent session + UserAgentData getAgentByUUID(LLUUID user); + + /// + /// Returns the current session agent for a user searching by username + /// + /// The users account name + /// The current agent session + UserAgentData getAgentByName(string name); + + /// + /// Returns the current session agent for a user searching by username parts + /// + /// The users first account name + /// The users account surname + /// The current agent session + UserAgentData getAgentByName(string fname, string lname); + + /// + /// Adds a new User profile to the database + /// + /// UserProfile to add + void addNewUserProfile(UserProfileData user); + + /// + /// Adds a new agent to the database + /// + /// The agent to add + void addNewUserAgent(UserAgentData agent); + + /// + /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) + /// + /// The account to transfer from + /// The account to transfer to + /// The amount to transfer + /// Successful? + bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount); + + /// + /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. + /// + /// User to transfer from + /// User to transfer to + /// Specified inventory item + /// Successful? + bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); + + /// + /// Returns the plugin version + /// + /// Plugin version in MAJOR.MINOR.REVISION.BUILD format + string getVersion(); + + /// + /// Returns the plugin name + /// + /// Plugin name, eg MySQL User Provider + string getName(); + + /// + /// Initialises the plugin (artificial constructor) + /// + void Initialise(); + } +} diff --git a/Common/OpenGrid.Framework.Data/UserProfileData.cs b/Common/OpenGrid.Framework.Data/UserProfileData.cs new file mode 100644 index 0000000..82633e1 --- /dev/null +++ b/Common/OpenGrid.Framework.Data/UserProfileData.cs @@ -0,0 +1,182 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; +using libsecondlife; + +namespace OpenGrid.Framework.Data +{ + /// + /// Information about a particular user known to the userserver + /// + public class UserProfileData + { + /// + /// The ID value for this user + /// + public LLUUID UUID; + + /// + /// The first component of a users account name + /// + public string username; + /// + /// The second component of a users account name + /// + public string surname; + + /// + /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) + /// + /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver + public string passwordHash; + /// + /// The salt used for the users hash, should be 32 bytes or longer + /// + public string passwordSalt; + + /// + /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into + /// + public ulong homeRegion; + /// + /// The coordinates inside the region of the home location + /// + public LLVector3 homeLocation; + /// + /// Where the user will be looking when they rez. + /// + public LLVector3 homeLookAt; + + /// + /// A UNIX Timestamp (seconds since epoch) for the users creation + /// + public int created; + /// + /// A UNIX Timestamp for the users last login date / time + /// + public int lastLogin; + + /// + /// A URI to the users inventory server, used for foreigners and large grids + /// + public string userInventoryURI; + /// + /// A URI to the users asset server, used for foreigners and large grids. + /// + public string userAssetURI; + + /// + /// A uint mask containing the "I can do" fields of the users profile + /// + public uint profileCanDoMask; + /// + /// A uint mask containing the "I want to do" part of the users profile + /// + public uint profileWantDoMask; // Profile window "I want to" mask + + /// + /// The about text listed in a users profile. + /// + public string profileAboutText; + /// + /// The first life about text listed in a users profile + /// + public string profileFirstText; + + /// + /// The profile image for an avatar stored on the asset server + /// + public LLUUID profileImage; + /// + /// The profile image for the users first life tab + /// + public LLUUID profileFirstImage; + /// + /// The users last registered agent (filled in on the user server) + /// + public UserAgentData currentAgent; + } + + /// + /// Information about a users session + /// + public class UserAgentData + { + /// + /// The UUID of the users avatar (not the agent!) + /// + public LLUUID UUID; + /// + /// The IP address of the user + /// + public string agentIP; + /// + /// The port of the user + /// + public uint agentPort; + /// + /// Is the user online? + /// + public bool agentOnline; + /// + /// The session ID for the user (also the agent ID) + /// + public LLUUID sessionID; + /// + /// The "secure" session ID for the user + /// + /// Not very secure. Dont rely on it for anything more than Linden Lab does. + public LLUUID secureSessionID; + /// + /// The region the user logged into initially + /// + public LLUUID regionID; + /// + /// A unix timestamp from when the user logged in + /// + public int loginTime; + /// + /// When this agent expired and logged out, 0 if still online + /// + public int logoutTime; + /// + /// Current region the user is logged into + /// + public LLUUID currentRegion; + /// + /// Region handle of the current region the user is in + /// + public ulong currentHandle; + /// + /// The position of the user within the region + /// + public LLVector3 currentPos; + } +} diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj new file mode 100644 index 0000000..232712b --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj @@ -0,0 +1,122 @@ + + + Local + 8.0.50727 + 2.0 + {DA9A7391-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.UserManagement + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.UserManagement + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + ..\..\bin\Db4objects.Db4o.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + OpenSim.Framework.dll + False + + + OpenSim.Framework.Console.dll + False + + + OpenSim.GenericConfig.Xml.dll + False + + + OpenSim.Servers.dll + False + + + System.dll + False + + + System.Data.dll + False + + + System.Xml.dll + False + + + XMLRPC.dll + False + + + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj.user b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj.user new file mode 100644 index 0000000..5941547 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\Sugilite\bin\ + 8.0.50727 + ProjectFiles + 0 + + + + diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.dll.build b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.dll.build new file mode 100644 index 0000000..a2f5d13 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManagement.dll.build @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj new file mode 100644 index 0000000..43f56a4 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj @@ -0,0 +1,122 @@ + + + Local + 8.0.50727 + 2.0 + {D1D78B8D-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenGrid.Framework.UserManager + JScript + Grid + IE50 + false + Library + + OpenGrid.Framework.UserManager + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\bin\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + + + + + ..\..\bin\Db4objects.Db4o.dll + False + + + ..\..\bin\libsecondlife.dll + False + + + OpenSim.Framework.dll + False + + + OpenSim.Framework.Console.dll + False + + + OpenSim.GenericConfig.Xml.dll + False + + + OpenSim.Servers.dll + False + + + System.dll + False + + + System.Data.dll + False + + + System.Xml.dll + False + + + XMLRPC.dll + False + + + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj.user b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj.user new file mode 100644 index 0000000..5941547 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\Sugilite\bin\ + 8.0.50727 + ProjectFiles + 0 + + + + diff --git a/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.dll.build b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.dll.build new file mode 100644 index 0000000..81a87f5 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/OpenGrid.Framework.UserManager.dll.build @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Common/OpenGrid.Framework.UserManager/UserManagerBase.cs b/Common/OpenGrid.Framework.UserManager/UserManagerBase.cs new file mode 100644 index 0000000..d6d50c1 --- /dev/null +++ b/Common/OpenGrid.Framework.UserManager/UserManagerBase.cs @@ -0,0 +1,721 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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; +using System.Text; +using OpenGrid.Framework.Data; +using libsecondlife; +using System.Reflection; + +using System.Xml; +using Nwc.XmlRpc; +using OpenSim.Framework.Sims; +using OpenSim.Framework.Inventory; +using OpenSim.Framework.Utilities; + +using System.Security.Cryptography; + +namespace OpenGrid.Framework.UserManagement +{ + public class UserManagerBase + { + public OpenSim.Framework.Interfaces.UserConfig _config; + Dictionary _plugins = new Dictionary(); + + /// + /// Adds a new user server plugin - user servers will be requested in the order they were loaded. + /// + /// The filename to the user server plugin DLL + public void AddPlugin(string FileName) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Attempting to load " + FileName); + Assembly pluginAssembly = Assembly.LoadFrom(FileName); + + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); + foreach (Type pluginType in pluginAssembly.GetTypes()) + { + if (!pluginType.IsAbstract) + { + Type typeInterface = pluginType.GetInterface("IUserData", true); + + if (typeInterface != null) + { + IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); + plug.Initialise(); + this._plugins.Add(plug.getName(), plug); + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Added IUserData Interface"); + } + + typeInterface = null; + } + } + + pluginAssembly = null; + } + + /// + /// + /// + /// + public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) + { + UserProfileData user = new UserProfileData(); + user.homeLocation = new LLVector3(128, 128, 100); + user.UUID = LLUUID.Random(); + user.username = firstName; + user.surname = lastName; + user.passwordHash = pass; + user.passwordSalt = ""; + user.created = Util.UnixTimeSinceEpoch(); + user.homeLookAt = new LLVector3(100, 100, 100); + user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256)); + + foreach (KeyValuePair plugin in _plugins) + { + try + { + plugin.Value.addNewUserProfile(user); + + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + } + + /// + /// Loads a user profile from a database by UUID + /// + /// The target UUID + /// A user profile + public UserProfileData getUserProfile(LLUUID uuid) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + UserProfileData profile = plugin.Value.getUserByUUID(uuid); + profile.currentAgent = getUserAgent(profile.UUID); + return profile; + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + + /// + /// Loads a user profile by name + /// + /// The target name + /// A user profile + public UserProfileData getUserProfile(string name) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + UserProfileData profile = plugin.Value.getUserByName(name); + profile.currentAgent = getUserAgent(profile.UUID); + return profile; + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Loads a user profile by name + /// + /// First name + /// Last name + /// A user profile + public UserProfileData getUserProfile(string fname, string lname) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + UserProfileData profile = plugin.Value.getUserByName(fname,lname); + try + { + profile.currentAgent = getUserAgent(profile.UUID); + } + catch (Exception e) + { + // Ignore + } + return profile; + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Loads a user agent by uuid (not called directly) + /// + /// The agents UUID + /// Agent profiles + public UserAgentData getUserAgent(LLUUID uuid) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByUUID(uuid); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Loads a user agent by name (not called directly) + /// + /// The agents name + /// A user agent + public UserAgentData getUserAgent(string name) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByName(name); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Loads a user agent by name (not called directly) + /// + /// The agents firstname + /// The agents lastname + /// A user agent + public UserAgentData getUserAgent(string fname, string lname) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByName(fname,lname); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Creates a error response caused by invalid XML + /// + /// An XMLRPC response + private static XmlRpcResponse CreateErrorConnectingToGridResponse() + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable ErrorRespData = new Hashtable(); + ErrorRespData["reason"] = "key"; + ErrorRespData["message"] = "Error connecting to grid. Could not percieve credentials from login XML."; + ErrorRespData["login"] = "false"; + response.Value = ErrorRespData; + return response; + } + + /// + /// Creates an error response caused by bad login credentials + /// + /// An XMLRPC response + private static XmlRpcResponse CreateLoginErrorResponse() + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable ErrorRespData = new Hashtable(); + ErrorRespData["reason"] = "key"; + ErrorRespData["message"] = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist."; + ErrorRespData["login"] = "false"; + response.Value = ErrorRespData; + return response; + } + + /// + /// Creates an error response caused by being logged in already + /// + /// An XMLRPC Response + private static XmlRpcResponse CreateAlreadyLoggedInResponse() + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable PresenceErrorRespData = new Hashtable(); + PresenceErrorRespData["reason"] = "presence"; + PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner"; + PresenceErrorRespData["login"] = "false"; + response.Value = PresenceErrorRespData; + return response; + } + + /// + /// Creates an error response caused by target region being down + /// + /// An XMLRPC Response + private static XmlRpcResponse CreateDeadRegionResponse() + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable PresenceErrorRespData = new Hashtable(); + PresenceErrorRespData["reason"] = "key"; + PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again."; + PresenceErrorRespData["login"] = "false"; + response.Value = PresenceErrorRespData; + return response; + } + + /// + /// Customises the login response and fills in missing values. + /// + /// The existing response + /// The user profile + public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser) + { + + } + + /// + /// Checks a user against it's password hash + /// + /// The users profile + /// The supplied password + /// Authenticated? + public bool AuthenticateUser(ref UserProfileData profile, string password) + { + OpenSim.Framework.Console.MainConsole.Instance.Verbose( + "Authenticating " + profile.username + " " + profile.surname); + + password = password.Remove(0, 3); //remove $1$ + + string s = Util.Md5Hash(password + ":" + profile.passwordSalt); + + return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); + } + + /// + /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB + /// + /// The users profile + /// The users loginrequest + public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request) + { + Hashtable requestData = (Hashtable)request.Params[0]; + + UserAgentData agent = new UserAgentData(); + + // User connection + agent.agentIP = ""; + agent.agentOnline = true; + agent.agentPort = 0; + + // Generate sessions + RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); + byte[] randDataS = new byte[16]; + byte[] randDataSS = new byte[16]; + rand.GetBytes(randDataS); + rand.GetBytes(randDataSS); + + agent.secureSessionID = new LLUUID(randDataSS, 0); + agent.sessionID = new LLUUID(randDataS, 0); + + // Profile UUID + agent.UUID = profile.UUID; + + // Current position (from Home) + agent.currentHandle = profile.homeRegion; + agent.currentPos = profile.homeLocation; + + // If user specified additional start, use that + if (requestData.ContainsKey("start")) + { + string startLoc = ((string)requestData["start"]).Trim(); + if (!(startLoc == "last" || startLoc == "home")) + { + // Format: uri:Ahern&162&213&34 + try + { + string[] parts = startLoc.Remove(0, 4).Split('&'); + string region = parts[0]; + + //////////////////////////////////////////////////// + //SimProfile SimInfo = new SimProfile(); + //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); + } + catch (Exception e) + { + + } + } + } + + // What time did the user login? + agent.loginTime = Util.UnixTimeSinceEpoch(); + agent.logoutTime = 0; + + // Current location + agent.regionID = new LLUUID(); // Fill in later + agent.currentRegion = new LLUUID(); // Fill in later + + profile.currentAgent = agent; + } + + /// + /// Saves a target agent to the database + /// + /// The users profile + /// Successful? + public bool CommitAgent(ref UserProfileData profile) + { + // Saves the agent to database + return true; + } + + /// + /// Main user login function + /// + /// The XMLRPC request + /// The response to send + public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable requestData = (Hashtable)request.Params[0]; + + bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); + bool GoodLogin = false; + string firstname = ""; + string lastname = ""; + string passwd = ""; + + UserProfileData TheUser; + + if (GoodXML) + { + firstname = (string)requestData["first"]; + lastname = (string)requestData["last"]; + passwd = (string)requestData["passwd"]; + + TheUser = getUserProfile(firstname, lastname); + if (TheUser == null) + return CreateLoginErrorResponse(); + + GoodLogin = AuthenticateUser(ref TheUser, passwd); + } + else + { + return CreateErrorConnectingToGridResponse(); + } + + if (!GoodLogin) + { + return CreateLoginErrorResponse(); + } + else + { + // If we already have a session... + if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline) + { + // Reject the login + return CreateAlreadyLoggedInResponse(); + } + // Otherwise... + // Create a new agent session + CreateAgent(ref TheUser, request); + + try + { + Hashtable responseData = new Hashtable(); + + LLUUID AgentID = TheUser.UUID; + + // Global Texture Section + Hashtable GlobalT = new Hashtable(); + GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271"; + GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; + GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; + ArrayList GlobalTextures = new ArrayList(); + GlobalTextures.Add(GlobalT); + + // Login Flags Section + Hashtable LoginFlagsHash = new Hashtable(); + LoginFlagsHash["daylight_savings"] = "N"; + LoginFlagsHash["stipend_since_login"] = "N"; + LoginFlagsHash["gendered"] = "Y"; // Needs to be combined with below... + LoginFlagsHash["ever_logged_in"] = "Y"; // Should allow male/female av selection + ArrayList LoginFlags = new ArrayList(); + LoginFlags.Add(LoginFlagsHash); + + // UI Customisation Section + Hashtable uiconfig = new Hashtable(); + uiconfig["allow_first_life"] = "Y"; + ArrayList ui_config = new ArrayList(); + ui_config.Add(uiconfig); + + // Classified Categories Section + Hashtable ClassifiedCategoriesHash = new Hashtable(); + ClassifiedCategoriesHash["category_name"] = "Generic"; + ClassifiedCategoriesHash["category_id"] = (Int32)1; + ArrayList ClassifiedCategories = new ArrayList(); + ClassifiedCategories.Add(ClassifiedCategoriesHash); + + // Inventory Library Section + ArrayList AgentInventoryArray = new ArrayList(); + Hashtable TempHash; + + AgentInventory Library = new AgentInventory(); + Library.CreateRootFolder(AgentID, true); + + foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values) + { + TempHash = new Hashtable(); + TempHash["name"] = InvFolder.FolderName; + TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); + TempHash["version"] = (Int32)InvFolder.Version; + TempHash["type_default"] = (Int32)InvFolder.DefaultType; + TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); + AgentInventoryArray.Add(TempHash); + } + + Hashtable InventoryRootHash = new Hashtable(); + InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated(); + ArrayList InventoryRoot = new ArrayList(); + InventoryRoot.Add(InventoryRootHash); + + Hashtable InitialOutfitHash = new Hashtable(); + InitialOutfitHash["folder_name"] = "Nightclub Female"; + InitialOutfitHash["gender"] = "female"; + ArrayList InitialOutfit = new ArrayList(); + InitialOutfit.Add(InitialOutfitHash); + + // Circuit Code + uint circode = (uint)(Util.RandomClass.Next()); + + // Generics + responseData["last_name"] = TheUser.surname; + responseData["ui-config"] = ui_config; + responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString(); + responseData["login-flags"] = LoginFlags; + responseData["global-textures"] = GlobalTextures; + responseData["classified_categories"] = ClassifiedCategories; + responseData["event_categories"] = new ArrayList(); + responseData["inventory-skeleton"] = AgentInventoryArray; + responseData["inventory-skel-lib"] = new ArrayList(); + responseData["inventory-root"] = InventoryRoot; + responseData["event_notifications"] = new ArrayList(); + responseData["gestures"] = new ArrayList(); + responseData["inventory-lib-owner"] = new ArrayList(); + responseData["initial-outfit"] = InitialOutfit; + responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + responseData["start_location"] = "last"; + responseData["home"] = "!!null temporary value {home}!!"; // Overwritten + responseData["message"] = _config.DefaultStartupMsg; + responseData["first_name"] = TheUser.username; + responseData["circuit_code"] = (Int32)circode; + responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port; + responseData["secure_session_id"] = TheUser.currentAgent.secureSessionID.ToStringHyphenated(); + responseData["look_at"] = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; + responseData["agent_id"] = AgentID.ToStringHyphenated(); + responseData["region_y"] = (Int32)0; // Overwritten + responseData["region_x"] = (Int32)0; // Overwritten + responseData["seed_capability"] = ""; + responseData["agent_access"] = "M"; + responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated(); + responseData["login"] = "true"; + + try + { + this.CustomiseResponse(ref responseData, ref TheUser); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return CreateDeadRegionResponse(); + } + + CommitAgent(ref TheUser); + + response.Value = responseData; + // TheUser.SendDataToSim(SimInfo); + return response; + + } + catch (Exception E) + { + Console.WriteLine(E.ToString()); + } + //} + } + return response; + + } + + /// + /// Deletes an active agent session + /// + /// The request + /// The path (eg /bork/narf/test) + /// Parameters sent + /// Success "OK" else error + public string RestDeleteUserSessionMethod(string request, string path, string param) + { + // TODO! Important! + + return "OK"; + } + + /// + /// Returns an error message that the user could not be found in the database + /// + /// XML string consisting of a error element containing individual error(s) + public string CreateUnknownUserErrorResponse() + { + System.IO.StringWriter sw = new System.IO.StringWriter(); + XmlTextWriter xw = new XmlTextWriter(sw); + + // Header + xw.Formatting = Formatting.Indented; + xw.WriteStartDocument(); + xw.WriteDocType("error", null, null, null); + xw.WriteComment("An error occured"); + xw.WriteStartElement("error"); + + // User + xw.WriteElementString("unknownuser", "Unable to find a user with that name"); + + // Footer + xw.WriteEndElement(); + xw.Flush(); + xw.Close(); + + return sw.ToString(); + } + + /// + /// Converts a user profile to an XML element which can be returned + /// + /// The user profile + /// A string containing an XML Document of the user profile + public string ProfileToXml(UserProfileData profile) + { + System.IO.StringWriter sw = new System.IO.StringWriter(); + XmlTextWriter xw = new XmlTextWriter(sw); + + // Header + xw.Formatting = Formatting.Indented; + xw.WriteStartDocument(); + xw.WriteDocType("userprofile", null, null, null); + xw.WriteComment("Found user profiles matching the request"); + xw.WriteStartElement("users"); + + // User + xw.WriteStartElement("user"); + // Account information + xw.WriteAttributeString("firstname", profile.username); + xw.WriteAttributeString("lastname", profile.surname); + xw.WriteAttributeString("uuid", profile.UUID.ToStringHyphenated()); + // Server Information + xw.WriteAttributeString("server_inventory", profile.userInventoryURI); + xw.WriteAttributeString("server_asset", profile.userAssetURI); + // Profile Information + xw.WriteAttributeString("profile_about", profile.profileAboutText); + xw.WriteAttributeString("profile_firstlife_about", profile.profileFirstText); + xw.WriteAttributeString("profile_firstlife_image", profile.profileFirstImage.ToStringHyphenated()); + xw.WriteAttributeString("profile_can_do", profile.profileCanDoMask.ToString()); + xw.WriteAttributeString("profile_want_do", profile.profileWantDoMask.ToString()); + xw.WriteAttributeString("profile_image", profile.profileImage.ToStringHyphenated()); + xw.WriteAttributeString("profile_created",profile.created.ToString()); + xw.WriteAttributeString("profile_lastlogin",profile.lastLogin.ToString()); + // Home region information + xw.WriteAttributeString("home_coordinates", profile.homeLocation.ToString()); + xw.WriteAttributeString("home_region", profile.homeRegion.ToString()); + xw.WriteAttributeString("home_look", profile.homeLookAt.ToString()); + + xw.WriteEndElement(); + + // Footer + xw.WriteEndElement(); + xw.Flush(); + xw.Close(); + + return sw.ToString(); + } + + public string RestGetUserMethodName(string request, string path, string param) + { + UserProfileData userProfile = getUserProfile(param.Trim()); + + if (userProfile == null) + { + return CreateUnknownUserErrorResponse(); + } + + return ProfileToXml(userProfile); + } + + public string RestGetUserMethodUUID(string request, string path, string param) + { + UserProfileData userProfile = getUserProfile(new LLUUID(param)); + + if (userProfile == null) + { + return CreateUnknownUserErrorResponse(); + } + + return ProfileToXml(userProfile); + } + + } +} diff --git a/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj b/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj index ad5480b..df68722 100644 --- a/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj +++ b/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\..\bin\ False False False diff --git a/OpenGridServices.build b/OpenGridServices.build index d461ac8..7cfe21e 100644 --- a/OpenGridServices.build +++ b/OpenGridServices.build @@ -47,12 +47,13 @@ - - + + + @@ -60,14 +61,15 @@ - + - + + @@ -82,12 +84,13 @@ - - + + + diff --git a/OpenGridServices.sln b/OpenGridServices.sln index 523be71..4772960 100644 --- a/OpenGridServices.sln +++ b/OpenGridServices.sln @@ -1,10 +1,10 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +# Visual C# Express 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Config.GridConfigDb4o", "OpenGridServices\OpenGrid.Config\GridConfigDb4o\OpenGrid.Config.GridConfigDb4o.csproj", "{B0027747-0000-0000-0000-000000000000}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data", "OpenGridServices\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj", "{62CDF671-0000-0000-0000-000000000000}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data", "Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj", "{62CDF671-0000-0000-0000-000000000000}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.DB4o", "OpenGridServices\OpenGrid.Framework.Data.DB4o\OpenGrid.Framework.Data.DB4o.csproj", "{39BD9497-0000-0000-0000-000000000000}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.DB4o", "Common\OpenGrid.Framework.Data.DB4o\OpenGrid.Framework.Data.DB4o.csproj", "{39BD9497-0000-0000-0000-000000000000}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.MSSQL", "OpenGridServices\OpenGrid.Framework.Data.MSSQL\OpenGrid.Framework.Data.MSSQL.csproj", "{0A563AC1-0000-0000-0000-000000000000}" EndProject @@ -14,6 +14,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.SQL EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Manager", "OpenGridServices\OpenGrid.Framework.Manager\OpenGrid.Framework.Manager.csproj", "{7924FD35-0000-0000-0000-000000000000}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.UserManagement", "Common\OpenGrid.Framework.UserManager\OpenGrid.Framework.UserManagement.csproj", "{DA9A7391-0000-0000-0000-000000000000}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.GridServer", "OpenGridServices\OpenGridServices.GridServer\OpenGridServices.GridServer.csproj", "{21BFC8E2-0000-0000-0000-000000000000}" @@ -23,66 +25,61 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}" EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - ({39BD9497-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) - ({0A563AC1-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000}) - ({0F3C3AC1-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) - ({1E3F341A-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000}) - ({21BFC8E2-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) - ({21BFC8E2-0000-0000-0000-000000000000}).3 = ({7924FD35-0000-0000-0000-000000000000}) - ({66591469-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs deleted file mode 100644 index 2b23131..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using OpenGrid.Framework.Data; -using libsecondlife; - - -namespace OpenGrid.Framework.Data.DB4o -{ - /// - /// A grid server storage mechanism employing the DB4o database system - /// - class DB4oGridData : IGridData - { - /// - /// The database manager object - /// - DB4oGridManager manager; - - /// - /// Called when the plugin is first loaded (as constructors are not called) - /// - public void Initialise() { - manager = new DB4oGridManager("gridserver.yap"); - } - - /// - /// Returns a list of regions within the specified ranges - /// - /// minimum X coordinate - /// minimum Y coordinate - /// maximum X coordinate - /// maximum Y coordinate - /// An array of region profiles - public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) - { - return null; - } - - /// - /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned) - /// - /// The handle to search for - /// A region profile - public SimProfileData GetProfileByHandle(ulong handle) { - lock (manager.simProfiles) - { - foreach (LLUUID UUID in manager.simProfiles.Keys) - { - if (manager.simProfiles[UUID].regionHandle == handle) - { - return manager.simProfiles[UUID]; - } - } - } - throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")"); - } - - /// - /// Returns a specific region - /// - /// The region ID code - /// A region profile - public SimProfileData GetProfileByLLUUID(LLUUID uuid) - { - lock (manager.simProfiles) - { - if (manager.simProfiles.ContainsKey(uuid)) - return manager.simProfiles[uuid]; - } - throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + ")"); - } - - /// - /// Adds a new specified region to the database - /// - /// The profile to add - /// A dataresponse enum indicating success - public DataResponse AddProfile(SimProfileData profile) - { - lock (manager.simProfiles) - { - if (manager.AddRow(profile)) - { - return DataResponse.RESPONSE_OK; - } - else - { - return DataResponse.RESPONSE_ERROR; - } - } - } - - /// - /// Authenticates a new region using the shared secrets. NOT SECURE. - /// - /// The UUID the region is authenticating with - /// The location the region is logging into (unused in Db4o) - /// The shared secret - /// Authenticated? - public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) { - if (manager.simProfiles[uuid].regionRecvKey == key) - return true; - return false; - } - - /// - /// Shuts down the database - /// - public void Close() - { - manager = null; - } - - /// - /// Returns the providers name - /// - /// The name of the storage system - public string getName() - { - return "DB4o Grid Provider"; - } - - /// - /// Returns the providers version - /// - /// The version of the storage system - public string getVersion() - { - return "0.1"; - } - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs deleted file mode 100644 index 356a49c..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using Db4objects.Db4o; -using OpenGrid.Framework.Data; -using libsecondlife; - -namespace OpenGrid.Framework.Data.DB4o -{ - /// - /// A Database manager for Db4o - /// - class DB4oGridManager - { - /// - /// A list of the current regions connected (in-memory cache) - /// - public Dictionary simProfiles = new Dictionary(); - /// - /// Database File Name - /// - string dbfl; - - /// - /// Creates a new grid storage manager - /// - /// Filename to the database file - public DB4oGridManager(string db4odb) - { - dbfl = db4odb; - IObjectContainer database; - database = Db4oFactory.OpenFile(dbfl); - IObjectSet result = database.Get(typeof(SimProfileData)); - // Loads the file into the in-memory cache - foreach(SimProfileData row in result) { - simProfiles.Add(row.UUID, row); - } - database.Close(); - } - - /// - /// Adds a new profile to the database (Warning: Probably slow.) - /// - /// The profile to add - /// Successful? - public bool AddRow(SimProfileData row) - { - if (simProfiles.ContainsKey(row.UUID)) - { - simProfiles[row.UUID] = row; - } - else - { - simProfiles.Add(row.UUID, row); - } - - try - { - IObjectContainer database; - database = Db4oFactory.OpenFile(dbfl); - database.Set(row); - database.Close(); - return true; - } - catch (Exception e) - { - return false; - } - } - - - } - - /// - /// A manager for the DB4o database (user profiles) - /// - class DB4oUserManager - { - /// - /// A list of the user profiles (in memory cache) - /// - public Dictionary userProfiles = new Dictionary(); - /// - /// Database filename - /// - string dbfl; - - /// - /// Initialises a new DB manager - /// - /// The filename to the database - public DB4oUserManager(string db4odb) - { - dbfl = db4odb; - IObjectContainer database; - database = Db4oFactory.OpenFile(dbfl); - // Load to cache - IObjectSet result = database.Get(typeof(UserProfileData)); - foreach (UserProfileData row in result) - { - userProfiles.Add(row.UUID, row); - } - database.Close(); - } - - /// - /// Adds a new profile to the database (Warning: Probably slow.) - /// - /// The profile to add - /// Successful? - public bool AddRow(UserProfileData row) - { - if (userProfiles.ContainsKey(row.UUID)) - { - userProfiles[row.UUID] = row; - } - else - { - userProfiles.Add(row.UUID, row); - } - - try - { - IObjectContainer database; - database = Db4oFactory.OpenFile(dbfl); - database.Set(row); - database.Close(); - return true; - } - catch (Exception e) - { - return false; - } - } - - - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs deleted file mode 100644 index 315f48d..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using OpenGrid.Framework.Data; -using libsecondlife; - -namespace OpenGrid.Framework.Data.DB4o -{ - /// - /// A User storage interface for the DB4o database system - /// - public class DB4oUserData : IUserData - { - /// - /// The database manager - /// - DB4oUserManager manager; - - /// - /// Artificial constructor called upon plugin load - /// - public void Initialise() - { - manager = new DB4oUserManager("userprofiles.yap"); - } - - /// - /// Loads a specified user profile from a UUID - /// - /// The users UUID - /// A user profile - public UserProfileData getUserByUUID(LLUUID uuid) - { - if(manager.userProfiles.ContainsKey(uuid)) - return manager.userProfiles[uuid]; - return null; - } - - /// - /// Returns a user by searching for its name - /// - /// The users account name - /// A matching users profile - public UserProfileData getUserByName(string name) - { - return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); - } - - /// - /// Returns a user by searching for its name - /// - /// The first part of the users account name - /// The second part of the users account name - /// A matching users profile - public UserProfileData getUserByName(string fname, string lname) - { - foreach (UserProfileData profile in manager.userProfiles.Values) - { - if (profile.username == fname && profile.surname == lname) - return profile; - } - return null; - } - - /// - /// Returns a user by UUID direct - /// - /// The users account ID - /// A matching users profile - public UserAgentData getAgentByUUID(LLUUID uuid) - { - try - { - return getUserByUUID(uuid).currentAgent; - } - catch (Exception e) - { - return null; - } - } - - /// - /// Returns a session by account name - /// - /// The account name - /// The users session agent - public UserAgentData getAgentByName(string name) - { - return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); - } - - /// - /// Returns a session by account name - /// - /// The first part of the users account name - /// The second part of the users account name - /// A user agent - public UserAgentData getAgentByName(string fname, string lname) - { - try - { - return getUserByName(fname,lname).currentAgent; - } - catch (Exception e) - { - return null; - } - } - - /// - /// Creates a new user profile - /// - /// The profile to add to the database - public void addNewUserProfile(UserProfileData user) - { - try - { - manager.AddRow(user); - } - catch (Exception e) - { - Console.WriteLine(e.ToString()); - } - } - - /// - /// Creates a new user agent - /// - /// The agent to add to the database - public void addNewUserAgent(UserAgentData agent) - { - // Do nothing. yet. - } - - /// - /// Transfers money between two user accounts - /// - /// Starting account - /// End account - /// The amount to move - /// Success? - public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) - { - return true; - } - - /// - /// Transfers inventory between two accounts - /// - /// Move to inventory server - /// Senders account - /// Recievers account - /// Inventory item - /// Success? - public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) - { - return true; - } - - /// - /// Returns the name of the storage provider - /// - /// Storage provider name - public string getName() - { - return "DB4o Userdata"; - } - - /// - /// Returns the version of the storage provider - /// - /// Storage provider version - public string getVersion() - { - return "0.1"; - } - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj deleted file mode 100644 index d2d6140..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj +++ /dev/null @@ -1,111 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {39BD9497-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data.DB4o - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data.DB4o - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - ..\..\bin\Db4objects.Db4o.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - System.dll - False - - - System.Data.dll - False - - - System.Xml.dll - False - - - - - OpenGrid.Framework.Data - {62CDF671-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine deleted file mode 100644 index 82d4f5f..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine +++ /dev/null @@ -1,111 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {39BD9497-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data.DB4o - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data.DB4o - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - ..\..\bin\Db4objects.Db4o.dll - False - - - - - OpenGrid.Framework.Data - {62CDF671-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 deleted file mode 100644 index d6dd03d..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 +++ /dev/null @@ -1,111 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {BC0F052F-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data.DB4o - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data.DB4o - - - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ../../bin/ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ../../bin/ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - ..\..\bin\Db4objects.Db4o.dll - False - - - - - OpenGrid.Framework.Data - {12DD8EB8-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 deleted file mode 100644 index 3b783ca..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 +++ /dev/null @@ -1,111 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {39BD9497-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data.DB4o - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data.DB4o - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - ..\..\bin\Db4objects.Db4o.dll - False - - - - - OpenGrid.Framework.Data - {62CDF671-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build deleted file mode 100644 index d82d751..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs deleted file mode 100644 index dc4a9a1..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenGrid.Framework.Data.DB4o")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenGrid.Framework.Data.DB4o")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("57991e15-79da-41b7-aa06-2e6b49165a63")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj index fa18c28..64bb78e 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj +++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj @@ -76,7 +76,7 @@ - + OpenGrid.Framework.Data {62CDF671-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj index cc3aacb..c1fc2da 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj +++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj @@ -80,7 +80,7 @@ - + OpenGrid.Framework.Data {62CDF671-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj index 63d0bd9..da42e05 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj +++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj @@ -80,7 +80,7 @@ - + OpenGrid.Framework.Data {62CDF671-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/OpenGridServices/OpenGrid.Framework.Data/GridData.cs b/OpenGridServices/OpenGrid.Framework.Data/GridData.cs deleted file mode 100644 index e9fb215..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/GridData.cs +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; - -namespace OpenGrid.Framework.Data -{ - public enum DataResponse - { - RESPONSE_OK, - RESPONSE_AUTHREQUIRED, - RESPONSE_INVALIDCREDENTIALS, - RESPONSE_ERROR - } - - /// - /// A standard grid interface - /// - public interface IGridData - { - /// - /// Returns a sim profile from a regionHandle - /// - /// A 64bit Region Handle - /// A simprofile - SimProfileData GetProfileByHandle(ulong regionHandle); - - /// - /// Returns a sim profile from a UUID - /// - /// A 128bit UUID - /// A sim profile - SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID); - - /// - /// Returns all profiles within the specified range - /// - /// Minimum sim coordinate (X) - /// Minimum sim coordinate (Y) - /// Maximum sim coordinate (X) - /// Maximum sim coordinate (Y) - /// An array containing all the sim profiles in the specified range - SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); - - /// - /// Authenticates a sim by use of it's recv key. - /// WARNING: Insecure - /// - /// The UUID sent by the sim - /// The regionhandle sent by the sim - /// The recieving key sent by the sim - /// Whether the sim has been authenticated - bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); - - /// - /// Initialises the interface - /// - void Initialise(); - - /// - /// Closes the interface - /// - void Close(); - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - string getName(); - - /// - /// The plugins version - /// - /// A string containing the plugin version - string getVersion(); - - /// - /// Adds a new profile to the database - /// - /// The profile to add - /// RESPONSE_OK if successful, error if not. - DataResponse AddProfile(SimProfileData profile); - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs b/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs deleted file mode 100644 index 2ac0bfe..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; - -namespace OpenGrid.Framework.Data -{ - /// - /// The severity of an individual log message - /// - public enum LogSeverity : int - { - /// - /// Critical: systems failure - /// - CRITICAL = 1, - /// - /// Major: warning prior to systems failure - /// - MAJOR = 2, - /// - /// Medium: an individual non-critical task failed - /// - MEDIUM = 3, - /// - /// Low: Informational warning - /// - LOW = 4, - /// - /// Info: Information - /// - INFO = 5, - /// - /// Verbose: Debug Information - /// - VERBOSE = 6 - } - - /// - /// An interface to a LogData storage system - /// - public interface ILogData - { - void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage); - /// - /// Initialises the interface - /// - void Initialise(); - - /// - /// Closes the interface - /// - void Close(); - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - string getName(); - - /// - /// The plugins version - /// - /// A string containing the plugin version - string getVersion(); - } - -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs b/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs deleted file mode 100644 index d17afac..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs +++ /dev/null @@ -1,100 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using System.IO; -using System.Text.RegularExpressions; - -/* - Taken from public code listing at by Alex Pinsker - http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html - */ - -namespace OpenGrid.Framework.Data -{ - /// - /// Parse settings from ini-like files - /// - public class IniFile - { - static IniFile() - { - _iniKeyValuePatternRegex = new Regex( - @"((\s)*(?([^\=^\s^\n]+))[\s^\n]* - # key part (surrounding whitespace stripped) - \= - (\s)*(?([^\n^\s]+(\n){0,1}))) - # value part (surrounding whitespace stripped) - ", - RegexOptions.IgnorePatternWhitespace | - RegexOptions.Compiled | - RegexOptions.CultureInvariant); - } - static private Regex _iniKeyValuePatternRegex; - - public IniFile(string iniFileName) - { - _iniFileName = iniFileName; - } - - public string ParseFileReadValue(string key) - { - using (StreamReader reader = - new StreamReader(_iniFileName)) - { - do - { - string line = reader.ReadLine(); - Match match = - _iniKeyValuePatternRegex.Match(line); - if (match.Success) - { - string currentKey = - match.Groups["Key"].Value as string; - if (currentKey != null && - currentKey.Trim().CompareTo(key) == 0) - { - string value = - match.Groups["Value"].Value as string; - return value; - } - } - - } - while (reader.Peek() != -1); - } - return null; - } - - public string IniFileName - { - get { return _iniFileName; } - } private string _iniFileName; - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs deleted file mode 100644 index 12f559b..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using libsecondlife; - -namespace OpenGrid.Framework.Data -{ - /// - /// Inventory Item - contains all the properties associated with an individual inventory piece. - /// - public class InventoryItemBase - { - /// - /// A UUID containing the ID for the inventory item itself - /// - public LLUUID inventoryID; - /// - /// The UUID of the associated asset on the asset server - /// - public LLUUID assetID; - /// - /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) - /// - public int type; - /// - /// The folder this item is contained in (NULL_KEY = Inventory Root) - /// - public LLUUID parentFolderID; - /// - /// The owner of this inventory item - /// - public LLUUID avatarID; - /// - /// The name of the inventory item (must be less than 64 characters) - /// - public string inventoryName; - /// - /// The description of the inventory item (must be less than 64 characters) - /// - public string inventoryDescription; - /// - /// A mask containing the permissions for the next owner (cannot be enforced) - /// - public uint inventoryNextPermissions; - /// - /// A mask containing permissions for the current owner (cannot be enforced) - /// - public uint inventoryCurrentPermissions; - } - - /// - /// A Class for folders which contain users inventory - /// - public class InventoryFolderBase - { - /// - /// The name of the folder (64 characters or less) - /// - public string name; - /// - /// The agent who's inventory this is contained by - /// - public LLUUID agentID; - /// - /// The folder this folder is contained in (NULL_KEY for root) - /// - public LLUUID parentID; - /// - /// The UUID for this folder - /// - public LLUUID folderID; - } - - /// - /// An interface for accessing inventory data from a storage server - /// - public interface IInventoryData - { - /// - /// Initialises the interface - /// - void Initialise(); - - /// - /// Closes the interface - /// - void Close(); - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - string getName(); - - /// - /// The plugins version - /// - /// A string containing the plugin version - string getVersion(); - - /// - /// Returns a list of inventory items contained within the specified folder - /// - /// The UUID of the target folder - /// A List of InventoryItemBase items - List getInventoryInFolder(LLUUID folderID); - - /// - /// Returns a list of folders in the users inventory root. - /// - /// The UUID of the user who is having inventory being returned - /// A list of folders - List getUserRootFolders(LLUUID user); - - /// - /// Returns a list of inventory folders contained in the folder 'parentID' - /// - /// The folder to get subfolders for - /// A list of inventory folders - List getInventoryFolders(LLUUID parentID); - - /// - /// Returns an inventory item by its UUID - /// - /// The UUID of the item to be returned - /// A class containing item information - InventoryItemBase getInventoryItem(LLUUID item); - - /// - /// Returns a specified inventory folder by its UUID - /// - /// The UUID of the folder to be returned - /// A class containing folder information - InventoryFolderBase getInventoryFolder(LLUUID folder); - - /// - /// Creates a new inventory item based on item - /// - /// The item to be created - void addInventoryItem(InventoryItemBase item); - - /// - /// Updates an inventory item with item (updates based on ID) - /// - /// The updated item - void updateInventoryItem(InventoryItemBase item); - - /// - /// Adds a new folder specified by folder - /// - /// The inventory folder - void addInventoryFolder(InventoryFolderBase folder); - - /// - /// Updates a folder based on its ID with folder - /// - /// The inventory folder - void updateInventoryFolder(InventoryFolderBase folder); - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj deleted file mode 100644 index 0b53b02..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {62CDF671-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - ..\..\bin\libsecondlife.dll - False - - - System.dll - False - - - System.Data.dll - False - - - System.Xml.dll - False - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine deleted file mode 100644 index a572204..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine +++ /dev/null @@ -1,113 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {62CDF671-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 deleted file mode 100644 index 3b6d24d..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 +++ /dev/null @@ -1,110 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {12DD8EB8-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data - - - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ../../bin/ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ../../bin/ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 deleted file mode 100644 index 990cd16..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 +++ /dev/null @@ -1,113 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {62CDF671-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Data - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Data - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\bin\ - False - False - False - 4 - - - - - System.dll - False - - - System.Xml.dll - False - - - System.Data.dll - False - - - ..\..\bin\libsecondlife.dll - False - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build deleted file mode 100644 index 7abebeb..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs deleted file mode 100644 index 1446673..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenGrid.Framework.Data")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenGrid.Framework.Data")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs deleted file mode 100644 index a3e7cb7..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; - -namespace OpenGrid.Framework.Data -{ - /// - /// A class which contains information known to the grid server about a region - /// - public class SimProfileData - { - /// - /// The name of the region - /// - public string regionName = ""; - - /// - /// A 64-bit number combining map position into a (mostly) unique ID - /// - public ulong regionHandle; - - /// - /// OGS/OpenSim Specific ID for a region - /// - public libsecondlife.LLUUID UUID; - - /// - /// Coordinates of the region - /// - public uint regionLocX; - public uint regionLocY; - public uint regionLocZ; // Reserved (round-robin, layers, etc) - - /// - /// Authentication secrets - /// - /// Not very secure, needs improvement. - public string regionSendKey = ""; - public string regionRecvKey = ""; - public string regionSecret = ""; - - /// - /// Whether the region is online - /// - public bool regionOnline; - - /// - /// Information about the server that the region is currently hosted on - /// - public string serverIP = ""; - public uint serverPort; - public string serverURI = ""; - - /// - /// Set of optional overrides. Can be used to create non-eulicidean spaces. - /// - public ulong regionNorthOverrideHandle; - public ulong regionSouthOverrideHandle; - public ulong regionEastOverrideHandle; - public ulong regionWestOverrideHandle; - - /// - /// Optional: URI Location of the region database - /// - /// Used for floating sim pools where the region data is not nessecarily coupled to a specific server - public string regionDataURI = ""; - - /// - /// Region Asset Details - /// - public string regionAssetURI = ""; - public string regionAssetSendKey = ""; - public string regionAssetRecvKey = ""; - - /// - /// Region Userserver Details - /// - public string regionUserURI = ""; - public string regionUserSendKey = ""; - public string regionUserRecvKey = ""; - - /// - /// Region Map Texture Asset - /// - public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006"); - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserData.cs deleted file mode 100644 index c2d5a72..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using libsecondlife; - -namespace OpenGrid.Framework.Data -{ - /// - /// An interface for connecting to user storage servers. - /// - public interface IUserData - { - /// - /// Returns a user profile from a database via their UUID - /// - /// The accounts UUID - /// The user data profile - UserProfileData getUserByUUID(LLUUID user); - - /// - /// Returns a users profile by searching their username - /// - /// The users username - /// The user data profile - UserProfileData getUserByName(string name); - - /// - /// Returns a users profile by searching their username parts - /// - /// Account firstname - /// Account lastname - /// The user data profile - UserProfileData getUserByName(string fname, string lname); - - /// - /// Returns the current agent for a user searching by it's UUID - /// - /// The users UUID - /// The current agent session - UserAgentData getAgentByUUID(LLUUID user); - - /// - /// Returns the current session agent for a user searching by username - /// - /// The users account name - /// The current agent session - UserAgentData getAgentByName(string name); - - /// - /// Returns the current session agent for a user searching by username parts - /// - /// The users first account name - /// The users account surname - /// The current agent session - UserAgentData getAgentByName(string fname, string lname); - - /// - /// Adds a new User profile to the database - /// - /// UserProfile to add - void addNewUserProfile(UserProfileData user); - - /// - /// Adds a new agent to the database - /// - /// The agent to add - void addNewUserAgent(UserAgentData agent); - - /// - /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) - /// - /// The account to transfer from - /// The account to transfer to - /// The amount to transfer - /// Successful? - bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount); - - /// - /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. - /// - /// User to transfer from - /// User to transfer to - /// Specified inventory item - /// Successful? - bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); - - /// - /// Returns the plugin version - /// - /// Plugin version in MAJOR.MINOR.REVISION.BUILD format - string getVersion(); - - /// - /// Returns the plugin name - /// - /// Plugin name, eg MySQL User Provider - string getName(); - - /// - /// Initialises the plugin (artificial constructor) - /// - void Initialise(); - } -} diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs deleted file mode 100644 index 82633e1..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim 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 System.Text; -using libsecondlife; - -namespace OpenGrid.Framework.Data -{ - /// - /// Information about a particular user known to the userserver - /// - public class UserProfileData - { - /// - /// The ID value for this user - /// - public LLUUID UUID; - - /// - /// The first component of a users account name - /// - public string username; - /// - /// The second component of a users account name - /// - public string surname; - - /// - /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) - /// - /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver - public string passwordHash; - /// - /// The salt used for the users hash, should be 32 bytes or longer - /// - public string passwordSalt; - - /// - /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into - /// - public ulong homeRegion; - /// - /// The coordinates inside the region of the home location - /// - public LLVector3 homeLocation; - /// - /// Where the user will be looking when they rez. - /// - public LLVector3 homeLookAt; - - /// - /// A UNIX Timestamp (seconds since epoch) for the users creation - /// - public int created; - /// - /// A UNIX Timestamp for the users last login date / time - /// - public int lastLogin; - - /// - /// A URI to the users inventory server, used for foreigners and large grids - /// - public string userInventoryURI; - /// - /// A URI to the users asset server, used for foreigners and large grids. - /// - public string userAssetURI; - - /// - /// A uint mask containing the "I can do" fields of the users profile - /// - public uint profileCanDoMask; - /// - /// A uint mask containing the "I want to do" part of the users profile - /// - public uint profileWantDoMask; // Profile window "I want to" mask - - /// - /// The about text listed in a users profile. - /// - public string profileAboutText; - /// - /// The first life about text listed in a users profile - /// - public string profileFirstText; - - /// - /// The profile image for an avatar stored on the asset server - /// - public LLUUID profileImage; - /// - /// The profile image for the users first life tab - /// - public LLUUID profileFirstImage; - /// - /// The users last registered agent (filled in on the user server) - /// - public UserAgentData currentAgent; - } - - /// - /// Information about a users session - /// - public class UserAgentData - { - /// - /// The UUID of the users avatar (not the agent!) - /// - public LLUUID UUID; - /// - /// The IP address of the user - /// - public string agentIP; - /// - /// The port of the user - /// - public uint agentPort; - /// - /// Is the user online? - /// - public bool agentOnline; - /// - /// The session ID for the user (also the agent ID) - /// - public LLUUID sessionID; - /// - /// The "secure" session ID for the user - /// - /// Not very secure. Dont rely on it for anything more than Linden Lab does. - public LLUUID secureSessionID; - /// - /// The region the user logged into initially - /// - public LLUUID regionID; - /// - /// A unix timestamp from when the user logged in - /// - public int loginTime; - /// - /// When this agent expired and logged out, 0 if still online - /// - public int logoutTime; - /// - /// Current region the user is logged into - /// - public LLUUID currentRegion; - /// - /// Region handle of the current region the user is in - /// - public ulong currentHandle; - /// - /// The position of the user within the region - /// - public LLVector3 currentPos; - } -} diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj index 55a0e02..291f997 100644 --- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj +++ b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj @@ -100,7 +100,7 @@ - + OpenGrid.Framework.Data {62CDF671-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj index b3d318c..ad0080a 100644 --- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj +++ b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj @@ -66,6 +66,10 @@ ..\..\bin\libsecondlife.dll False + + OpenGrid.Framework.UserManager.dll + False + OpenSim.Framework.dll False @@ -100,7 +104,7 @@ - + OpenGrid.Framework.Data {62CDF671-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build index 68cbef7..a24003f 100644 --- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build +++ b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build @@ -23,6 +23,7 @@ + diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs index f512b15..6f5f054 100644 --- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs +++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs @@ -38,284 +38,16 @@ using Nwc.XmlRpc; using OpenSim.Framework.Sims; using OpenSim.Framework.Inventory; using OpenSim.Framework.Utilities; +using OpenGrid.Framework.UserManagement; using System.Security.Cryptography; namespace OpenGridServices.UserServer { - public class UserManager + public class UserManager : UserManagerBase { - public OpenSim.Framework.Interfaces.UserConfig _config; - Dictionary _plugins = new Dictionary(); - - /// - /// Adds a new user server plugin - user servers will be requested in the order they were loaded. - /// - /// The filename to the user server plugin DLL - public void AddPlugin(string FileName) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Attempting to load " + FileName); - Assembly pluginAssembly = Assembly.LoadFrom(FileName); - - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); - foreach (Type pluginType in pluginAssembly.GetTypes()) - { - if (!pluginType.IsAbstract) - { - Type typeInterface = pluginType.GetInterface("IUserData", true); - - if (typeInterface != null) - { - IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - plug.Initialise(); - this._plugins.Add(plug.getName(), plug); - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Added IUserData Interface"); - } - - typeInterface = null; - } - } - - pluginAssembly = null; - } - - /// - /// - /// - /// - public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) - { - UserProfileData user = new UserProfileData(); - user.homeLocation = new LLVector3(128, 128, 100); - user.UUID = LLUUID.Random(); - user.username = firstName; - user.surname = lastName; - user.passwordHash = pass; - user.passwordSalt = ""; - user.created = Util.UnixTimeSinceEpoch(); - user.homeLookAt = new LLVector3(100, 100, 100); - user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256)); - - foreach (KeyValuePair plugin in _plugins) - { - try - { - plugin.Value.addNewUserProfile(user); - - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - } - - /// - /// Loads a user profile from a database by UUID - /// - /// The target UUID - /// A user profile - public UserProfileData getUserProfile(LLUUID uuid) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - UserProfileData profile = plugin.Value.getUserByUUID(uuid); - profile.currentAgent = getUserAgent(profile.UUID); - return profile; - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - - /// - /// Loads a user profile by name - /// - /// The target name - /// A user profile - public UserProfileData getUserProfile(string name) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - UserProfileData profile = plugin.Value.getUserByName(name); - profile.currentAgent = getUserAgent(profile.UUID); - return profile; - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - /// - /// Loads a user profile by name - /// - /// First name - /// Last name - /// A user profile - public UserProfileData getUserProfile(string fname, string lname) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - UserProfileData profile = plugin.Value.getUserByName(fname,lname); - try - { - profile.currentAgent = getUserAgent(profile.UUID); - } - catch (Exception e) - { - // Ignore - } - return profile; - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - /// - /// Loads a user agent by uuid (not called directly) - /// - /// The agents UUID - /// Agent profiles - public UserAgentData getUserAgent(LLUUID uuid) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - return plugin.Value.getAgentByUUID(uuid); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - /// - /// Loads a user agent by name (not called directly) - /// - /// The agents name - /// A user agent - public UserAgentData getUserAgent(string name) + public UserManager() { - foreach (KeyValuePair plugin in _plugins) - { - try - { - return plugin.Value.getAgentByName(name); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - /// - /// Loads a user agent by name (not called directly) - /// - /// The agents firstname - /// The agents lastname - /// A user agent - public UserAgentData getUserAgent(string fname, string lname) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - return plugin.Value.getAgentByName(fname,lname); - } - catch (Exception e) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } - - /// - /// Creates a error response caused by invalid XML - /// - /// An XMLRPC response - private static XmlRpcResponse CreateErrorConnectingToGridResponse() - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable ErrorRespData = new Hashtable(); - ErrorRespData["reason"] = "key"; - ErrorRespData["message"] = "Error connecting to grid. Could not percieve credentials from login XML."; - ErrorRespData["login"] = "false"; - response.Value = ErrorRespData; - return response; - } - - /// - /// Creates an error response caused by bad login credentials - /// - /// An XMLRPC response - private static XmlRpcResponse CreateLoginErrorResponse() - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable ErrorRespData = new Hashtable(); - ErrorRespData["reason"] = "key"; - ErrorRespData["message"] = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist."; - ErrorRespData["login"] = "false"; - response.Value = ErrorRespData; - return response; - } - - /// - /// Creates an error response caused by being logged in already - /// - /// An XMLRPC Response - private static XmlRpcResponse CreateAlreadyLoggedInResponse() - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable PresenceErrorRespData = new Hashtable(); - PresenceErrorRespData["reason"] = "presence"; - PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner"; - PresenceErrorRespData["login"] = "false"; - response.Value = PresenceErrorRespData; - return response; - } - - /// - /// Creates an error response caused by target region being down - /// - /// An XMLRPC Response - private static XmlRpcResponse CreateDeadRegionResponse() - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable PresenceErrorRespData = new Hashtable(); - PresenceErrorRespData["reason"] = "key"; - PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again."; - PresenceErrorRespData["login"] = "false"; - response.Value = PresenceErrorRespData; - return response; } /// @@ -323,7 +55,7 @@ namespace OpenGridServices.UserServer /// /// The existing response /// The user profile - public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser) + public override void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser) { // Load information from the gridserver SimProfile SimInfo = new SimProfile(); @@ -331,7 +63,7 @@ namespace OpenGridServices.UserServer // Customise the response // Home Location - response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + + response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; @@ -366,395 +98,5 @@ namespace OpenGridServices.UserServer XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000); } - - /// - /// Checks a user against it's password hash - /// - /// The users profile - /// The supplied password - /// Authenticated? - public bool AuthenticateUser(ref UserProfileData profile, string password) - { - OpenSim.Framework.Console.MainConsole.Instance.Verbose( - "Authenticating " + profile.username + " " + profile.surname); - - password = password.Remove(0, 3); //remove $1$ - - string s = Util.Md5Hash(password + ":" + profile.passwordSalt); - - return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); - } - - /// - /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB - /// - /// The users profile - /// The users loginrequest - public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request) - { - Hashtable requestData = (Hashtable)request.Params[0]; - - UserAgentData agent = new UserAgentData(); - - // User connection - agent.agentIP = ""; - agent.agentOnline = true; - agent.agentPort = 0; - - // Generate sessions - RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); - byte[] randDataS = new byte[16]; - byte[] randDataSS = new byte[16]; - rand.GetBytes(randDataS); - rand.GetBytes(randDataSS); - - agent.secureSessionID = new LLUUID(randDataSS, 0); - agent.sessionID = new LLUUID(randDataS, 0); - - // Profile UUID - agent.UUID = profile.UUID; - - // Current position (from Home) - agent.currentHandle = profile.homeRegion; - agent.currentPos = profile.homeLocation; - - // If user specified additional start, use that - if (requestData.ContainsKey("start")) - { - string startLoc = ((string)requestData["start"]).Trim(); - if (!(startLoc == "last" || startLoc == "home")) - { - // Format: uri:Ahern&162&213&34 - try - { - string[] parts = startLoc.Remove(0, 4).Split('&'); - string region = parts[0]; - - //////////////////////////////////////////////////// - //SimProfile SimInfo = new SimProfile(); - //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); - } - catch (Exception e) - { - - } - } - } - - // What time did the user login? - agent.loginTime = Util.UnixTimeSinceEpoch(); - agent.logoutTime = 0; - - // Current location - agent.regionID = new LLUUID(); // Fill in later - agent.currentRegion = new LLUUID(); // Fill in later - - profile.currentAgent = agent; - } - - /// - /// Saves a target agent to the database - /// - /// The users profile - /// Successful? - public bool CommitAgent(ref UserProfileData profile) - { - // Saves the agent to database - return true; - } - - /// - /// Main user login function - /// - /// The XMLRPC request - /// The response to send - public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable requestData = (Hashtable)request.Params[0]; - - bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); - bool GoodLogin = false; - string firstname = ""; - string lastname = ""; - string passwd = ""; - - UserProfileData TheUser; - - if (GoodXML) - { - firstname = (string)requestData["first"]; - lastname = (string)requestData["last"]; - passwd = (string)requestData["passwd"]; - - TheUser = getUserProfile(firstname, lastname); - if (TheUser == null) - return CreateLoginErrorResponse(); - - GoodLogin = AuthenticateUser(ref TheUser, passwd); - } - else - { - return CreateErrorConnectingToGridResponse(); - } - - if (!GoodLogin) - { - return CreateLoginErrorResponse(); - } - else - { - // If we already have a session... - if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline) - { - // Reject the login - return CreateAlreadyLoggedInResponse(); - } - // Otherwise... - // Create a new agent session - CreateAgent(ref TheUser, request); - - try - { - Hashtable responseData = new Hashtable(); - - LLUUID AgentID = TheUser.UUID; - - // Global Texture Section - Hashtable GlobalT = new Hashtable(); - GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271"; - GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; - GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; - ArrayList GlobalTextures = new ArrayList(); - GlobalTextures.Add(GlobalT); - - // Login Flags Section - Hashtable LoginFlagsHash = new Hashtable(); - LoginFlagsHash["daylight_savings"] = "N"; - LoginFlagsHash["stipend_since_login"] = "N"; - LoginFlagsHash["gendered"] = "Y"; // Needs to be combined with below... - LoginFlagsHash["ever_logged_in"] = "Y"; // Should allow male/female av selection - ArrayList LoginFlags = new ArrayList(); - LoginFlags.Add(LoginFlagsHash); - - // UI Customisation Section - Hashtable uiconfig = new Hashtable(); - uiconfig["allow_first_life"] = "Y"; - ArrayList ui_config = new ArrayList(); - ui_config.Add(uiconfig); - - // Classified Categories Section - Hashtable ClassifiedCategoriesHash = new Hashtable(); - ClassifiedCategoriesHash["category_name"] = "Generic"; - ClassifiedCategoriesHash["category_id"] = (Int32)1; - ArrayList ClassifiedCategories = new ArrayList(); - ClassifiedCategories.Add(ClassifiedCategoriesHash); - - // Inventory Library Section - ArrayList AgentInventoryArray = new ArrayList(); - Hashtable TempHash; - - AgentInventory Library = new AgentInventory(); - Library.CreateRootFolder(AgentID, true); - - foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values) - { - TempHash = new Hashtable(); - TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); - TempHash["version"] = (Int32)InvFolder.Version; - TempHash["type_default"] = (Int32)InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); - AgentInventoryArray.Add(TempHash); - } - - Hashtable InventoryRootHash = new Hashtable(); - InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated(); - ArrayList InventoryRoot = new ArrayList(); - InventoryRoot.Add(InventoryRootHash); - - Hashtable InitialOutfitHash = new Hashtable(); - InitialOutfitHash["folder_name"] = "Nightclub Female"; - InitialOutfitHash["gender"] = "female"; - ArrayList InitialOutfit = new ArrayList(); - InitialOutfit.Add(InitialOutfitHash); - - // Circuit Code - uint circode = (uint)(Util.RandomClass.Next()); - - // Generics - responseData["last_name"] = TheUser.surname; - responseData["ui-config"] = ui_config; - responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString(); - responseData["login-flags"] = LoginFlags; - responseData["global-textures"] = GlobalTextures; - responseData["classified_categories"] = ClassifiedCategories; - responseData["event_categories"] = new ArrayList(); - responseData["inventory-skeleton"] = AgentInventoryArray; - responseData["inventory-skel-lib"] = new ArrayList(); - responseData["inventory-root"] = InventoryRoot; - responseData["event_notifications"] = new ArrayList(); - responseData["gestures"] = new ArrayList(); - responseData["inventory-lib-owner"] = new ArrayList(); - responseData["initial-outfit"] = InitialOutfit; - responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; - responseData["start_location"] = "last"; - responseData["home"] = "!!null temporary value {home}!!"; // Overwritten - responseData["message"] = _config.DefaultStartupMsg; - responseData["first_name"] = TheUser.username; - responseData["circuit_code"] = (Int32)circode; - responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port; - responseData["secure_session_id"] = TheUser.currentAgent.secureSessionID.ToStringHyphenated(); - responseData["look_at"] = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; - responseData["agent_id"] = AgentID.ToStringHyphenated(); - responseData["region_y"] = (Int32)0; // Overwritten - responseData["region_x"] = (Int32)0; // Overwritten - responseData["seed_capability"] = ""; - responseData["agent_access"] = "M"; - responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated(); - responseData["login"] = "true"; - - try - { - this.CustomiseResponse(ref responseData, ref TheUser); - } - catch (Exception e) - { - Console.WriteLine(e.ToString()); - return CreateDeadRegionResponse(); - } - - CommitAgent(ref TheUser); - - response.Value = responseData; - // TheUser.SendDataToSim(SimInfo); - return response; - - } - catch (Exception E) - { - Console.WriteLine(E.ToString()); - } - //} - } - return response; - - } - - /// - /// Deletes an active agent session - /// - /// The request - /// The path (eg /bork/narf/test) - /// Parameters sent - /// Success "OK" else error - public string RestDeleteUserSessionMethod(string request, string path, string param) - { - // TODO! Important! - - return "OK"; - } - - /// - /// Returns an error message that the user could not be found in the database - /// - /// XML string consisting of a error element containing individual error(s) - public string CreateUnknownUserErrorResponse() - { - System.IO.StringWriter sw = new System.IO.StringWriter(); - XmlTextWriter xw = new XmlTextWriter(sw); - - // Header - xw.Formatting = Formatting.Indented; - xw.WriteStartDocument(); - xw.WriteDocType("error", null, null, null); - xw.WriteComment("An error occured"); - xw.WriteStartElement("error"); - - // User - xw.WriteElementString("unknownuser", "Unable to find a user with that name"); - - // Footer - xw.WriteEndElement(); - xw.Flush(); - xw.Close(); - - return sw.ToString(); - } - - /// - /// Converts a user profile to an XML element which can be returned - /// - /// The user profile - /// A string containing an XML Document of the user profile - public string ProfileToXml(UserProfileData profile) - { - System.IO.StringWriter sw = new System.IO.StringWriter(); - XmlTextWriter xw = new XmlTextWriter(sw); - - // Header - xw.Formatting = Formatting.Indented; - xw.WriteStartDocument(); - xw.WriteDocType("userprofile", null, null, null); - xw.WriteComment("Found user profiles matching the request"); - xw.WriteStartElement("users"); - - // User - xw.WriteStartElement("user"); - // Account information - xw.WriteAttributeString("firstname", profile.username); - xw.WriteAttributeString("lastname", profile.surname); - xw.WriteAttributeString("uuid", profile.UUID.ToStringHyphenated()); - // Server Information - xw.WriteAttributeString("server_inventory", profile.userInventoryURI); - xw.WriteAttributeString("server_asset", profile.userAssetURI); - // Profile Information - xw.WriteAttributeString("profile_about", profile.profileAboutText); - xw.WriteAttributeString("profile_firstlife_about", profile.profileFirstText); - xw.WriteAttributeString("profile_firstlife_image", profile.profileFirstImage.ToStringHyphenated()); - xw.WriteAttributeString("profile_can_do", profile.profileCanDoMask.ToString()); - xw.WriteAttributeString("profile_want_do", profile.profileWantDoMask.ToString()); - xw.WriteAttributeString("profile_image", profile.profileImage.ToStringHyphenated()); - xw.WriteAttributeString("profile_created",profile.created.ToString()); - xw.WriteAttributeString("profile_lastlogin",profile.lastLogin.ToString()); - // Home region information - xw.WriteAttributeString("home_coordinates", profile.homeLocation.ToString()); - xw.WriteAttributeString("home_region", profile.homeRegion.ToString()); - xw.WriteAttributeString("home_look", profile.homeLookAt.ToString()); - - xw.WriteEndElement(); - - // Footer - xw.WriteEndElement(); - xw.Flush(); - xw.Close(); - - return sw.ToString(); - } - - public string RestGetUserMethodName(string request, string path, string param) - { - UserProfileData userProfile = getUserProfile(param.Trim()); - - if (userProfile == null) - { - return CreateUnknownUserErrorResponse(); - } - - return ProfileToXml(userProfile); - } - - public string RestGetUserMethodUUID(string request, string path, string param) - { - UserProfileData userProfile = getUserProfile(new LLUUID(param)); - - if (userProfile == null) - { - return CreateUnknownUserErrorResponse(); - } - - return ProfileToXml(userProfile); - } - } } diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj index ba50752..a89a38d 100644 --- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj +++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\..\bin\ False False False diff --git a/OpenSim.build b/OpenSim.build index 9eb05c7..a9a5fa5 100644 --- a/OpenSim.build +++ b/OpenSim.build @@ -47,6 +47,9 @@ + + + @@ -66,8 +69,6 @@ - - @@ -76,8 +77,6 @@ - - @@ -90,11 +89,14 @@ + + + + + - - @@ -106,6 +108,9 @@ + + + @@ -125,8 +130,6 @@ - - diff --git a/OpenSim.sln b/OpenSim.sln index 3c2d95b..a3a1051 100644 --- a/OpenSim.sln +++ b/OpenSim.sln @@ -1,7 +1,13 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C# Express 2005 +# Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Communications", "Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj", "{683344D5-0000-0000-0000-000000000000}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data", "Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj", "{62CDF671-0000-0000-0000-000000000000}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.DB4o", "Common\OpenGrid.Framework.Data.DB4o\OpenGrid.Framework.Data.DB4o.csproj", "{39BD9497-0000-0000-0000-000000000000}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.UserManagement", "Common\OpenGrid.Framework.UserManager\OpenGrid.Framework.UserManagement.csproj", "{DA9A7391-0000-0000-0000-000000000000}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\OpenSim\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Caches", "OpenSim\OpenSim.Caches\OpenSim.Caches.csproj", "{1938EB12-0000-0000-0000-000000000000}" @@ -40,112 +46,179 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorag EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApp", "OpenSim\Examples\SimpleApp\SimpleApp.csproj", "{24B12448-0000-0000-0000-000000000000}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApp2", "OpenSim\Examples\SimpleApp2\SimpleApp2.csproj", "{24DF2448-0000-0000-0000-000000000000}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}" EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {683344D5-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {683344D5-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {683344D5-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {683344D5-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {1938EB12-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1938EB12-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1938EB12-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1938EB12-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {79CED992-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79CED992-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79CED992-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79CED992-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {196916AF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {196916AF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {196916AF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {196916AF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {24B12448-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B12448-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B12448-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B12448-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + ({683344D5-0000-0000-0000-000000000000}).1 = ({62CDF671-0000-0000-0000-000000000000}) + ({683344D5-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000}) + ({39BD9497-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).5 = ({E88EF749-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).6 = ({8BB20F0A-0000-0000-0000-000000000000}) + ({DA9A7391-0000-0000-0000-000000000000}).10 = ({8E81D43C-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).3 = ({683344D5-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).4 = ({1938EB12-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).7 = ({E88EF749-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).8 = ({79CED992-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).10 = ({196916AF-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).11 = ({632E1BFD-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).12 = ({8BB20F0A-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).13 = ({2270B8FE-0000-0000-0000-000000000000}) + ({438A9556-0000-0000-0000-000000000000}).16 = ({8E81D43C-0000-0000-0000-000000000000}) + ({1938EB12-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000}) + ({8ACA2445-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000}) + ({8ACA2445-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000}) + ({E88EF749-0000-0000-0000-000000000000}).0 = ({8ACA2445-0000-0000-0000-000000000000}) + ({546099CD-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000}) + ({546099CD-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000}) + ({B55C0B5D-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000}) + ({B55C0B5D-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000}) + ({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000}) + ({79CED992-0000-0000-0000-000000000000}).1 = ({683344D5-0000-0000-0000-000000000000}) + ({79CED992-0000-0000-0000-000000000000}).2 = ({62CDF671-0000-0000-0000-000000000000}) + ({79CED992-0000-0000-0000-000000000000}).3 = ({DA9A7391-0000-0000-0000-000000000000}) + ({79CED992-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000}) + ({4F874463-0000-0000-0000-000000000000}).1 = ({8BE16150-0000-0000-0000-000000000000}) + ({8BE16150-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000}) + ({8BE16150-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000}) + ({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000}) + ({988F0AC4-0000-0000-0000-000000000000}).1 = ({8BE16150-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).3 = ({683344D5-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).4 = ({1938EB12-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).7 = ({E88EF749-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).8 = ({8BE16150-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).9 = ({8BB20F0A-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).10 = ({2270B8FE-0000-0000-0000-000000000000}) + ({196916AF-0000-0000-0000-000000000000}).13 = ({8E81D43C-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).3 = ({1938EB12-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).6 = ({E88EF749-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).9 = ({2270B8FE-0000-0000-0000-000000000000}) + ({632E1BFD-0000-0000-0000-000000000000}).12 = ({8E81D43C-0000-0000-0000-000000000000}) + ({8BB20F0A-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000}) + ({8BB20F0A-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000}) + ({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000}) + ({EE9E5D96-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000}) + ({EE9E5D96-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000}) + ({E1B79ECF-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000}) + ({E1B79ECF-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000}) + ({6B20B603-0000-0000-0000-000000000000}).1 = ({8ACA2445-0000-0000-0000-000000000000}) + ({6B20B603-0000-0000-0000-000000000000}).2 = ({A7CD0630-0000-0000-0000-000000000000}) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {683344D5-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {683344D5-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {683344D5-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {683344D5-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA9A7391-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {1938EB12-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1938EB12-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1938EB12-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1938EB12-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {79CED992-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79CED992-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79CED992-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79CED992-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {196916AF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {196916AF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {196916AF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {196916AF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal diff --git a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs index fb7dc7d..795f99d 100644 --- a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs +++ b/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs @@ -35,21 +35,19 @@ using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; using OpenGrid.Framework.Communications; -using OpenSim.LocalCommunications.LocalUserManagement; namespace OpenSim.LocalCommunications { public class CommunicationsLocal : CommunicationsManager { - public LocalBackEndServices SandBoxManager = new LocalBackEndServices(); - public LocalUserServices UserServices = new LocalUserServices(); + public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); + protected LocalUserServices UserServices = new LocalUserServices(); public CommunicationsLocal() { - UserServer = UserServices; - GridServer = SandBoxManager; - InterRegion = SandBoxManager; + GridServer = SandBoxServices; + InterRegion = SandBoxServices; } } } diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/LocalUserServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/LocalUserServices.cs deleted file mode 100644 index f438117..0000000 --- a/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/LocalUserServices.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using OpenGrid.Framework.Communications; -using OpenSim.Framework.User; - -using libsecondlife; - -namespace OpenSim.LocalCommunications.LocalUserManagement -{ - public class LocalUserServices : IUserServices - { - public UserProfileManager userProfileManager = new UserProfileManager(); - public LocalLoginService localLoginService; - public LocalUserServices() - { - localLoginService = new LocalLoginService(this); - } - - public UserProfile GetUserProfile(string first_name, string last_name) - { - return GetUserProfile(first_name + " " + last_name); - } - - public UserProfile GetUserProfile(string name) - { - return null; - } - public UserProfile GetUserProfile(LLUUID avatar_id) - { - return null; - } - - } -} diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/UserProfileManager.cs b/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/UserProfileManager.cs deleted file mode 100644 index 5f9d028..0000000 --- a/OpenSim/OpenSim.LocalCommunications/LocalUserManagement/UserProfileManager.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using libsecondlife; -using OpenSim.Framework.User; - -namespace OpenSim.LocalCommunications.LocalUserManagement -{ - public class UserProfileManager - { - Dictionary userProfiles = new Dictionary(); - - public UserProfileManager() - { - } - - private LLUUID getUserUUID(string first_name, string last_name) - { - return getUserUUID(first_name + " " + last_name); - } - private LLUUID getUserUUID(string name) - { - return null; - } - - - public UserProfile getUserProfile(string first_name, string last_name) - { - return getUserProfile(first_name + " " + last_name); - } - public UserProfile getUserProfile(string name) - { - return null; - } - public UserProfile getUserProfile(LLUUID user_id) - { - return null; - } - - } -} diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs b/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs new file mode 100644 index 0000000..0fe52a7 --- /dev/null +++ b/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; + +using OpenGrid.Framework.Communications; +using OpenSim.Framework.User; +using OpenGrid.Framework.UserManagement; +using OpenGrid.Framework.Data; + +using libsecondlife; + +namespace OpenSim.LocalCommunications +{ + public class LocalUserServices : UserManagerBase, IUserServices + { + + public LocalUserServices() + { + + } + + public UserProfileData GetUserProfile(string first_name, string last_name) + { + return GetUserProfile(first_name + " " + last_name); + } + + public UserProfileData GetUserProfile(string name) + { + return null; + } + public UserProfileData GetUserProfile(LLUUID avatar_id) + { + return null; + } + + public override void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser) + { + + } + + } +} diff --git a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj index f7c28eb..3cb36da 100644 --- a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj +++ b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj @@ -1,4 +1,4 @@ - + Local 8.0.50727 @@ -6,8 +6,7 @@ {79CED992-0000-0000-0000-000000000000} Debug AnyCPU - - + OpenSim.LocalCommunications @@ -16,11 +15,9 @@ IE50 false Library - - + OpenSim.LocalCommunications - - + @@ -31,8 +28,7 @@ TRACE;DEBUG - - + True 4096 False @@ -41,8 +37,7 @@ False False 4 - - + False @@ -51,8 +46,7 @@ TRACE - - + False 4096 True @@ -61,20 +55,18 @@ False False 4 - - + - + ..\..\bin\libsecondlife.dll False - + System.dll False - - + System.Xml.dll False @@ -84,13 +76,25 @@ OpenGrid.Framework.Communications {683344D5-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False + + + OpenGrid.Framework.Data + {62CDF671-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + OpenGrid.Framework.UserManagement + {DA9A7391-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False OpenSim.Framework {8ACA2445-0000-0000-0000-000000000000} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False @@ -100,9 +104,9 @@ Code - - - + + Code + Code @@ -114,4 +118,4 @@ - \ No newline at end of file + diff --git a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj.user b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj.user index 518ce40..5941547 100644 --- a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj.user +++ b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj.user @@ -2,7 +2,7 @@ Debug AnyCPU - C:\Documents and Settings\Stefan\My Documents\source\opensim\branches\Sugilite\bin\ + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\Sugilite\bin\ 8.0.50727 ProjectFiles 0 diff --git a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build index 2ea6497..2b72e2d 100644 --- a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build +++ b/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build @@ -13,6 +13,7 @@ + @@ -22,6 +23,8 @@ + + diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj index 5f8b0ed..f88eb32 100644 --- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj +++ b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\..\bin\Physics\ False False False diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj b/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj index 22d7786..08f54aa 100644 --- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj +++ b/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\..\bin\Physics\ False False False diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj b/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj index 0cebe66..aa89cc1 100644 --- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj +++ b/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\..\bin\Physics\ False False False diff --git a/OpenSim/OpenSim.Region/OpenSim.Region.csproj b/OpenSim/OpenSim.Region/OpenSim.Region.csproj index 2a5d6ec..94efbed 100644 --- a/OpenSim/OpenSim.Region/OpenSim.Region.csproj +++ b/OpenSim/OpenSim.Region/OpenSim.Region.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\bin\ False False False diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj index 17a651d..63eeb9c 100644 --- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj +++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\bin\ False False False diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj b/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj index 10bc0fd..694521b 100644 --- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj +++ b/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\bin\ False False False diff --git a/OpenSim/OpenSim/OpenSim.csproj b/OpenSim/OpenSim/OpenSim.csproj index df3a32c..fb0e0c1 100644 --- a/OpenSim/OpenSim/OpenSim.csproj +++ b/OpenSim/OpenSim/OpenSim.csproj @@ -50,7 +50,7 @@ False 4096 True - bin\ + ..\..\bin\ False False False diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs index dddcaea..762b9e1 100644 --- a/OpenSim/OpenSim/OpenSimMain.cs +++ b/OpenSim/OpenSim/OpenSimMain.cs @@ -134,7 +134,7 @@ namespace OpenSim { loginServer = new LoginServer(regionData[0].IPListenAddr, regionData[0].IPListenPort, regionData[0].RegionLocX, regionData[0].RegionLocY, false); loginServer.Startup(); - loginServer.SetSessionHandler(sandboxCommunications.SandBoxManager.AddNewSession); + loginServer.SetSessionHandler(sandboxCommunications.SandBoxServices.AddNewSession); //sandbox mode with loginserver not using accounts httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod); } diff --git a/Prebuild/Prebuild.build b/Prebuild/Prebuild.build index c6c4660..395fb31 100644 --- a/Prebuild/Prebuild.build +++ b/Prebuild/Prebuild.build @@ -12,6 +12,13 @@ + + + + + + + diff --git a/Prebuild/Prebuild.sln b/Prebuild/Prebuild.sln index 440c8ba..449896b 100644 --- a/Prebuild/Prebuild.sln +++ b/Prebuild/Prebuild.sln @@ -5,10 +5,13 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {92E80C1C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92E80C1C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92E80C1C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92E80C1C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Prebuild/src/Prebuild.csproj b/Prebuild/src/Prebuild.csproj index bda6129..c8b859c 100644 --- a/Prebuild/src/Prebuild.csproj +++ b/Prebuild/src/Prebuild.csproj @@ -41,6 +41,24 @@ 4 1595 + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\bin\ + False + False + False + 4 + 1595 + System.dll diff --git a/prebuild.xml b/prebuild.xml index 6b25abd..cbe688d 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -33,7 +33,7 @@ - + ../../bin/ @@ -93,7 +93,7 @@ - + @@ -114,58 +114,10 @@ ../../bin/ - - - - - - - - - - - - - - - ../../bin/ - - - - - ../../bin/ - - - - ../../bin/ - - - - - - - - - - - - - - ../../bin/ - - - - - ../../bin/ - - - - ../../bin/ - - - - - + + + + @@ -188,7 +140,7 @@ - + @@ -219,7 +171,7 @@ - + @@ -319,7 +271,7 @@ - + @@ -352,6 +304,11 @@ ../../../bin/Physics/ + + + ../../../bin/Physics/ + + ../../../bin/ @@ -368,6 +325,11 @@ ../../../bin/Physics/ + + + ../../../bin/Physics/ + + ../../../bin/ @@ -385,43 +347,58 @@ ../../../bin/Physics/ + + + ../../../bin/Physics/ + + ../../../bin/ - + - - + + ../../../bin/ + + + ../../../bin/ + + ../../../bin/ - + - - + + ../../bin/ + + + ../../bin/ + + ../../bin/ @@ -436,69 +413,145 @@ - + ../../bin/ + + + ../../bin/ + + ../../bin/ + - - - - - - - - - - - - - + ../../bin/ + + + ../../bin/ + + ../../bin/ + + - - - - - - - - - - + + + + + + + + + ../../bin/ + + + + + ../../bin/ + + + + ../../bin/ + + + + + + + + + + + + + + + + + + + + + + ../../bin/ + + + + + ../../bin/ + + + + ../../bin/ + + + + + - - + ../../bin/ + + + ../../bin/ + + + + ../../bin/ + + + + + + + + + + + + + + + + + + ../../bin/ + + + + + ../../bin/ + + ../../bin/ @@ -509,81 +562,92 @@ + - - - - - - - + - ../../../bin/ + ../../bin/ + + + + + ../../bin/ - ../../../bin/ - - + ../../bin/ - - - + + + + - - + + + - - + + + - + + - ../../../bin/ + ../../bin/ + + + + + ../../bin/ - ../../../bin/ - - + ../../bin/ - - - + + + + - - + + - + + + + + + - - - - - + + + + + TRACE;DEBUG @@ -615,9 +679,9 @@ - - - + + + ../../bin/ @@ -663,7 +727,7 @@ - + ../../bin/ @@ -734,9 +798,9 @@ - - - + + + ../../bin/ @@ -748,19 +812,19 @@ - ../../bin/ - - - - - + ../../bin/ + + + + + - - - + + + - + @@ -773,26 +837,26 @@ - ../../bin/ - - - - - - - - - - - - - - - - + ../../bin/ + + + + + + + + + + + + + + + + - + ../../bin/ @@ -804,20 +868,50 @@ - ../../bin/ - - - - - - - - - + ../../bin/ + + + + + + + + + + + + + + - - - + + + + ../../bin/ + + + + + ../../bin/ + + + + ../../bin/ + + + + + + + + + + + + + + + @@ -831,25 +925,27 @@ ../../bin/ - - ../../bin/ - - - - - - - - - - - - - - - + + ../../bin/ + + + + + + + + + + + + + + + + + @@ -883,6 +979,11 @@ ../../../bin/ + + + ../../../bin/ + + ../../../bin/ @@ -896,9 +997,10 @@ - - - + + + + @@ -910,6 +1012,15 @@ 1595 + + + TRACE + bin/Release + true + false + 1595 + + @@ -921,6 +1032,16 @@ 1595 + + + TRACE + ..\..\bin\ + true + false + Prebuild.snk + 1595 + + ../../bin/ -- cgit v1.1