From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- OpenSim/Data/MySQL/MySQLAssetData.cs | 6 +- OpenSim/Data/MySQL/MySQLEstateData.cs | 26 +++--- OpenSim/Data/MySQL/MySQLGridData.cs | 12 +-- OpenSim/Data/MySQL/MySQLInventoryData.cs | 54 ++++++------ OpenSim/Data/MySQL/MySQLLogData.cs | 2 +- OpenSim/Data/MySQL/MySQLManager.cs | 134 +++++++++++++++--------------- OpenSim/Data/MySQL/MySQLRegionData.cs | 138 +++++++++++++++---------------- OpenSim/Data/MySQL/MySQLUserData.cs | 62 +++++++------- 8 files changed, 217 insertions(+), 217 deletions(-) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 08a8c6e..5c58a4b 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using MySql.Data.MySqlClient; using OpenSim.Framework; @@ -116,7 +116,7 @@ namespace OpenSim.Data.MySQL /// Asset UUID to fetch /// Return the asset /// On failure : throw an exception and attempt to reconnect to database - override public AssetBase FetchAsset(LLUUID assetID) + override public AssetBase FetchAsset(UUID assetID) { AssetBase asset = null; lock (_dbConnection) @@ -223,7 +223,7 @@ namespace OpenSim.Data.MySQL /// /// The asset UUID /// true if exist. - override public bool ExistsAsset(LLUUID uuid) + override public bool ExistsAsset(UUID uuid) { bool assetExists = false; diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 2ab7d40..8eddec6 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -31,7 +31,7 @@ using System.Data; using System.IO; using System.Reflection; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using MySql.Data.MySqlClient; using OpenSim.Framework; @@ -157,7 +157,7 @@ namespace OpenSim.Data.MySQL m_lastConnectionUse = timeNow; } - public EstateSettings LoadEstateSettings(LLUUID regionID) + public EstateSettings LoadEstateSettings(UUID regionID) { EstateSettings es = new EstateSettings(); es.OnSave += StoreEstateSettings; @@ -185,11 +185,11 @@ namespace OpenSim.Data.MySQL else m_FieldMap[name].SetValue(es, false); } - else if (m_FieldMap[name].GetValue(es) is libsecondlife.LLUUID) + else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID) { - LLUUID uuid = LLUUID.Zero; + UUID uuid = UUID.Zero; - LLUUID.TryParse(r[name].ToString(), out uuid); + UUID.TryParse(r[name].ToString(), out uuid); m_FieldMap[name].SetValue(es, uuid); } else @@ -330,8 +330,8 @@ namespace OpenSim.Data.MySQL { EstateBan eb = new EstateBan(); - LLUUID uuid = new LLUUID(); - LLUUID.TryParse(r["bannedUUID"].ToString(), out uuid); + UUID uuid = new UUID(); + UUID.TryParse(r["bannedUUID"].ToString(), out uuid); eb.bannedUUID = uuid; eb.bannedIP = "0.0.0.0"; @@ -366,7 +366,7 @@ namespace OpenSim.Data.MySQL } } - void SaveUUIDList(uint EstateID, string table, LLUUID[] data) + void SaveUUIDList(uint EstateID, string table, UUID[] data) { CheckConnection(); @@ -381,7 +381,7 @@ namespace OpenSim.Data.MySQL cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )"; - foreach (LLUUID uuid in data) + foreach (UUID uuid in data) { cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString()); cmd.Parameters.AddWithValue("?uuid", uuid.ToString()); @@ -391,9 +391,9 @@ namespace OpenSim.Data.MySQL } } - LLUUID[] LoadUUIDList(uint EstateID, string table) + UUID[] LoadUUIDList(uint EstateID, string table) { - List uuids = new List(); + List uuids = new List(); CheckConnection(); @@ -408,8 +408,8 @@ namespace OpenSim.Data.MySQL { // EstateBan eb = new EstateBan(); - LLUUID uuid = new LLUUID(); - LLUUID.TryParse(r["uuid"].ToString(), out uuid); + UUID uuid = new UUID(); + UUID.TryParse(r["uuid"].ToString(), out uuid); uuids.Add(uuid); } diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 9dc3d18..fa5b33c 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; @@ -121,7 +121,7 @@ namespace OpenSim.Data.MySQL } else { - m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); + m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.Xml and we'll use that instead"); IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); @@ -322,7 +322,7 @@ namespace OpenSim.Data.MySQL /// /// The region UUID /// The sim profile - override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) + override public RegionProfileData GetProfileByUUID(UUID uuid) { MySQLSuperManager dbm = GetLockedConnection(); @@ -458,14 +458,14 @@ namespace OpenSim.Data.MySQL /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - override public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) + override public bool AuthenticateSim(UUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 if (throwHissyFit) throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); - RegionProfileData data = GetProfileByLLUUID(uuid); + RegionProfileData data = GetProfileByUUID(uuid); return (handle == data.regionHandle && authkey == data.regionSecret); } @@ -479,7 +479,7 @@ namespace OpenSim.Data.MySQL /// /// /// - public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(UUID uuid, ulong handle, string authhash, string challenge) { // SHA512Managed HashProvider = new SHA512Managed(); // Encoding TextProvider = new UTF8Encoding(); diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index fe2d393..50d3cc7 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using MySql.Data.MySqlClient; using OpenSim.Framework; @@ -125,7 +125,7 @@ namespace OpenSim.Data.MySQL /// /// The folder to search /// A list containing inventory items - public List getInventoryInFolder(LLUUID folderID) + public List getInventoryInFolder(UUID folderID) { try { @@ -163,7 +163,7 @@ namespace OpenSim.Data.MySQL /// /// The user whos inventory is to be searched /// A list of folder objects - public List getUserRootFolders(LLUUID user) + public List getUserRootFolders(UUID user) { try { @@ -176,7 +176,7 @@ namespace OpenSim.Data.MySQL "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", database.Connection); result.Parameters.AddWithValue("?uuid", user.ToString()); - result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); + result.Parameters.AddWithValue("?zero", UUID.Zero.ToString()); MySqlDataReader reader = result.ExecuteReader(); List items = new List(); @@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL /// /// The user UUID /// - public InventoryFolderBase getUserRootFolder(LLUUID user) + public InventoryFolderBase getUserRootFolder(UUID user) { try { @@ -217,7 +217,7 @@ namespace OpenSim.Data.MySQL "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", database.Connection); result.Parameters.AddWithValue("?uuid", user.ToString()); - result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); + result.Parameters.AddWithValue("?zero", UUID.Zero.ToString()); MySqlDataReader reader = result.ExecuteReader(); @@ -258,7 +258,7 @@ namespace OpenSim.Data.MySQL /// /// The folder to search /// A list of inventory folders - public List getInventoryFolders(LLUUID parentID) + public List getInventoryFolders(UUID parentID) { try { @@ -302,23 +302,23 @@ namespace OpenSim.Data.MySQL { InventoryItemBase item = new InventoryItemBase(); - item.ID = new LLUUID((string) reader["inventoryID"]); - item.AssetID = new LLUUID((string) reader["assetID"]); + item.ID = new UUID((string) reader["inventoryID"]); + item.AssetID = new UUID((string) reader["assetID"]); item.AssetType = (int) reader["assetType"]; - item.Folder = new LLUUID((string) reader["parentFolderID"]); - item.Owner = new LLUUID((string) reader["avatarID"]); + item.Folder = new UUID((string) reader["parentFolderID"]); + item.Owner = new UUID((string) reader["avatarID"]); item.Name = (string) reader["inventoryName"]; item.Description = (string) reader["inventoryDescription"]; item.NextPermissions = (uint) reader["inventoryNextPermissions"]; item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; item.InvType = (int) reader["invType"]; - item.Creator = new LLUUID((string) reader["creatorID"]); + item.Creator = new UUID((string) reader["creatorID"]); item.BasePermissions = (uint) reader["inventoryBasePermissions"]; item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; item.SalePrice = (int) reader["salePrice"]; item.SaleType = Convert.ToByte(reader["saleType"]); item.CreationDate = (int) reader["creationDate"]; - item.GroupID = new LLUUID(reader["groupID"].ToString()); + item.GroupID = new UUID(reader["groupID"].ToString()); item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); item.Flags = (uint) reader["flags"]; @@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL /// /// The item to return /// An inventory item - public InventoryItemBase getInventoryItem(LLUUID itemID) + public InventoryItemBase getInventoryItem(UUID itemID) { try { @@ -378,9 +378,9 @@ namespace OpenSim.Data.MySQL try { InventoryFolderBase folder = new InventoryFolderBase(); - folder.Owner = new LLUUID((string) reader["agentID"]); - folder.ParentID = new LLUUID((string) reader["parentFolderID"]); - folder.ID = new LLUUID((string) reader["folderID"]); + folder.Owner = new UUID((string) reader["agentID"]); + folder.ParentID = new UUID((string) reader["parentFolderID"]); + folder.ID = new UUID((string) reader["folderID"]); folder.Name = (string) reader["folderName"]; folder.Type = (short) reader["type"]; folder.Version = (ushort) ((int) reader["version"]); @@ -400,7 +400,7 @@ namespace OpenSim.Data.MySQL /// /// The folder to return /// A folder class - public InventoryFolderBase getInventoryFolder(LLUUID folderID) + public InventoryFolderBase getInventoryFolder(UUID folderID) { try { @@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL /// Detele the specified inventory item /// /// The inventory item UUID to delete - public void deleteInventoryItem(LLUUID itemID) + public void deleteInventoryItem(UUID itemID) { try { @@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL /// /// list where folders will be appended /// ID of parent - protected void getInventoryFolders(ref List folders, LLUUID parentID) + protected void getInventoryFolders(ref List folders, UUID parentID) { List subfolderList = getInventoryFolders(parentID); @@ -610,7 +610,7 @@ namespace OpenSim.Data.MySQL /// /// /// - public List getFolderHierarchy(LLUUID parentID) + public List getFolderHierarchy(UUID parentID) { /* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one * - We will only need to hit the database twice instead of n times. @@ -631,8 +631,8 @@ namespace OpenSim.Data.MySQL try { List folders = new List(); - Dictionary> hashtable - = new Dictionary>(); ; + Dictionary> hashtable + = new Dictionary>(); ; List parentFolder = new List(); lock (database) { @@ -655,7 +655,7 @@ namespace OpenSim.Data.MySQL if (parentFolder.Count >= 1) // No result means parent folder does not exist { - if (parentFolder[0].ParentID == LLUUID.Zero) // We are querying the root folder + if (parentFolder[0].ParentID == UUID.Zero) // We are querying the root folder { /* Get all of the agent's folders from the database, put them in a list and return it */ result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE agentID = ?uuid", @@ -728,7 +728,7 @@ namespace OpenSim.Data.MySQL /// Delete a folder from database /// /// the folder UUID - protected void deleteOneFolder(LLUUID folderID) + protected void deleteOneFolder(UUID folderID) { try { @@ -754,7 +754,7 @@ namespace OpenSim.Data.MySQL /// Delete all item in a folder /// /// the folder UUID - protected void deleteItemsInFolder(LLUUID folderID) + protected void deleteItemsInFolder(UUID folderID) { try { @@ -780,7 +780,7 @@ namespace OpenSim.Data.MySQL /// Deletes an inventory folder /// /// Id of folder to delete - public void deleteInventoryFolder(LLUUID folderID) + public void deleteInventoryFolder(UUID folderID) { List subFolders = getFolderHierarchy(folderID); diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs index c02016c..07ef916 100644 --- a/OpenSim/Data/MySQL/MySQLLogData.cs +++ b/OpenSim/Data/MySQL/MySQLLogData.cs @@ -63,7 +63,7 @@ namespace OpenSim.Data.MySQL } else { - m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); + m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.Xml and we'll use that instead"); IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index e863216..6048f93 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -31,7 +31,7 @@ using System.Collections; using System.Data; using System.IO; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using MySql.Data.MySqlClient; using OpenSim.Framework; @@ -384,8 +384,8 @@ namespace OpenSim.Data.MySQL { retval.regionHandle = tmp64; } - LLUUID tmp_uuid; - if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) + UUID tmp_uuid; + if (!UUID.TryParse((string)reader["uuid"], out tmp_uuid)) { return null; } @@ -396,7 +396,7 @@ namespace OpenSim.Data.MySQL // non-critical parts retval.regionName = (string)reader["regionName"]; - retval.originUUID = new LLUUID((string) reader["originUUID"]); + retval.originUUID = new UUID((string) reader["originUUID"]); // Secrets retval.regionRecvKey = (string) reader["regionRecvKey"]; @@ -434,8 +434,8 @@ namespace OpenSim.Data.MySQL retval.regionUserSendKey = (string) reader["regionUserSendKey"]; // World Map Addition - LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); - LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); + UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); + UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); } else { @@ -463,8 +463,8 @@ namespace OpenSim.Data.MySQL retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString()); retval.reservationName = (string) reader["resName"]; retval.status = Convert.ToInt32(reader["status"].ToString()) == 1; - LLUUID tmp; - LLUUID.TryParse((string) reader["userUUID"], out tmp); + UUID tmp; + UUID.TryParse((string) reader["userUUID"], out tmp); retval.userUUID = tmp; } else @@ -486,15 +486,15 @@ namespace OpenSim.Data.MySQL if (reader.Read()) { // Agent IDs - LLUUID tmp; - if (!LLUUID.TryParse((string)reader["UUID"], out tmp)) + UUID tmp; + if (!UUID.TryParse((string)reader["UUID"], out tmp)) return null; retval.ProfileID = tmp; - LLUUID.TryParse((string) reader["sessionID"], out tmp); + UUID.TryParse((string) reader["sessionID"], out tmp); retval.SessionID = tmp; - LLUUID.TryParse((string)reader["secureSessionID"], out tmp); + UUID.TryParse((string)reader["secureSessionID"], out tmp); retval.SecureSessionID = tmp; // Agent Who? @@ -507,10 +507,10 @@ namespace OpenSim.Data.MySQL retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); // Current position - retval.Region = new LLUUID((string)reader["currentRegion"]); + retval.Region = new UUID((string)reader["currentRegion"]); retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); - LLVector3 tmp_v; - LLVector3.TryParse((string) reader["currentPos"], out tmp_v); + Vector3 tmp_v; + Vector3.TryParse((string) reader["currentPos"], out tmp_v); retval.Position = tmp_v; } else @@ -531,8 +531,8 @@ namespace OpenSim.Data.MySQL if (reader.Read()) { - LLUUID id; - if (!LLUUID.TryParse((string)reader["UUID"], out id)) + UUID id; + if (!UUID.TryParse((string)reader["UUID"], out id)) return null; retval.ID = id; @@ -543,17 +543,17 @@ namespace OpenSim.Data.MySQL retval.PasswordSalt = (string) reader["passwordSalt"]; retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); - retval.HomeLocation = new LLVector3( + retval.HomeLocation = new Vector3( Convert.ToSingle(reader["homeLocationX"].ToString()), Convert.ToSingle(reader["homeLocationY"].ToString()), Convert.ToSingle(reader["homeLocationZ"].ToString())); - retval.HomeLookAt = new LLVector3( + retval.HomeLookAt = new Vector3( Convert.ToSingle(reader["homeLookAtX"].ToString()), Convert.ToSingle(reader["homeLookAtY"].ToString()), Convert.ToSingle(reader["homeLookAtZ"].ToString())); - LLUUID regionID = LLUUID.Zero; - LLUUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero + UUID regionID = UUID.Zero; + UUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use UUID.Zero retval.HomeRegionID = regionID; retval.Created = Convert.ToInt32(reader["created"].ToString()); @@ -576,29 +576,29 @@ namespace OpenSim.Data.MySQL retval.FirstLifeAboutText = (string)reader["profileFirstText"]; if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) - retval.Image = LLUUID.Zero; + retval.Image = UUID.Zero; else { - LLUUID tmp; - LLUUID.TryParse((string)reader["profileImage"], out tmp); + UUID tmp; + UUID.TryParse((string)reader["profileImage"], out tmp); retval.Image = tmp; } if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) - retval.FirstLifeImage = LLUUID.Zero; + retval.FirstLifeImage = UUID.Zero; else { - LLUUID tmp; - LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); + UUID tmp; + UUID.TryParse((string)reader["profileFirstImage"], out tmp); retval.FirstLifeImage = tmp; } if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) { - retval.WebLoginKey = LLUUID.Zero; + retval.WebLoginKey = UUID.Zero; } else { - LLUUID tmp; - LLUUID.TryParse((string)reader["webLoginKey"], out tmp); + UUID tmp; + UUID.TryParse((string)reader["webLoginKey"], out tmp); retval.WebLoginKey = tmp; } @@ -611,12 +611,12 @@ namespace OpenSim.Data.MySQL if (reader.IsDBNull(reader.GetOrdinal("partner"))) { - retval.Partner = LLUUID.Zero; + retval.Partner = UUID.Zero; } else { - LLUUID tmp; - LLUUID.TryParse((string)reader["partner"], out tmp); + UUID tmp; + UUID.TryParse((string)reader["partner"], out tmp); retval.Partner = tmp; } } @@ -638,37 +638,37 @@ namespace OpenSim.Data.MySQL if (reader.Read()) { appearance = new AvatarAppearance(); - appearance.Owner = new LLUUID((string)reader["owner"]); + appearance.Owner = new UUID((string)reader["owner"]); appearance.Serial = Convert.ToInt32(reader["serial"]); appearance.VisualParams = (byte[])reader["visual_params"]; - appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); + appearance.Texture = new Primitive.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); - appearance.BodyItem = new LLUUID((string)reader["body_item"]); - appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); - appearance.SkinItem = new LLUUID((string)reader["skin_item"]); - appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); - appearance.HairItem = new LLUUID((string)reader["hair_item"]); - appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); - appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); - appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); - appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); - appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); - appearance.PantsItem = new LLUUID((string)reader["pants_item"]); - appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); - appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); - appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); - appearance.SocksItem = new LLUUID((string)reader["socks_item"]); - appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); - appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); - appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); - appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); - appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); - appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); - appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); - appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); - appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); - appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); - appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); + appearance.BodyItem = new UUID((string)reader["body_item"]); + appearance.BodyAsset = new UUID((string)reader["body_asset"]); + appearance.SkinItem = new UUID((string)reader["skin_item"]); + appearance.SkinAsset = new UUID((string)reader["skin_asset"]); + appearance.HairItem = new UUID((string)reader["hair_item"]); + appearance.HairAsset = new UUID((string)reader["hair_asset"]); + appearance.EyesItem = new UUID((string)reader["eyes_item"]); + appearance.EyesAsset = new UUID((string)reader["eyes_asset"]); + appearance.ShirtItem = new UUID((string)reader["shirt_item"]); + appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]); + appearance.PantsItem = new UUID((string)reader["pants_item"]); + appearance.PantsAsset = new UUID((string)reader["pants_asset"]); + appearance.ShoesItem = new UUID((string)reader["shoes_item"]); + appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]); + appearance.SocksItem = new UUID((string)reader["socks_item"]); + appearance.SocksAsset = new UUID((string)reader["socks_asset"]); + appearance.JacketItem = new UUID((string)reader["jacket_item"]); + appearance.JacketAsset = new UUID((string)reader["jacket_asset"]); + appearance.GlovesItem = new UUID((string)reader["gloves_item"]); + appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]); + appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]); + appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]); + appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]); + appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]); + appearance.SkirtItem = new UUID((string)reader["skirt_item"]); + appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]); } return appearance; } @@ -766,12 +766,12 @@ namespace OpenSim.Data.MySQL /// UUID for firstlife image /// Ignored /// Success? - public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, + public bool insertUserRow(UUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText, - LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) + UUID profileImage, UUID firstImage, UUID webLoginKey) { m_log.Debug("[MySQLManager]: Fetching profile for " + uuid.ToString()); string sql = @@ -867,12 +867,12 @@ namespace OpenSim.Data.MySQL /// UUID for firstlife image /// UUID for weblogin Key /// Success? - public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, - string passwordSalt, UInt64 homeRegion, LLUUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, + public bool updateUserRow(UUID uuid, string username, string lastname, string passwordHash, + string passwordSalt, UInt64 homeRegion, UUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText, - LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey, int userFlags, int godLevel, string customType, LLUUID partner) + UUID profileImage, UUID firstImage, UUID webLoginKey, int userFlags, int godLevel, string customType, UUID partner) { string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; @@ -1211,7 +1211,7 @@ namespace OpenSim.Data.MySQL } - public void writeAttachments(LLUUID agentID, Hashtable data) + public void writeAttachments(UUID agentID, Hashtable data) { string sql = "delete from avatarattachments where UUID = ?uuid"; diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 903f022..9552ba1 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -31,7 +31,7 @@ using System.Data; using System.IO; using System.Reflection; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using MySql.Data.MySqlClient; using OpenSim.Framework; @@ -296,15 +296,15 @@ namespace OpenSim.Data.MySQL /// /// The object /// The region UUID - public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) + public void StoreObject(SceneObjectGroup obj, UUID regionUUID) { lock (m_dataSet) { foreach (SceneObjectPart prim in obj.Children.Values) { - if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 - && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 - && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) + if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0 + && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0 + && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0) { //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); addPrim(prim, obj.UUID, regionUUID); @@ -323,9 +323,9 @@ namespace OpenSim.Data.MySQL /// /// The object /// The Region UUID - public void RemoveObject(LLUUID obj, LLUUID regionUUID) + public void RemoveObject(UUID obj, UUID regionUUID) { - m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); + m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj, regionUUID); DataTable prims = m_primTable; DataTable shapes = m_shapeTable; @@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL foreach (DataRow row in primRows) { // Remove shapes row - LLUUID uuid = new LLUUID((string) row["UUID"]); + UUID uuid = new UUID((string) row["UUID"]); DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); if (shapeRow != null) { @@ -358,7 +358,7 @@ namespace OpenSim.Data.MySQL /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. /// /// the Item UUID - private void RemoveItems(LLUUID uuid) + private void RemoveItems(UUID uuid) { String sql = String.Format("primID = '{0}'", uuid); DataRow[] itemRows = m_itemsTable.Select(sql); @@ -374,9 +374,9 @@ namespace OpenSim.Data.MySQL /// /// the Region UUID /// List of loaded groups - public List LoadObjects(LLUUID regionUUID) + public List LoadObjects(UUID regionUUID) { - Dictionary createdObjects = new Dictionary(); + Dictionary createdObjects = new Dictionary(); List retvals = new List(); @@ -436,7 +436,7 @@ namespace OpenSim.Data.MySQL "No shape found for prim in storage, so setting default box shape"); prim.Shape = PrimitiveBaseShape.Default; } - createdObjects[new LLUUID(objID)].AddPart(prim); + createdObjects[new UUID(objID)].AddPart(prim); } LoadItems(prim); @@ -497,7 +497,7 @@ namespace OpenSim.Data.MySQL /// /// HeightField data /// region UUID - public void StoreTerrain(double[,] ter, LLUUID regionID) + public void StoreTerrain(double[,] ter, UUID regionID) { int revision = 1; m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); @@ -527,7 +527,7 @@ namespace OpenSim.Data.MySQL /// /// the region UUID /// Heightfield data - public double[,] LoadTerrain(LLUUID regionID) + public double[,] LoadTerrain(UUID regionID) { double[,] terret = new double[256,256]; terret.Initialize(); @@ -583,7 +583,7 @@ namespace OpenSim.Data.MySQL /// /// /// - public void RemoveLandObject(LLUUID globalID) + public void RemoveLandObject(UUID globalID) { lock (m_dataSet) { @@ -646,7 +646,7 @@ namespace OpenSim.Data.MySQL } } - public RegionSettings LoadRegionSettings(LLUUID regionUUID) + public RegionSettings LoadRegionSettings(UUID regionUUID) { lock (m_dataSet) { @@ -701,7 +701,7 @@ namespace OpenSim.Data.MySQL /// /// /// - public List LoadLandObjects(LLUUID regionUUID) + public List LoadLandObjects(UUID regionUUID) { List landDataForRegion = new List(); lock (m_dataSet) @@ -1101,7 +1101,7 @@ namespace OpenSim.Data.MySQL private SceneObjectPart buildPrim(DataRow row) { SceneObjectPart prim = new SceneObjectPart(); - prim.UUID = new LLUUID((String) row["UUID"]); + prim.UUID = new UUID((String) row["UUID"]); // explicit conversion of integers is required, which sort // of sucks. No idea if there is a shortcut here or not. prim.ParentID = Convert.ToUInt32(row["ParentID"]); @@ -1114,54 +1114,54 @@ namespace OpenSim.Data.MySQL prim.TouchName = (String) row["TouchName"]; // permissions prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); - prim.CreatorID = new LLUUID((String) row["CreatorID"]); - prim.OwnerID = new LLUUID((String) row["OwnerID"]); - prim.GroupID = new LLUUID((String) row["GroupID"]); - prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); + prim.CreatorID = new UUID((String) row["CreatorID"]); + prim.OwnerID = new UUID((String) row["OwnerID"]); + prim.GroupID = new UUID((String) row["GroupID"]); + prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); // vectors - prim.OffsetPosition = new LLVector3( + prim.OffsetPosition = new Vector3( Convert.ToSingle(row["PositionX"]), Convert.ToSingle(row["PositionY"]), Convert.ToSingle(row["PositionZ"]) ); - prim.GroupPosition = new LLVector3( + prim.GroupPosition = new Vector3( Convert.ToSingle(row["GroupPositionX"]), Convert.ToSingle(row["GroupPositionY"]), Convert.ToSingle(row["GroupPositionZ"]) ); - prim.Velocity = new LLVector3( + prim.Velocity = new Vector3( Convert.ToSingle(row["VelocityX"]), Convert.ToSingle(row["VelocityY"]), Convert.ToSingle(row["VelocityZ"]) ); - prim.AngularVelocity = new LLVector3( + prim.AngularVelocity = new Vector3( Convert.ToSingle(row["AngularVelocityX"]), Convert.ToSingle(row["AngularVelocityY"]), Convert.ToSingle(row["AngularVelocityZ"]) ); - prim.Acceleration = new LLVector3( + prim.Acceleration = new Vector3( Convert.ToSingle(row["AccelerationX"]), Convert.ToSingle(row["AccelerationY"]), Convert.ToSingle(row["AccelerationZ"]) ); // quaternions - prim.RotationOffset = new LLQuaternion( + prim.RotationOffset = new Quaternion( Convert.ToSingle(row["RotationX"]), Convert.ToSingle(row["RotationY"]), Convert.ToSingle(row["RotationZ"]), Convert.ToSingle(row["RotationW"]) ); - prim.SitTargetPositionLL = new LLVector3( + prim.SitTargetPositionLL = new Vector3( Convert.ToSingle(row["SitTargetOffsetX"]), Convert.ToSingle(row["SitTargetOffsetY"]), Convert.ToSingle(row["SitTargetOffsetZ"]) ); - prim.SitTargetOrientationLL = new LLQuaternion( + prim.SitTargetOrientationLL = new Quaternion( Convert.ToSingle(row["SitTargetOrientX"]), Convert.ToSingle(row["SitTargetOrientY"]), Convert.ToSingle(row["SitTargetOrientZ"]), @@ -1174,14 +1174,14 @@ namespace OpenSim.Data.MySQL prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); - prim.Sound = new LLUUID(row["LoopedSound"].ToString()); + prim.Sound = new UUID(row["LoopedSound"].ToString()); prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); prim.SoundFlags = 1; // If it's persisted at all, it's looped if (!row.IsNull("TextureAnimation")) prim.TextureAnimation = (Byte[])row["TextureAnimation"]; - prim.RotationalVelocity = new LLVector3( + prim.RotationalVelocity = new Vector3( Convert.ToSingle(row["OmegaX"]), Convert.ToSingle(row["OmegaY"]), Convert.ToSingle(row["OmegaZ"]) @@ -1190,13 +1190,13 @@ namespace OpenSim.Data.MySQL // TODO: Rotation // OmegaX, OmegaY, OmegaZ - prim.SetCameraEyeOffset(new LLVector3( + prim.SetCameraEyeOffset(new Vector3( Convert.ToSingle(row["CameraEyeOffsetX"]), Convert.ToSingle(row["CameraEyeOffsetY"]), Convert.ToSingle(row["CameraEyeOffsetZ"]) )); - prim.SetCameraAtOffset(new LLVector3( + prim.SetCameraAtOffset(new Vector3( Convert.ToSingle(row["CameraAtOffsetX"]), Convert.ToSingle(row["CameraAtOffsetY"]), Convert.ToSingle(row["CameraAtOffsetZ"]) @@ -1229,10 +1229,10 @@ namespace OpenSim.Data.MySQL { TaskInventoryItem taskItem = new TaskInventoryItem(); - taskItem.ItemID = new LLUUID((String)row["itemID"]); - taskItem.ParentPartID = new LLUUID((String)row["primID"]); - taskItem.AssetID = new LLUUID((String)row["assetID"]); - taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); + taskItem.ItemID = new UUID((String)row["itemID"]); + taskItem.ParentPartID = new UUID((String)row["primID"]); + taskItem.AssetID = new UUID((String)row["assetID"]); + taskItem.ParentID = new UUID((String)row["parentFolderID"]); taskItem.InvType = Convert.ToInt32(row["invType"]); taskItem.Type = Convert.ToInt32(row["assetType"]); @@ -1240,10 +1240,10 @@ namespace OpenSim.Data.MySQL taskItem.Name = (String)row["name"]; taskItem.Description = (String)row["description"]; taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); - taskItem.CreatorID = new LLUUID((String)row["creatorID"]); - taskItem.OwnerID = new LLUUID((String)row["ownerID"]); - taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); - taskItem.GroupID = new LLUUID((String)row["groupID"]); + taskItem.CreatorID = new UUID((String)row["creatorID"]); + taskItem.OwnerID = new UUID((String)row["ownerID"]); + taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); + taskItem.GroupID = new UUID((String)row["groupID"]); taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); @@ -1259,7 +1259,7 @@ namespace OpenSim.Data.MySQL { RegionSettings newSettings = new RegionSettings(); - newSettings.RegionUUID = new LLUUID((string) row["regionUUID"]); + newSettings.RegionUUID = new UUID((string) row["regionUUID"]); newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); @@ -1273,10 +1273,10 @@ namespace OpenSim.Data.MySQL newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); - newSettings.TerrainTexture1 = new LLUUID((String) row["terrain_texture_1"]); - newSettings.TerrainTexture2 = new LLUUID((String) row["terrain_texture_2"]); - newSettings.TerrainTexture3 = new LLUUID((String) row["terrain_texture_3"]); - newSettings.TerrainTexture4 = new LLUUID((String) row["terrain_texture_4"]); + newSettings.TerrainTexture1 = new UUID((String) row["terrain_texture_1"]); + newSettings.TerrainTexture2 = new UUID((String) row["terrain_texture_2"]); + newSettings.TerrainTexture3 = new UUID((String) row["terrain_texture_3"]); + newSettings.TerrainTexture4 = new UUID((String) row["terrain_texture_4"]); newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); @@ -1292,7 +1292,7 @@ namespace OpenSim.Data.MySQL newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); - newSettings.Covenant = new LLUUID((String) row["covenant"]); + newSettings.Covenant = new UUID((String) row["covenant"]); return newSettings; } @@ -1306,7 +1306,7 @@ namespace OpenSim.Data.MySQL { LandData newData = new LandData(); - newData.GlobalID = new LLUUID((String) row["UUID"]); + newData.GlobalID = new UUID((String) row["UUID"]); newData.LocalID = Convert.ToInt32(row["LocalLandID"]); // Bitmap is a byte[512] @@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL //Enum libsecondlife.Parcel.ParcelCategory newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); - newData.GroupID = new LLUUID((String) row["GroupUUID"]); + newData.GroupID = new UUID((String) row["GroupUUID"]); newData.SalePrice = Convert.ToInt32(row["SalePrice"]); newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); //Enum. libsecondlife.Parcel.ParcelStatus newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.LandingType = Convert.ToByte(row["LandingType"]); newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); - newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); + newData.MediaID = new UUID((String) row["MediaTextureUUID"]); newData.MediaURL = (String) row["MediaURL"]; newData.MusicURL = (String) row["MusicURL"]; newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]); - LLUUID authedbuyer = LLUUID.Zero; - LLUUID snapshotID = LLUUID.Zero; + UUID authedbuyer = UUID.Zero; + UUID snapshotID = UUID.Zero; - Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer); - Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID); + UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer); + UUID.TryParse((string)row["SnapshotUUID"], out snapshotID); newData.AuthBuyerID = authedbuyer; newData.SnapshotID = snapshotID; try { newData.UserLocation = - new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), + new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), Convert.ToSingle(row["UserLocationZ"])); newData.UserLookAt = - new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), + new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), Convert.ToSingle(row["UserLookAtZ"])); } catch (InvalidCastException) { - newData.UserLocation = LLVector3.Zero; - newData.UserLookAt = LLVector3.Zero; + newData.UserLocation = Vector3.Zero; + newData.UserLookAt = Vector3.Zero; m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); } @@ -1371,7 +1371,7 @@ namespace OpenSim.Data.MySQL private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); - entry.AgentID = new LLUUID((string) row["AccessUUID"]); + entry.AgentID = new UUID((string) row["AccessUUID"]); entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); entry.Time = new DateTime(); return entry; @@ -1408,7 +1408,7 @@ namespace OpenSim.Data.MySQL /// /// /// - private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) + private void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) { row["UUID"] = Util.ToRawUuidString(prim.UUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID); @@ -1456,12 +1456,12 @@ namespace OpenSim.Data.MySQL row["RotationW"] = prim.RotationOffset.W; // Sit target - LLVector3 sitTargetPos = prim.SitTargetPositionLL; + Vector3 sitTargetPos = prim.SitTargetPositionLL; row["SitTargetOffsetX"] = sitTargetPos.X; row["SitTargetOffsetY"] = sitTargetPos.Y; row["SitTargetOffsetZ"] = sitTargetPos.Z; - LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; + Quaternion sitTargetOrient = prim.SitTargetOrientationLL; row["SitTargetOrientW"] = sitTargetOrient.W; row["SitTargetOrientX"] = sitTargetOrient.X; row["SitTargetOrientY"] = sitTargetOrient.Y; @@ -1480,7 +1480,7 @@ namespace OpenSim.Data.MySQL } else { - row["LoopedSound"] = LLUUID.Zero; + row["LoopedSound"] = UUID.Zero; row["LoopedSoundGain"] = 0.0f; } @@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL /// /// /// - private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) + private static void fillLandRow(DataRow row, LandData land, UUID regionUUID) { row["UUID"] = Util.ToRawUuidString(land.GlobalID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID); @@ -1642,7 +1642,7 @@ namespace OpenSim.Data.MySQL /// /// /// - private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) + private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID) { row["LandUUID"] = Util.ToRawUuidString(parcelID); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); @@ -1657,7 +1657,7 @@ namespace OpenSim.Data.MySQL private PrimitiveBaseShape buildShape(DataRow row) { PrimitiveBaseShape s = new PrimitiveBaseShape(); - s.Scale = new LLVector3( + s.Scale = new Vector3( Convert.ToSingle(row["ScaleX"]), Convert.ToSingle(row["ScaleY"]), Convert.ToSingle(row["ScaleZ"]) @@ -1778,7 +1778,7 @@ namespace OpenSim.Data.MySQL /// /// /// - private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) + private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) { lock (m_dataSet) { @@ -1816,7 +1816,7 @@ namespace OpenSim.Data.MySQL /// /// /// - public void StorePrimInventory(LLUUID primID, ICollection items) + public void StorePrimInventory(UUID primID, ICollection items) { m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 8d0b177..42983b1 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs @@ -31,7 +31,7 @@ using System.Collections.Generic; using System.Data; using System.Reflection; using System.Text.RegularExpressions; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; using MySql.Data.MySqlClient; @@ -221,15 +221,15 @@ namespace OpenSim.Data.MySQL #region User Friends List Data - public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) + public override void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) { MySQLSuperManager dbm = GetLockedConnection(); int dtvalue = Util.UnixTimeSinceEpoch(); Dictionary param = new Dictionary(); - param["?ownerID"] = friendlistowner.UUID.ToString(); - param["?friendID"] = friend.UUID.ToString(); + param["?ownerID"] = friendlistowner.ToString(); + param["?friendID"] = friend.ToString(); param["?friendPerms"] = perms.ToString(); param["?datetimestamp"] = dtvalue.ToString(); @@ -265,13 +265,13 @@ namespace OpenSim.Data.MySQL } } - public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) + public override void RemoveUserFriend(UUID friendlistowner, UUID friend) { MySQLSuperManager dbm = GetLockedConnection(); Dictionary param = new Dictionary(); - param["?ownerID"] = friendlistowner.UUID.ToString(); - param["?friendID"] = friend.UUID.ToString(); + param["?ownerID"] = friendlistowner.ToString(); + param["?friendID"] = friend.ToString(); try { @@ -299,13 +299,13 @@ namespace OpenSim.Data.MySQL } } - public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) + public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) { MySQLSuperManager dbm = GetLockedConnection(); Dictionary param = new Dictionary(); - param["?ownerID"] = friendlistowner.UUID.ToString(); - param["?friendID"] = friend.UUID.ToString(); + param["?ownerID"] = friendlistowner.ToString(); + param["?friendID"] = friend.ToString(); param["?friendPerms"] = perms.ToString(); try @@ -330,13 +330,13 @@ namespace OpenSim.Data.MySQL } } - public override List GetUserFriendList(LLUUID friendlistowner) + public override List GetUserFriendList(UUID friendlistowner) { MySQLSuperManager dbm = GetLockedConnection(); List Lfli = new List(); Dictionary param = new Dictionary(); - param["?ownerID"] = friendlistowner.UUID.ToString(); + param["?ownerID"] = friendlistowner.ToString(); try { @@ -352,8 +352,8 @@ namespace OpenSim.Data.MySQL while (reader.Read()) { FriendListItem fli = new FriendListItem(); - fli.FriendListOwner = new LLUUID((string) reader["ownerID"]); - fli.Friend = new LLUUID((string) reader["friendID"]); + fli.FriendListOwner = new UUID((string) reader["ownerID"]); + fli.Friend = new UUID((string) reader["friendID"]); fli.FriendPerms = (uint) Convert.ToInt32(reader["friendPerms"]); // This is not a real column in the database table, it's a joined column from the opposite record @@ -381,12 +381,12 @@ namespace OpenSim.Data.MySQL #endregion - public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) + public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle) { //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called"); } - public override List GeneratePickerResults(LLUUID queryID, string query) + public override List GeneratePickerResults(UUID queryID, string query) { MySQLSuperManager dbm = GetLockedConnection(); @@ -413,7 +413,7 @@ namespace OpenSim.Data.MySQL while (reader.Read()) { AvatarPickerAvatar user = new AvatarPickerAvatar(); - user.AvatarID = new LLUUID((string) reader["UUID"]); + user.AvatarID = new UUID((string) reader["UUID"]); user.firstName = (string) reader["username"]; user.lastName = (string) reader["lastname"]; returnlist.Add(user); @@ -449,7 +449,7 @@ namespace OpenSim.Data.MySQL while (reader.Read()) { AvatarPickerAvatar user = new AvatarPickerAvatar(); - user.AvatarID = new LLUUID((string) reader["UUID"]); + user.AvatarID = new UUID((string) reader["UUID"]); user.firstName = (string) reader["username"]; user.lastName = (string) reader["lastname"]; returnlist.Add(user); @@ -476,7 +476,7 @@ namespace OpenSim.Data.MySQL /// /// User UUID /// User profile data - public override UserProfileData GetUserByUUID(LLUUID uuid) + public override UserProfileData GetUserByUUID(UUID uuid) { MySQLSuperManager dbm = GetLockedConnection(); try @@ -533,13 +533,13 @@ namespace OpenSim.Data.MySQL /// /// /// is it still used ? - public override void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) + public override void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey) { MySQLSuperManager dbm = GetLockedConnection(); Dictionary param = new Dictionary(); - param["?UUID"] = AgentID.UUID.ToString(); - param["?webLoginKey"] = WebLoginKey.UUID.ToString(); + param["?UUID"] = AgentID.ToString(); + param["?webLoginKey"] = WebLoginKey.ToString(); try { @@ -565,7 +565,7 @@ namespace OpenSim.Data.MySQL /// /// The accounts UUID /// The users session - public override UserAgentData GetAgentByUUID(LLUUID uuid) + public override UserAgentData GetAgentByUUID(UUID uuid) { MySQLSuperManager dbm = GetLockedConnection(); @@ -682,7 +682,7 @@ namespace OpenSim.Data.MySQL /// The receivers account ID /// The amount to transfer /// Success? - public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) + public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return false; } @@ -695,7 +695,7 @@ namespace OpenSim.Data.MySQL /// The receivers account ID /// The item to transfer /// Success? - public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) + public override bool InventoryTransferRequest(UUID from, UUID to, UUID item) { return false; } @@ -705,7 +705,7 @@ namespace OpenSim.Data.MySQL /// TODO: stubs for now to get us to a compiling state gently /// override /// - public override AvatarAppearance GetUserAppearance(LLUUID user) + public override AvatarAppearance GetUserAppearance(UUID user) { MySQLSuperManager dbm = GetLockedConnection(); try @@ -744,7 +744,7 @@ namespace OpenSim.Data.MySQL /// The user UUID /// The avatar appearance // override - public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) + public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance) { MySQLSuperManager dbm = GetLockedConnection(); try @@ -783,7 +783,7 @@ namespace OpenSim.Data.MySQL get { return "0.1"; } } - public Hashtable GetUserAttachments(LLUUID agentID) + public Hashtable GetUserAttachments(UUID agentID) { MySQLSuperManager dbm = GetLockedConnection(); @@ -814,7 +814,7 @@ namespace OpenSim.Data.MySQL } } - public void UpdateUserAttachments(LLUUID agentID, Hashtable data) + public void UpdateUserAttachments(UUID agentID, Hashtable data) { MySQLSuperManager dbm = GetLockedConnection(); try @@ -827,7 +827,7 @@ namespace OpenSim.Data.MySQL } } - public override void ResetAttachments(LLUUID userID) + public override void ResetAttachments(UUID userID) { MySQLSuperManager dbm = GetLockedConnection(); @@ -847,4 +847,4 @@ namespace OpenSim.Data.MySQL } } } -} \ No newline at end of file +} -- cgit v1.1