* 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.
0.6.0-stable
Teravus Ovares 2008-09-06 07:52:41 +00:00
parent cbec2bf22b
commit 7d89e12293
388 changed files with 6811 additions and 7138 deletions

View File

@ -31,7 +31,7 @@ using System.IO;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Timers; using System.Timers;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using Nwc.XmlRpc; using Nwc.XmlRpc;
@ -113,7 +113,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
throw new Exception("wrong password"); throw new Exception("wrong password");
LLUUID regionID = new LLUUID((string) requestData["regionID"]); UUID regionID = new UUID((string) requestData["regionID"]);
responseData["accepted"] = "true"; responseData["accepted"] = "true";
response.Value = responseData; response.Value = responseData;
@ -198,7 +198,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception("wrong password"); throw new Exception("wrong password");
string file = (string)requestData["filename"]; string file = (string)requestData["filename"];
LLUUID regionID = (string) requestData["regionid"]; UUID regionID = (string) requestData["regionid"];
m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file); m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file);
responseData["accepted"] = "true"; responseData["accepted"] = "true";
@ -379,7 +379,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// extract or generate region ID now // extract or generate region ID now
Scene scene = null; Scene scene = null;
LLUUID regionID = LLUUID.Zero; UUID regionID = UUID.Zero;
if (requestData.ContainsKey("region_id") && if (requestData.ContainsKey("region_id") &&
!String.IsNullOrEmpty((string)requestData["region_id"])) !String.IsNullOrEmpty((string)requestData["region_id"]))
{ {
@ -391,7 +391,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
} }
else else
{ {
regionID = LLUUID.Random(); regionID = UUID.Random();
m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID); m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID);
} }
@ -517,7 +517,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// <description>error message if success is false</description></item> /// <description>error message if success is false</description></item>
/// <item><term>avatar_uuid</term> /// <item><term>avatar_uuid</term>
/// <description>UUID of the newly created avatar /// <description>UUID of the newly created avatar
/// account; LLUUID.Zero if failed. /// account; UUID.Zero if failed.
/// </description></item> /// </description></item>
/// </list> /// </list>
/// </remarks> /// </remarks>
@ -551,9 +551,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (null != userProfile) if (null != userProfile)
throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
LLUUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY); UUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY);
if (userID == LLUUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
firstname, lastname)); firstname, lastname));
responseData["success"] = "true"; responseData["success"] = "true";
@ -569,7 +569,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString());
responseData["success"] = "false"; responseData["success"] = "false";
responseData["avatar_uuid"] = LLUUID.Zero.ToString(); responseData["avatar_uuid"] = UUID.Zero.ToString();
responseData["error"] = e.Message; responseData["error"] = e.Message;
response.Value = responseData; response.Value = responseData;
@ -742,7 +742,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Scene scene = null; Scene scene = null;
if (requestData.Contains("region_uuid")) if (requestData.Contains("region_uuid"))
{ {
LLUUID region_uuid = (string)requestData["region_uuid"]; UUID region_uuid = (string)requestData["region_uuid"];
if (!m_app.SceneManager.TryGetScene(region_uuid, out scene)) if (!m_app.SceneManager.TryGetScene(region_uuid, out scene))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
} }
@ -802,7 +802,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string filename = (string)requestData["filename"]; string filename = (string)requestData["filename"];
if (requestData.Contains("region_uuid")) if (requestData.Contains("region_uuid"))
{ {
LLUUID region_uuid = (string)requestData["region_uuid"]; UUID region_uuid = (string)requestData["region_uuid"];
if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
@ -827,7 +827,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
switch (xml_version) switch (xml_version)
{ {
case "1": case "1":
m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new Vector3(0, 0, 0));
break; break;
case "2": case "2":

View File

@ -35,7 +35,7 @@ using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using libsecondlife; using OpenMetaverse;
using System.Xml; using System.Xml;
namespace OpenSim.ApplicationPlugins.Rest.Inventory namespace OpenSim.ApplicationPlugins.Rest.Inventory

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
using Nini.Config; using Nini.Config;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -190,12 +190,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
// The only parameter we accept is an LLUUID for // The only parameter we accept is an UUID for
// the asset // the asset
if (rdata.Parameters.Length == 1) if (rdata.Parameters.Length == 1)
{ {
LLUUID uuid = new LLUUID(rdata.Parameters[0]); UUID uuid = new UUID(rdata.Parameters[0]);
AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture); AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture);
if (asset != null) if (asset != null)
@ -233,7 +233,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{ {
Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
// The only parameter we accept is an LLUUID for // The only parameter we accept is an UUID for
// the asset // the asset
if (rdata.Parameters.Length == 1) if (rdata.Parameters.Length == 1)

View File

@ -31,12 +31,12 @@ using System.IO;
using System.Threading; using System.Threading;
using System.Xml; using System.Xml;
using System.Drawing; using System.Drawing;
using OpenJPEGNet;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using libsecondlife; using OpenMetaverse;
using OpenMetaverse.Imaging;
using Nini.Config; using Nini.Config;
namespace OpenSim.ApplicationPlugins.Rest.Inventory namespace OpenSim.ApplicationPlugins.Rest.Inventory
@ -189,7 +189,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// We can only get here if we are authorized // We can only get here if we are authorized
// //
// The requestor may have specified an LLUUID or // The requestor may have specified an UUID or
// a conjoined FirstName LastName string. We'll // a conjoined FirstName LastName string. We'll
// try both. If we fail with the first, UUID, // try both. If we fail with the first, UUID,
// attempt, we try the other. As an example, the // attempt, we try the other. As an example, the
@ -202,6 +202,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// required to designate a GET for an entire // required to designate a GET for an entire
// inventory. // inventory.
// //
// Do we have at least a user agent name? // Do we have at least a user agent name?
if (rdata.Parameters.Length < 1) if (rdata.Parameters.Length < 1)
@ -210,15 +212,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified");
} }
// The first parameter MUST be the agent identification, either an LLUUID // The first parameter MUST be the agent identification, either an UUID
// or a space-separated First-name Last-Name specification. We check for // or a space-separated First-name Last-Name specification. We check for
// an LLUUID first, if anyone names their character using a valid LLUUID // an UUID first, if anyone names their character using a valid UUID
// that identifies another existing avatar will cause this a problem... // that identifies another existing avatar will cause this a problem...
try try
{ {
rdata.uuid = new LLUUID(rdata.Parameters[PARM_USERID]); rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]);
Rest.Log.DebugFormat("{0} LLUUID supplied", MsgId); Rest.Log.DebugFormat("{0} UUID supplied", MsgId);
rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid);
} }
catch catch
@ -490,7 +492,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// may have already set the parent ID explicitly, in which // may have already set the parent ID explicitly, in which
// case we don't have to do it here. // case we don't have to do it here.
if (folder.ParentID == LLUUID.Zero || folder.ParentID == context.ID) if (folder.ParentID == UUID.Zero || folder.ParentID == context.ID)
{ {
if (newnode != String.Empty) if (newnode != String.Empty)
{ {
@ -550,7 +552,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// If the parentID is zero, then this is going // If the parentID is zero, then this is going
// directly into the root identified by the URI. // directly into the root identified by the URI.
if (item.Folder == LLUUID.Zero) if (item.Folder == UUID.Zero)
{ {
item.Folder = context.ID; item.Folder = context.ID;
} }
@ -719,7 +721,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{ {
if ((rfound = (folder.Name == PRIVATE_ROOT_NAME))) if ((rfound = (folder.Name == PRIVATE_ROOT_NAME)))
{ {
if ((rfound = (folder.ParentID == LLUUID.Zero))) if ((rfound = (folder.ParentID == UUID.Zero)))
break; break;
} }
} }
@ -746,7 +748,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
foreach (InventoryFolderBase folder in entity.Folders) foreach (InventoryFolderBase folder in entity.Folders)
{ {
if (folder.ParentID == uri.ParentID || if (folder.ParentID == uri.ParentID ||
folder.ParentID == LLUUID.Zero) folder.ParentID == UUID.Zero)
{ {
folder.ParentID = uri.ParentID; folder.ParentID = uri.ParentID;
xml = folder; xml = folder;
@ -778,9 +780,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// All went well, so we generate a UUID is one is // All went well, so we generate a UUID is one is
// needed. // needed.
if (xml.ID == LLUUID.Zero) if (xml.ID == UUID.Zero)
{ {
xml.ID = LLUUID.Random(); xml.ID = UUID.Random();
} }
uri.ParentID = TrashCan.ID; uri.ParentID = TrashCan.ID;
@ -834,9 +836,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
xml = entity.Items[0]; xml = entity.Items[0];
if (xml.ID == LLUUID.Zero) if (xml.ID == UUID.Zero)
{ {
xml.ID = LLUUID.Random(); xml.ID = UUID.Random();
} }
// If the folder reference has changed, then this item is // If the folder reference has changed, then this item is
@ -1336,7 +1338,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{ {
TrashCan = new InventoryFolderBase(); TrashCan = new InventoryFolderBase();
TrashCan.Name = "tmp"; TrashCan.Name = "tmp";
TrashCan.ID = LLUUID.Random(); TrashCan.ID = UUID.Random();
TrashCan.Version = 1; TrashCan.Version = 1;
TrashCan.Type = (short) AssetType.TrashFolder; TrashCan.Type = (short) AssetType.TrashFolder;
TrashCan.ParentID = f.ID; TrashCan.ParentID = f.ID;
@ -1556,9 +1558,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// Default values // Default values
result.Name = String.Empty; result.Name = String.Empty;
result.ID = LLUUID.Zero; result.ID = UUID.Zero;
result.Owner = ic.UserID; result.Owner = ic.UserID;
result.ParentID = LLUUID.Zero; // Context result.ParentID = UUID.Zero; // Context
result.Type = (short) AssetType.Folder; result.Type = (short) AssetType.Folder;
result.Version = 1; result.Version = 1;
@ -1573,13 +1575,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.Name = ic.xml.Value; result.Name = ic.xml.Value;
break; break;
case "uuid" : case "uuid" :
result.ID = new LLUUID(ic.xml.Value); result.ID = new UUID(ic.xml.Value);
break; break;
case "parent" : case "parent" :
result.ParentID = new LLUUID(ic.xml.Value); result.ParentID = new UUID(ic.xml.Value);
break; break;
case "owner" : case "owner" :
result.Owner = new LLUUID(ic.xml.Value); result.Owner = new UUID(ic.xml.Value);
break; break;
case "type" : case "type" :
result.Type = Int16.Parse(ic.xml.Value); result.Type = Int16.Parse(ic.xml.Value);
@ -1604,7 +1606,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// is necessary where a new folder may have been // is necessary where a new folder may have been
// introduced. // introduced.
if (result.ParentID == LLUUID.Zero) if (result.ParentID == UUID.Zero)
{ {
result.ParentID = ic.Parent(); result.ParentID = ic.Parent();
} }
@ -1632,9 +1634,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// This is a new folder, so no existing UUID is available // This is a new folder, so no existing UUID is available
// or appropriate // or appropriate
if (result.ID == LLUUID.Zero) if (result.ID == UUID.Zero)
{ {
result.ID = LLUUID.Random(); result.ID = UUID.Random();
} }
// Treat this as a new context. Any other information is // Treat this as a new context. Any other information is
@ -1664,12 +1666,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.Name = String.Empty; result.Name = String.Empty;
result.Description = String.Empty; result.Description = String.Empty;
result.ID = LLUUID.Zero; result.ID = UUID.Zero;
result.Folder = LLUUID.Zero; result.Folder = UUID.Zero;
result.Owner = ic.UserID; result.Owner = ic.UserID;
result.Creator = ic.UserID; result.Creator = ic.UserID;
result.AssetID = LLUUID.Zero; result.AssetID = UUID.Zero;
result.GroupID = LLUUID.Zero; result.GroupID = UUID.Zero;
result.GroupOwned = false; result.GroupOwned = false;
result.InvType = (int) InventoryType.Unknown; result.InvType = (int) InventoryType.Unknown;
result.AssetType = (int) AssetType.Unknown; result.AssetType = (int) AssetType.Unknown;
@ -1689,19 +1691,19 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.Description = ic.xml.Value; result.Description = ic.xml.Value;
break; break;
case "uuid" : case "uuid" :
result.ID = new LLUUID(ic.xml.Value); result.ID = new UUID(ic.xml.Value);
break; break;
case "folder" : case "folder" :
result.Folder = new LLUUID(ic.xml.Value); result.Folder = new UUID(ic.xml.Value);
break; break;
case "owner" : case "owner" :
result.Owner = new LLUUID(ic.xml.Value); result.Owner = new UUID(ic.xml.Value);
break; break;
case "invtype" : case "invtype" :
result.InvType = Int32.Parse(ic.xml.Value); result.InvType = Int32.Parse(ic.xml.Value);
break; break;
case "creator" : case "creator" :
result.Creator = new LLUUID(ic.xml.Value); result.Creator = new UUID(ic.xml.Value);
break; break;
case "assettype" : case "assettype" :
result.AssetType = Int32.Parse(ic.xml.Value); result.AssetType = Int32.Parse(ic.xml.Value);
@ -1710,7 +1712,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
result.GroupOwned = Boolean.Parse(ic.xml.Value); result.GroupOwned = Boolean.Parse(ic.xml.Value);
break; break;
case "groupid" : case "groupid" :
result.GroupID = new LLUUID(ic.xml.Value); result.GroupID = new UUID(ic.xml.Value);
break; break;
case "flags" : case "flags" :
result.Flags = UInt32.Parse(ic.xml.Value); result.Flags = UInt32.Parse(ic.xml.Value);
@ -1776,7 +1778,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// This is not a persistent attribute // This is not a persistent attribute
bool inline = true; bool inline = true;
LLUUID uuid = LLUUID.Zero; UUID uuid = UUID.Zero;
// Attribute is optional // Attribute is optional
if (ic.xml.HasAttributes) if (ic.xml.HasAttributes)
@ -1804,7 +1806,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
break; break;
case "uuid" : case "uuid" :
uuid = new LLUUID(ic.xml.Value); uuid = new UUID(ic.xml.Value);
break; break;
case "inline" : case "inline" :
@ -1834,7 +1836,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
{ {
if (ic.Item != null) if (ic.Item != null)
{ {
ic.Item.AssetID = new LLUUID(ic.xml.ReadElementContentAsString()); ic.Item.AssetID = new UUID(ic.xml.ReadElementContentAsString());
Rest.Log.DebugFormat("{0} Asset ID supplied: {1}", MsgId, ic.Item.AssetID); Rest.Log.DebugFormat("{0} Asset ID supplied: {1}", MsgId, ic.Item.AssetID);
} }
else else
@ -1855,9 +1857,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// Generate a UUID of none were given, and generally none should // Generate a UUID of none were given, and generally none should
// be. Ever. // be. Ever.
if (uuid == LLUUID.Zero) if (uuid == UUID.Zero)
{ {
uuid = LLUUID.Random(); uuid = UUID.Random();
} }
// Create AssetBase entity to hold the inlined asset // Create AssetBase entity to hold the inlined asset
@ -1887,7 +1889,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// If this is in the context of an item, establish // If this is in the context of an item, establish
// a link with the item in context. // a link with the item in context.
if (ic.Item != null && ic.Item.AssetID == LLUUID.Zero) if (ic.Item != null && ic.Item.AssetID == UUID.Zero)
{ {
ic.Item.AssetID = uuid; ic.Item.AssetID = uuid;
} }
@ -1970,7 +1972,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// here. It should always get set from the information stored // here. It should always get set from the information stored
// when the Asset element was processed. // when the Asset element was processed.
if (ic.Item.AssetID == LLUUID.Zero) if (ic.Item.AssetID == UUID.Zero)
{ {
Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId); Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId);
Rest.Log.InfoFormat("{0} Asset information is missing", MsgId); Rest.Log.InfoFormat("{0} Asset information is missing", MsgId);
@ -1979,16 +1981,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
// If the item is new, then assign it an ID // If the item is new, then assign it an ID
if (ic.Item.ID == LLUUID.Zero) if (ic.Item.ID == UUID.Zero)
{ {
ic.Item.ID = LLUUID.Random(); ic.Item.ID = UUID.Random();
} }
// If the context is being implied, obtain the current // If the context is being implied, obtain the current
// folder item's ID. If it was specified explicitly, make // folder item's ID. If it was specified explicitly, make
// sure that theparent folder exists. // sure that theparent folder exists.
if (ic.Item.Folder == LLUUID.Zero) if (ic.Item.Folder == UUID.Zero)
{ {
ic.Item.Folder = ic.Parent(); ic.Item.Folder = ic.Parent();
} }
@ -2113,8 +2115,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Bitmap temp; Bitmap temp;
Stream tgadata = new MemoryStream(ic.Asset.Data); Stream tgadata = new MemoryStream(ic.Asset.Data);
temp = OpenJPEGNet.LoadTGAClass.LoadTGA(tgadata); temp = LoadTGAClass.LoadTGA(tgadata);
ic.Asset.Data = OpenJPEGNet.OpenJPEG.EncodeFromImage(temp, true); ic.Asset.Data = OpenJPEG.EncodeFromImage(temp, true);
} }
ic.reset(); ic.reset();
@ -2129,7 +2131,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// extensions. /// extensions.
/// </summary> /// </summary>
internal LLUUID uuid = LLUUID.Zero; internal UUID uuid = UUID.Zero;
internal bool HaveInventory = false; internal bool HaveInventory = false;
internal ICollection<InventoryFolderImpl> folders = null; internal ICollection<InventoryFolderImpl> folders = null;
internal ICollection<InventoryItemBase> items = null; internal ICollection<InventoryItemBase> items = null;
@ -2214,7 +2216,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
EveryOnePermissions = DefaultEveryOne; EveryOnePermissions = DefaultEveryOne;
} }
internal LLUUID Parent() internal UUID Parent()
{ {
if (stk.Count != 0) if (stk.Count != 0)
{ {
@ -2222,7 +2224,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
} }
else else
{ {
return LLUUID.Zero; return UUID.Zero;
} }
} }

View File

@ -26,7 +26,7 @@
* *
*/ */
using libsecondlife; using OpenMetaverse;
using Nini.Config; using Nini.Config;
using System; using System;
using System.IO; using System.IO;

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
using Nini.Config; using Nini.Config;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -174,7 +174,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
float x = Convert.ToSingle(rdata.Parameters[PARM_MOVE_X]); float x = Convert.ToSingle(rdata.Parameters[PARM_MOVE_X]);
float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]); float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]);
float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]); float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]);
LLVector3 vector = new LLVector3(x,y,z); Vector3 vector = new Vector3(x,y,z);
avatar.DoAutoPilot(0,vector,avatar.ControllingClient); avatar.DoAutoPilot(0,vector,avatar.ControllingClient);
} }
catch (Exception e) catch (Exception e)

View File

@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
using System.Timers; using System.Timers;
using System.Xml; using System.Xml;
using System.Xml.Serialization; using System.Xml.Serialization;
using libsecondlife; using OpenMetaverse;
using Mono.Addins; using Mono.Addins;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using Nini.Config; using Nini.Config;
@ -109,11 +109,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
// be resilient and don't get confused by a terminating '/' // be resilient and don't get confused by a terminating '/'
param = param.TrimEnd(new char[]{'/'}); param = param.TrimEnd(new char[]{'/'});
string[] comps = param.Split('/'); string[] comps = param.Split('/');
LLUUID regionID = (LLUUID)comps[0]; UUID regionID = (UUID)comps[0];
m_log.DebugFormat("{0} GET region UUID {1}", MsgID, regionID.ToString()); m_log.DebugFormat("{0} GET region UUID {1}", MsgID, regionID.ToString());
if (LLUUID.Zero == regionID) throw new Exception("missing region ID"); if (UUID.Zero == regionID) throw new Exception("missing region ID");
Scene scene = null; Scene scene = null;
App.SceneManager.TryGetScene(regionID, out scene); App.SceneManager.TryGetScene(regionID, out scene);
@ -150,7 +150,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
return RegionStats(httpResponse, scene); return RegionStats(httpResponse, scene);
case "prims": case "prims":
return RegionPrims(httpResponse, scene, LLVector3.Zero, LLVector3.Zero); return RegionPrims(httpResponse, scene, Vector3.Zero, Vector3.Zero);
} }
} }
@ -162,11 +162,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
string[] subregion = comps[2].Split(','); string[] subregion = comps[2].Split(',');
if (subregion.Length == 6) if (subregion.Length == 6)
{ {
LLVector3 min, max; Vector3 min, max;
try try
{ {
min = new LLVector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2]));
max = new LLVector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5]));
} }
catch (Exception) catch (Exception)
{ {
@ -215,7 +215,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
return XmlWriterResult; return XmlWriterResult;
} }
protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, LLVector3 min, LLVector3 max) protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
{ {
httpResponse.SendChunked = true; httpResponse.SendChunked = true;
httpResponse.ContentType = "text/xml"; httpResponse.ContentType = "text/xml";

View File

@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
using System.Timers; using System.Timers;
using System.Xml; using System.Xml;
using System.Xml.Serialization; using System.Xml.Serialization;
using libsecondlife; using OpenMetaverse;
using Mono.Addins; using Mono.Addins;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using Nini.Config; using Nini.Config;
@ -76,10 +76,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
// Parse region ID and other parameters // Parse region ID and other parameters
param = param.TrimEnd(new char[]{'/'}); param = param.TrimEnd(new char[]{'/'});
string[] comps = param.Split('/'); string[] comps = param.Split('/');
LLUUID regionID = (LLUUID)comps[0]; UUID regionID = (UUID)comps[0];
m_log.DebugFormat("{0} POST region UUID {1}", MsgID, regionID.ToString()); m_log.DebugFormat("{0} POST region UUID {1}", MsgID, regionID.ToString());
if (LLUUID.Zero == regionID) throw new Exception("missing region ID"); if (UUID.Zero == regionID) throw new Exception("missing region ID");
Scene scene = null; Scene scene = null;
App.SceneManager.TryGetScene(regionID, out scene); App.SceneManager.TryGetScene(regionID, out scene);

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -58,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
region_id = regInfo.RegionID.ToString(); region_id = regInfo.RegionID.ToString();
region_x = regInfo.RegionLocX; region_x = regInfo.RegionLocX;
region_y = regInfo.RegionLocY; region_y = regInfo.RegionLocY;
if (regInfo.EstateSettings.EstateOwner != LLUUID.Zero) if (regInfo.EstateSettings.EstateOwner != UUID.Zero)
region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); region_owner_id = regInfo.EstateSettings.EstateOwner.ToString();
else else
region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString(); region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString();

View File

@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
using System.Timers; using System.Timers;
using System.Xml; using System.Xml;
using System.Xml.Serialization; using System.Xml.Serialization;
using libsecondlife; using OpenMetaverse;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;

View File

@ -34,7 +34,7 @@ using System.Net;
using System.Reflection; using System.Reflection;
using System.Timers; using System.Timers;
using System.Xml; using System.Xml;
using libsecondlife; using OpenMetaverse;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
@ -339,7 +339,7 @@ namespace OpenSim.ApplicationPlugins.Rest
/// HTTP header is indeed the password on file for the avatar /// HTTP header is indeed the password on file for the avatar
/// specified by the UUID /// specified by the UUID
/// </summary> /// </summary>
protected bool IsVerifiedUser(OSHttpRequest request, LLUUID uuid) protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid)
{ {
// XXX under construction // XXX under construction
return false; return false;

View File

@ -25,17 +25,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
namespace OpenSim.Data namespace OpenSim.Data
{ {
public abstract class AssetDataBase : IAssetProviderPlugin public abstract class AssetDataBase : IAssetProviderPlugin
{ {
public abstract AssetBase FetchAsset(LLUUID uuid); public abstract AssetBase FetchAsset(UUID uuid);
public abstract void CreateAsset(AssetBase asset); public abstract void CreateAsset(AssetBase asset);
public abstract void UpdateAsset(AssetBase asset); public abstract void UpdateAsset(AssetBase asset);
public abstract bool ExistsAsset(LLUUID uuid); public abstract bool ExistsAsset(UUID uuid);
public abstract string Version { get; } public abstract string Version { get; }
public abstract string Name { get; } public abstract string Name { get; }

View File

@ -26,7 +26,7 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
using OpenSim.Data.Base; using OpenSim.Data.Base;
using OpenSim.Framework; using OpenSim.Framework;
@ -55,15 +55,15 @@ namespace OpenSim.Data.Base
m_schema = rowMapperSchema; m_schema = rowMapperSchema;
m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID", m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<uint>("Serial", rowMapperSchema.AddMapping<uint>("Serial",
delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; }, delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; },
delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; }); delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; });
rowMapperSchema.AddMapping<Guid>("WearableItem0", rowMapperSchema.AddMapping<Guid>("WearableItem0",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ {
if (mapper.Object.Wearables == null) if (mapper.Object.Wearables == null)
@ -74,121 +74,121 @@ namespace OpenSim.Data.Base
mapper.Object.Wearables[i] = new AvatarWearable(); mapper.Object.Wearables[i] = new AvatarWearable();
} }
} }
mapper.Object.Wearables[0].ItemID = new LLUUID(value.ToString()); mapper.Object.Wearables[0].ItemID = new UUID(value.ToString());
}); });
rowMapperSchema.AddMapping<Guid>("WearableAsset0", rowMapperSchema.AddMapping<Guid>("WearableAsset0",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[0].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[0].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem1", rowMapperSchema.AddMapping<Guid>("WearableItem1",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset1", rowMapperSchema.AddMapping<Guid>("WearableAsset1",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[1].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[1].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem2", rowMapperSchema.AddMapping<Guid>("WearableItem2",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset2", rowMapperSchema.AddMapping<Guid>("WearableAsset2",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[2].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[2].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem3", rowMapperSchema.AddMapping<Guid>("WearableItem3",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset3", rowMapperSchema.AddMapping<Guid>("WearableAsset3",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[3].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[3].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem4", rowMapperSchema.AddMapping<Guid>("WearableItem4",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset4", rowMapperSchema.AddMapping<Guid>("WearableAsset4",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[4].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[4].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem5", rowMapperSchema.AddMapping<Guid>("WearableItem5",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset5", rowMapperSchema.AddMapping<Guid>("WearableAsset5",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[5].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[5].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem6", rowMapperSchema.AddMapping<Guid>("WearableItem6",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset6", rowMapperSchema.AddMapping<Guid>("WearableAsset6",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[6].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[6].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem7", rowMapperSchema.AddMapping<Guid>("WearableItem7",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset7", rowMapperSchema.AddMapping<Guid>("WearableAsset7",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[7].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[7].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem8", rowMapperSchema.AddMapping<Guid>("WearableItem8",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset8", rowMapperSchema.AddMapping<Guid>("WearableAsset8",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[8].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[8].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem9", rowMapperSchema.AddMapping<Guid>("WearableItem9",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset9", rowMapperSchema.AddMapping<Guid>("WearableAsset9",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[9].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[9].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem10", rowMapperSchema.AddMapping<Guid>("WearableItem10",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset10", rowMapperSchema.AddMapping<Guid>("WearableAsset10",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[10].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[10].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem11", rowMapperSchema.AddMapping<Guid>("WearableItem11",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset11", rowMapperSchema.AddMapping<Guid>("WearableAsset11",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[11].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[11].AssetID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableItem12", rowMapperSchema.AddMapping<Guid>("WearableItem12",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new LLUUID(value.ToString()); }); delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new UUID(value.ToString()); });
rowMapperSchema.AddMapping<Guid>("WearableAsset12", rowMapperSchema.AddMapping<Guid>("WearableAsset12",
delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; }, delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.Guid; },
delegate(AppearanceRowMapper mapper, Guid value) delegate(AppearanceRowMapper mapper, Guid value)
{ mapper.Object.Wearables[12].AssetID = new LLUUID(value.ToString()); }); { mapper.Object.Wearables[12].AssetID = new UUID(value.ToString()); });
} }
@ -213,7 +213,7 @@ namespace OpenSim.Data.Base
public bool Update(Guid userID, AvatarAppearance appearance) public bool Update(Guid userID, AvatarAppearance appearance)
{ {
AppearanceRowMapper mapper = CreateRowMapper(appearance); AppearanceRowMapper mapper = CreateRowMapper(appearance);
return Update(appearance.Owner.UUID, mapper); return Update(appearance.Owner.Guid, mapper);
} }
/// <summary> /// <summary>
@ -244,7 +244,7 @@ namespace OpenSim.Data.Base
protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance) protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance)
{ {
AppearanceRowMapper mapper = CreateRowMapper(appearance); AppearanceRowMapper mapper = CreateRowMapper(appearance);
mapper.FillObject(reader); mapper.FiPrimitive(reader);
return mapper; return mapper;
} }
@ -256,7 +256,7 @@ namespace OpenSim.Data.Base
public override AppearanceRowMapper FromReader(BaseDataReader reader) public override AppearanceRowMapper FromReader(BaseDataReader reader)
{ {
AppearanceRowMapper mapper = CreateRowMapper(); AppearanceRowMapper mapper = CreateRowMapper();
mapper.FillObject(reader); mapper.FiPrimitive(reader);
return mapper; return mapper;
} }

View File

@ -32,7 +32,7 @@ namespace OpenSim.Data.Base
/// </summary> /// </summary>
public abstract class BaseRowMapper public abstract class BaseRowMapper
{ {
public abstract void FillObject(BaseDataReader reader); public abstract void FiPrimitive(BaseDataReader reader);
} }
/// <summary> /// <summary>
@ -67,7 +67,7 @@ namespace OpenSim.Data.Base
/// ///
/// </summary> /// </summary>
/// <param name="reader"></param> /// <param name="reader"></param>
public override void FillObject(BaseDataReader reader) public override void FiPrimitive(BaseDataReader reader)
{ {
foreach (BaseFieldMapper fieldMapper in m_schema.Fields.Values) foreach (BaseFieldMapper fieldMapper in m_schema.Fields.Values)
{ {

View File

@ -25,17 +25,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Data namespace OpenSim.Data
{ {
public abstract class GridDataBase : IGridDataPlugin public abstract class GridDataBase : IGridDataPlugin
{ {
public abstract RegionProfileData GetProfileByHandle(ulong regionHandle); public abstract RegionProfileData GetProfileByHandle(ulong regionHandle);
public abstract RegionProfileData GetProfileByLLUUID(LLUUID UUID); public abstract RegionProfileData GetProfileByUUID(UUID UUID);
public abstract RegionProfileData GetProfileByString(string regionName); public abstract RegionProfileData GetProfileByString(string regionName);
public abstract RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); public abstract RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
public abstract bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); public abstract bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey);
public abstract DataResponse AddProfile(RegionProfileData profile); public abstract DataResponse AddProfile(RegionProfileData profile);
public abstract ReservationData GetReservationAtPoint(uint x, uint y); public abstract ReservationData GetReservationAtPoint(uint x, uint y);
public abstract DataResponse UpdateProfile(RegionProfileData profile); public abstract DataResponse UpdateProfile(RegionProfileData profile);

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
namespace OpenSim.Data namespace OpenSim.Data
@ -60,7 +60,7 @@ namespace OpenSim.Data
/// </summary> /// </summary>
/// <param name="UUID">A 128bit UUID</param> /// <param name="UUID">A 128bit UUID</param>
/// <returns>A sim profile</returns> /// <returns>A sim profile</returns>
RegionProfileData GetProfileByLLUUID(LLUUID UUID); RegionProfileData GetProfileByUUID(UUID UUID);
/// <summary> /// <summary>
/// Returns a sim profile from a string match /// Returns a sim profile from a string match
@ -87,7 +87,7 @@ namespace OpenSim.Data
/// <param name="regionHandle">The regionhandle sent by the sim</param> /// <param name="regionHandle">The regionhandle sent by the sim</param>
/// <param name="simrecvkey">The receiving key sent by the sim</param> /// <param name="simrecvkey">The receiving key sent by the sim</param>
/// <returns>Whether the sim has been authenticated</returns> /// <returns>Whether the sim has been authenticated</returns>
bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey);
/// <summary> /// <summary>
/// Adds a new profile to the database /// Adds a new profile to the database

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -84,7 +84,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="assetID">the asset UUID</param> /// <param name="assetID">the asset UUID</param>
/// <returns></returns> /// <returns></returns>
override public AssetBase FetchAsset(LLUUID assetID) override public AssetBase FetchAsset(UUID assetID)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["id"] = assetID.ToString(); param["id"] = assetID.ToString();
@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="asset">the asset</param> /// <param name="asset">the asset</param>
override public void CreateAsset(AssetBase asset) override public void CreateAsset(AssetBase asset)
{ {
if (ExistsAsset((LLUUID) asset.FullID)) if (ExistsAsset((UUID) asset.FullID))
{ {
return; return;
} }
@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="uuid"></param> /// <param name="uuid"></param>
/// <returns>true if exist.</returns> /// <returns>true if exist.</returns>
override public bool ExistsAsset(LLUUID uuid) override public bool ExistsAsset(UUID uuid)
{ {
if (FetchAsset(uuid) != null) if (FetchAsset(uuid) != null)
{ {

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="regionID">region ID.</param> /// <param name="regionID">region ID.</param>
/// <returns></returns> /// <returns></returns>
public EstateSettings LoadEstateSettings(LLUUID regionID) public EstateSettings LoadEstateSettings(UUID regionID)
{ {
EstateSettings es = new EstateSettings(); EstateSettings es = new EstateSettings();
@ -128,10 +128,10 @@ namespace OpenSim.Data.MSSQL
else else
_FieldMap[name].SetValue(es, false); _FieldMap[name].SetValue(es, false);
} }
else if (_FieldMap[name].GetValue(es) is LLUUID) else if (_FieldMap[name].GetValue(es) is UUID)
{ {
LLUUID uuid; UUID uuid;
LLUUID.TryParse(reader[name].ToString(), out uuid); UUID.TryParse(reader[name].ToString(), out uuid);
_FieldMap[name].SetValue(es, uuid); _FieldMap[name].SetValue(es, uuid);
} }
@ -333,8 +333,8 @@ namespace OpenSim.Data.MSSQL
{ {
EstateBan eb = new EstateBan(); EstateBan eb = new EstateBan();
LLUUID uuid; UUID uuid;
LLUUID.TryParse(reader["bannedUUID"].ToString(), out uuid); UUID.TryParse(reader["bannedUUID"].ToString(), out uuid);
eb.bannedUUID = uuid; eb.bannedUUID = uuid;
eb.bannedIP = "0.0.0.0"; eb.bannedIP = "0.0.0.0";
@ -345,9 +345,9 @@ namespace OpenSim.Data.MSSQL
} }
} }
private LLUUID[] LoadUUIDList(uint estateID, string table) private UUID[] LoadUUIDList(uint estateID, string table)
{ {
List<LLUUID> uuids = new List<LLUUID>(); List<UUID> uuids = new List<UUID>();
string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table); string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table);
@ -361,8 +361,8 @@ namespace OpenSim.Data.MSSQL
{ {
// EstateBan eb = new EstateBan(); // EstateBan eb = new EstateBan();
LLUUID uuid; UUID uuid;
LLUUID.TryParse(reader["uuid"].ToString(), out uuid); UUID.TryParse(reader["uuid"].ToString(), out uuid);
uuids.Add(uuid); uuids.Add(uuid);
} }
@ -399,7 +399,7 @@ namespace OpenSim.Data.MSSQL
} }
} }
private void SaveUUIDList(uint estateID, string table, LLUUID[] data) private void SaveUUIDList(uint estateID, string table, UUID[] data)
{ {
//Delete first //Delete first
string sql = string.Format("delete from {0} where EstateID = @EstateID", table); string sql = string.Format("delete from {0} where EstateID = @EstateID", table);
@ -416,7 +416,7 @@ namespace OpenSim.Data.MSSQL
bool createParamOnce = true; bool createParamOnce = true;
foreach (LLUUID uuid in data) foreach (UUID uuid in data)
{ {
if (createParamOnce) if (createParamOnce)
{ {

View File

@ -31,7 +31,7 @@ using System.Data;
using System.Reflection; using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -176,7 +176,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="uuid">The region UUID</param> /// <param name="uuid">The region UUID</param>
/// <returns>The sim profile</returns> /// <returns>The sim profile</returns>
override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) override public RegionProfileData GetProfileByUUID(UUID uuid)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = uuid.ToString(); param["uuid"] = uuid.ToString();
@ -284,7 +284,7 @@ namespace OpenSim.Data.MSSQL
parameters["regionHandle"] = profile.regionHandle.ToString(); parameters["regionHandle"] = profile.regionHandle.ToString();
parameters["regionName"] = profile.regionName; parameters["regionName"] = profile.regionName;
parameters["uuid"] = profile.UUID.ToString(); parameters["uuid"] = profile.ToString();
parameters["regionRecvKey"] = profile.regionRecvKey; parameters["regionRecvKey"] = profile.regionRecvKey;
parameters["regionSecret"] = profile.regionSecret; parameters["regionSecret"] = profile.regionSecret;
parameters["regionSendKey"] = profile.regionSendKey; parameters["regionSendKey"] = profile.regionSendKey;
@ -352,7 +352,7 @@ namespace OpenSim.Data.MSSQL
parameters["regionHandle"] = profile.regionHandle.ToString(); parameters["regionHandle"] = profile.regionHandle.ToString();
parameters["regionName"] = profile.regionName; parameters["regionName"] = profile.regionName;
parameters["uuid"] = profile.UUID.ToString(); parameters["uuid"] = profile.ToString();
parameters["regionRecvKey"] = profile.regionRecvKey; parameters["regionRecvKey"] = profile.regionRecvKey;
parameters["regionSecret"] = profile.regionSecret; parameters["regionSecret"] = profile.regionSecret;
parameters["regionSendKey"] = profile.regionSendKey; parameters["regionSendKey"] = profile.regionSendKey;
@ -403,14 +403,14 @@ namespace OpenSim.Data.MSSQL
/// <param name="handle">The attempted regionHandle of the challenger</param> /// <param name="handle">The attempted regionHandle of the challenger</param>
/// <param name="authkey">The secret</param> /// <param name="authkey">The secret</param>
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
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 bool throwHissyFit = false; // Should be true by 1.0
if (throwHissyFit) if (throwHissyFit)
throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 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); return (handle == data.regionHandle && authkey == data.regionSecret);
} }
@ -424,7 +424,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="authhash"></param> /// <param name="authhash"></param>
/// <param name="challenge"></param> /// <param name="challenge"></param>
/// <returns></returns> /// <returns></returns>
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(); // SHA512Managed HashProvider = new SHA512Managed();
// Encoding TextProvider = new UTF8Encoding(); // Encoding TextProvider = new UTF8Encoding();

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -167,7 +167,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="folderID">The folder to search</param> /// <param name="folderID">The folder to search</param>
/// <returns>A list containing inventory items</returns> /// <returns>A list containing inventory items</returns>
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
{ {
try try
{ {
@ -201,13 +201,13 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="user">The user whos inventory is to be searched</param> /// <param name="user">The user whos inventory is to be searched</param>
/// <returns>A list of folder objects</returns> /// <returns>A list of folder objects</returns>
public List<InventoryFolderBase> getUserRootFolders(LLUUID user) public List<InventoryFolderBase> getUserRootFolders(UUID user)
{ {
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = user.ToString(); param["uuid"] = user.ToString();
param["zero"] = LLUUID.Zero.ToString(); param["zero"] = UUID.Zero.ToString();
using (IDbCommand result = using (IDbCommand result =
database.Query( database.Query(
@ -235,13 +235,13 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="user">the User UUID</param> /// <param name="user">the User UUID</param>
/// <returns></returns> /// <returns></returns>
public InventoryFolderBase getUserRootFolder(LLUUID user) public InventoryFolderBase getUserRootFolder(UUID user)
{ {
try try
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = user.ToString(); param["uuid"] = user.ToString();
param["zero"] = LLUUID.Zero.ToString(); param["zero"] = UUID.Zero.ToString();
using (IDbCommand result = using (IDbCommand result =
database.Query( database.Query(
@ -281,7 +281,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="parentID">The folder to search</param> /// <param name="parentID">The folder to search</param>
/// <returns>A list of inventory folders</returns> /// <returns>A list of inventory folders</returns>
public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{ {
try try
{ {
@ -318,23 +318,23 @@ namespace OpenSim.Data.MSSQL
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.ID = new LLUUID((string) reader["inventoryID"]); item.ID = new UUID((string) reader["inventoryID"]);
item.AssetID = new LLUUID((string) reader["assetID"]); item.AssetID = new UUID((string) reader["assetID"]);
item.AssetType = (int) reader["assetType"]; item.AssetType = (int) reader["assetType"];
item.Folder = new LLUUID((string) reader["parentFolderID"]); item.Folder = new UUID((string) reader["parentFolderID"]);
item.Owner = new LLUUID((string) reader["avatarID"]); item.Owner = new UUID((string) reader["avatarID"]);
item.Name = (string) reader["inventoryName"]; item.Name = (string) reader["inventoryName"];
item.Description = (string) reader["inventoryDescription"]; item.Description = (string) reader["inventoryDescription"];
item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]); item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]);
item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]); item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]);
item.InvType = (int) reader["invType"]; item.InvType = (int) reader["invType"];
item.Creator = new LLUUID((string) reader["creatorID"]); item.Creator = new UUID((string) reader["creatorID"]);
item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]); item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]);
item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]); item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]);
item.SalePrice = (int) reader["salePrice"]; item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]); item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"]; 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.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]); item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]);
@ -353,7 +353,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="item">The item to return</param> /// <param name="item">The item to return</param>
/// <returns>An inventory item</returns> /// <returns>An inventory item</returns>
public InventoryItemBase getInventoryItem(LLUUID itemID) public InventoryItemBase getInventoryItem(UUID itemID)
{ {
try try
{ {
@ -389,9 +389,9 @@ namespace OpenSim.Data.MSSQL
try try
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.Owner = new LLUUID((string) reader["agentID"]); folder.Owner = new UUID((string) reader["agentID"]);
folder.ParentID = new LLUUID((string) reader["parentFolderID"]); folder.ParentID = new UUID((string) reader["parentFolderID"]);
folder.ID = new LLUUID((string) reader["folderID"]); folder.ID = new UUID((string) reader["folderID"]);
folder.Name = (string) reader["folderName"]; folder.Name = (string) reader["folderName"];
folder.Type = (short) reader["type"]; folder.Type = (short) reader["type"];
folder.Version = Convert.ToUInt16(reader["version"]); folder.Version = Convert.ToUInt16(reader["version"]);
@ -410,7 +410,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="folder">The folder to return</param> /// <param name="folder">The folder to return</param>
/// <returns>A folder class</returns> /// <returns>A folder class</returns>
public InventoryFolderBase getInventoryFolder(LLUUID folderID) public InventoryFolderBase getInventoryFolder(UUID folderID)
{ {
try try
{ {
@ -556,7 +556,7 @@ namespace OpenSim.Data.MSSQL
/// Delete an item in inventory database /// Delete an item in inventory database
/// </summary> /// </summary>
/// <param name="item">the item UUID</param> /// <param name="item">the item UUID</param>
public void deleteInventoryItem(LLUUID itemID) public void deleteInventoryItem(UUID itemID)
{ {
try try
{ {
@ -679,7 +679,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="folders">list where folders will be appended</param> /// <param name="folders">list where folders will be appended</param>
/// <param name="parentID">ID of parent</param> /// <param name="parentID">ID of parent</param>
protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
{ {
List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID); List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID);
@ -688,7 +688,7 @@ namespace OpenSim.Data.MSSQL
} }
// See IInventoryDataPlugin // See IInventoryDataPlugin
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, parentID); getInventoryFolders(ref folders, parentID);
@ -703,7 +703,7 @@ namespace OpenSim.Data.MSSQL
/// Delete a folder in inventory databasae /// Delete a folder in inventory databasae
/// </summary> /// </summary>
/// <param name="folderID">the folder UUID</param> /// <param name="folderID">the folder UUID</param>
protected void deleteOneFolder(LLUUID folderID) protected void deleteOneFolder(UUID folderID)
{ {
try try
{ {
@ -725,7 +725,7 @@ namespace OpenSim.Data.MSSQL
/// Delete an item in inventory database /// Delete an item in inventory database
/// </summary> /// </summary>
/// <param name="folderID">the item ID</param> /// <param name="folderID">the item ID</param>
protected void deleteItemsInFolder(LLUUID folderID) protected void deleteItemsInFolder(UUID folderID)
{ {
try try
{ {
@ -749,7 +749,7 @@ namespace OpenSim.Data.MSSQL
/// Delete an inventory folder /// Delete an inventory folder
/// </summary> /// </summary>
/// <param name="folderId">Id of folder to delete</param> /// <param name="folderId">Id of folder to delete</param>
public void deleteInventoryFolder(LLUUID folderID) public void deleteInventoryFolder(UUID folderID)
{ {
// lock (database) // lock (database)
{ {

View File

@ -31,7 +31,7 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -220,7 +220,7 @@ namespace OpenSim.Data.MSSQL
{ {
return SqlDbType.Bit; return SqlDbType.Bit;
} }
if (type == typeof(LLUUID)) if (type == typeof(UUID))
{ {
return SqlDbType.VarChar; return SqlDbType.VarChar;
} }
@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
{ {
Type valueType = value.GetType(); Type valueType = value.GetType();
if (valueType == typeof(LLUUID)) if (valueType == typeof(UUID))
{ {
return value.ToString(); return value.ToString();
} }
@ -335,7 +335,7 @@ namespace OpenSim.Data.MSSQL
// Region Main // Region Main
regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]); regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]);
regionprofile.regionName = (string)reader["regionName"]; regionprofile.regionName = (string)reader["regionName"];
regionprofile.UUID = new LLUUID((string)reader["uuid"]); regionprofile.UUID = new UUID((string)reader["uuid"]);
// Secrets // Secrets
regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
@ -372,16 +372,16 @@ namespace OpenSim.Data.MSSQL
regionprofile.regionUserURI = (string)reader["regionUserURI"]; regionprofile.regionUserURI = (string)reader["regionUserURI"];
regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
regionprofile.owner_uuid = new LLUUID((string) reader["owner_uuid"]); regionprofile.owner_uuid = new UUID((string) reader["owner_uuid"]);
// World Map Addition // World Map Addition
string tempRegionMap = reader["regionMapTexture"].ToString(); string tempRegionMap = reader["regionMapTexture"].ToString();
if (tempRegionMap != String.Empty) if (tempRegionMap != String.Empty)
{ {
regionprofile.regionMapTextureID = new LLUUID(tempRegionMap); regionprofile.regionMapTextureID = new UUID(tempRegionMap);
} }
else else
{ {
regionprofile.regionMapTextureID = new LLUUID(); regionprofile.regionMapTextureID = new UUID();
} }
} }
else else
@ -403,7 +403,7 @@ namespace OpenSim.Data.MSSQL
if (reader.Read()) if (reader.Read())
{ {
retval.ID = new LLUUID((string)reader["UUID"]); retval.ID = new UUID((string)reader["UUID"]);
retval.FirstName = (string)reader["username"]; retval.FirstName = (string)reader["username"];
retval.SurName = (string)reader["lastname"]; retval.SurName = (string)reader["lastname"];
@ -411,11 +411,11 @@ namespace OpenSim.Data.MSSQL
retval.PasswordSalt = (string)reader["passwordSalt"]; retval.PasswordSalt = (string)reader["passwordSalt"];
retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
retval.HomeLocation = new LLVector3( retval.HomeLocation = new Vector3(
Convert.ToSingle(reader["homeLocationX"].ToString()), Convert.ToSingle(reader["homeLocationX"].ToString()),
Convert.ToSingle(reader["homeLocationY"].ToString()), Convert.ToSingle(reader["homeLocationY"].ToString()),
Convert.ToSingle(reader["homeLocationZ"].ToString())); Convert.ToSingle(reader["homeLocationZ"].ToString()));
retval.HomeLookAt = new LLVector3( retval.HomeLookAt = new Vector3(
Convert.ToSingle(reader["homeLookAtX"].ToString()), Convert.ToSingle(reader["homeLookAtX"].ToString()),
Convert.ToSingle(reader["homeLookAtY"].ToString()), Convert.ToSingle(reader["homeLookAtY"].ToString()),
Convert.ToSingle(reader["homeLookAtZ"].ToString())); Convert.ToSingle(reader["homeLookAtZ"].ToString()));
@ -432,9 +432,9 @@ namespace OpenSim.Data.MSSQL
retval.AboutText = (string)reader["profileAboutText"]; retval.AboutText = (string)reader["profileAboutText"];
retval.FirstLifeAboutText = (string)reader["profileFirstText"]; retval.FirstLifeAboutText = (string)reader["profileFirstText"];
retval.Image = new LLUUID((string)reader["profileImage"]); retval.Image = new UUID((string)reader["profileImage"]);
retval.FirstLifeImage = new LLUUID((string)reader["profileFirstImage"]); retval.FirstLifeImage = new UUID((string)reader["profileFirstImage"]);
retval.WebLoginKey = new LLUUID((string)reader["webLoginKey"]); retval.WebLoginKey = new UUID((string)reader["webLoginKey"]);
} }
else else
{ {
@ -455,9 +455,9 @@ namespace OpenSim.Data.MSSQL
if (reader.Read()) if (reader.Read())
{ {
// Agent IDs // Agent IDs
retval.ProfileID = new LLUUID((string)reader["UUID"]); retval.ProfileID = new UUID((string)reader["UUID"]);
retval.SessionID = new LLUUID((string)reader["sessionID"]); retval.SessionID = new UUID((string)reader["sessionID"]);
retval.SecureSessionID = new LLUUID((string)reader["secureSessionID"]); retval.SecureSessionID = new UUID((string)reader["secureSessionID"]);
// Agent Who? // Agent Who?
retval.AgentIP = (string)reader["agentIP"]; retval.AgentIP = (string)reader["agentIP"];
@ -471,8 +471,8 @@ namespace OpenSim.Data.MSSQL
// Current position // Current position
retval.Region = (string)reader["currentRegion"]; retval.Region = (string)reader["currentRegion"];
retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
LLVector3 tmp_v; Vector3 tmp_v;
LLVector3.TryParse((string)reader["currentPos"], out tmp_v); Vector3.TryParse((string)reader["currentPos"], out tmp_v);
retval.Position = tmp_v; retval.Position = tmp_v;
} }
@ -497,7 +497,7 @@ namespace OpenSim.Data.MSSQL
asset = new AssetBase(); asset = new AssetBase();
asset.Data = (byte[])reader["data"]; asset.Data = (byte[])reader["data"];
asset.Description = (string)reader["description"]; asset.Description = (string)reader["description"];
asset.FullID = new LLUUID((string)reader["id"]); asset.FullID = new UUID((string)reader["id"]);
asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
asset.Name = (string)reader["name"]; asset.Name = (string)reader["name"];
asset.Type = Convert.ToSByte(reader["assetType"]); asset.Type = Convert.ToSByte(reader["assetType"]);

View File

@ -31,7 +31,7 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
@ -174,12 +174,12 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="regionUUID">The region UUID.</param> /// <param name="regionUUID">The region UUID.</param>
/// <returns></returns> /// <returns></returns>
public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
{ {
Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
//Retrieve all values of current region //Retrieve all values of current region
RetrievePrimsDataForRegion(regionUUID, LLUUID.Zero, ""); RetrievePrimsDataForRegion(regionUUID, UUID.Zero, "");
List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
@ -235,7 +235,7 @@ namespace OpenSim.Data.MSSQL
"No shape found for prim in storage, so setting default box shape"); "No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
createdObjects[new LLUUID(objID)].AddPart(prim); createdObjects[new UUID(objID)].AddPart(prim);
} }
LoadItems(prim); LoadItems(prim);
@ -292,7 +292,7 @@ namespace OpenSim.Data.MSSQL
// } // }
// else // else
// { // {
// createdObjects[new LLUUID(objID)].AddPart(prim); // createdObjects[new UUID(objID)].AddPart(prim);
// } // }
// } // }
// } // }
@ -307,7 +307,7 @@ namespace OpenSim.Data.MSSQL
// { // {
// while (readerShapes.Read()) // while (readerShapes.Read())
// { // {
// LLUUID UUID = new LLUUID((string) readerShapes["UUID"]); // UUID UUID = new UUID((string) readerShapes["UUID"]);
// //
// foreach (SceneObjectGroup objectGroup in createdObjects.Values) // foreach (SceneObjectGroup objectGroup in createdObjects.Values)
// { // {
@ -324,7 +324,7 @@ namespace OpenSim.Data.MSSQL
#endregion #endregion
} }
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
//Retrieve all values of current region, and current scene/or prims //Retrieve all values of current region, and current scene/or prims
//Build primID's, we use IN so I can select all prims from objgroup //Build primID's, we use IN so I can select all prims from objgroup
@ -341,9 +341,9 @@ namespace OpenSim.Data.MSSQL
foreach (SceneObjectPart prim in obj.Children.Values) foreach (SceneObjectPart prim in obj.Children.Values)
{ {
if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{ {
lock (_PrimsDataSet) lock (_PrimsDataSet)
{ {
@ -391,7 +391,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="objectID">id of scenegroup</param> /// <param name="objectID">id of scenegroup</param>
/// <param name="regionUUID">regionUUID (is this used anyway</param> /// <param name="regionUUID">regionUUID (is this used anyway</param>
public void RemoveObject(LLUUID objectID, LLUUID regionUUID) public void RemoveObject(UUID objectID, UUID regionUUID)
{ {
_Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID); _Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID);
@ -418,7 +418,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="primID"></param> /// <param name="primID"></param>
/// <param name="items"></param> /// <param name="items"></param>
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{ {
_Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); _Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
@ -456,7 +456,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="regionID">regionID.</param> /// <param name="regionID">regionID.</param>
/// <returns></returns> /// <returns></returns>
public double[,] LoadTerrain(LLUUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] terrain = new double[256, 256]; double[,] terrain = new double[256, 256];
terrain.Initialize(); terrain.Initialize();
@ -501,7 +501,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="terrain">terrain map data.</param> /// <param name="terrain">terrain map data.</param>
/// <param name="regionID">regionID.</param> /// <param name="regionID">regionID.</param>
public void StoreTerrain(double[,] terrain, LLUUID regionID) public void StoreTerrain(double[,] terrain, UUID regionID)
{ {
int revision = Util.UnixTimeSinceEpoch(); int revision = Util.UnixTimeSinceEpoch();
@ -532,7 +532,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="regionUUID">The region UUID.</param> /// <param name="regionUUID">The region UUID.</param>
/// <returns></returns> /// <returns></returns>
public List<LandData> LoadLandObjects(LLUUID regionUUID) public List<LandData> LoadLandObjects(UUID regionUUID)
{ {
List<LandData> landDataForRegion = new List<LandData>(); List<LandData> landDataForRegion = new List<LandData>();
@ -617,7 +617,7 @@ VALUES
/// Removes a land object from DB. /// Removes a land object from DB.
/// </summary> /// </summary>
/// <param name="globalID">UUID of landobject</param> /// <param name="globalID">UUID of landobject</param>
public void RemoveLandObject(LLUUID globalID) public void RemoveLandObject(UUID globalID)
{ {
using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID")) using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID"))
{ {
@ -637,7 +637,7 @@ VALUES
/// </summary> /// </summary>
/// <param name="regionUUID">The region UUID.</param> /// <param name="regionUUID">The region UUID.</param>
/// <returns></returns> /// <returns></returns>
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(UUID regionUUID)
{ {
string sql = "select * from regionsettings where regionUUID = @regionUUID"; string sql = "select * from regionsettings where regionUUID = @regionUUID";
RegionSettings regionSettings; RegionSettings regionSettings;
@ -801,7 +801,7 @@ VALUES
//TODO change this is some more generic code so we doesnt have to change it every time a new field is added? //TODO change this is some more generic code so we doesnt have to change it every time a new field is added?
RegionSettings newSettings = new RegionSettings(); 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.BlockTerraform = Convert.ToBoolean(row["block_terraform"]);
newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]);
newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]);
@ -815,10 +815,10 @@ VALUES
newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]);
newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]);
newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]);
newSettings.TerrainTexture1 = new LLUUID((String)row["terrain_texture_1"]); newSettings.TerrainTexture1 = new UUID((String)row["terrain_texture_1"]);
newSettings.TerrainTexture2 = new LLUUID((String)row["terrain_texture_2"]); newSettings.TerrainTexture2 = new UUID((String)row["terrain_texture_2"]);
newSettings.TerrainTexture3 = new LLUUID((String)row["terrain_texture_3"]); newSettings.TerrainTexture3 = new UUID((String)row["terrain_texture_3"]);
newSettings.TerrainTexture4 = new LLUUID((String)row["terrain_texture_4"]); newSettings.TerrainTexture4 = new UUID((String)row["terrain_texture_4"]);
newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]);
newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]);
newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]);
@ -834,7 +834,7 @@ VALUES
newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
newSettings.Covenant = new LLUUID((String)row["covenant"]); newSettings.Covenant = new UUID((String)row["covenant"]);
return newSettings; return newSettings;
} }
@ -848,7 +848,7 @@ VALUES
{ {
LandData newData = new LandData(); LandData newData = new LandData();
newData.GlobalID = new LLUUID((String)row["UUID"]); newData.GlobalID = new UUID((String)row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]); newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512] // Bitmap is a byte[512]
@ -864,41 +864,41 @@ VALUES
//Enum libsecondlife.Parcel.ParcelCategory //Enum libsecondlife.Parcel.ParcelCategory
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 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.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus //Enum. libsecondlife.Parcel.ParcelStatus
newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = Convert.ToByte(row["LandingType"]); newData.LandingType = Convert.ToByte(row["LandingType"]);
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 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.MediaURL = (String)row["MediaURL"];
newData.MusicURL = (String)row["MusicURL"]; newData.MusicURL = (String)row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
LLUUID authedbuyer; UUID authedbuyer;
LLUUID snapshotID; UUID snapshotID;
if (LLUUID.TryParse((string)row["AuthBuyerID"], out authedbuyer)) if (UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer))
newData.AuthBuyerID = authedbuyer; newData.AuthBuyerID = authedbuyer;
if (LLUUID.TryParse((string)row["SnapshotUUID"], out snapshotID)) if (UUID.TryParse((string)row["SnapshotUUID"], out snapshotID))
newData.SnapshotID = snapshotID; newData.SnapshotID = snapshotID;
try try
{ {
newData.UserLocation = 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"])); Convert.ToSingle(row["UserLocationZ"]));
newData.UserLookAt = 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"])); Convert.ToSingle(row["UserLookAtZ"]));
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
newData.UserLocation = LLVector3.Zero; newData.UserLocation = Vector3.Zero;
newData.UserLookAt = LLVector3.Zero; newData.UserLookAt = Vector3.Zero;
_Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); _Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
} }
@ -915,7 +915,7 @@ VALUES
private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row) private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 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.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
@ -930,7 +930,7 @@ VALUES
{ {
SceneObjectPart prim = new SceneObjectPart(); 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 // explicit conversion of integers is required, which sort
// of sucks. No idea if there is a shortcut here or not. // of sucks. No idea if there is a shortcut here or not.
prim.ParentID = Convert.ToUInt32(row["ParentID"]); prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@ -943,54 +943,54 @@ VALUES
prim.TouchName = (String)row["TouchName"]; prim.TouchName = (String)row["TouchName"];
// permissions // permissions
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorID = new LLUUID((String)row["CreatorID"]); prim.CreatorID = new UUID((String)row["CreatorID"]);
prim.OwnerID = new LLUUID((String)row["OwnerID"]); prim.OwnerID = new UUID((String)row["OwnerID"]);
prim.GroupID = new LLUUID((String)row["GroupID"]); prim.GroupID = new UUID((String)row["GroupID"]);
prim.LastOwnerID = new LLUUID((String)row["LastOwnerID"]); prim.LastOwnerID = new UUID((String)row["LastOwnerID"]);
prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
// vectors // vectors
prim.OffsetPosition = new LLVector3( prim.OffsetPosition = new Vector3(
Convert.ToSingle(row["PositionX"]), Convert.ToSingle(row["PositionX"]),
Convert.ToSingle(row["PositionY"]), Convert.ToSingle(row["PositionY"]),
Convert.ToSingle(row["PositionZ"]) Convert.ToSingle(row["PositionZ"])
); );
prim.GroupPosition = new LLVector3( prim.GroupPosition = new Vector3(
Convert.ToSingle(row["GroupPositionX"]), Convert.ToSingle(row["GroupPositionX"]),
Convert.ToSingle(row["GroupPositionY"]), Convert.ToSingle(row["GroupPositionY"]),
Convert.ToSingle(row["GroupPositionZ"]) Convert.ToSingle(row["GroupPositionZ"])
); );
prim.Velocity = new LLVector3( prim.Velocity = new Vector3(
Convert.ToSingle(row["VelocityX"]), Convert.ToSingle(row["VelocityX"]),
Convert.ToSingle(row["VelocityY"]), Convert.ToSingle(row["VelocityY"]),
Convert.ToSingle(row["VelocityZ"]) Convert.ToSingle(row["VelocityZ"])
); );
prim.AngularVelocity = new LLVector3( prim.AngularVelocity = new Vector3(
Convert.ToSingle(row["AngularVelocityX"]), Convert.ToSingle(row["AngularVelocityX"]),
Convert.ToSingle(row["AngularVelocityY"]), Convert.ToSingle(row["AngularVelocityY"]),
Convert.ToSingle(row["AngularVelocityZ"]) Convert.ToSingle(row["AngularVelocityZ"])
); );
prim.Acceleration = new LLVector3( prim.Acceleration = new Vector3(
Convert.ToSingle(row["AccelerationX"]), Convert.ToSingle(row["AccelerationX"]),
Convert.ToSingle(row["AccelerationY"]), Convert.ToSingle(row["AccelerationY"]),
Convert.ToSingle(row["AccelerationZ"]) Convert.ToSingle(row["AccelerationZ"])
); );
// quaternions // quaternions
prim.RotationOffset = new LLQuaternion( prim.RotationOffset = new Quaternion(
Convert.ToSingle(row["RotationX"]), Convert.ToSingle(row["RotationX"]),
Convert.ToSingle(row["RotationY"]), Convert.ToSingle(row["RotationY"]),
Convert.ToSingle(row["RotationZ"]), Convert.ToSingle(row["RotationZ"]),
Convert.ToSingle(row["RotationW"]) Convert.ToSingle(row["RotationW"])
); );
prim.SitTargetPositionLL = new LLVector3( prim.SitTargetPositionLL = new Vector3(
Convert.ToSingle(row["SitTargetOffsetX"]), Convert.ToSingle(row["SitTargetOffsetX"]),
Convert.ToSingle(row["SitTargetOffsetY"]), Convert.ToSingle(row["SitTargetOffsetY"]),
Convert.ToSingle(row["SitTargetOffsetZ"]) Convert.ToSingle(row["SitTargetOffsetZ"])
); );
prim.SitTargetOrientationLL = new LLQuaternion( prim.SitTargetOrientationLL = new Quaternion(
Convert.ToSingle(row["SitTargetOrientX"]), Convert.ToSingle(row["SitTargetOrientX"]),
Convert.ToSingle(row["SitTargetOrientY"]), Convert.ToSingle(row["SitTargetOrientY"]),
Convert.ToSingle(row["SitTargetOrientZ"]), Convert.ToSingle(row["SitTargetOrientZ"]),
@ -1003,14 +1003,14 @@ VALUES
prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); 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.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
prim.SoundFlags = 1; // If it's persisted at all, it's looped prim.SoundFlags = 1; // If it's persisted at all, it's looped
if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value) if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value)
prim.TextureAnimation = (Byte[])row["TextureAnimation"]; prim.TextureAnimation = (Byte[])row["TextureAnimation"];
prim.RotationalVelocity = new LLVector3( prim.RotationalVelocity = new Vector3(
Convert.ToSingle(row["OmegaX"]), Convert.ToSingle(row["OmegaX"]),
Convert.ToSingle(row["OmegaY"]), Convert.ToSingle(row["OmegaY"]),
Convert.ToSingle(row["OmegaZ"]) Convert.ToSingle(row["OmegaZ"])
@ -1019,13 +1019,13 @@ VALUES
// TODO: Rotation // TODO: Rotation
// OmegaX, OmegaY, OmegaZ // OmegaX, OmegaY, OmegaZ
prim.SetCameraEyeOffset(new LLVector3( prim.SetCameraEyeOffset(new Vector3(
Convert.ToSingle(row["CameraEyeOffsetX"]), Convert.ToSingle(row["CameraEyeOffsetX"]),
Convert.ToSingle(row["CameraEyeOffsetY"]), Convert.ToSingle(row["CameraEyeOffsetY"]),
Convert.ToSingle(row["CameraEyeOffsetZ"]) Convert.ToSingle(row["CameraEyeOffsetZ"])
)); ));
prim.SetCameraAtOffset(new LLVector3( prim.SetCameraAtOffset(new Vector3(
Convert.ToSingle(row["CameraAtOffsetX"]), Convert.ToSingle(row["CameraAtOffsetX"]),
Convert.ToSingle(row["CameraAtOffsetY"]), Convert.ToSingle(row["CameraAtOffsetY"]),
Convert.ToSingle(row["CameraAtOffsetZ"]) Convert.ToSingle(row["CameraAtOffsetZ"])
@ -1056,7 +1056,7 @@ VALUES
private static PrimitiveBaseShape buildShape(DataRow row) private static PrimitiveBaseShape buildShape(DataRow row)
{ {
PrimitiveBaseShape s = new PrimitiveBaseShape(); PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new LLVector3( s.Scale = new Vector3(
Convert.ToSingle(row["ScaleX"]), Convert.ToSingle(row["ScaleX"]),
Convert.ToSingle(row["ScaleY"]), Convert.ToSingle(row["ScaleY"]),
Convert.ToSingle(row["ScaleZ"]) Convert.ToSingle(row["ScaleZ"])
@ -1108,10 +1108,10 @@ VALUES
{ {
TaskInventoryItem taskItem = new TaskInventoryItem(); TaskInventoryItem taskItem = new TaskInventoryItem();
taskItem.ItemID = new LLUUID((String)row["itemID"]); taskItem.ItemID = new UUID((String)row["itemID"]);
taskItem.ParentPartID = new LLUUID((String)row["primID"]); taskItem.ParentPartID = new UUID((String)row["primID"]);
taskItem.AssetID = new LLUUID((String)row["assetID"]); taskItem.AssetID = new UUID((String)row["assetID"]);
taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); taskItem.ParentID = new UUID((String)row["parentFolderID"]);
taskItem.InvType = Convert.ToInt32(row["invType"]); taskItem.InvType = Convert.ToInt32(row["invType"]);
taskItem.Type = Convert.ToInt32(row["assetType"]); taskItem.Type = Convert.ToInt32(row["assetType"]);
@ -1119,10 +1119,10 @@ VALUES
taskItem.Name = (String)row["name"]; taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"]; taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = new LLUUID((String)row["creatorID"]); taskItem.CreatorID = new UUID((String)row["creatorID"]);
taskItem.OwnerID = new LLUUID((String)row["ownerID"]); taskItem.OwnerID = new UUID((String)row["ownerID"]);
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]); taskItem.GroupID = new UUID((String)row["groupID"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@ -1225,7 +1225,7 @@ VALUES
/// <param name="land">land parameters.</param> /// <param name="land">land parameters.</param>
/// <param name="regionUUID">region UUID.</param> /// <param name="regionUUID">region UUID.</param>
/// <returns></returns> /// <returns></returns>
private SqlParameter[] CreateLandParameters(LandData land, LLUUID regionUUID) private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
{ {
SqlParameter[] parameters = new SqlParameter[32]; SqlParameter[] parameters = new SqlParameter[32];
@ -1274,7 +1274,7 @@ VALUES
/// <param name="parcelAccessEntry">parcel access entry.</param> /// <param name="parcelAccessEntry">parcel access entry.</param>
/// <param name="parcelID">parcel ID.</param> /// <param name="parcelID">parcel ID.</param>
/// <returns></returns> /// <returns></returns>
private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, LLUUID parcelID) private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, UUID parcelID)
{ {
SqlParameter[] parameters = new SqlParameter[3]; SqlParameter[] parameters = new SqlParameter[3];
@ -1292,7 +1292,7 @@ VALUES
/// <param name="prim">prim data.</param> /// <param name="prim">prim data.</param>
/// <param name="sceneGroupID">scenegroup ID.</param> /// <param name="sceneGroupID">scenegroup ID.</param>
/// <param name="regionUUID">regionUUID.</param> /// <param name="regionUUID">regionUUID.</param>
private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
{ {
row["UUID"] = prim.UUID.ToString(); row["UUID"] = prim.UUID.ToString();
row["RegionUUID"] = regionUUID.ToString(); row["RegionUUID"] = regionUUID.ToString();
@ -1340,12 +1340,12 @@ VALUES
row["RotationW"] = prim.RotationOffset.W; row["RotationW"] = prim.RotationOffset.W;
// Sit target // Sit target
LLVector3 sitTargetPos = prim.SitTargetPositionLL; Vector3 sitTargetPos = prim.SitTargetPositionLL;
row["SitTargetOffsetX"] = sitTargetPos.X; row["SitTargetOffsetX"] = sitTargetPos.X;
row["SitTargetOffsetY"] = sitTargetPos.Y; row["SitTargetOffsetY"] = sitTargetPos.Y;
row["SitTargetOffsetZ"] = sitTargetPos.Z; row["SitTargetOffsetZ"] = sitTargetPos.Z;
LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
row["SitTargetOrientW"] = sitTargetOrient.W; row["SitTargetOrientW"] = sitTargetOrient.W;
row["SitTargetOrientX"] = sitTargetOrient.X; row["SitTargetOrientX"] = sitTargetOrient.X;
row["SitTargetOrientY"] = sitTargetOrient.Y; row["SitTargetOrientY"] = sitTargetOrient.Y;
@ -1364,7 +1364,7 @@ VALUES
} }
else else
{ {
row["LoopedSound"] = LLUUID.Zero; row["LoopedSound"] = UUID.Zero;
row["LoopedSoundGain"] = 0.0f; row["LoopedSoundGain"] = 0.0f;
} }
@ -1446,13 +1446,13 @@ VALUES
#endregion #endregion
private void RetrievePrimsDataForRegion(LLUUID regionUUID, LLUUID sceneGroupID, string primID) private void RetrievePrimsDataForRegion(UUID regionUUID, UUID sceneGroupID, string primID)
{ {
using (SqlConnection connection = _Database.DatabaseConnection()) using (SqlConnection connection = _Database.DatabaseConnection())
{ {
_PrimDataAdapter.SelectCommand.Connection = connection; _PrimDataAdapter.SelectCommand.Connection = connection;
_PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); _PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
if (sceneGroupID != LLUUID.Zero) if (sceneGroupID != UUID.Zero)
_PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
else else
_PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@ -1462,7 +1462,7 @@ VALUES
_ShapeDataAdapter.SelectCommand.Connection = connection; _ShapeDataAdapter.SelectCommand.Connection = connection;
_ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); _ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
if (sceneGroupID != LLUUID.Zero) if (sceneGroupID != UUID.Zero)
_ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
else else
_ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@ -1472,7 +1472,7 @@ VALUES
_ItemsDataAdapter.SelectCommand.Connection = connection; _ItemsDataAdapter.SelectCommand.Connection = connection;
_ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); _ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
if (sceneGroupID != LLUUID.Zero) if (sceneGroupID != UUID.Zero)
_ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
else else
_ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -183,13 +183,13 @@ namespace OpenSim.Data.MSSQL
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">Friend's UUID</param> /// <param name="friend">Friend's UUID</param>
/// <param name="perms">Permission flag</param> /// <param name="perms">Permission flag</param>
override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) override public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
{ {
int dtvalue = Util.UnixTimeSinceEpoch(); int dtvalue = Util.UnixTimeSinceEpoch();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["@ownerID"] = friendlistowner.UUID.ToString(); param["@ownerID"] = friendlistowner.ToString();
param["@friendID"] = friend.UUID.ToString(); param["@friendID"] = friend.ToString();
param["@friendPerms"] = perms.ToString(); param["@friendPerms"] = perms.ToString();
param["@datetimestamp"] = dtvalue.ToString(); param["@datetimestamp"] = dtvalue.ToString();
@ -229,11 +229,11 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">UUID of the not-so-friendly user to remove from the list</param> /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param>
override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) override public void RemoveUserFriend(UUID friendlistowner, UUID friend)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["@ownerID"] = friendlistowner.UUID.ToString(); param["@ownerID"] = friendlistowner.ToString();
param["@friendID"] = friend.UUID.ToString(); param["@friendID"] = friend.ToString();
try try
@ -267,11 +267,11 @@ namespace OpenSim.Data.MSSQL
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">UUID of the friend</param> /// <param name="friend">UUID of the friend</param>
/// <param name="perms">new permission flag</param> /// <param name="perms">new permission flag</param>
override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) override public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["@ownerID"] = friendlistowner.UUID.ToString(); param["@ownerID"] = friendlistowner.ToString();
param["@friendID"] = friend.UUID.ToString(); param["@friendID"] = friend.ToString();
param["@friendPerms"] = perms.ToString(); param["@friendPerms"] = perms.ToString();
@ -298,12 +298,12 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <returns>Friendlist list</returns> /// <returns>Friendlist list</returns>
override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) override public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
{ {
List<FriendListItem> Lfli = new List<FriendListItem>(); List<FriendListItem> Lfli = new List<FriendListItem>();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["@ownerID"] = friendlistowner.UUID.ToString(); param["@ownerID"] = friendlistowner.ToString();
try try
{ {
@ -318,8 +318,8 @@ namespace OpenSim.Data.MSSQL
while (reader.Read()) while (reader.Read())
{ {
FriendListItem fli = new FriendListItem(); FriendListItem fli = new FriendListItem();
fli.FriendListOwner = new LLUUID((string)reader["ownerID"]); fli.FriendListOwner = new UUID((string)reader["ownerID"]);
fli.Friend = new LLUUID((string)reader["friendID"]); fli.Friend = new UUID((string)reader["friendID"]);
fli.FriendPerms = (uint)Convert.ToInt32(reader["friendPerms"]); 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 // This is not a real column in the database table, it's a joined column from the opposite record
@ -345,7 +345,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="avatarid">avatar uuid</param> /// <param name="avatarid">avatar uuid</param>
/// <param name="regionuuid">region uuid</param> /// <param name="regionuuid">region uuid</param>
/// <param name="regionhandle">region handle</param> /// <param name="regionhandle">region handle</param>
override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) override public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
{ {
//m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
} }
@ -356,7 +356,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="queryID"></param> /// <param name="queryID"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
{ {
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
string[] querysplit; string[] querysplit;
@ -375,7 +375,7 @@ namespace OpenSim.Data.MSSQL
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string)reader["UUID"]); user.AvatarID = new UUID((string)reader["UUID"]);
user.firstName = (string)reader["username"]; user.firstName = (string)reader["username"];
user.lastName = (string)reader["lastname"]; user.lastName = (string)reader["lastname"];
returnlist.Add(user); returnlist.Add(user);
@ -400,7 +400,7 @@ namespace OpenSim.Data.MSSQL
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string)reader["UUID"]); user.AvatarID = new UUID((string)reader["UUID"]);
user.firstName = (string)reader["username"]; user.firstName = (string)reader["username"];
user.lastName = (string)reader["lastname"]; user.lastName = (string)reader["lastname"];
returnlist.Add(user); returnlist.Add(user);
@ -420,7 +420,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="uuid"></param> /// <param name="uuid"></param>
/// <returns></returns> /// <returns></returns>
override public UserProfileData GetUserByUUID(LLUUID uuid) override public UserProfileData GetUserByUUID(UUID uuid)
{ {
try try
{ {
@ -467,7 +467,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="uuid">The accounts UUID</param> /// <param name="uuid">The accounts UUID</param>
/// <returns>The users session</returns> /// <returns>The users session</returns>
override public UserAgentData GetAgentByUUID(LLUUID uuid) override public UserAgentData GetAgentByUUID(UUID uuid)
{ {
try try
{ {
@ -493,7 +493,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="AgentID">The agent UUID</param> /// <param name="AgentID">The agent UUID</param>
/// <param name="WebLoginKey">the WebLogin Key</param> /// <param name="WebLoginKey">the WebLogin Key</param>
/// <remarks>unused ?</remarks> /// <remarks>unused ?</remarks>
override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) override public void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
{ {
UserProfileData user = GetUserByUUID(AgentID); UserProfileData user = GetUserByUUID(AgentID);
user.WebLoginKey = WebLoginKey; user.WebLoginKey = WebLoginKey;
@ -549,12 +549,12 @@ namespace OpenSim.Data.MSSQL
/// <param name="profileImage">UUID for profile image</param> /// <param name="profileImage">UUID for profile image</param>
/// <param name="firstImage">UUID for firstlife image</param> /// <param name="firstImage">UUID for firstlife image</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
private bool InsertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, private bool InsertUserRow(UUID uuid, string username, string lastname, string passwordHash,
string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
string aboutText, string firstText, string aboutText, string firstText,
LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) UUID profileImage, UUID firstImage, UUID webLoginKey)
{ {
string sql = "INSERT INTO "+m_usersTableName; string sql = "INSERT INTO "+m_usersTableName;
sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
@ -594,7 +594,7 @@ namespace OpenSim.Data.MSSQL
parameters["profileFirstText"] = firstText; parameters["profileFirstText"] = firstText;
parameters["profileImage"] = profileImage.ToString(); parameters["profileImage"] = profileImage.ToString();
parameters["profileFirstImage"] = firstImage.ToString(); parameters["profileFirstImage"] = firstImage.ToString();
parameters["webLoginKey"] = LLUUID.Random().ToString(); parameters["webLoginKey"] = UUID.Random().ToString();
try try
@ -683,7 +683,7 @@ namespace OpenSim.Data.MSSQL
SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString()); SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString());
SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString()); SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString());
SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString()); SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString());
SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.UUID.ToString()); SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -728,7 +728,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="to">The receivers account ID</param> /// <param name="to">The receivers account ID</param>
/// <param name="amount">The amount to transfer</param> /// <param name="amount">The amount to transfer</param>
/// <returns>false</returns> /// <returns>false</returns>
override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) override public bool MoneyTransferRequest(UUID from, UUID to, uint amount)
{ {
return false; return false;
} }
@ -741,14 +741,14 @@ namespace OpenSim.Data.MSSQL
/// <param name="to">The receivers account ID</param> /// <param name="to">The receivers account ID</param>
/// <param name="item">The item to transfer</param> /// <param name="item">The item to transfer</param>
/// <returns>false</returns> /// <returns>false</returns>
override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) override public bool InventoryTransferRequest(UUID from, UUID to, UUID item)
{ {
return false; return false;
} }
/// Appearance /// Appearance
/// TODO: stubs for now to get us to a compiling state gently /// TODO: stubs for now to get us to a compiling state gently
override public AvatarAppearance GetUserAppearance(LLUUID user) override public AvatarAppearance GetUserAppearance(UUID user)
{ {
// return new AvatarAppearance(); // return new AvatarAppearance();
try try
@ -784,37 +784,37 @@ namespace OpenSim.Data.MSSQL
{ {
AvatarAppearance appearance = new AvatarAppearance(); AvatarAppearance appearance = new AvatarAppearance();
appearance.Owner = new LLUUID((string)reader["owner"]); appearance.Owner = new UUID((string)reader["owner"]);
appearance.Serial = Convert.ToInt32(reader["serial"]); appearance.Serial = Convert.ToInt32(reader["serial"]);
appearance.VisualParams = (byte[])reader["visual_params"]; 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.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]);
appearance.BodyItem = new LLUUID((string)reader["body_item"]); appearance.BodyItem = new UUID((string)reader["body_item"]);
appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); appearance.BodyAsset = new UUID((string)reader["body_asset"]);
appearance.SkinItem = new LLUUID((string)reader["skin_item"]); appearance.SkinItem = new UUID((string)reader["skin_item"]);
appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); appearance.SkinAsset = new UUID((string)reader["skin_asset"]);
appearance.HairItem = new LLUUID((string)reader["hair_item"]); appearance.HairItem = new UUID((string)reader["hair_item"]);
appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); appearance.HairAsset = new UUID((string)reader["hair_asset"]);
appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); appearance.EyesItem = new UUID((string)reader["eyes_item"]);
appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); appearance.EyesAsset = new UUID((string)reader["eyes_asset"]);
appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); appearance.ShirtItem = new UUID((string)reader["shirt_item"]);
appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]);
appearance.PantsItem = new LLUUID((string)reader["pants_item"]); appearance.PantsItem = new UUID((string)reader["pants_item"]);
appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); appearance.PantsAsset = new UUID((string)reader["pants_asset"]);
appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); appearance.ShoesItem = new UUID((string)reader["shoes_item"]);
appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]);
appearance.SocksItem = new LLUUID((string)reader["socks_item"]); appearance.SocksItem = new UUID((string)reader["socks_item"]);
appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); appearance.SocksAsset = new UUID((string)reader["socks_asset"]);
appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); appearance.JacketItem = new UUID((string)reader["jacket_item"]);
appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); appearance.JacketAsset = new UUID((string)reader["jacket_asset"]);
appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); appearance.GlovesItem = new UUID((string)reader["gloves_item"]);
appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]);
appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]);
appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]);
appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]);
appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]);
appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); appearance.SkirtItem = new UUID((string)reader["skirt_item"]);
appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]);
return appearance; return appearance;
} }
@ -831,7 +831,7 @@ namespace OpenSim.Data.MSSQL
/// </summary> /// </summary>
/// <param name="user">the used UUID</param> /// <param name="user">the used UUID</param>
/// <param name="appearance">the appearence</param> /// <param name="appearance">the appearence</param>
override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
{ {
string sql = String.Empty; string sql = String.Empty;
sql += "DELETE FROM avatarappearance WHERE owner=@owner "; sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
@ -918,7 +918,7 @@ namespace OpenSim.Data.MSSQL
{ {
} }
override public void ResetAttachments(LLUUID userID) override public void ResetAttachments(UUID userID)
{ {
} }
} }

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -116,7 +116,7 @@ namespace OpenSim.Data.MySQL
/// <param name="assetID">Asset UUID to fetch</param> /// <param name="assetID">Asset UUID to fetch</param>
/// <returns>Return the asset</returns> /// <returns>Return the asset</returns>
/// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks>
override public AssetBase FetchAsset(LLUUID assetID) override public AssetBase FetchAsset(UUID assetID)
{ {
AssetBase asset = null; AssetBase asset = null;
lock (_dbConnection) lock (_dbConnection)
@ -223,7 +223,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">The asset UUID</param> /// <param name="uuid">The asset UUID</param>
/// <returns>true if exist.</returns> /// <returns>true if exist.</returns>
override public bool ExistsAsset(LLUUID uuid) override public bool ExistsAsset(UUID uuid)
{ {
bool assetExists = false; bool assetExists = false;

View File

@ -31,7 +31,7 @@ using System.Data;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -157,7 +157,7 @@ namespace OpenSim.Data.MySQL
m_lastConnectionUse = timeNow; m_lastConnectionUse = timeNow;
} }
public EstateSettings LoadEstateSettings(LLUUID regionID) public EstateSettings LoadEstateSettings(UUID regionID)
{ {
EstateSettings es = new EstateSettings(); EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings; es.OnSave += StoreEstateSettings;
@ -185,11 +185,11 @@ namespace OpenSim.Data.MySQL
else else
m_FieldMap[name].SetValue(es, false); 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); m_FieldMap[name].SetValue(es, uuid);
} }
else else
@ -330,8 +330,8 @@ namespace OpenSim.Data.MySQL
{ {
EstateBan eb = new EstateBan(); EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID(); UUID uuid = new UUID();
LLUUID.TryParse(r["bannedUUID"].ToString(), out uuid); UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
eb.bannedUUID = uuid; eb.bannedUUID = uuid;
eb.bannedIP = "0.0.0.0"; 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(); CheckConnection();
@ -381,7 +381,7 @@ namespace OpenSim.Data.MySQL
cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )"; 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("?EstateID", EstateID.ToString());
cmd.Parameters.AddWithValue("?uuid", uuid.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<LLUUID> uuids = new List<LLUUID>(); List<UUID> uuids = new List<UUID>();
CheckConnection(); CheckConnection();
@ -408,8 +408,8 @@ namespace OpenSim.Data.MySQL
{ {
// EstateBan eb = new EstateBan(); // EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID(); UUID uuid = new UUID();
LLUUID.TryParse(r["uuid"].ToString(), out uuid); UUID.TryParse(r["uuid"].ToString(), out uuid);
uuids.Add(uuid); uuids.Add(uuid);
} }

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -121,7 +121,7 @@ namespace OpenSim.Data.MySQL
} }
else 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"); IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
@ -322,7 +322,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">The region UUID</param> /// <param name="uuid">The region UUID</param>
/// <returns>The sim profile</returns> /// <returns>The sim profile</returns>
override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) override public RegionProfileData GetProfileByUUID(UUID uuid)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
@ -458,14 +458,14 @@ namespace OpenSim.Data.MySQL
/// <param name="handle">The attempted regionHandle of the challenger</param> /// <param name="handle">The attempted regionHandle of the challenger</param>
/// <param name="authkey">The secret</param> /// <param name="authkey">The secret</param>
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
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 bool throwHissyFit = false; // Should be true by 1.0
if (throwHissyFit) if (throwHissyFit)
throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 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); return (handle == data.regionHandle && authkey == data.regionSecret);
} }
@ -479,7 +479,7 @@ namespace OpenSim.Data.MySQL
/// <param name="authhash"></param> /// <param name="authhash"></param>
/// <param name="challenge"></param> /// <param name="challenge"></param>
/// <returns></returns> /// <returns></returns>
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(); // SHA512Managed HashProvider = new SHA512Managed();
// Encoding TextProvider = new UTF8Encoding(); // Encoding TextProvider = new UTF8Encoding();

View File

@ -28,7 +28,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -125,7 +125,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="folderID">The folder to search</param> /// <param name="folderID">The folder to search</param>
/// <returns>A list containing inventory items</returns> /// <returns>A list containing inventory items</returns>
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
{ {
try try
{ {
@ -163,7 +163,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="user">The user whos inventory is to be searched</param> /// <param name="user">The user whos inventory is to be searched</param>
/// <returns>A list of folder objects</returns> /// <returns>A list of folder objects</returns>
public List<InventoryFolderBase> getUserRootFolders(LLUUID user) public List<InventoryFolderBase> getUserRootFolders(UUID user)
{ {
try try
{ {
@ -176,7 +176,7 @@ namespace OpenSim.Data.MySQL
"SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", user.ToString()); result.Parameters.AddWithValue("?uuid", user.ToString());
result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); result.Parameters.AddWithValue("?zero", UUID.Zero.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
List<InventoryFolderBase> items = new List<InventoryFolderBase>(); List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="user">The user UUID</param> /// <param name="user">The user UUID</param>
/// <returns></returns> /// <returns></returns>
public InventoryFolderBase getUserRootFolder(LLUUID user) public InventoryFolderBase getUserRootFolder(UUID user)
{ {
try try
{ {
@ -217,7 +217,7 @@ namespace OpenSim.Data.MySQL
"SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
database.Connection); database.Connection);
result.Parameters.AddWithValue("?uuid", user.ToString()); result.Parameters.AddWithValue("?uuid", user.ToString());
result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); result.Parameters.AddWithValue("?zero", UUID.Zero.ToString());
MySqlDataReader reader = result.ExecuteReader(); MySqlDataReader reader = result.ExecuteReader();
@ -258,7 +258,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="parentID">The folder to search</param> /// <param name="parentID">The folder to search</param>
/// <returns>A list of inventory folders</returns> /// <returns>A list of inventory folders</returns>
public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{ {
try try
{ {
@ -302,23 +302,23 @@ namespace OpenSim.Data.MySQL
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.ID = new LLUUID((string) reader["inventoryID"]); item.ID = new UUID((string) reader["inventoryID"]);
item.AssetID = new LLUUID((string) reader["assetID"]); item.AssetID = new UUID((string) reader["assetID"]);
item.AssetType = (int) reader["assetType"]; item.AssetType = (int) reader["assetType"];
item.Folder = new LLUUID((string) reader["parentFolderID"]); item.Folder = new UUID((string) reader["parentFolderID"]);
item.Owner = new LLUUID((string) reader["avatarID"]); item.Owner = new UUID((string) reader["avatarID"]);
item.Name = (string) reader["inventoryName"]; item.Name = (string) reader["inventoryName"];
item.Description = (string) reader["inventoryDescription"]; item.Description = (string) reader["inventoryDescription"];
item.NextPermissions = (uint) reader["inventoryNextPermissions"]; item.NextPermissions = (uint) reader["inventoryNextPermissions"];
item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
item.InvType = (int) reader["invType"]; 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.BasePermissions = (uint) reader["inventoryBasePermissions"];
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
item.SalePrice = (int) reader["salePrice"]; item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]); item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"]; 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.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
item.Flags = (uint) reader["flags"]; item.Flags = (uint) reader["flags"];
@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="item">The item to return</param> /// <param name="item">The item to return</param>
/// <returns>An inventory item</returns> /// <returns>An inventory item</returns>
public InventoryItemBase getInventoryItem(LLUUID itemID) public InventoryItemBase getInventoryItem(UUID itemID)
{ {
try try
{ {
@ -378,9 +378,9 @@ namespace OpenSim.Data.MySQL
try try
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.Owner = new LLUUID((string) reader["agentID"]); folder.Owner = new UUID((string) reader["agentID"]);
folder.ParentID = new LLUUID((string) reader["parentFolderID"]); folder.ParentID = new UUID((string) reader["parentFolderID"]);
folder.ID = new LLUUID((string) reader["folderID"]); folder.ID = new UUID((string) reader["folderID"]);
folder.Name = (string) reader["folderName"]; folder.Name = (string) reader["folderName"];
folder.Type = (short) reader["type"]; folder.Type = (short) reader["type"];
folder.Version = (ushort) ((int) reader["version"]); folder.Version = (ushort) ((int) reader["version"]);
@ -400,7 +400,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="folder">The folder to return</param> /// <param name="folder">The folder to return</param>
/// <returns>A folder class</returns> /// <returns>A folder class</returns>
public InventoryFolderBase getInventoryFolder(LLUUID folderID) public InventoryFolderBase getInventoryFolder(UUID folderID)
{ {
try try
{ {
@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL
/// Detele the specified inventory item /// Detele the specified inventory item
/// </summary> /// </summary>
/// <param name="item">The inventory item UUID to delete</param> /// <param name="item">The inventory item UUID to delete</param>
public void deleteInventoryItem(LLUUID itemID) public void deleteInventoryItem(UUID itemID)
{ {
try try
{ {
@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="folders">list where folders will be appended</param> /// <param name="folders">list where folders will be appended</param>
/// <param name="parentID">ID of parent</param> /// <param name="parentID">ID of parent</param>
protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
{ {
List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID); List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID);
@ -610,7 +610,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="parentID"></param> /// <param name="parentID"></param>
/// <returns></returns> /// <returns></returns>
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
{ {
/* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one /* 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. * - We will only need to hit the database twice instead of n times.
@ -631,8 +631,8 @@ namespace OpenSim.Data.MySQL
try try
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
Dictionary<LLUUID, List<InventoryFolderBase>> hashtable Dictionary<UUID, List<InventoryFolderBase>> hashtable
= new Dictionary<LLUUID, List<InventoryFolderBase>>(); ; = new Dictionary<UUID, List<InventoryFolderBase>>(); ;
List<InventoryFolderBase> parentFolder = new List<InventoryFolderBase>(); List<InventoryFolderBase> parentFolder = new List<InventoryFolderBase>();
lock (database) lock (database)
{ {
@ -655,7 +655,7 @@ namespace OpenSim.Data.MySQL
if (parentFolder.Count >= 1) // No result means parent folder does not exist 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 */ /* 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", result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE agentID = ?uuid",
@ -728,7 +728,7 @@ namespace OpenSim.Data.MySQL
/// Delete a folder from database /// Delete a folder from database
/// </summary> /// </summary>
/// <param name="folderID">the folder UUID</param> /// <param name="folderID">the folder UUID</param>
protected void deleteOneFolder(LLUUID folderID) protected void deleteOneFolder(UUID folderID)
{ {
try try
{ {
@ -754,7 +754,7 @@ namespace OpenSim.Data.MySQL
/// Delete all item in a folder /// Delete all item in a folder
/// </summary> /// </summary>
/// <param name="folderID">the folder UUID</param> /// <param name="folderID">the folder UUID</param>
protected void deleteItemsInFolder(LLUUID folderID) protected void deleteItemsInFolder(UUID folderID)
{ {
try try
{ {
@ -780,7 +780,7 @@ namespace OpenSim.Data.MySQL
/// Deletes an inventory folder /// Deletes an inventory folder
/// </summary> /// </summary>
/// <param name="folderId">Id of folder to delete</param> /// <param name="folderId">Id of folder to delete</param>
public void deleteInventoryFolder(LLUUID folderID) public void deleteInventoryFolder(UUID folderID)
{ {
List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID); List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID);

View File

@ -63,7 +63,7 @@ namespace OpenSim.Data.MySQL
} }
else 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"); IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");

View File

@ -31,7 +31,7 @@ using System.Collections;
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -384,8 +384,8 @@ namespace OpenSim.Data.MySQL
{ {
retval.regionHandle = tmp64; retval.regionHandle = tmp64;
} }
LLUUID tmp_uuid; UUID tmp_uuid;
if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) if (!UUID.TryParse((string)reader["uuid"], out tmp_uuid))
{ {
return null; return null;
} }
@ -396,7 +396,7 @@ namespace OpenSim.Data.MySQL
// non-critical parts // non-critical parts
retval.regionName = (string)reader["regionName"]; retval.regionName = (string)reader["regionName"];
retval.originUUID = new LLUUID((string) reader["originUUID"]); retval.originUUID = new UUID((string) reader["originUUID"]);
// Secrets // Secrets
retval.regionRecvKey = (string) reader["regionRecvKey"]; retval.regionRecvKey = (string) reader["regionRecvKey"];
@ -434,8 +434,8 @@ namespace OpenSim.Data.MySQL
retval.regionUserSendKey = (string) reader["regionUserSendKey"]; retval.regionUserSendKey = (string) reader["regionUserSendKey"];
// World Map Addition // World Map Addition
LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID);
LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid);
} }
else else
{ {
@ -463,8 +463,8 @@ namespace OpenSim.Data.MySQL
retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString()); retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString());
retval.reservationName = (string) reader["resName"]; retval.reservationName = (string) reader["resName"];
retval.status = Convert.ToInt32(reader["status"].ToString()) == 1; retval.status = Convert.ToInt32(reader["status"].ToString()) == 1;
LLUUID tmp; UUID tmp;
LLUUID.TryParse((string) reader["userUUID"], out tmp); UUID.TryParse((string) reader["userUUID"], out tmp);
retval.userUUID = tmp; retval.userUUID = tmp;
} }
else else
@ -486,15 +486,15 @@ namespace OpenSim.Data.MySQL
if (reader.Read()) if (reader.Read())
{ {
// Agent IDs // Agent IDs
LLUUID tmp; UUID tmp;
if (!LLUUID.TryParse((string)reader["UUID"], out tmp)) if (!UUID.TryParse((string)reader["UUID"], out tmp))
return null; return null;
retval.ProfileID = tmp; retval.ProfileID = tmp;
LLUUID.TryParse((string) reader["sessionID"], out tmp); UUID.TryParse((string) reader["sessionID"], out tmp);
retval.SessionID = tmp; retval.SessionID = tmp;
LLUUID.TryParse((string)reader["secureSessionID"], out tmp); UUID.TryParse((string)reader["secureSessionID"], out tmp);
retval.SecureSessionID = tmp; retval.SecureSessionID = tmp;
// Agent Who? // Agent Who?
@ -507,10 +507,10 @@ namespace OpenSim.Data.MySQL
retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
// Current position // Current position
retval.Region = new LLUUID((string)reader["currentRegion"]); retval.Region = new UUID((string)reader["currentRegion"]);
retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
LLVector3 tmp_v; Vector3 tmp_v;
LLVector3.TryParse((string) reader["currentPos"], out tmp_v); Vector3.TryParse((string) reader["currentPos"], out tmp_v);
retval.Position = tmp_v; retval.Position = tmp_v;
} }
else else
@ -531,8 +531,8 @@ namespace OpenSim.Data.MySQL
if (reader.Read()) if (reader.Read())
{ {
LLUUID id; UUID id;
if (!LLUUID.TryParse((string)reader["UUID"], out id)) if (!UUID.TryParse((string)reader["UUID"], out id))
return null; return null;
retval.ID = id; retval.ID = id;
@ -543,17 +543,17 @@ namespace OpenSim.Data.MySQL
retval.PasswordSalt = (string) reader["passwordSalt"]; retval.PasswordSalt = (string) reader["passwordSalt"];
retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
retval.HomeLocation = new LLVector3( retval.HomeLocation = new Vector3(
Convert.ToSingle(reader["homeLocationX"].ToString()), Convert.ToSingle(reader["homeLocationX"].ToString()),
Convert.ToSingle(reader["homeLocationY"].ToString()), Convert.ToSingle(reader["homeLocationY"].ToString()),
Convert.ToSingle(reader["homeLocationZ"].ToString())); Convert.ToSingle(reader["homeLocationZ"].ToString()));
retval.HomeLookAt = new LLVector3( retval.HomeLookAt = new Vector3(
Convert.ToSingle(reader["homeLookAtX"].ToString()), Convert.ToSingle(reader["homeLookAtX"].ToString()),
Convert.ToSingle(reader["homeLookAtY"].ToString()), Convert.ToSingle(reader["homeLookAtY"].ToString()),
Convert.ToSingle(reader["homeLookAtZ"].ToString())); Convert.ToSingle(reader["homeLookAtZ"].ToString()));
LLUUID regionID = LLUUID.Zero; UUID regionID = UUID.Zero;
LLUUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero UUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use UUID.Zero
retval.HomeRegionID = regionID; retval.HomeRegionID = regionID;
retval.Created = Convert.ToInt32(reader["created"].ToString()); retval.Created = Convert.ToInt32(reader["created"].ToString());
@ -576,29 +576,29 @@ namespace OpenSim.Data.MySQL
retval.FirstLifeAboutText = (string)reader["profileFirstText"]; retval.FirstLifeAboutText = (string)reader["profileFirstText"];
if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
retval.Image = LLUUID.Zero; retval.Image = UUID.Zero;
else { else {
LLUUID tmp; UUID tmp;
LLUUID.TryParse((string)reader["profileImage"], out tmp); UUID.TryParse((string)reader["profileImage"], out tmp);
retval.Image = tmp; retval.Image = tmp;
} }
if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage")))
retval.FirstLifeImage = LLUUID.Zero; retval.FirstLifeImage = UUID.Zero;
else { else {
LLUUID tmp; UUID tmp;
LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); UUID.TryParse((string)reader["profileFirstImage"], out tmp);
retval.FirstLifeImage = tmp; retval.FirstLifeImage = tmp;
} }
if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
{ {
retval.WebLoginKey = LLUUID.Zero; retval.WebLoginKey = UUID.Zero;
} }
else else
{ {
LLUUID tmp; UUID tmp;
LLUUID.TryParse((string)reader["webLoginKey"], out tmp); UUID.TryParse((string)reader["webLoginKey"], out tmp);
retval.WebLoginKey = tmp; retval.WebLoginKey = tmp;
} }
@ -611,12 +611,12 @@ namespace OpenSim.Data.MySQL
if (reader.IsDBNull(reader.GetOrdinal("partner"))) if (reader.IsDBNull(reader.GetOrdinal("partner")))
{ {
retval.Partner = LLUUID.Zero; retval.Partner = UUID.Zero;
} }
else else
{ {
LLUUID tmp; UUID tmp;
LLUUID.TryParse((string)reader["partner"], out tmp); UUID.TryParse((string)reader["partner"], out tmp);
retval.Partner = tmp; retval.Partner = tmp;
} }
} }
@ -638,37 +638,37 @@ namespace OpenSim.Data.MySQL
if (reader.Read()) if (reader.Read())
{ {
appearance = new AvatarAppearance(); appearance = new AvatarAppearance();
appearance.Owner = new LLUUID((string)reader["owner"]); appearance.Owner = new UUID((string)reader["owner"]);
appearance.Serial = Convert.ToInt32(reader["serial"]); appearance.Serial = Convert.ToInt32(reader["serial"]);
appearance.VisualParams = (byte[])reader["visual_params"]; 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.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]);
appearance.BodyItem = new LLUUID((string)reader["body_item"]); appearance.BodyItem = new UUID((string)reader["body_item"]);
appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); appearance.BodyAsset = new UUID((string)reader["body_asset"]);
appearance.SkinItem = new LLUUID((string)reader["skin_item"]); appearance.SkinItem = new UUID((string)reader["skin_item"]);
appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); appearance.SkinAsset = new UUID((string)reader["skin_asset"]);
appearance.HairItem = new LLUUID((string)reader["hair_item"]); appearance.HairItem = new UUID((string)reader["hair_item"]);
appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); appearance.HairAsset = new UUID((string)reader["hair_asset"]);
appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); appearance.EyesItem = new UUID((string)reader["eyes_item"]);
appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); appearance.EyesAsset = new UUID((string)reader["eyes_asset"]);
appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); appearance.ShirtItem = new UUID((string)reader["shirt_item"]);
appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]);
appearance.PantsItem = new LLUUID((string)reader["pants_item"]); appearance.PantsItem = new UUID((string)reader["pants_item"]);
appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); appearance.PantsAsset = new UUID((string)reader["pants_asset"]);
appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); appearance.ShoesItem = new UUID((string)reader["shoes_item"]);
appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]);
appearance.SocksItem = new LLUUID((string)reader["socks_item"]); appearance.SocksItem = new UUID((string)reader["socks_item"]);
appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); appearance.SocksAsset = new UUID((string)reader["socks_asset"]);
appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); appearance.JacketItem = new UUID((string)reader["jacket_item"]);
appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); appearance.JacketAsset = new UUID((string)reader["jacket_asset"]);
appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); appearance.GlovesItem = new UUID((string)reader["gloves_item"]);
appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]);
appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]);
appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]);
appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]);
appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]);
appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); appearance.SkirtItem = new UUID((string)reader["skirt_item"]);
appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]);
} }
return appearance; return appearance;
} }
@ -766,12 +766,12 @@ namespace OpenSim.Data.MySQL
/// <param name="firstImage">UUID for firstlife image</param> /// <param name="firstImage">UUID for firstlife image</param>
/// <param name="webLoginKey">Ignored</param> /// <param name="webLoginKey">Ignored</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
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, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
string aboutText, string firstText, 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()); m_log.Debug("[MySQLManager]: Fetching profile for " + uuid.ToString());
string sql = string sql =
@ -867,12 +867,12 @@ namespace OpenSim.Data.MySQL
/// <param name="firstImage">UUID for firstlife image</param> /// <param name="firstImage">UUID for firstlife image</param>
/// <param name="webLoginKey">UUID for weblogin Key</param> /// <param name="webLoginKey">UUID for weblogin Key</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, public bool updateUserRow(UUID uuid, string username, string lastname, string passwordHash,
string passwordSalt, UInt64 homeRegion, LLUUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, string passwordSalt, UInt64 homeRegion, UUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ,
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
string aboutText, string firstText, 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 "; string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname ";
sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; 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"; string sql = "delete from avatarattachments where UUID = ?uuid";

View File

@ -31,7 +31,7 @@ using System.Data;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -296,15 +296,15 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="obj">The object</param> /// <param name="obj">The object</param>
/// <param name="regionUUID">The region UUID</param> /// <param name="regionUUID">The region UUID</param>
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
lock (m_dataSet) lock (m_dataSet)
{ {
foreach (SceneObjectPart prim in obj.Children.Values) foreach (SceneObjectPart prim in obj.Children.Values)
{ {
if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{ {
//m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID); addPrim(prim, obj.UUID, regionUUID);
@ -323,9 +323,9 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="obj">The object</param> /// <param name="obj">The object</param>
/// <param name="regionUUID">The Region UUID</param> /// <param name="regionUUID">The Region UUID</param>
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 prims = m_primTable;
DataTable shapes = m_shapeTable; DataTable shapes = m_shapeTable;
@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL
foreach (DataRow row in primRows) foreach (DataRow row in primRows)
{ {
// Remove shapes row // 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)); DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid));
if (shapeRow != null) 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 caller must acquire the necessrary synchronization locks and commit or rollback changes.
/// </summary> /// </summary>
/// <param name="uuid">the Item UUID</param> /// <param name="uuid">the Item UUID</param>
private void RemoveItems(LLUUID uuid) private void RemoveItems(UUID uuid)
{ {
String sql = String.Format("primID = '{0}'", uuid); String sql = String.Format("primID = '{0}'", uuid);
DataRow[] itemRows = m_itemsTable.Select(sql); DataRow[] itemRows = m_itemsTable.Select(sql);
@ -374,9 +374,9 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="regionUUID">the Region UUID</param> /// <param name="regionUUID">the Region UUID</param>
/// <returns>List of loaded groups</returns> /// <returns>List of loaded groups</returns>
public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
{ {
Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
@ -436,7 +436,7 @@ namespace OpenSim.Data.MySQL
"No shape found for prim in storage, so setting default box shape"); "No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
createdObjects[new LLUUID(objID)].AddPart(prim); createdObjects[new UUID(objID)].AddPart(prim);
} }
LoadItems(prim); LoadItems(prim);
@ -497,7 +497,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="ter">HeightField data</param> /// <param name="ter">HeightField data</param>
/// <param name="regionID">region UUID</param> /// <param name="regionID">region UUID</param>
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, UUID regionID)
{ {
int revision = 1; int revision = 1;
m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
@ -527,7 +527,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="regionID">the region UUID</param> /// <param name="regionID">the region UUID</param>
/// <returns>Heightfield data</returns> /// <returns>Heightfield data</returns>
public double[,] LoadTerrain(LLUUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
double[,] terret = new double[256,256]; double[,] terret = new double[256,256];
terret.Initialize(); terret.Initialize();
@ -583,7 +583,7 @@ namespace OpenSim.Data.MySQL
/// </list> /// </list>
/// </summary> /// </summary>
/// <param name="globalID"></param> /// <param name="globalID"></param>
public void RemoveLandObject(LLUUID globalID) public void RemoveLandObject(UUID globalID)
{ {
lock (m_dataSet) lock (m_dataSet)
{ {
@ -646,7 +646,7 @@ namespace OpenSim.Data.MySQL
} }
} }
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(UUID regionUUID)
{ {
lock (m_dataSet) lock (m_dataSet)
{ {
@ -701,7 +701,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
/// <returns></returns> /// <returns></returns>
public List<LandData> LoadLandObjects(LLUUID regionUUID) public List<LandData> LoadLandObjects(UUID regionUUID)
{ {
List<LandData> landDataForRegion = new List<LandData>(); List<LandData> landDataForRegion = new List<LandData>();
lock (m_dataSet) lock (m_dataSet)
@ -1101,7 +1101,7 @@ namespace OpenSim.Data.MySQL
private SceneObjectPart buildPrim(DataRow row) private SceneObjectPart buildPrim(DataRow row)
{ {
SceneObjectPart prim = new SceneObjectPart(); 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 // explicit conversion of integers is required, which sort
// of sucks. No idea if there is a shortcut here or not. // of sucks. No idea if there is a shortcut here or not.
prim.ParentID = Convert.ToUInt32(row["ParentID"]); prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@ -1114,54 +1114,54 @@ namespace OpenSim.Data.MySQL
prim.TouchName = (String) row["TouchName"]; prim.TouchName = (String) row["TouchName"];
// permissions // permissions
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorID = new LLUUID((String) row["CreatorID"]); prim.CreatorID = new UUID((String) row["CreatorID"]);
prim.OwnerID = new LLUUID((String) row["OwnerID"]); prim.OwnerID = new UUID((String) row["OwnerID"]);
prim.GroupID = new LLUUID((String) row["GroupID"]); prim.GroupID = new UUID((String) row["GroupID"]);
prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
// vectors // vectors
prim.OffsetPosition = new LLVector3( prim.OffsetPosition = new Vector3(
Convert.ToSingle(row["PositionX"]), Convert.ToSingle(row["PositionX"]),
Convert.ToSingle(row["PositionY"]), Convert.ToSingle(row["PositionY"]),
Convert.ToSingle(row["PositionZ"]) Convert.ToSingle(row["PositionZ"])
); );
prim.GroupPosition = new LLVector3( prim.GroupPosition = new Vector3(
Convert.ToSingle(row["GroupPositionX"]), Convert.ToSingle(row["GroupPositionX"]),
Convert.ToSingle(row["GroupPositionY"]), Convert.ToSingle(row["GroupPositionY"]),
Convert.ToSingle(row["GroupPositionZ"]) Convert.ToSingle(row["GroupPositionZ"])
); );
prim.Velocity = new LLVector3( prim.Velocity = new Vector3(
Convert.ToSingle(row["VelocityX"]), Convert.ToSingle(row["VelocityX"]),
Convert.ToSingle(row["VelocityY"]), Convert.ToSingle(row["VelocityY"]),
Convert.ToSingle(row["VelocityZ"]) Convert.ToSingle(row["VelocityZ"])
); );
prim.AngularVelocity = new LLVector3( prim.AngularVelocity = new Vector3(
Convert.ToSingle(row["AngularVelocityX"]), Convert.ToSingle(row["AngularVelocityX"]),
Convert.ToSingle(row["AngularVelocityY"]), Convert.ToSingle(row["AngularVelocityY"]),
Convert.ToSingle(row["AngularVelocityZ"]) Convert.ToSingle(row["AngularVelocityZ"])
); );
prim.Acceleration = new LLVector3( prim.Acceleration = new Vector3(
Convert.ToSingle(row["AccelerationX"]), Convert.ToSingle(row["AccelerationX"]),
Convert.ToSingle(row["AccelerationY"]), Convert.ToSingle(row["AccelerationY"]),
Convert.ToSingle(row["AccelerationZ"]) Convert.ToSingle(row["AccelerationZ"])
); );
// quaternions // quaternions
prim.RotationOffset = new LLQuaternion( prim.RotationOffset = new Quaternion(
Convert.ToSingle(row["RotationX"]), Convert.ToSingle(row["RotationX"]),
Convert.ToSingle(row["RotationY"]), Convert.ToSingle(row["RotationY"]),
Convert.ToSingle(row["RotationZ"]), Convert.ToSingle(row["RotationZ"]),
Convert.ToSingle(row["RotationW"]) Convert.ToSingle(row["RotationW"])
); );
prim.SitTargetPositionLL = new LLVector3( prim.SitTargetPositionLL = new Vector3(
Convert.ToSingle(row["SitTargetOffsetX"]), Convert.ToSingle(row["SitTargetOffsetX"]),
Convert.ToSingle(row["SitTargetOffsetY"]), Convert.ToSingle(row["SitTargetOffsetY"]),
Convert.ToSingle(row["SitTargetOffsetZ"]) Convert.ToSingle(row["SitTargetOffsetZ"])
); );
prim.SitTargetOrientationLL = new LLQuaternion( prim.SitTargetOrientationLL = new Quaternion(
Convert.ToSingle(row["SitTargetOrientX"]), Convert.ToSingle(row["SitTargetOrientX"]),
Convert.ToSingle(row["SitTargetOrientY"]), Convert.ToSingle(row["SitTargetOrientY"]),
Convert.ToSingle(row["SitTargetOrientZ"]), Convert.ToSingle(row["SitTargetOrientZ"]),
@ -1174,14 +1174,14 @@ namespace OpenSim.Data.MySQL
prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); 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.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
prim.SoundFlags = 1; // If it's persisted at all, it's looped prim.SoundFlags = 1; // If it's persisted at all, it's looped
if (!row.IsNull("TextureAnimation")) if (!row.IsNull("TextureAnimation"))
prim.TextureAnimation = (Byte[])row["TextureAnimation"]; prim.TextureAnimation = (Byte[])row["TextureAnimation"];
prim.RotationalVelocity = new LLVector3( prim.RotationalVelocity = new Vector3(
Convert.ToSingle(row["OmegaX"]), Convert.ToSingle(row["OmegaX"]),
Convert.ToSingle(row["OmegaY"]), Convert.ToSingle(row["OmegaY"]),
Convert.ToSingle(row["OmegaZ"]) Convert.ToSingle(row["OmegaZ"])
@ -1190,13 +1190,13 @@ namespace OpenSim.Data.MySQL
// TODO: Rotation // TODO: Rotation
// OmegaX, OmegaY, OmegaZ // OmegaX, OmegaY, OmegaZ
prim.SetCameraEyeOffset(new LLVector3( prim.SetCameraEyeOffset(new Vector3(
Convert.ToSingle(row["CameraEyeOffsetX"]), Convert.ToSingle(row["CameraEyeOffsetX"]),
Convert.ToSingle(row["CameraEyeOffsetY"]), Convert.ToSingle(row["CameraEyeOffsetY"]),
Convert.ToSingle(row["CameraEyeOffsetZ"]) Convert.ToSingle(row["CameraEyeOffsetZ"])
)); ));
prim.SetCameraAtOffset(new LLVector3( prim.SetCameraAtOffset(new Vector3(
Convert.ToSingle(row["CameraAtOffsetX"]), Convert.ToSingle(row["CameraAtOffsetX"]),
Convert.ToSingle(row["CameraAtOffsetY"]), Convert.ToSingle(row["CameraAtOffsetY"]),
Convert.ToSingle(row["CameraAtOffsetZ"]) Convert.ToSingle(row["CameraAtOffsetZ"])
@ -1229,10 +1229,10 @@ namespace OpenSim.Data.MySQL
{ {
TaskInventoryItem taskItem = new TaskInventoryItem(); TaskInventoryItem taskItem = new TaskInventoryItem();
taskItem.ItemID = new LLUUID((String)row["itemID"]); taskItem.ItemID = new UUID((String)row["itemID"]);
taskItem.ParentPartID = new LLUUID((String)row["primID"]); taskItem.ParentPartID = new UUID((String)row["primID"]);
taskItem.AssetID = new LLUUID((String)row["assetID"]); taskItem.AssetID = new UUID((String)row["assetID"]);
taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); taskItem.ParentID = new UUID((String)row["parentFolderID"]);
taskItem.InvType = Convert.ToInt32(row["invType"]); taskItem.InvType = Convert.ToInt32(row["invType"]);
taskItem.Type = Convert.ToInt32(row["assetType"]); taskItem.Type = Convert.ToInt32(row["assetType"]);
@ -1240,10 +1240,10 @@ namespace OpenSim.Data.MySQL
taskItem.Name = (String)row["name"]; taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"]; taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = new LLUUID((String)row["creatorID"]); taskItem.CreatorID = new UUID((String)row["creatorID"]);
taskItem.OwnerID = new LLUUID((String)row["ownerID"]); taskItem.OwnerID = new UUID((String)row["ownerID"]);
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]); taskItem.GroupID = new UUID((String)row["groupID"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@ -1259,7 +1259,7 @@ namespace OpenSim.Data.MySQL
{ {
RegionSettings newSettings = new RegionSettings(); 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.BlockTerraform = Convert.ToBoolean(row["block_terraform"]);
newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]);
newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]);
@ -1273,10 +1273,10 @@ namespace OpenSim.Data.MySQL
newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]);
newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]);
newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]);
newSettings.TerrainTexture1 = new LLUUID((String) row["terrain_texture_1"]); newSettings.TerrainTexture1 = new UUID((String) row["terrain_texture_1"]);
newSettings.TerrainTexture2 = new LLUUID((String) row["terrain_texture_2"]); newSettings.TerrainTexture2 = new UUID((String) row["terrain_texture_2"]);
newSettings.TerrainTexture3 = new LLUUID((String) row["terrain_texture_3"]); newSettings.TerrainTexture3 = new UUID((String) row["terrain_texture_3"]);
newSettings.TerrainTexture4 = new LLUUID((String) row["terrain_texture_4"]); newSettings.TerrainTexture4 = new UUID((String) row["terrain_texture_4"]);
newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]);
newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]);
newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]);
@ -1292,7 +1292,7 @@ namespace OpenSim.Data.MySQL
newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
newSettings.Covenant = new LLUUID((String) row["covenant"]); newSettings.Covenant = new UUID((String) row["covenant"]);
return newSettings; return newSettings;
} }
@ -1306,7 +1306,7 @@ namespace OpenSim.Data.MySQL
{ {
LandData newData = new LandData(); LandData newData = new LandData();
newData.GlobalID = new LLUUID((String) row["UUID"]); newData.GlobalID = new UUID((String) row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]); newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512] // Bitmap is a byte[512]
@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL
//Enum libsecondlife.Parcel.ParcelCategory //Enum libsecondlife.Parcel.ParcelCategory
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 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.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus //Enum. libsecondlife.Parcel.ParcelStatus
newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = Convert.ToByte(row["LandingType"]); newData.LandingType = Convert.ToByte(row["LandingType"]);
newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 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.MediaURL = (String) row["MediaURL"];
newData.MusicURL = (String) row["MusicURL"]; newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassHours = Convert.ToSingle(row["PassHours"]);
newData.PassPrice = Convert.ToInt32(row["PassPrice"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
LLUUID authedbuyer = LLUUID.Zero; UUID authedbuyer = UUID.Zero;
LLUUID snapshotID = LLUUID.Zero; UUID snapshotID = UUID.Zero;
Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer); UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer);
Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID); UUID.TryParse((string)row["SnapshotUUID"], out snapshotID);
newData.AuthBuyerID = authedbuyer; newData.AuthBuyerID = authedbuyer;
newData.SnapshotID = snapshotID; newData.SnapshotID = snapshotID;
try try
{ {
newData.UserLocation = 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"])); Convert.ToSingle(row["UserLocationZ"]));
newData.UserLookAt = 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"])); Convert.ToSingle(row["UserLookAtZ"]));
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
newData.UserLocation = LLVector3.Zero; newData.UserLocation = Vector3.Zero;
newData.UserLookAt = LLVector3.Zero; newData.UserLookAt = Vector3.Zero;
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 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) private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 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.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]);
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
@ -1408,7 +1408,7 @@ namespace OpenSim.Data.MySQL
/// <param name="prim"></param> /// <param name="prim"></param>
/// <param name="sceneGroupID"></param> /// <param name="sceneGroupID"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
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["UUID"] = Util.ToRawUuidString(prim.UUID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@ -1456,12 +1456,12 @@ namespace OpenSim.Data.MySQL
row["RotationW"] = prim.RotationOffset.W; row["RotationW"] = prim.RotationOffset.W;
// Sit target // Sit target
LLVector3 sitTargetPos = prim.SitTargetPositionLL; Vector3 sitTargetPos = prim.SitTargetPositionLL;
row["SitTargetOffsetX"] = sitTargetPos.X; row["SitTargetOffsetX"] = sitTargetPos.X;
row["SitTargetOffsetY"] = sitTargetPos.Y; row["SitTargetOffsetY"] = sitTargetPos.Y;
row["SitTargetOffsetZ"] = sitTargetPos.Z; row["SitTargetOffsetZ"] = sitTargetPos.Z;
LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
row["SitTargetOrientW"] = sitTargetOrient.W; row["SitTargetOrientW"] = sitTargetOrient.W;
row["SitTargetOrientX"] = sitTargetOrient.X; row["SitTargetOrientX"] = sitTargetOrient.X;
row["SitTargetOrientY"] = sitTargetOrient.Y; row["SitTargetOrientY"] = sitTargetOrient.Y;
@ -1480,7 +1480,7 @@ namespace OpenSim.Data.MySQL
} }
else else
{ {
row["LoopedSound"] = LLUUID.Zero; row["LoopedSound"] = UUID.Zero;
row["LoopedSoundGain"] = 0.0f; row["LoopedSoundGain"] = 0.0f;
} }
@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL
/// <param name="row"></param> /// <param name="row"></param>
/// <param name="land"></param> /// <param name="land"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
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["UUID"] = Util.ToRawUuidString(land.GlobalID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@ -1642,7 +1642,7 @@ namespace OpenSim.Data.MySQL
/// <param name="row"></param> /// <param name="row"></param>
/// <param name="entry"></param> /// <param name="entry"></param>
/// <param name="parcelID"></param> /// <param name="parcelID"></param>
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["LandUUID"] = Util.ToRawUuidString(parcelID);
row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
@ -1657,7 +1657,7 @@ namespace OpenSim.Data.MySQL
private PrimitiveBaseShape buildShape(DataRow row) private PrimitiveBaseShape buildShape(DataRow row)
{ {
PrimitiveBaseShape s = new PrimitiveBaseShape(); PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new LLVector3( s.Scale = new Vector3(
Convert.ToSingle(row["ScaleX"]), Convert.ToSingle(row["ScaleX"]),
Convert.ToSingle(row["ScaleY"]), Convert.ToSingle(row["ScaleY"]),
Convert.ToSingle(row["ScaleZ"]) Convert.ToSingle(row["ScaleZ"])
@ -1778,7 +1778,7 @@ namespace OpenSim.Data.MySQL
/// <param name="prim"></param> /// <param name="prim"></param>
/// <param name="sceneGroupID"></param> /// <param name="sceneGroupID"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
{ {
lock (m_dataSet) lock (m_dataSet)
{ {
@ -1816,7 +1816,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="primID"></param> /// <param name="primID"></param>
/// <param name="items"></param> /// <param name="items"></param>
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{ {
m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);

View File

@ -31,7 +31,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
@ -221,15 +221,15 @@ namespace OpenSim.Data.MySQL
#region User Friends List Data #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(); MySQLSuperManager dbm = GetLockedConnection();
int dtvalue = Util.UnixTimeSinceEpoch(); int dtvalue = Util.UnixTimeSinceEpoch();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?ownerID"] = friendlistowner.UUID.ToString(); param["?ownerID"] = friendlistowner.ToString();
param["?friendID"] = friend.UUID.ToString(); param["?friendID"] = friend.ToString();
param["?friendPerms"] = perms.ToString(); param["?friendPerms"] = perms.ToString();
param["?datetimestamp"] = dtvalue.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(); MySQLSuperManager dbm = GetLockedConnection();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?ownerID"] = friendlistowner.UUID.ToString(); param["?ownerID"] = friendlistowner.ToString();
param["?friendID"] = friend.UUID.ToString(); param["?friendID"] = friend.ToString();
try 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(); MySQLSuperManager dbm = GetLockedConnection();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?ownerID"] = friendlistowner.UUID.ToString(); param["?ownerID"] = friendlistowner.ToString();
param["?friendID"] = friend.UUID.ToString(); param["?friendID"] = friend.ToString();
param["?friendPerms"] = perms.ToString(); param["?friendPerms"] = perms.ToString();
try try
@ -330,13 +330,13 @@ namespace OpenSim.Data.MySQL
} }
} }
public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) public override List<FriendListItem> GetUserFriendList(UUID friendlistowner)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
List<FriendListItem> Lfli = new List<FriendListItem>(); List<FriendListItem> Lfli = new List<FriendListItem>();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?ownerID"] = friendlistowner.UUID.ToString(); param["?ownerID"] = friendlistowner.ToString();
try try
{ {
@ -352,8 +352,8 @@ namespace OpenSim.Data.MySQL
while (reader.Read()) while (reader.Read())
{ {
FriendListItem fli = new FriendListItem(); FriendListItem fli = new FriendListItem();
fli.FriendListOwner = new LLUUID((string) reader["ownerID"]); fli.FriendListOwner = new UUID((string) reader["ownerID"]);
fli.Friend = new LLUUID((string) reader["friendID"]); fli.Friend = new UUID((string) reader["friendID"]);
fli.FriendPerms = (uint) Convert.ToInt32(reader["friendPerms"]); 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 // 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 #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"); //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
} }
public override List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) public override List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
@ -413,7 +413,7 @@ namespace OpenSim.Data.MySQL
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]); user.AvatarID = new UUID((string) reader["UUID"]);
user.firstName = (string) reader["username"]; user.firstName = (string) reader["username"];
user.lastName = (string) reader["lastname"]; user.lastName = (string) reader["lastname"];
returnlist.Add(user); returnlist.Add(user);
@ -449,7 +449,7 @@ namespace OpenSim.Data.MySQL
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]); user.AvatarID = new UUID((string) reader["UUID"]);
user.firstName = (string) reader["username"]; user.firstName = (string) reader["username"];
user.lastName = (string) reader["lastname"]; user.lastName = (string) reader["lastname"];
returnlist.Add(user); returnlist.Add(user);
@ -476,7 +476,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">User UUID</param> /// <param name="uuid">User UUID</param>
/// <returns>User profile data</returns> /// <returns>User profile data</returns>
public override UserProfileData GetUserByUUID(LLUUID uuid) public override UserProfileData GetUserByUUID(UUID uuid)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
try try
@ -533,13 +533,13 @@ namespace OpenSim.Data.MySQL
/// <param name="AgentID"></param> /// <param name="AgentID"></param>
/// <param name="WebLoginKey"></param> /// <param name="WebLoginKey"></param>
/// <remarks>is it still used ?</remarks> /// <remarks>is it still used ?</remarks>
public override void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) public override void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["?UUID"] = AgentID.UUID.ToString(); param["?UUID"] = AgentID.ToString();
param["?webLoginKey"] = WebLoginKey.UUID.ToString(); param["?webLoginKey"] = WebLoginKey.ToString();
try try
{ {
@ -565,7 +565,7 @@ namespace OpenSim.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">The accounts UUID</param> /// <param name="uuid">The accounts UUID</param>
/// <returns>The users session</returns> /// <returns>The users session</returns>
public override UserAgentData GetAgentByUUID(LLUUID uuid) public override UserAgentData GetAgentByUUID(UUID uuid)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
@ -682,7 +682,7 @@ namespace OpenSim.Data.MySQL
/// <param name="to">The receivers account ID</param> /// <param name="to">The receivers account ID</param>
/// <param name="amount">The amount to transfer</param> /// <param name="amount">The amount to transfer</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) public override bool MoneyTransferRequest(UUID from, UUID to, uint amount)
{ {
return false; return false;
} }
@ -695,7 +695,7 @@ namespace OpenSim.Data.MySQL
/// <param name="to">The receivers account ID</param> /// <param name="to">The receivers account ID</param>
/// <param name="item">The item to transfer</param> /// <param name="item">The item to transfer</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) public override bool InventoryTransferRequest(UUID from, UUID to, UUID item)
{ {
return false; return false;
} }
@ -705,7 +705,7 @@ namespace OpenSim.Data.MySQL
/// TODO: stubs for now to get us to a compiling state gently /// TODO: stubs for now to get us to a compiling state gently
/// override /// override
/// </summary> /// </summary>
public override AvatarAppearance GetUserAppearance(LLUUID user) public override AvatarAppearance GetUserAppearance(UUID user)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
try try
@ -744,7 +744,7 @@ namespace OpenSim.Data.MySQL
/// <param name="user">The user UUID</param> /// <param name="user">The user UUID</param>
/// <param name="appearance">The avatar appearance</param> /// <param name="appearance">The avatar appearance</param>
// override // override
public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();
try try
@ -783,7 +783,7 @@ namespace OpenSim.Data.MySQL
get { return "0.1"; } get { return "0.1"; }
} }
public Hashtable GetUserAttachments(LLUUID agentID) public Hashtable GetUserAttachments(UUID agentID)
{ {
MySQLSuperManager dbm = GetLockedConnection(); 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(); MySQLSuperManager dbm = GetLockedConnection();
try try
@ -827,7 +827,7 @@ namespace OpenSim.Data.MySQL
} }
} }
public override void ResetAttachments(LLUUID userID) public override void ResetAttachments(UUID userID)
{ {
MySQLSuperManager dbm = GetLockedConnection(); MySQLSuperManager dbm = GetLockedConnection();

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using NHibernate; using NHibernate;
using NHibernate.SqlTypes; using NHibernate.SqlTypes;
using NHibernate.UserTypes; using NHibernate.UserTypes;
@ -35,7 +35,7 @@ using NHibernate.UserTypes;
namespace OpenSim.Data.NHibernate namespace OpenSim.Data.NHibernate
{ {
[Serializable] [Serializable]
public class LLQuaternionUserType: IUserType public class QuaternionUserType: IUserType
{ {
public object Assemble(object cached, object owner) public object Assemble(object cached, object owner)
{ {
@ -49,9 +49,8 @@ namespace OpenSim.Data.NHibernate
public object DeepCopy(object quat) public object DeepCopy(object quat)
{ {
// silly libsecondlife having no copy constructor Quaternion q = (Quaternion)quat;
LLQuaternion q = (LLQuaternion) quat; return new Quaternion(q);
return new LLQuaternion(q.X, q.Y, q.Z, q.W);
} }
public object Disassemble(object quat) public object Disassemble(object quat)
@ -79,14 +78,14 @@ namespace OpenSim.Data.NHibernate
int w = rs.GetOrdinal(names[3]); int w = rs.GetOrdinal(names[3]);
if (!rs.IsDBNull(x)) if (!rs.IsDBNull(x))
{ {
quat = new LLQuaternion((Single)rs[x], (Single)rs[y], (Single)rs[z], (Single)rs[w]); quat = new Quaternion((Single)rs[x], (Single)rs[y], (Single)rs[z], (Single)rs[w]);
} }
return quat; return quat;
} }
public void NullSafeSet(IDbCommand cmd, object obj, int index) public void NullSafeSet(IDbCommand cmd, object obj, int index)
{ {
LLQuaternion quat = (LLQuaternion)obj; Quaternion quat = (Quaternion)obj;
((IDataParameter)cmd.Parameters[index]).Value = quat.X; ((IDataParameter)cmd.Parameters[index]).Value = quat.X;
((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y; ((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y;
((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z; ((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z;
@ -100,7 +99,7 @@ namespace OpenSim.Data.NHibernate
public Type ReturnedType public Type ReturnedType
{ {
get { return typeof(LLQuaternion); } get { return typeof(Quaternion); }
} }
public SqlType[] SqlTypes public SqlType[] SqlTypes

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using NHibernate; using NHibernate;
using NHibernate.SqlTypes; using NHibernate.SqlTypes;
using NHibernate.UserTypes; using NHibernate.UserTypes;
@ -35,7 +35,7 @@ using NHibernate.UserTypes;
namespace OpenSim.Data.NHibernate namespace OpenSim.Data.NHibernate
{ {
[Serializable] [Serializable]
public class LLUUIDUserType: IUserType public class UUIDUserType: IUserType
{ {
public object Assemble(object cached, object owner) public object Assemble(object cached, object owner)
{ {
@ -75,7 +75,7 @@ namespace OpenSim.Data.NHibernate
if (!rs.IsDBNull(ord)) if (!rs.IsDBNull(ord))
{ {
string first = (string)rs.GetString(ord); string first = (string)rs.GetString(ord);
uuid = new LLUUID(first); uuid = new UUID(first);
} }
return uuid; return uuid;
@ -83,7 +83,7 @@ namespace OpenSim.Data.NHibernate
public void NullSafeSet(IDbCommand cmd, object obj, int index) public void NullSafeSet(IDbCommand cmd, object obj, int index)
{ {
LLUUID uuid = (LLUUID)obj; UUID uuid = (UUID)obj;
((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString(); ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString();
} }
@ -94,7 +94,7 @@ namespace OpenSim.Data.NHibernate
public Type ReturnedType public Type ReturnedType
{ {
get { return typeof(LLUUID); } get { return typeof(UUID); }
} }
public SqlType[] SqlTypes public SqlType[] SqlTypes

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using NHibernate; using NHibernate;
using NHibernate.SqlTypes; using NHibernate.SqlTypes;
using NHibernate.UserTypes; using NHibernate.UserTypes;
@ -35,7 +35,7 @@ using NHibernate.UserTypes;
namespace OpenSim.Data.NHibernate namespace OpenSim.Data.NHibernate
{ {
[Serializable] [Serializable]
public class LLVector3UserType: IUserType public class Vector3UserType: IUserType
{ {
public object Assemble(object cached, object owner) public object Assemble(object cached, object owner)
{ {
@ -49,7 +49,7 @@ namespace OpenSim.Data.NHibernate
public object DeepCopy(object vector) public object DeepCopy(object vector)
{ {
return new LLVector3((LLVector3) vector); return new Vector3((Vector3) vector);
} }
public object Disassemble(object vector) public object Disassemble(object vector)
@ -76,14 +76,14 @@ namespace OpenSim.Data.NHibernate
int z = rs.GetOrdinal(names[2]); int z = rs.GetOrdinal(names[2]);
if (!rs.IsDBNull(x)) if (!rs.IsDBNull(x))
{ {
vector = new LLVector3((Single)rs[x], (Single)rs[y], (Single)rs[z]); vector = new Vector3((Single)rs[x], (Single)rs[y], (Single)rs[z]);
} }
return vector; return vector;
} }
public void NullSafeSet(IDbCommand cmd, object obj, int index) public void NullSafeSet(IDbCommand cmd, object obj, int index)
{ {
LLVector3 vector = (LLVector3)obj; Vector3 vector = (Vector3)obj;
((IDataParameter)cmd.Parameters[index]).Value = vector.X; ((IDataParameter)cmd.Parameters[index]).Value = vector.X;
((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y; ((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y;
((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z; ((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z;
@ -96,7 +96,7 @@ namespace OpenSim.Data.NHibernate
public Type ReturnedType public Type ReturnedType
{ {
get { return typeof(LLVector3); } get { return typeof(Vector3); }
} }
public SqlType[] SqlTypes public SqlType[] SqlTypes

View File

@ -30,7 +30,7 @@ using System.Collections;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using NHibernate; using NHibernate;
using NHibernate.Cfg; using NHibernate.Cfg;
@ -101,7 +101,7 @@ namespace OpenSim.Data.NHibernate
} }
override public AssetBase FetchAsset(LLUUID uuid) override public AssetBase FetchAsset(UUID uuid)
{ {
try try
{ {
@ -163,13 +163,13 @@ namespace OpenSim.Data.NHibernate
// asset.InvType, temporary, local, assetLength)); // asset.InvType, temporary, local, assetLength));
// } // }
override public bool ExistsAsset(LLUUID uuid) override public bool ExistsAsset(UUID uuid)
{ {
m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
return (FetchAsset(uuid) != null); return (FetchAsset(uuid) != null);
} }
public void DeleteAsset(LLUUID uuid) public void DeleteAsset(UUID uuid)
{ {
} }

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using NHibernate; using NHibernate;
using NHibernate.Cfg; using NHibernate.Cfg;
@ -105,7 +105,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="item">The UUID of the item to be returned</param> /// <param name="item">The UUID of the item to be returned</param>
/// <returns>A class containing item information</returns> /// <returns>A class containing item information</returns>
public InventoryItemBase getInventoryItem(LLUUID item) public InventoryItemBase getInventoryItem(UUID item)
{ {
try try
{ {
@ -163,7 +163,7 @@ namespace OpenSim.Data.NHibernate
/// ///
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
public void deleteInventoryItem(LLUUID itemID) public void deleteInventoryItem(UUID itemID)
{ {
using (ITransaction transaction = session.BeginTransaction()) using (ITransaction transaction = session.BeginTransaction())
{ {
@ -177,7 +177,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="folder">The UUID of the folder to be returned</param> /// <param name="folder">The UUID of the folder to be returned</param>
/// <returns>A class containing folder information</returns> /// <returns>A class containing folder information</returns>
public InventoryFolderBase getInventoryFolder(LLUUID folder) public InventoryFolderBase getInventoryFolder(UUID folder)
{ {
try try
{ {
@ -235,7 +235,7 @@ namespace OpenSim.Data.NHibernate
/// ///
/// </summary> /// </summary>
/// <param name="folder"></param> /// <param name="folder"></param>
public void deleteInventoryFolder(LLUUID folderID) public void deleteInventoryFolder(UUID folderID)
{ {
using (ITransaction transaction = session.BeginTransaction()) using (ITransaction transaction = session.BeginTransaction())
{ {
@ -245,12 +245,12 @@ namespace OpenSim.Data.NHibernate
} }
// useful private methods // useful private methods
private bool ExistsItem(LLUUID uuid) private bool ExistsItem(UUID uuid)
{ {
return (getInventoryItem(uuid) != null) ? true : false; return (getInventoryItem(uuid) != null) ? true : false;
} }
private bool ExistsFolder(LLUUID uuid) private bool ExistsFolder(UUID uuid)
{ {
return (getInventoryFolder(uuid) != null) ? true : false; return (getInventoryFolder(uuid) != null) ? true : false;
} }
@ -314,7 +314,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="folderID">The UUID of the target folder</param> /// <param name="folderID">The UUID of the target folder</param>
/// <returns>A List of InventoryItemBase items</returns> /// <returns>A List of InventoryItemBase items</returns>
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
{ {
// try { // try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase));
@ -332,16 +332,16 @@ namespace OpenSim.Data.NHibernate
// } // }
} }
public List<InventoryFolderBase> getUserRootFolders(LLUUID user) public List<InventoryFolderBase> getUserRootFolders(UUID user)
{ {
return new List<InventoryFolderBase>(); return new List<InventoryFolderBase>();
} }
// see InventoryItemBase.getUserRootFolder // see InventoryItemBase.getUserRootFolder
public InventoryFolderBase getUserRootFolder(LLUUID user) public InventoryFolderBase getUserRootFolder(UUID user)
{ {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
criteria.Add(Expression.Eq("ParentID", LLUUID.Zero)); criteria.Add(Expression.Eq("ParentID", UUID.Zero));
criteria.Add(Expression.Eq("Owner", user)); criteria.Add(Expression.Eq("Owner", user));
foreach (InventoryFolderBase folder in criteria.List()) foreach (InventoryFolderBase folder in criteria.List())
{ {
@ -356,7 +356,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="folders">list where folders will be appended</param> /// <param name="folders">list where folders will be appended</param>
/// <param name="parentID">ID of parent</param> /// <param name="parentID">ID of parent</param>
private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) private void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
{ {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
criteria.Add(Expression.Eq("ParentID", parentID)); criteria.Add(Expression.Eq("ParentID", parentID));
@ -371,7 +371,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="parentID">The folder to get subfolders for</param> /// <param name="parentID">The folder to get subfolders for</param>
/// <returns>A list of inventory folders</returns> /// <returns>A list of inventory folders</returns>
public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, parentID); getInventoryFolders(ref folders, parentID);
@ -379,7 +379,7 @@ namespace OpenSim.Data.NHibernate
} }
// See IInventoryDataPlugin // See IInventoryDataPlugin
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, parentID); getInventoryFolders(ref folders, parentID);

View File

@ -31,7 +31,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using NHibernate; using NHibernate;
using NHibernate.Cfg; using NHibernate.Cfg;
@ -109,7 +109,7 @@ namespace OpenSim.Data.NHibernate
{ {
} }
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(UUID regionUUID)
{ {
return null; return null;
} }
@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="obj">the object</param> /// <param name="obj">the object</param>
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
try try
{ {
@ -179,7 +179,7 @@ namespace OpenSim.Data.NHibernate
} }
} }
private SceneObjectGroup LoadObject(LLUUID uuid, LLUUID region) private SceneObjectGroup LoadObject(UUID uuid, UUID region)
{ {
SceneObjectGroup group = new SceneObjectGroup(); SceneObjectGroup group = new SceneObjectGroup();
@ -210,7 +210,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="obj">the object</param> /// <param name="obj">the object</param>
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
public void RemoveObject(LLUUID obj, LLUUID regionUUID) public void RemoveObject(UUID obj, UUID regionUUID)
{ {
SceneObjectGroup g = LoadObject(obj, regionUUID); SceneObjectGroup g = LoadObject(obj, regionUUID);
foreach (SceneObjectPart p in g.Children.Values) foreach (SceneObjectPart p in g.Children.Values)
@ -219,7 +219,7 @@ namespace OpenSim.Data.NHibernate
} }
session.Flush(); session.Flush();
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.Guid, regionUUID);
} }
@ -228,9 +228,9 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="regionUUID">The region UUID</param> /// <param name="regionUUID">The region UUID</param>
/// <returns>List of loaded groups</returns> /// <returns>List of loaded groups</returns>
public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
{ {
Dictionary<LLUUID, SceneObjectGroup> SOG = new Dictionary<LLUUID, SceneObjectGroup>(); Dictionary<UUID, SceneObjectGroup> SOG = new Dictionary<UUID, SceneObjectGroup>();
List<SceneObjectGroup> ret = new List<SceneObjectGroup>(); List<SceneObjectGroup> ret = new List<SceneObjectGroup>();
ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart)); ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart));
@ -276,7 +276,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="ter">terrain heightfield</param> /// <param name="ter">terrain heightfield</param>
/// <param name="regionID">region UUID</param> /// <param name="regionID">region UUID</param>
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, UUID regionID)
{ {
lock (this) { lock (this) {
Terrain t = new Terrain(regionID, ter); Terrain t = new Terrain(regionID, ter);
@ -289,7 +289,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="regionID">the region UUID</param> /// <param name="regionID">the region UUID</param>
/// <returns>Heightfield data</returns> /// <returns>Heightfield data</returns>
public double[,] LoadTerrain(LLUUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
try try
{ {
@ -307,7 +307,7 @@ namespace OpenSim.Data.NHibernate
/// ///
/// </summary> /// </summary>
/// <param name="globalID"></param> /// <param name="globalID"></param>
public void RemoveLandObject(LLUUID globalID) public void RemoveLandObject(UUID globalID)
{ {
} }
@ -326,7 +326,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
/// <returns></returns> /// <returns></returns>
public List<LandData> LoadLandObjects(LLUUID regionUUID) public List<LandData> LoadLandObjects(UUID regionUUID)
{ {
List<LandData> landDataForRegion = new List<LandData>(); List<LandData> landDataForRegion = new List<LandData>();
@ -347,7 +347,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
/// <returns>The banlist</returns> /// <returns>The banlist</returns>
public List<EstateBan> LoadRegionBanList(LLUUID regionUUID) public List<EstateBan> LoadRegionBanList(UUID regionUUID)
{ {
List<EstateBan> regionbanlist = new List<EstateBan>(); List<EstateBan> regionbanlist = new List<EstateBan>();
@ -395,7 +395,7 @@ namespace OpenSim.Data.NHibernate
/// </summary> /// </summary>
/// <param name="primID"></param> /// <param name="primID"></param>
/// <param name="items"></param> /// <param name="items"></param>
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{ {
ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem)); ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem));
criteria.Add(Expression.Eq("ParentPartID", primID)); criteria.Add(Expression.Eq("ParentPartID", primID));

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using NHibernate; using NHibernate;
using NHibernate.Cfg; using NHibernate.Cfg;
@ -90,7 +90,7 @@ namespace OpenSim.Data.NHibernate
m.Update(); m.Update();
} }
private bool ExistsUser(LLUUID uuid) private bool ExistsUser(UUID uuid)
{ {
UserProfileData user = null; UserProfileData user = null;
try try
@ -105,7 +105,7 @@ namespace OpenSim.Data.NHibernate
return (user != null); return (user != null);
} }
override public UserProfileData GetUserByUUID(LLUUID uuid) override public UserProfileData GetUserByUUID(UUID uuid)
{ {
UserProfileData user; UserProfileData user;
// TODO: I'm sure I'll have to do something silly here // TODO: I'm sure I'll have to do something silly here
@ -136,7 +136,7 @@ namespace OpenSim.Data.NHibernate
} }
} }
private void SetAgentData(LLUUID uuid, UserAgentData agent) private void SetAgentData(UUID uuid, UserAgentData agent)
{ {
if (agent == null) if (agent == null)
{ {
@ -190,7 +190,7 @@ namespace OpenSim.Data.NHibernate
session.Update(agent); session.Update(agent);
} }
override public UserAgentData GetAgentByUUID(LLUUID uuid) override public UserAgentData GetAgentByUUID(UUID uuid)
{ {
try try
{ {
@ -225,7 +225,7 @@ namespace OpenSim.Data.NHibernate
return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
{ {
List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>();
string[] querysplit; string[] querysplit;
@ -249,18 +249,18 @@ namespace OpenSim.Data.NHibernate
} }
// TODO: actually implement these // TODO: actually implement these
public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; } public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle) { return; }
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) { return; } public override void StoreWebLoginKey(UUID agentID, UUID webLoginKey) { return; }
public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } public override void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) { return; }
public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { return; } public override void RemoveUserFriend(UUID friendlistowner, UUID friend) { return; }
public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) { return; }
public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) { return new List<FriendListItem>(); } public override List<FriendListItem> GetUserFriendList(UUID friendlistowner) { return new List<FriendListItem>(); }
public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return true; } public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return true; }
public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) { return true; } public override bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return true; }
/// Appearance /// Appearance
/// TODO: stubs for now to get us to a compiling state gently /// TODO: stubs for now to get us to a compiling state gently
public override AvatarAppearance GetUserAppearance(LLUUID user) public override AvatarAppearance GetUserAppearance(UUID user)
{ {
AvatarAppearance appearance; AvatarAppearance appearance;
// TODO: I'm sure I'll have to do something silly here // TODO: I'm sure I'll have to do something silly here
@ -272,7 +272,7 @@ namespace OpenSim.Data.NHibernate
return appearance; return appearance;
} }
private bool ExistsAppearance(LLUUID uuid) private bool ExistsAppearance(UUID uuid)
{ {
AvatarAppearance appearance; AvatarAppearance appearance;
try { try {
@ -285,7 +285,7 @@ namespace OpenSim.Data.NHibernate
} }
public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
{ {
if (appearance == null) if (appearance == null)
return; return;
@ -303,7 +303,7 @@ namespace OpenSim.Data.NHibernate
} }
} }
public override void ResetAttachments(LLUUID userID) public override void ResetAttachments(UUID userID)
{ {
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false"> <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false">
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="Type" type="System.SByte" /> <property name="Type" type="System.SByte" />

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false"> <class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
<id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="Type" type="Int16" /> <property name="Type" type="Int16" />
<property name="Version" type="System.UInt16" /> <property name="Version" type="System.UInt16" />
<property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Name" type="String" length="64" /> <property name="Name" type="String" length="64" />
</class> </class>
</hibernate-mapping> </hibernate-mapping>

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false"> <class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
<id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="InvType" type="System.Int32" /> <property name="InvType" type="System.Int32" />
<property name="AssetType" type="System.Int32" /> <property name="AssetType" type="System.Int32" />
<property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Creator" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Creator" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Name" type="String" length="64" /> <property name="Name" type="String" length="64" />
<property name="Description" type="String" length="64" /> <property name="Description" type="String" length="64" />
<property name="NextPermissions" type="System.UInt32" /> <property name="NextPermissions" type="System.UInt32" />
<property name="CurrentPermissions" type="System.UInt32" /> <property name="CurrentPermissions" type="System.UInt32" />
<property name="BasePermissions" type="System.UInt32" /> <property name="BasePermissions" type="System.UInt32" />
<property name="EveryOnePermissions" type="System.UInt32" /> <property name="EveryOnePermissions" type="System.UInt32" />
<property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="GroupOwned" type="boolean" /> <property name="GroupOwned" type="boolean" />
<property name="SalePrice" type="System.Int32" /> <property name="SalePrice" type="System.Int32" />
<property name="SaleType" type="System.Byte" /> <property name="SaleType" type="System.Byte" />

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Region.Environment.Scenes.SceneObjectPart, OpenSim.Region.Environment" table="Prims" lazy="false"> <class name="OpenSim.Region.Environment.Scenes.SceneObjectPart, OpenSim.Region.Environment" table="Prims" lazy="false">
<id name="UUID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="UUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="ParentID" type="System.UInt32"/> <property name="ParentID" type="System.UInt32"/>
<property name="ParentUUID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ParentUUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="RegionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="CreationDate" type="System.Int32" /> <property name="CreationDate" type="System.Int32" />
<property name="Name" type="String" length="255" /> <property name="Name" type="String" length="255" />
<property name="Text" type="String" length="255" /> <property name="Text" type="String" length="255" />
@ -15,10 +15,10 @@
<property name="TouchName" type="String" length="255" /> <property name="TouchName" type="String" length="255" />
<property name="ObjectFlags" type="System.UInt32" /> <property name="ObjectFlags" type="System.UInt32" />
<property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="OwnerMask" type="System.UInt32" /> <property name="OwnerMask" type="System.UInt32" />
<property name="NextOwnerMask" type="System.UInt32" /> <property name="NextOwnerMask" type="System.UInt32" />
@ -26,50 +26,50 @@
<property name="EveryoneMask" type="System.UInt32" /> <property name="EveryoneMask" type="System.UInt32" />
<property name="BaseMask" type="System.UInt32" /> <property name="BaseMask" type="System.UInt32" />
<property name="OffsetPosition" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="PositionX" /> <column name="PositionX" />
<column name="PositionY" /> <column name="PositionY" />
<column name="PositionZ" /> <column name="PositionZ" />
</property> </property>
<property name="GroupPosition" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="GroupPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="GroupPositionX" /> <column name="GroupPositionX" />
<column name="GroupPositionY" /> <column name="GroupPositionY" />
<column name="GroupPositionZ" /> <column name="GroupPositionZ" />
</property> </property>
<property name="Velocity" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="Velocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="VelocityX" /> <column name="VelocityX" />
<column name="VelocityY" /> <column name="VelocityY" />
<column name="VelocityZ" /> <column name="VelocityZ" />
</property> </property>
<property name="AngularVelocity" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="AngularVelocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="AngularVelocityX" /> <column name="AngularVelocityX" />
<column name="AngularVelocityY" /> <column name="AngularVelocityY" />
<column name="AngularVelocityZ" /> <column name="AngularVelocityZ" />
</property> </property>
<property name="Acceleration" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="Acceleration" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="AccelerationX" /> <column name="AccelerationX" />
<column name="AccelerationY" /> <column name="AccelerationY" />
<column name="AccelerationZ" /> <column name="AccelerationZ" />
</property> </property>
<property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="SitTargetOffsetX" /> <column name="SitTargetOffsetX" />
<column name="SitTargetOffsetY" /> <column name="SitTargetOffsetY" />
<column name="SitTargetOffsetZ" /> <column name="SitTargetOffsetZ" />
</property> </property>
<property name="RotationOffset" type="OpenSim.Data.NHibernate.LLQuaternionUserType, OpenSim.Data.NHibernate" > <property name="RotationOffset" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
<column name="RotationX" /> <column name="RotationX" />
<column name="RotationY" /> <column name="RotationY" />
<column name="RotationZ" /> <column name="RotationZ" />
<column name="RotationW" /> <column name="RotationW" />
</property> </property>
<property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.LLQuaternionUserType, OpenSim.Data.NHibernate" > <property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
<column name="SitTargetOrientX" /> <column name="SitTargetOrientX" />
<column name="SitTargetOrientY" /> <column name="SitTargetOrientY" />
<column name="SitTargetOrientZ" /> <column name="SitTargetOrientZ" />
@ -77,7 +77,7 @@
</property> </property>
<component name="Shape"> <component name="Shape">
<property name="Scale" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > <property name="Scale" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
<column name="ScaleX" /> <column name="ScaleX" />
<column name="ScaleY" /> <column name="ScaleY" />
<column name="ScaleZ" /> <column name="ScaleZ" />
@ -105,22 +105,22 @@
</component> </component>
</class> </class>
<class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false"> <class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false">
<id name="RegionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="Map" type="System.Byte[]" /> <property name="Map" type="System.Byte[]" />
</class> </class>
<class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false"> <class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
<id name="ItemID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="ItemID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
<property name="CurrentPermissions" type="System.UInt32" /> <property name="CurrentPermissions" type="System.UInt32" />
<property name="BasePermissions" type="System.UInt32" /> <property name="BasePermissions" type="System.UInt32" />
<property name="EveryonePermissions" type="System.UInt32" /> <property name="EveryonePermissions" type="System.UInt32" />

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false"> <class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false">
<id name="ProfileID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="AgentIP" type="String" length="24" /> <property name="AgentIP" type="String" length="24" />
<property name="AgentPort" type="Int32" /> <property name="AgentPort" type="Int32" />
<property name="AgentOnline" type="boolean" /> <property name="AgentOnline" type="boolean" />
<property name="SessionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SecureSessionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SecureSessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="InitialRegion" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="InitialRegion" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Region" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Region" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="LoginTime" type="Int32" /> <property name="LoginTime" type="Int32" />
<property name="LogoutTime" type="Int32" /> <property name="LogoutTime" type="Int32" />
<property name="Handle" type="Int64" /> <property name="Handle" type="Int64" />

View File

@ -1,35 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false"> <class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
<id name="Owner" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="Owner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="BodyItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="BodyItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="BodyAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="BodyAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SkinItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SkinItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SkinAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SkinAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="HairItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="HairItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="HairAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="HairAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="EyesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="EyesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="EyesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="EyesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="ShirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="ShirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="PantsItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="PantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="PantsAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="PantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="ShoesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ShoesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="ShoesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="ShoesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SocksItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SocksItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SocksAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SocksAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="JacketItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="JacketItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="JacketAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="JacketAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="GlovesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="GlovesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="GlovesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="GlovesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="UnderShirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="UnderShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="UnderPantsItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="UnderPantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SkirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SkirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="SkirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="SkirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" /> <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
<property name="VisualParams" type="binary" /> <property name="VisualParams" type="binary" />
<property name="Serial" type="Int32" /> <property name="Serial" type="Int32" />

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false"> <class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false">
<id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" /> <generator class="assigned" />
</id> </id>
<property name="FirstName" index="user_firstname" type="String" length="32" /> <property name="FirstName" index="user_firstname" type="String" length="32" />
<property name="SurName" index="user_surname" type="String" length="32" /> <property name="SurName" index="user_surname" type="String" length="32" />
<property name="PasswordHash" type="String" length="32" /> <property name="PasswordHash" type="String" length="32" />
<property name="PasswordSalt" type="String" length="32" /> <property name="PasswordSalt" type="String" length="32" />
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="HomeRegionX" type="System.UInt32" /> <property name="HomeRegionX" type="System.UInt32" />
<property name="HomeRegionY" type="System.UInt32" /> <property name="HomeRegionY" type="System.UInt32" />
<property name="HomeLocationX" type="Single" /> <property name="HomeLocationX" type="Single" />
@ -19,11 +19,11 @@
<property name="HomeLookAtZ" type="Single" /> <property name="HomeLookAtZ" type="Single" />
<property name="Created" type="Int32" /> <property name="Created" type="Int32" />
<property name="LastLogin" type="Int32" /> <property name="LastLogin" type="Int32" />
<property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="UserInventoryURI" type="String" length="255"/> <property name="UserInventoryURI" type="String" length="255"/>
<property name="UserAssetURI" type="String" length="255"/> <property name="UserAssetURI" type="String" length="255"/>
<property name="Image" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="FirstLifeImage" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
<property name="AboutText" type="String" length="255" /> <property name="AboutText" type="String" length="255" />
<property name="FirstLifeAboutText" type="String" length="255" /> <property name="FirstLifeAboutText" type="String" length="255" />
</class> </class>

View File

@ -30,7 +30,7 @@ using System.IO;
using System.Reflection; using System.Reflection;
using OpenSim.Framework; using OpenSim.Framework;
using log4net; using log4net;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Data.NHibernate namespace OpenSim.Data.NHibernate
{ {
@ -39,9 +39,9 @@ namespace OpenSim.Data.NHibernate
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private double[,] map; private double[,] map;
private LLUUID regionID; private UUID regionID;
public Terrain(LLUUID Region, double[,] array) public Terrain(UUID Region, double[,] array)
{ {
map = array; map = array;
regionID = Region; regionID = Region;
@ -51,10 +51,10 @@ namespace OpenSim.Data.NHibernate
{ {
map = new double[Constants.RegionSize, Constants.RegionSize]; map = new double[Constants.RegionSize, Constants.RegionSize];
map.Initialize(); map.Initialize();
regionID = LLUUID.Zero; regionID = UUID.Zero;
} }
public LLUUID RegionID public UUID RegionID
{ {
get { return regionID; } get { return regionID; }
set { regionID = value; } set { regionID = value; }

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using NHibernate; using NHibernate;
using NHibernate.SqlTypes; using NHibernate.SqlTypes;
@ -53,12 +53,12 @@ namespace OpenSim.Data.NHibernate
if (texture == null) if (texture == null)
{ {
// TODO: should parametrize this texture out // TODO: should parametrize this texture out
return new LLObject.TextureEntry(new LLUUID(Constants.DefaultTexture)); return new Primitive.TextureEntry(new UUID(Constants.DefaultTexture));
} }
else else
{ {
byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes(); byte[] bytes = ((Primitive.TextureEntry)texture).ToBytes();
return new LLObject.TextureEntry(bytes, 0, bytes.Length); return new Primitive.TextureEntry(bytes, 0, bytes.Length);
} }
} }
@ -85,7 +85,7 @@ namespace OpenSim.Data.NHibernate
if (!rs.IsDBNull(ord)) if (!rs.IsDBNull(ord))
{ {
byte[] bytes = (byte[])rs[ord]; byte[] bytes = (byte[])rs[ord];
texture = new LLObject.TextureEntry(bytes, 0, bytes.Length); texture = new Primitive.TextureEntry(bytes, 0, bytes.Length);
} }
return texture; return texture;
@ -93,7 +93,7 @@ namespace OpenSim.Data.NHibernate
public void NullSafeSet(IDbCommand cmd, object obj, int index) public void NullSafeSet(IDbCommand cmd, object obj, int index)
{ {
LLObject.TextureEntry texture = (LLObject.TextureEntry)obj; Primitive.TextureEntry texture = (Primitive.TextureEntry)obj;
((IDataParameter)cmd.Parameters[index]).Value = texture.ToBytes(); ((IDataParameter)cmd.Parameters[index]).Value = texture.ToBytes();
} }
@ -104,7 +104,7 @@ namespace OpenSim.Data.NHibernate
public Type ReturnedType public Type ReturnedType
{ {
get { return typeof(LLObject.TextureEntry); } get { return typeof(Primitive.TextureEntry); }
} }
public SqlType[] SqlTypes public SqlType[] SqlTypes

View File

@ -26,7 +26,7 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
@ -47,39 +47,39 @@ namespace OpenSim.Data.Null
{ {
} }
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(UUID regionUUID)
{ {
return null; return null;
} }
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
} }
public void RemoveObject(LLUUID obj, LLUUID regionUUID) public void RemoveObject(UUID obj, UUID regionUUID)
{ {
} }
// see IRegionDatastore // see IRegionDatastore
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{ {
} }
public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
{ {
return new List<SceneObjectGroup>(); return new List<SceneObjectGroup>();
} }
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, UUID regionID)
{ {
} }
public double[,] LoadTerrain(LLUUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
return null; return null;
} }
public void RemoveLandObject(LLUUID globalID) public void RemoveLandObject(UUID globalID)
{ {
} }
@ -87,7 +87,7 @@ namespace OpenSim.Data.Null
{ {
} }
public List<LandData> LoadLandObjects(LLUUID regionUUID) public List<LandData> LoadLandObjects(UUID regionUUID)
{ {
return new List<LandData>(); return new List<LandData>();
} }

View File

@ -26,7 +26,7 @@
*/ */
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using OpenSim.Data.Base; using OpenSim.Data.Base;
namespace OpenSim.Data namespace OpenSim.Data
@ -37,25 +37,25 @@ namespace OpenSim.Data
{ {
} }
public LLVector3 GetVector(string s) public Vector3 GetVector(string s)
{ {
float x = GetFloat(s + "X"); float x = GetFloat(s + "X");
float y = GetFloat(s + "Y"); float y = GetFloat(s + "Y");
float z = GetFloat(s + "Z"); float z = GetFloat(s + "Z");
LLVector3 vector = new LLVector3(x, y, z); Vector3 vector = new Vector3(x, y, z);
return vector; return vector;
} }
public LLQuaternion GetQuaternion(string s) public Quaternion GetQuaternion(string s)
{ {
float x = GetFloat(s + "X"); float x = GetFloat(s + "X");
float y = GetFloat(s + "Y"); float y = GetFloat(s + "Y");
float z = GetFloat(s + "Z"); float z = GetFloat(s + "Z");
float w = GetFloat(s + "W"); float w = GetFloat(s + "W");
LLQuaternion quaternion = new LLQuaternion(x, y, z, w); Quaternion quaternion = new Quaternion(x, y, z, w);
return quaternion; return quaternion;
} }

View File

@ -26,7 +26,7 @@
*/ */
using System.Data; using System.Data;
using libsecondlife; using OpenMetaverse;
using OpenSim.Data.Base; using OpenSim.Data.Base;
namespace OpenSim.Data namespace OpenSim.Data
@ -39,9 +39,9 @@ namespace OpenSim.Data
public override object ConvertToDbType(object value) public override object ConvertToDbType(object value)
{ {
if (value is LLUUID) if (value is UUID)
{ {
return ((LLUUID) value).UUID.ToString(); return ((UUID)value).ToString();
} }
return base.ConvertToDbType(value); return base.ConvertToDbType(value);

View File

@ -28,7 +28,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Common; using System.Data.Common;
using libsecondlife; using OpenMetaverse;
using OpenSim.Data.Base; using OpenSim.Data.Base;
namespace OpenSim.Data namespace OpenSim.Data
@ -47,17 +47,17 @@ namespace OpenSim.Data
string fieldName = FieldName; string fieldName = FieldName;
object value = GetParamValue(obj); object value = GetParamValue(obj);
if (ValueType == typeof(LLVector3)) if (ValueType == typeof(Vector3))
{ {
LLVector3 vector = (LLVector3)value; Vector3 vector = (Vector3)value;
RawAddParam(command, fieldNames, fieldName + "X", vector.X); RawAddParam(command, fieldNames, fieldName + "X", vector.X);
RawAddParam(command, fieldNames, fieldName + "Y", vector.Y); RawAddParam(command, fieldNames, fieldName + "Y", vector.Y);
RawAddParam(command, fieldNames, fieldName + "Z", vector.Z); RawAddParam(command, fieldNames, fieldName + "Z", vector.Z);
} }
else if (ValueType == typeof(LLQuaternion)) else if (ValueType == typeof(Quaternion))
{ {
LLQuaternion quaternion = (LLQuaternion)value; Quaternion quaternion = (Quaternion)value;
RawAddParam(command, fieldNames, fieldName + "X", quaternion.X); RawAddParam(command, fieldNames, fieldName + "X", quaternion.X);
RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y); RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y);
@ -76,18 +76,18 @@ namespace OpenSim.Data
OpenSimDataReader osreader = (OpenSimDataReader) reader; OpenSimDataReader osreader = (OpenSimDataReader) reader;
if (ValueType == typeof(LLVector3)) if (ValueType == typeof(Vector3))
{ {
value = osreader.GetVector(FieldName); value = osreader.GetVector(FieldName);
} }
else if (ValueType == typeof(LLQuaternion)) else if (ValueType == typeof(Quaternion))
{ {
value = osreader.GetQuaternion(FieldName); value = osreader.GetQuaternion(FieldName);
} }
else if (ValueType == typeof(LLUUID)) else if (ValueType == typeof(UUID))
{ {
Guid guid = reader.GetGuid(FieldName); Guid guid = reader.GetGuid(FieldName);
value = new LLUUID(guid); value = new UUID(guid);
} }
else else
{ {

View File

@ -26,7 +26,7 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
using OpenSim.Data.Base; using OpenSim.Data.Base;
using OpenSim.Framework; using OpenSim.Framework;
@ -89,9 +89,9 @@ namespace OpenSim.Data
delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; }, delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; },
delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; }); delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; });
rowMapperSchema.AddMapping<LLVector3>("Scale", rowMapperSchema.AddMapping<Vector3>("Scale",
delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; }, delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; },
delegate(PrimitiveBaseShapeRowMapper shape, LLVector3 value) { shape.Object.Scale = value; }); delegate(PrimitiveBaseShapeRowMapper shape, Vector3 value) { shape.Object.Scale = value; });
rowMapperSchema.AddMapping<sbyte>("PathTaperX", rowMapperSchema.AddMapping<sbyte>("PathTaperX",
delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; }, delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; },
@ -143,7 +143,7 @@ namespace OpenSim.Data
PrimitiveBaseShape shape = new PrimitiveBaseShape(); PrimitiveBaseShape shape = new PrimitiveBaseShape();
PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape);
mapper.FillObject(reader); mapper.FiPrimitive(reader);
return mapper; return mapper;
} }

View File

@ -27,9 +27,10 @@
using System; using System;
using System.Collections; using System.Collections;
using libsecondlife; using OpenMetaverse;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework; using OpenSim.Framework;
using OpenMetaverse;
namespace OpenSim.Data namespace OpenSim.Data
{ {
@ -51,7 +52,7 @@ namespace OpenSim.Data
/// <summary> /// <summary>
/// OGS/OpenSim Specific ID for a region /// OGS/OpenSim Specific ID for a region
/// </summary> /// </summary>
public LLUUID UUID; public UUID UUID;
/// <summary> /// <summary>
/// Coordinates of the region /// Coordinates of the region
@ -117,18 +118,18 @@ namespace OpenSim.Data
/// <summary> /// <summary>
/// Region Map Texture Asset /// Region Map Texture Asset
/// </summary> /// </summary>
public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); public UUID regionMapTextureID = new UUID("00000000-0000-1111-9999-000000000006");
/// <summary> /// <summary>
/// this particular mod to the file provides support within the spec for RegionProfileData for the /// this particular mod to the file provides support within the spec for RegionProfileData for the
/// owner_uuid for the region /// owner_uuid for the region
/// </summary> /// </summary>
public LLUUID owner_uuid = LLUUID.Zero; public UUID owner_uuid = UUID.Zero;
/// <summary> /// <summary>
/// OGS/OpenSim Specific original ID for a region after move/split /// OGS/OpenSim Specific original ID for a region after move/split
/// </summary> /// </summary>
public LLUUID originUUID; public UUID originUUID;
/// <summary> /// <summary>
/// Request sim data based on arbitrary key/value /// Request sim data based on arbitrary key/value
@ -161,7 +162,7 @@ namespace OpenSim.Data
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
simData.serverURI = (string) responseData["server_uri"]; simData.serverURI = (string) responseData["server_uri"];
simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
simData.UUID = new LLUUID((string) responseData["region_UUID"]); simData.UUID = new UUID((string) responseData["region_UUID"]);
simData.regionName = (string) responseData["region_name"]; simData.regionName = (string) responseData["region_name"];
} }
@ -177,10 +178,10 @@ namespace OpenSim.Data
/// <param name="gridserver_recvkey"></param> /// <param name="gridserver_recvkey"></param>
/// <returns>The sim profile. Null if there was a request failure</returns> /// <returns>The sim profile. Null if there was a request failure</returns>
/// <remarks>This method should be statics</remarks> /// <remarks>This method should be statics</remarks>
public static RegionProfileData RequestSimProfileData(LLUUID region_uuid, Uri gridserver_url, public static RegionProfileData RequestSimProfileData(UUID region_uuid, Uri gridserver_url,
string gridserver_sendkey, string gridserver_recvkey) string gridserver_sendkey, string gridserver_recvkey)
{ {
return RequestSimData(gridserver_url, gridserver_sendkey, "region_UUID", region_uuid.UUID.ToString()); return RequestSimData(gridserver_url, gridserver_sendkey, "region_UUID", region_uuid.Guid.ToString());
} }
/// <summary> /// <summary>

View File

@ -26,13 +26,13 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Data namespace OpenSim.Data
{ {
public class ReservationData public class ReservationData
{ {
public LLUUID userUUID = LLUUID.Zero; public UUID userUUID = UUID.Zero;
public int reservationMinX = 0; public int reservationMinX = 0;
public int reservationMinY = 0; public int reservationMinY = 0;
public int reservationMaxX = 65536; public int reservationMaxX = 65536;

View File

@ -28,7 +28,7 @@
using System; using System;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -87,7 +87,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">UUID of ... ?</param> /// <param name="uuid">UUID of ... ?</param>
/// <returns>Asset base</returns> /// <returns>Asset base</returns>
override public AssetBase FetchAsset(LLUUID uuid) override public AssetBase FetchAsset(UUID uuid)
{ {
lock (this) lock (this)
{ {
@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">The asset UUID</param> /// <param name="uuid">The asset UUID</param>
/// <returns>True if exist, or false.</returns> /// <returns>True if exist, or false.</returns>
override public bool ExistsAsset(LLUUID uuid) override public bool ExistsAsset(UUID uuid)
{ {
lock (this) { lock (this) {
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
@ -217,7 +217,7 @@ namespace OpenSim.Data.SQLite
/// Delete an asset from database /// Delete an asset from database
/// </summary> /// </summary>
/// <param name="uuid"></param> /// <param name="uuid"></param>
public void DeleteAsset(LLUUID uuid) public void DeleteAsset(UUID uuid)
{ {
using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
{ {
@ -239,7 +239,7 @@ namespace OpenSim.Data.SQLite
// back out. Not enough time to figure it out yet. // back out. Not enough time to figure it out yet.
AssetBase asset = new AssetBase(); AssetBase asset = new AssetBase();
asset.FullID = new LLUUID((String) row["UUID"]); asset.FullID = new UUID((String) row["UUID"]);
asset.Name = (String) row["Name"]; asset.Name = (String) row["Name"];
asset.Description = (String) row["Description"]; asset.Description = (String) row["Description"];
asset.Type = Convert.ToSByte(row["Type"]); asset.Type = Convert.ToSByte(row["Type"]);

View File

@ -31,7 +31,7 @@ using System.Data;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -83,7 +83,7 @@ namespace OpenSim.Data.SQLite
get { return new List<string>(m_FieldMap.Keys).ToArray(); } get { return new List<string>(m_FieldMap.Keys).ToArray(); }
} }
public EstateSettings LoadEstateSettings(LLUUID regionID) public EstateSettings LoadEstateSettings(UUID regionID)
{ {
EstateSettings es = new EstateSettings(); EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings; es.OnSave += StoreEstateSettings;
@ -109,11 +109,11 @@ namespace OpenSim.Data.SQLite
else else
m_FieldMap[name].SetValue(es, false); 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); m_FieldMap[name].SetValue(es, uuid);
} }
else else
@ -258,8 +258,8 @@ namespace OpenSim.Data.SQLite
{ {
EstateBan eb = new EstateBan(); EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID(); UUID uuid = new UUID();
LLUUID.TryParse(r["bannedUUID"].ToString(), out uuid); UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
eb.bannedUUID = uuid; eb.bannedUUID = uuid;
eb.bannedIP = "0.0.0.0"; eb.bannedIP = "0.0.0.0";
@ -292,7 +292,7 @@ namespace OpenSim.Data.SQLite
} }
} }
void SaveUUIDList(uint EstateID, string table, LLUUID[] data) void SaveUUIDList(uint EstateID, string table, UUID[] data)
{ {
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
@ -305,7 +305,7 @@ namespace OpenSim.Data.SQLite
cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
foreach (LLUUID uuid in data) foreach (UUID uuid in data)
{ {
cmd.Parameters.Add(":EstateID", EstateID.ToString()); cmd.Parameters.Add(":EstateID", EstateID.ToString());
cmd.Parameters.Add(":uuid", uuid.ToString()); cmd.Parameters.Add(":uuid", uuid.ToString());
@ -315,9 +315,9 @@ namespace OpenSim.Data.SQLite
} }
} }
LLUUID[] LoadUUIDList(uint EstateID, string table) UUID[] LoadUUIDList(uint EstateID, string table)
{ {
List<LLUUID> uuids = new List<LLUUID>(); List<UUID> uuids = new List<UUID>();
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
@ -330,8 +330,8 @@ namespace OpenSim.Data.SQLite
{ {
// EstateBan eb = new EstateBan(); // EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID(); UUID uuid = new UUID();
LLUUID.TryParse(r["uuid"].ToString(), out uuid); UUID.TryParse(r["uuid"].ToString(), out uuid);
uuids.Add(uuid); uuids.Add(uuid);
} }

View File

@ -31,7 +31,7 @@ using System.Data;
using System.Reflection; using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -162,7 +162,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">The region UUID</param> /// <param name="uuid">The region UUID</param>
/// <returns>The sim profile</returns> /// <returns>The sim profile</returns>
override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) override public RegionProfileData GetProfileByUUID(UUID uuid)
{ {
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["uuid"] = uuid.ToString(); param["uuid"] = uuid.ToString();
@ -181,7 +181,7 @@ namespace OpenSim.Data.SQLite
/// Returns a list of avatar and UUIDs that match the query /// Returns a list of avatar and UUIDs that match the query
/// </summary> /// </summary>
/// <remarks>do nothing yet</remarks> /// <remarks>do nothing yet</remarks>
public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
{ {
//Do nothing yet //Do nothing yet
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
@ -217,14 +217,14 @@ namespace OpenSim.Data.SQLite
/// <param name="handle">The attempted regionHandle of the challenger</param> /// <param name="handle">The attempted regionHandle of the challenger</param>
/// <param name="authkey">The secret</param> /// <param name="authkey">The secret</param>
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
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 bool throwHissyFit = false; // Should be true by 1.0
if (throwHissyFit) if (throwHissyFit)
throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 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); return (handle == data.regionHandle && authkey == data.regionSecret);
} }
@ -238,7 +238,7 @@ namespace OpenSim.Data.SQLite
/// <param name="authhash"></param> /// <param name="authhash"></param>
/// <param name="challenge"></param> /// <param name="challenge"></param>
/// <returns></returns> /// <returns></returns>
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(); // SHA512Managed HashProvider = new SHA512Managed();
// Encoding TextProvider = new UTF8Encoding(); // Encoding TextProvider = new UTF8Encoding();

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -109,13 +109,13 @@ namespace OpenSim.Data.SQLite
public InventoryItemBase buildItem(DataRow row) public InventoryItemBase buildItem(DataRow row)
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.ID = new LLUUID((string) row["UUID"]); item.ID = new UUID((string) row["UUID"]);
item.AssetID = new LLUUID((string) row["assetID"]); item.AssetID = new UUID((string) row["assetID"]);
item.AssetType = Convert.ToInt32(row["assetType"]); item.AssetType = Convert.ToInt32(row["assetType"]);
item.InvType = Convert.ToInt32(row["invType"]); item.InvType = Convert.ToInt32(row["invType"]);
item.Folder = new LLUUID((string) row["parentFolderID"]); item.Folder = new UUID((string) row["parentFolderID"]);
item.Owner = new LLUUID((string) row["avatarID"]); item.Owner = new UUID((string) row["avatarID"]);
item.Creator = new LLUUID((string) row["creatorsID"]); item.Creator = new UUID((string) row["creatorsID"]);
item.Name = (string) row["inventoryName"]; item.Name = (string) row["inventoryName"];
item.Description = (string) row["inventoryDescription"]; item.Description = (string) row["inventoryDescription"];
@ -135,7 +135,7 @@ namespace OpenSim.Data.SQLite
item.CreationDate = Convert.ToInt32(row["creationDate"]); item.CreationDate = Convert.ToInt32(row["creationDate"]);
if (!Convert.IsDBNull(row["groupID"])) if (!Convert.IsDBNull(row["groupID"]))
item.GroupID = new LLUUID((string)row["groupID"]); item.GroupID = new UUID((string)row["groupID"]);
if (!Convert.IsDBNull(row["groupOwned"])) if (!Convert.IsDBNull(row["groupOwned"]))
item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
@ -317,7 +317,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="folderID">The UUID of the target folder</param> /// <param name="folderID">The UUID of the target folder</param>
/// <returns>A List of InventoryItemBase items</returns> /// <returns>A List of InventoryItemBase items</returns>
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
{ {
lock (ds) lock (ds)
{ {
@ -339,20 +339,20 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="user">The user whos inventory is to be searched</param> /// <param name="user">The user whos inventory is to be searched</param>
/// <returns>A list of folder objects</returns> /// <returns>A list of folder objects</returns>
public List<InventoryFolderBase> getUserRootFolders(LLUUID user) public List<InventoryFolderBase> getUserRootFolders(UUID user)
{ {
return new List<InventoryFolderBase>(); return new List<InventoryFolderBase>();
} }
// see InventoryItemBase.getUserRootFolder // see InventoryItemBase.getUserRootFolder
public InventoryFolderBase getUserRootFolder(LLUUID user) public InventoryFolderBase getUserRootFolder(UUID user)
{ {
lock (ds) lock (ds)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" +
Util.ToRawUuidString(LLUUID.Zero) + "'"; Util.ToRawUuidString(UUID.Zero) + "'";
DataRow[] rows = inventoryFolderTable.Select(selectExp); DataRow[] rows = inventoryFolderTable.Select(selectExp);
foreach (DataRow row in rows) foreach (DataRow row in rows)
{ {
@ -378,7 +378,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="folders">list where folders will be appended</param> /// <param name="folders">list where folders will be appended</param>
/// <param name="parentID">ID of parent</param> /// <param name="parentID">ID of parent</param>
protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
{ {
lock (ds) lock (ds)
{ {
@ -398,7 +398,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="parentID">The folder to get subfolders for</param> /// <param name="parentID">The folder to get subfolders for</param>
/// <returns>A list of inventory folders</returns> /// <returns>A list of inventory folders</returns>
public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
{ {
List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
@ -410,7 +410,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="parentID"></param> /// <param name="parentID"></param>
/// <returns></returns> /// <returns></returns>
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
{ {
/* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one /* 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. * - We will only need to hit the database twice instead of n times.
@ -441,7 +441,7 @@ namespace OpenSim.Data.SQLite
if (parentRow.GetLength(0) >= 1) // No result means parent folder does not exist if (parentRow.GetLength(0) >= 1) // No result means parent folder does not exist
{ {
parentFolder = buildFolder(parentRow[0]); parentFolder = buildFolder(parentRow[0]);
LLUUID agentID = parentFolder.Owner; UUID agentID = parentFolder.Owner;
selectExp = "agentID = '" + Util.ToRawUuidString(agentID) + "'"; selectExp = "agentID = '" + Util.ToRawUuidString(agentID) + "'";
folderRows = inventoryFolderTable.Select(selectExp); folderRows = inventoryFolderTable.Select(selectExp);
} }
@ -451,7 +451,7 @@ namespace OpenSim.Data.SQLite
/* if we're querying the root folder, just return an unordered list of all folders in the user's /* if we're querying the root folder, just return an unordered list of all folders in the user's
* inventory * inventory
*/ */
if (parentFolder.ParentID == LLUUID.Zero) if (parentFolder.ParentID == UUID.Zero)
{ {
foreach (DataRow row in folderRows) foreach (DataRow row in folderRows)
{ {
@ -470,13 +470,13 @@ namespace OpenSim.Data.SQLite
{ // Querying a non-root folder { // Querying a non-root folder
// Build a hash table of all user's inventory folders, indexed by each folder's parent ID // Build a hash table of all user's inventory folders, indexed by each folder's parent ID
Dictionary<LLUUID, List<InventoryFolderBase>> hashtable = Dictionary<UUID, List<InventoryFolderBase>> hashtable =
new Dictionary<LLUUID, List<InventoryFolderBase>>(folderRows.GetLength(0)); new Dictionary<UUID, List<InventoryFolderBase>>(folderRows.GetLength(0));
foreach (DataRow row in folderRows) foreach (DataRow row in folderRows)
{ {
InventoryFolderBase curFolder = buildFolder(row); InventoryFolderBase curFolder = buildFolder(row);
if (curFolder.ParentID != LLUUID.Zero) // Discard root of tree - not needed if (curFolder.ParentID != UUID.Zero) // Discard root of tree - not needed
{ {
if (hashtable.ContainsKey(curFolder.ParentID)) if (hashtable.ContainsKey(curFolder.ParentID))
{ {
@ -514,7 +514,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="item">The UUID of the item to be returned</param> /// <param name="item">The UUID of the item to be returned</param>
/// <returns>A class containing item information</returns> /// <returns>A class containing item information</returns>
public InventoryItemBase getInventoryItem(LLUUID item) public InventoryItemBase getInventoryItem(UUID item)
{ {
lock (ds) lock (ds)
{ {
@ -535,7 +535,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="folder">The UUID of the folder to be returned</param> /// <param name="folder">The UUID of the folder to be returned</param>
/// <returns>A class containing folder information</returns> /// <returns>A class containing folder information</returns>
public InventoryFolderBase getInventoryFolder(LLUUID folder) public InventoryFolderBase getInventoryFolder(UUID folder)
{ {
// TODO: Deep voodoo here. If you enable this code then // TODO: Deep voodoo here. If you enable this code then
// multi region breaks. No idea why, but I figured it was // multi region breaks. No idea why, but I figured it was
@ -578,7 +578,7 @@ namespace OpenSim.Data.SQLite
/// Delete an inventory item /// Delete an inventory item
/// </summary> /// </summary>
/// <param name="item">The item UUID</param> /// <param name="item">The item UUID</param>
public void deleteInventoryItem(LLUUID itemID) public void deleteInventoryItem(UUID itemID)
{ {
lock (ds) lock (ds)
{ {
@ -599,7 +599,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="folderId">id of the folder, whose item content should be deleted</param> /// <param name="folderId">id of the folder, whose item content should be deleted</param>
/// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo> /// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo>
private void deleteItemsInFolder(LLUUID folderId) private void deleteItemsInFolder(UUID folderId)
{ {
List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId));
@ -641,7 +641,7 @@ namespace OpenSim.Data.SQLite
/// This will clean-up any child folders and child items as well /// This will clean-up any child folders and child items as well
/// </remarks> /// </remarks>
/// <param name="folderID">the folder UUID</param> /// <param name="folderID">the folder UUID</param>
public void deleteInventoryFolder(LLUUID folderID) public void deleteInventoryFolder(UUID folderID)
{ {
lock (ds) lock (ds)
{ {
@ -791,10 +791,10 @@ namespace OpenSim.Data.SQLite
private static InventoryFolderBase buildFolder(DataRow row) private static InventoryFolderBase buildFolder(DataRow row)
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.ID = new LLUUID((string) row["UUID"]); folder.ID = new UUID((string) row["UUID"]);
folder.Name = (string) row["name"]; folder.Name = (string) row["name"];
folder.Owner = new LLUUID((string) row["agentID"]); folder.Owner = new UUID((string) row["agentID"]);
folder.ParentID = new LLUUID((string) row["parentID"]); folder.ParentID = new UUID((string) row["parentID"]);
folder.Type = Convert.ToInt16(row["type"]); folder.Type = Convert.ToInt16(row["type"]);
folder.Version = Convert.ToUInt16(row["version"]); folder.Version = Convert.ToUInt16(row["version"]);
return folder; return folder;

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SQLite; using System.Data.SQLite;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
namespace OpenSim.Data.SQLite namespace OpenSim.Data.SQLite
@ -118,7 +118,7 @@ namespace OpenSim.Data.SQLite
// Region Main // Region Main
retval.regionHandle = (ulong) reader["regionHandle"]; retval.regionHandle = (ulong) reader["regionHandle"];
retval.regionName = (string) reader["regionName"]; retval.regionName = (string) reader["regionName"];
retval.UUID = new LLUUID((string) reader["uuid"]); retval.UUID = new UUID((string) reader["uuid"]);
// Secrets // Secrets
retval.regionRecvKey = (string) reader["regionRecvKey"]; retval.regionRecvKey = (string) reader["regionRecvKey"];
@ -182,7 +182,7 @@ namespace OpenSim.Data.SQLite
parameters["regionHandle"] = profile.regionHandle.ToString(); parameters["regionHandle"] = profile.regionHandle.ToString();
parameters["regionName"] = profile.regionName; parameters["regionName"] = profile.regionName;
parameters["uuid"] = profile.UUID.ToString(); parameters["uuid"] = profile.ToString();
parameters["regionRecvKey"] = profile.regionRecvKey; parameters["regionRecvKey"] = profile.regionRecvKey;
parameters["regionSendKey"] = profile.regionSendKey; parameters["regionSendKey"] = profile.regionSendKey;
parameters["regionDataURI"] = profile.regionDataURI; parameters["regionDataURI"] = profile.regionDataURI;

View File

@ -31,7 +31,7 @@ using System.Data;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite
{ {
} }
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(UUID regionUUID)
{ {
return null; return null;
} }
@ -200,15 +200,15 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="obj">the object</param> /// <param name="obj">the object</param>
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{ {
lock (ds) lock (ds)
{ {
foreach (SceneObjectPart prim in obj.Children.Values) foreach (SceneObjectPart prim in obj.Children.Values)
{ {
if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
{ {
//m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
@ -235,9 +235,9 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="obj">the object</param> /// <param name="obj">the object</param>
/// <param name="regionUUID">the region UUID</param> /// <param name="regionUUID">the region UUID</param>
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.Guid, regionUUID);
DataTable prims = ds.Tables["prims"]; DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"]; DataTable shapes = ds.Tables["primshapes"];
@ -249,7 +249,7 @@ namespace OpenSim.Data.SQLite
foreach (DataRow row in primRows) foreach (DataRow row in primRows)
{ {
// Remove shape rows // Remove shape rows
LLUUID uuid = new LLUUID((string) row["UUID"]); UUID uuid = new UUID((string) row["UUID"]);
DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid));
if (shapeRow != null) if (shapeRow != null)
{ {
@ -271,7 +271,7 @@ namespace OpenSim.Data.SQLite
/// The caller must acquire the necessrary synchronization locks and commit or rollback changes. /// The caller must acquire the necessrary synchronization locks and commit or rollback changes.
/// </summary> /// </summary>
/// <param name="uuid">The item UUID</param> /// <param name="uuid">The item UUID</param>
private void RemoveItems(LLUUID uuid) private void RemoveItems(UUID uuid)
{ {
DataTable items = ds.Tables["primitems"]; DataTable items = ds.Tables["primitems"];
@ -289,9 +289,9 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="regionUUID">The region UUID</param> /// <param name="regionUUID">The region UUID</param>
/// <returns>List of loaded groups</returns> /// <returns>List of loaded groups</returns>
public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
{ {
Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
@ -350,7 +350,7 @@ namespace OpenSim.Data.SQLite
"[REGION DB]: No shape found for prim in storage, so setting default box shape"); "[REGION DB]: No shape found for prim in storage, so setting default box shape");
prim.Shape = PrimitiveBaseShape.Default; prim.Shape = PrimitiveBaseShape.Default;
} }
createdObjects[new LLUUID(objID)].AddPart(prim); createdObjects[new UUID(objID)].AddPart(prim);
} }
LoadItems(prim); LoadItems(prim);
@ -379,7 +379,7 @@ namespace OpenSim.Data.SQLite
DataTable dbItems = ds.Tables["primitems"]; DataTable dbItems = ds.Tables["primitems"];
String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); String sql = String.Format("primID = '{0}'", prim.ToString());
DataRow[] dbItemRows = dbItems.Select(sql); DataRow[] dbItemRows = dbItems.Select(sql);
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
@ -407,7 +407,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="ter">terrain heightfield</param> /// <param name="ter">terrain heightfield</param>
/// <param name="regionID">region UUID</param> /// <param name="regionID">region UUID</param>
public void StoreTerrain(double[,] ter, LLUUID regionID) public void StoreTerrain(double[,] ter, UUID regionID)
{ {
lock (ds) lock (ds)
{ {
@ -451,7 +451,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="regionID">the region UUID</param> /// <param name="regionID">the region UUID</param>
/// <returns>Heightfield data</returns> /// <returns>Heightfield data</returns>
public double[,] LoadTerrain(LLUUID regionID) public double[,] LoadTerrain(UUID regionID)
{ {
lock (ds) lock (ds)
{ {
@ -499,7 +499,7 @@ namespace OpenSim.Data.SQLite
/// ///
/// </summary> /// </summary>
/// <param name="globalID"></param> /// <param name="globalID"></param>
public void RemoveLandObject(LLUUID globalID) public void RemoveLandObject(UUID globalID)
{ {
lock (ds) lock (ds)
{ {
@ -563,7 +563,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
/// <returns></returns> /// <returns></returns>
public List<LandData> LoadLandObjects(LLUUID regionUUID) public List<LandData> LoadLandObjects(UUID regionUUID)
{ {
List<LandData> landDataForRegion = new List<LandData>(); List<LandData> landDataForRegion = new List<LandData>();
lock (ds) lock (ds)
@ -821,12 +821,12 @@ namespace OpenSim.Data.SQLite
createCol(land, "IsGroupOwned", typeof (Boolean)); createCol(land, "IsGroupOwned", typeof (Boolean));
createCol(land, "Area", typeof (Int32)); createCol(land, "Area", typeof (Int32));
createCol(land, "AuctionID", typeof (Int32)); //Unemplemented createCol(land, "AuctionID", typeof (Int32)); //Unemplemented
createCol(land, "Category", typeof (Int32)); //Enum libsecondlife.Parcel.ParcelCategory createCol(land, "Category", typeof (Int32)); //Enum OpenMetaverse.Parcel.ParcelCategory
createCol(land, "ClaimDate", typeof (Int32)); createCol(land, "ClaimDate", typeof (Int32));
createCol(land, "ClaimPrice", typeof (Int32)); createCol(land, "ClaimPrice", typeof (Int32));
createCol(land, "GroupUUID", typeof (string)); createCol(land, "GroupUUID", typeof (string));
createCol(land, "SalePrice", typeof (Int32)); createCol(land, "SalePrice", typeof (Int32));
createCol(land, "LandStatus", typeof (Int32)); //Enum. libsecondlife.Parcel.ParcelStatus createCol(land, "LandStatus", typeof (Int32)); //Enum. OpenMetaverse.Parcel.ParcelStatus
createCol(land, "LandFlags", typeof (UInt32)); createCol(land, "LandFlags", typeof (UInt32));
createCol(land, "LandingType", typeof (Byte)); createCol(land, "LandingType", typeof (Byte));
createCol(land, "MediaAutoScale", typeof (Byte)); createCol(land, "MediaAutoScale", typeof (Byte));
@ -882,7 +882,7 @@ namespace OpenSim.Data.SQLite
// interesting has to be done to actually get these values // interesting has to be done to actually get these values
// back out. Not enough time to figure it out yet. // back out. Not enough time to figure it out yet.
SceneObjectPart prim = new SceneObjectPart(); 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 // explicit conversion of integers is required, which sort
// of sucks. No idea if there is a shortcut here or not. // of sucks. No idea if there is a shortcut here or not.
prim.ParentID = Convert.ToUInt32(row["ParentID"]); prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@ -895,43 +895,43 @@ namespace OpenSim.Data.SQLite
prim.TouchName = (String) row["TouchName"]; prim.TouchName = (String) row["TouchName"];
// permissions // permissions
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorID = new LLUUID((String) row["CreatorID"]); prim.CreatorID = new UUID((String) row["CreatorID"]);
prim.OwnerID = new LLUUID((String) row["OwnerID"]); prim.OwnerID = new UUID((String) row["OwnerID"]);
prim.GroupID = new LLUUID((String) row["GroupID"]); prim.GroupID = new UUID((String) row["GroupID"]);
prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
// vectors // vectors
prim.OffsetPosition = new LLVector3( prim.OffsetPosition = new Vector3(
Convert.ToSingle(row["PositionX"]), Convert.ToSingle(row["PositionX"]),
Convert.ToSingle(row["PositionY"]), Convert.ToSingle(row["PositionY"]),
Convert.ToSingle(row["PositionZ"]) Convert.ToSingle(row["PositionZ"])
); );
prim.GroupPosition = new LLVector3( prim.GroupPosition = new Vector3(
Convert.ToSingle(row["GroupPositionX"]), Convert.ToSingle(row["GroupPositionX"]),
Convert.ToSingle(row["GroupPositionY"]), Convert.ToSingle(row["GroupPositionY"]),
Convert.ToSingle(row["GroupPositionZ"]) Convert.ToSingle(row["GroupPositionZ"])
); );
prim.Velocity = new LLVector3( prim.Velocity = new Vector3(
Convert.ToSingle(row["VelocityX"]), Convert.ToSingle(row["VelocityX"]),
Convert.ToSingle(row["VelocityY"]), Convert.ToSingle(row["VelocityY"]),
Convert.ToSingle(row["VelocityZ"]) Convert.ToSingle(row["VelocityZ"])
); );
prim.AngularVelocity = new LLVector3( prim.AngularVelocity = new Vector3(
Convert.ToSingle(row["AngularVelocityX"]), Convert.ToSingle(row["AngularVelocityX"]),
Convert.ToSingle(row["AngularVelocityY"]), Convert.ToSingle(row["AngularVelocityY"]),
Convert.ToSingle(row["AngularVelocityZ"]) Convert.ToSingle(row["AngularVelocityZ"])
); );
prim.Acceleration = new LLVector3( prim.Acceleration = new Vector3(
Convert.ToSingle(row["AccelerationX"]), Convert.ToSingle(row["AccelerationX"]),
Convert.ToSingle(row["AccelerationY"]), Convert.ToSingle(row["AccelerationY"]),
Convert.ToSingle(row["AccelerationZ"]) Convert.ToSingle(row["AccelerationZ"])
); );
// quaternions // quaternions
prim.RotationOffset = new LLQuaternion( prim.RotationOffset = new Quaternion(
Convert.ToSingle(row["RotationX"]), Convert.ToSingle(row["RotationX"]),
Convert.ToSingle(row["RotationY"]), Convert.ToSingle(row["RotationY"]),
Convert.ToSingle(row["RotationZ"]), Convert.ToSingle(row["RotationZ"]),
@ -940,11 +940,11 @@ namespace OpenSim.Data.SQLite
try try
{ {
prim.SitTargetPositionLL = new LLVector3( prim.SitTargetPositionLL = new Vector3(
Convert.ToSingle(row["SitTargetOffsetX"]), Convert.ToSingle(row["SitTargetOffsetX"]),
Convert.ToSingle(row["SitTargetOffsetY"]), Convert.ToSingle(row["SitTargetOffsetY"]),
Convert.ToSingle(row["SitTargetOffsetZ"])); Convert.ToSingle(row["SitTargetOffsetZ"]));
prim.SitTargetOrientationLL = new LLQuaternion( prim.SitTargetOrientationLL = new Quaternion(
Convert.ToSingle( Convert.ToSingle(
row["SitTargetOrientX"]), row["SitTargetOrientX"]),
Convert.ToSingle( Convert.ToSingle(
@ -993,10 +993,10 @@ namespace OpenSim.Data.SQLite
{ {
TaskInventoryItem taskItem = new TaskInventoryItem(); TaskInventoryItem taskItem = new TaskInventoryItem();
taskItem.ItemID = new LLUUID((String)row["itemID"]); taskItem.ItemID = new UUID((String)row["itemID"]);
taskItem.ParentPartID = new LLUUID((String)row["primID"]); taskItem.ParentPartID = new UUID((String)row["primID"]);
taskItem.AssetID = new LLUUID((String)row["assetID"]); taskItem.AssetID = new UUID((String)row["assetID"]);
taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); taskItem.ParentID = new UUID((String)row["parentFolderID"]);
taskItem.InvType = Convert.ToInt32(row["invType"]); taskItem.InvType = Convert.ToInt32(row["invType"]);
taskItem.Type = Convert.ToInt32(row["assetType"]); taskItem.Type = Convert.ToInt32(row["assetType"]);
@ -1004,10 +1004,10 @@ namespace OpenSim.Data.SQLite
taskItem.Name = (String)row["name"]; taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"]; taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = new LLUUID((String)row["creatorID"]); taskItem.CreatorID = new UUID((String)row["creatorID"]);
taskItem.OwnerID = new LLUUID((String)row["ownerID"]); taskItem.OwnerID = new UUID((String)row["ownerID"]);
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]); taskItem.GroupID = new UUID((String)row["groupID"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@ -1028,7 +1028,7 @@ namespace OpenSim.Data.SQLite
{ {
LandData newData = new LandData(); LandData newData = new LandData();
newData.GlobalID = new LLUUID((String) row["UUID"]); newData.GlobalID = new UUID((String) row["UUID"]);
newData.LocalID = Convert.ToInt32(row["LocalLandID"]); newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
// Bitmap is a byte[512] // Bitmap is a byte[512]
@ -1041,17 +1041,17 @@ namespace OpenSim.Data.SQLite
newData.Area = Convert.ToInt32(row["Area"]); newData.Area = Convert.ToInt32(row["Area"]);
newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
//Enum libsecondlife.Parcel.ParcelCategory //Enum OpenMetaverse.Parcel.ParcelCategory
newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 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.SalePrice = Convert.ToInt32(row["SalePrice"]);
newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
//Enum. libsecondlife.Parcel.ParcelStatus //Enum. OpenMetaverse.Parcel.ParcelStatus
newData.Flags = Convert.ToUInt32(row["LandFlags"]); newData.Flags = Convert.ToUInt32(row["LandFlags"]);
newData.LandingType = (Byte) row["LandingType"]; newData.LandingType = (Byte) row["LandingType"];
newData.MediaAutoScale = (Byte) row["MediaAutoScale"]; newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); newData.MediaID = new UUID((String) row["MediaTextureUUID"]);
newData.MediaURL = (String) row["MediaURL"]; newData.MediaURL = (String) row["MediaURL"];
newData.MusicURL = (String) row["MusicURL"]; newData.MusicURL = (String) row["MusicURL"];
newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassHours = Convert.ToSingle(row["PassHours"]);
@ -1061,25 +1061,25 @@ namespace OpenSim.Data.SQLite
{ {
newData.UserLocation = 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"])); Convert.ToSingle(row["UserLocationZ"]));
newData.UserLookAt = 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"])); Convert.ToSingle(row["UserLookAtZ"]));
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
newData.UserLocation = LLVector3.Zero; newData.UserLocation = Vector3.Zero;
newData.UserLookAt = LLVector3.Zero; newData.UserLookAt = Vector3.Zero;
} }
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
LLUUID authBuyerID = LLUUID.Zero; UUID authBuyerID = UUID.Zero;
try try
{ {
Helpers.TryParse((string)row["AuthbuyerID"], out authBuyerID); UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
@ -1120,7 +1120,7 @@ namespace OpenSim.Data.SQLite
private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
{ {
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = new LLUUID((string) row["AccessUUID"]); entry.AgentID = new UUID((string) row["AccessUUID"]);
entry.Flags = (ParcelManager.AccessList) row["Flags"]; entry.Flags = (ParcelManager.AccessList) row["Flags"];
entry.Time = new DateTime(); entry.Time = new DateTime();
return entry; return entry;
@ -1144,7 +1144,7 @@ namespace OpenSim.Data.SQLite
return str.ToArray(); return str.ToArray();
} }
// private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) // private void fillTerrainRow(DataRow row, UUID regionUUID, int rev, double[,] val)
// { // {
// row["RegionUUID"] = regionUUID; // row["RegionUUID"] = regionUUID;
// row["Revision"] = rev; // row["Revision"] = rev;
@ -1167,7 +1167,7 @@ namespace OpenSim.Data.SQLite
/// <param name="prim"></param> /// <param name="prim"></param>
/// <param name="sceneGroupID"></param> /// <param name="sceneGroupID"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
{ {
row["UUID"] = Util.ToRawUuidString(prim.UUID); row["UUID"] = Util.ToRawUuidString(prim.UUID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@ -1215,12 +1215,12 @@ namespace OpenSim.Data.SQLite
row["RotationW"] = prim.RotationOffset.W; row["RotationW"] = prim.RotationOffset.W;
// Sit target // Sit target
LLVector3 sitTargetPos = prim.SitTargetPositionLL; Vector3 sitTargetPos = prim.SitTargetPositionLL;
row["SitTargetOffsetX"] = sitTargetPos.X; row["SitTargetOffsetX"] = sitTargetPos.X;
row["SitTargetOffsetY"] = sitTargetPos.Y; row["SitTargetOffsetY"] = sitTargetPos.Y;
row["SitTargetOffsetZ"] = sitTargetPos.Z; row["SitTargetOffsetZ"] = sitTargetPos.Z;
LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
row["SitTargetOrientW"] = sitTargetOrient.W; row["SitTargetOrientW"] = sitTargetOrient.W;
row["SitTargetOrientX"] = sitTargetOrient.X; row["SitTargetOrientX"] = sitTargetOrient.X;
row["SitTargetOrientY"] = sitTargetOrient.Y; row["SitTargetOrientY"] = sitTargetOrient.Y;
@ -1263,7 +1263,7 @@ namespace OpenSim.Data.SQLite
/// <param name="row"></param> /// <param name="row"></param>
/// <param name="land"></param> /// <param name="land"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
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["UUID"] = Util.ToRawUuidString(land.GlobalID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@ -1278,12 +1278,12 @@ namespace OpenSim.Data.SQLite
row["IsGroupOwned"] = land.IsGroupOwned; row["IsGroupOwned"] = land.IsGroupOwned;
row["Area"] = land.Area; row["Area"] = land.Area;
row["AuctionID"] = land.AuctionID; //Unemplemented row["AuctionID"] = land.AuctionID; //Unemplemented
row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory
row["ClaimDate"] = land.ClaimDate; row["ClaimDate"] = land.ClaimDate;
row["ClaimPrice"] = land.ClaimPrice; row["ClaimPrice"] = land.ClaimPrice;
row["GroupUUID"] = Util.ToRawUuidString(land.GroupID); row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
row["SalePrice"] = land.SalePrice; row["SalePrice"] = land.SalePrice;
row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus row["LandStatus"] = land.Status; //Enum. OpenMetaverse.Parcel.ParcelStatus
row["LandFlags"] = land.Flags; row["LandFlags"] = land.Flags;
row["LandingType"] = land.LandingType; row["LandingType"] = land.LandingType;
row["MediaAutoScale"] = land.MediaAutoScale; row["MediaAutoScale"] = land.MediaAutoScale;
@ -1308,7 +1308,7 @@ namespace OpenSim.Data.SQLite
/// <param name="row"></param> /// <param name="row"></param>
/// <param name="entry"></param> /// <param name="entry"></param>
/// <param name="parcelID"></param> /// <param name="parcelID"></param>
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["LandUUID"] = Util.ToRawUuidString(parcelID);
row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
@ -1323,7 +1323,7 @@ namespace OpenSim.Data.SQLite
private PrimitiveBaseShape buildShape(DataRow row) private PrimitiveBaseShape buildShape(DataRow row)
{ {
PrimitiveBaseShape s = new PrimitiveBaseShape(); PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new LLVector3( s.Scale = new Vector3(
Convert.ToSingle(row["ScaleX"]), Convert.ToSingle(row["ScaleX"]),
Convert.ToSingle(row["ScaleY"]), Convert.ToSingle(row["ScaleY"]),
Convert.ToSingle(row["ScaleZ"]) Convert.ToSingle(row["ScaleZ"])
@ -1418,7 +1418,7 @@ namespace OpenSim.Data.SQLite
/// <param name="prim"></param> /// <param name="prim"></param>
/// <param name="sceneGroupID"></param> /// <param name="sceneGroupID"></param>
/// <param name="regionUUID"></param> /// <param name="regionUUID"></param>
private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
{ {
DataTable prims = ds.Tables["prims"]; DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"]; DataTable shapes = ds.Tables["primshapes"];
@ -1453,7 +1453,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="primID"></param> /// <param name="primID"></param>
/// <param name="items"></param> /// <param name="items"></param>
public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{ {
m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using OpenSim.Framework; using OpenSim.Framework;
@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname";
private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname";
private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); private Dictionary<UUID, AvatarAppearance> aplist = new Dictionary<UUID, AvatarAppearance>();
private DataSet ds; private DataSet ds;
private SqliteDataAdapter da; private SqliteDataAdapter da;
private SqliteDataAdapter daf; private SqliteDataAdapter daf;
@ -124,7 +124,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">User UUID</param> /// <param name="uuid">User UUID</param>
/// <returns>user profile data</returns> /// <returns>user profile data</returns>
override public UserProfileData GetUserByUUID(LLUUID uuid) override public UserProfileData GetUserByUUID(UUID uuid)
{ {
lock (ds) lock (ds)
{ {
@ -184,21 +184,21 @@ namespace OpenSim.Data.SQLite
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">UUID of the friend to add</param> /// <param name="friend">UUID of the friend to add</param>
/// <param name="perms">permission flag</param> /// <param name="perms">permission flag</param>
override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) override public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
{ {
string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)";
using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
cmd.Parameters.Add(new SqliteParameter(":perms", perms)); cmd.Parameters.Add(new SqliteParameter(":perms", perms));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":ownerID", friend.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":ownerID", friend.ToString()));
cmd.Parameters.Add(new SqliteParameter(":friendID", friendlistowner.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":friendID", friendlistowner.ToString()));
cmd.Parameters.Add(new SqliteParameter(":perms", perms)); cmd.Parameters.Add(new SqliteParameter(":perms", perms));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
@ -209,13 +209,13 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">UUID of the friend to remove</param> /// <param name="friend">UUID of the friend to remove</param>
override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) override public void RemoveUserFriend(UUID friendlistowner, UUID friend)
{ {
string DeletePerms = "delete from friendlist where (ownerID=:ownerID and friendID=:friendID) or (ownerID=:friendID and friendID=:ownerID)"; string DeletePerms = "delete from friendlist where (ownerID=:ownerID and friendID=:friendID) or (ownerID=:friendID and friendID=:ownerID)";
using (SqliteCommand cmd = new SqliteCommand(DeletePerms, g_conn)) using (SqliteCommand cmd = new SqliteCommand(DeletePerms, g_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }
@ -226,14 +226,14 @@ namespace OpenSim.Data.SQLite
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <param name="friend">UUID of the friend to modify</param> /// <param name="friend">UUID of the friend to modify</param>
/// <param name="perms">updated permission flag</param> /// <param name="perms">updated permission flag</param>
override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) override public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
{ {
string UpdatePerms = "update friendlist set perms=:perms where ownerID=:ownerID and friendID=:friendID"; string UpdatePerms = "update friendlist set perms=:perms where ownerID=:ownerID and friendID=:friendID";
using (SqliteCommand cmd = new SqliteCommand(UpdatePerms, g_conn)) using (SqliteCommand cmd = new SqliteCommand(UpdatePerms, g_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":perms", perms)); cmd.Parameters.Add(new SqliteParameter(":perms", perms));
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }
@ -243,13 +243,13 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="friendlistowner">UUID of the friendlist owner</param> /// <param name="friendlistowner">UUID of the friendlist owner</param>
/// <returns>The friendlist list</returns> /// <returns>The friendlist list</returns>
override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) override public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
{ {
List<FriendListItem> returnlist = new List<FriendListItem>(); List<FriendListItem> returnlist = new List<FriendListItem>();
using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn)) using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn))
{ {
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
try try
{ {
@ -259,7 +259,7 @@ namespace OpenSim.Data.SQLite
{ {
FriendListItem user = new FriendListItem(); FriendListItem user = new FriendListItem();
user.FriendListOwner = friendlistowner; user.FriendListOwner = friendlistowner;
user.Friend = new LLUUID((string)reader[0]); user.Friend = new UUID((string)reader[0]);
user.FriendPerms = Convert.ToUInt32(reader[1]); user.FriendPerms = Convert.ToUInt32(reader[1]);
user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]); user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]);
returnlist.Add(user); returnlist.Add(user);
@ -288,7 +288,7 @@ namespace OpenSim.Data.SQLite
/// <param name="regionuuid">UUID of the region</param> /// <param name="regionuuid">UUID of the region</param>
/// <param name="regionhandle">region handle</param> /// <param name="regionhandle">region handle</param>
/// <remarks>DO NOTHING</remarks> /// <remarks>DO NOTHING</remarks>
override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) override public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
{ {
//m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called"); //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
} }
@ -299,7 +299,7 @@ namespace OpenSim.Data.SQLite
/// <param name="queryID"></param> /// <param name="queryID"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
{ {
List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
string[] querysplit; string[] querysplit;
@ -316,7 +316,7 @@ namespace OpenSim.Data.SQLite
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]); user.AvatarID = new UUID((string) reader["UUID"]);
user.firstName = (string) reader["username"]; user.firstName = (string) reader["username"];
user.lastName = (string) reader["surname"]; user.lastName = (string) reader["surname"];
returnlist.Add(user); returnlist.Add(user);
@ -337,7 +337,7 @@ namespace OpenSim.Data.SQLite
while (reader.Read()) while (reader.Read())
{ {
AvatarPickerAvatar user = new AvatarPickerAvatar(); AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]); user.AvatarID = new UUID((string) reader["UUID"]);
user.firstName = (string) reader["username"]; user.firstName = (string) reader["username"];
user.lastName = (string) reader["surname"]; user.lastName = (string) reader["surname"];
returnlist.Add(user); returnlist.Add(user);
@ -354,7 +354,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">The user's account ID</param> /// <param name="uuid">The user's account ID</param>
/// <returns>A matching user profile</returns> /// <returns>A matching user profile</returns>
override public UserAgentData GetAgentByUUID(LLUUID uuid) override public UserAgentData GetAgentByUUID(UUID uuid)
{ {
try try
{ {
@ -399,7 +399,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="AgentID">UUID of the user</param> /// <param name="AgentID">UUID of the user</param>
/// <param name="WebLoginKey">UUID of the weblogin</param> /// <param name="WebLoginKey">UUID of the weblogin</param>
override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) override public void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
{ {
DataTable users = ds.Tables["users"]; DataTable users = ds.Tables["users"];
lock (ds) lock (ds)
@ -520,7 +520,7 @@ namespace OpenSim.Data.SQLite
/// <param name="to">End account</param> /// <param name="to">End account</param>
/// <param name="amount">The amount to move</param> /// <param name="amount">The amount to move</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) override public bool MoneyTransferRequest(UUID from, UUID to, uint amount)
{ {
return true; return true;
} }
@ -533,7 +533,7 @@ namespace OpenSim.Data.SQLite
/// <param name="to">Receivers account</param> /// <param name="to">Receivers account</param>
/// <param name="item">Inventory item</param> /// <param name="item">Inventory item</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) override public bool InventoryTransferRequest(UUID from, UUID to, UUID item)
{ {
return true; return true;
} }
@ -545,7 +545,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="user">The user UUID</param> /// <param name="user">The user UUID</param>
/// <returns>Avatar Appearence</returns> /// <returns>Avatar Appearence</returns>
override public AvatarAppearance GetUserAppearance(LLUUID user) override public AvatarAppearance GetUserAppearance(UUID user)
{ {
AvatarAppearance aa = null; AvatarAppearance aa = null;
try { try {
@ -562,7 +562,7 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
/// <param name="user">the user UUID</param> /// <param name="user">the user UUID</param>
/// <param name="appearance">appearence</param> /// <param name="appearance">appearence</param>
override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
{ {
appearance.Owner = user; appearance.Owner = user;
aplist[user] = appearance; aplist[user] = appearance;
@ -707,8 +707,8 @@ namespace OpenSim.Data.SQLite
private static UserProfileData buildUserProfile(DataRow row) private static UserProfileData buildUserProfile(DataRow row)
{ {
UserProfileData user = new UserProfileData(); UserProfileData user = new UserProfileData();
LLUUID tmp; UUID tmp;
LLUUID.TryParse((String)row["UUID"], out tmp); UUID.TryParse((String)row["UUID"], out tmp);
user.ID = tmp; user.ID = tmp;
user.FirstName = (String) row["username"]; user.FirstName = (String) row["username"];
user.SurName = (String) row["surname"]; user.SurName = (String) row["surname"];
@ -717,39 +717,39 @@ namespace OpenSim.Data.SQLite
user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]); user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]);
user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]); user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]);
user.HomeLocation = new LLVector3( user.HomeLocation = new Vector3(
Convert.ToSingle(row["homeLocationX"]), Convert.ToSingle(row["homeLocationX"]),
Convert.ToSingle(row["homeLocationY"]), Convert.ToSingle(row["homeLocationY"]),
Convert.ToSingle(row["homeLocationZ"]) Convert.ToSingle(row["homeLocationZ"])
); );
user.HomeLookAt = new LLVector3( user.HomeLookAt = new Vector3(
Convert.ToSingle(row["homeLookAtX"]), Convert.ToSingle(row["homeLookAtX"]),
Convert.ToSingle(row["homeLookAtY"]), Convert.ToSingle(row["homeLookAtY"]),
Convert.ToSingle(row["homeLookAtZ"]) Convert.ToSingle(row["homeLookAtZ"])
); );
LLUUID regionID = LLUUID.Zero; UUID regionID = UUID.Zero;
LLUUID.TryParse(row["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero UUID.TryParse(row["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use UUID.Zero
user.HomeRegionID = regionID; user.HomeRegionID = regionID;
user.Created = Convert.ToInt32(row["created"]); user.Created = Convert.ToInt32(row["created"]);
user.LastLogin = Convert.ToInt32(row["lastLogin"]); user.LastLogin = Convert.ToInt32(row["lastLogin"]);
user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); user.RootInventoryFolderID = new UUID((String) row["rootInventoryFolderID"]);
user.UserInventoryURI = (String) row["userInventoryURI"]; user.UserInventoryURI = (String) row["userInventoryURI"];
user.UserAssetURI = (String) row["userAssetURI"]; user.UserAssetURI = (String) row["userAssetURI"];
user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
user.WantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); user.WantDoMask = Convert.ToUInt32(row["profileWantDoMask"]);
user.AboutText = (String) row["profileAboutText"]; user.AboutText = (String) row["profileAboutText"];
user.FirstLifeAboutText = (String) row["profileFirstText"]; user.FirstLifeAboutText = (String) row["profileFirstText"];
LLUUID.TryParse((String)row["profileImage"], out tmp); UUID.TryParse((String)row["profileImage"], out tmp);
user.Image = tmp; user.Image = tmp;
LLUUID.TryParse((String)row["profileFirstImage"], out tmp); UUID.TryParse((String)row["profileFirstImage"], out tmp);
user.FirstLifeImage = tmp; user.FirstLifeImage = tmp;
user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); user.WebLoginKey = new UUID((String) row["webLoginKey"]);
user.UserFlags = Convert.ToInt32(row["userFlags"]); user.UserFlags = Convert.ToInt32(row["userFlags"]);
user.GodLevel = Convert.ToInt32(row["godLevel"]); user.GodLevel = Convert.ToInt32(row["godLevel"]);
user.CustomType = row["customType"].ToString(); user.CustomType = row["customType"].ToString();
user.Partner = new LLUUID((String) row["partner"]); user.Partner = new UUID((String) row["partner"]);
return user; return user;
} }
@ -814,18 +814,18 @@ namespace OpenSim.Data.SQLite
{ {
UserAgentData ua = new UserAgentData(); UserAgentData ua = new UserAgentData();
ua.ProfileID = new LLUUID((String) row["UUID"]); ua.ProfileID = new UUID((String) row["UUID"]);
ua.AgentIP = (String) row["agentIP"]; ua.AgentIP = (String) row["agentIP"];
ua.AgentPort = Convert.ToUInt32(row["agentPort"]); ua.AgentPort = Convert.ToUInt32(row["agentPort"]);
ua.AgentOnline = Convert.ToBoolean(row["agentOnline"]); ua.AgentOnline = Convert.ToBoolean(row["agentOnline"]);
ua.SessionID = new LLUUID((String) row["sessionID"]); ua.SessionID = new UUID((String) row["sessionID"]);
ua.SecureSessionID = new LLUUID((String) row["secureSessionID"]); ua.SecureSessionID = new UUID((String) row["secureSessionID"]);
ua.InitialRegion = new LLUUID((String) row["regionID"]); ua.InitialRegion = new UUID((String) row["regionID"]);
ua.LoginTime = Convert.ToInt32(row["loginTime"]); ua.LoginTime = Convert.ToInt32(row["loginTime"]);
ua.LogoutTime = Convert.ToInt32(row["logoutTime"]); ua.LogoutTime = Convert.ToInt32(row["logoutTime"]);
ua.Region = new LLUUID((String) row["currentRegion"]); ua.Region = new UUID((String) row["currentRegion"]);
ua.Handle = Convert.ToUInt64(row["currentHandle"]); ua.Handle = Convert.ToUInt64(row["currentHandle"]);
ua.Position = new LLVector3( ua.Position = new Vector3(
Convert.ToSingle(row["currentPosX"]), Convert.ToSingle(row["currentPosX"]),
Convert.ToSingle(row["currentPosY"]), Convert.ToSingle(row["currentPosY"]),
Convert.ToSingle(row["currentPosZ"]) Convert.ToSingle(row["currentPosZ"])
@ -906,7 +906,7 @@ namespace OpenSim.Data.SQLite
} }
override public void ResetAttachments(LLUUID userID) override public void ResetAttachments(UUID userID)
{ {
} }
} }

View File

@ -27,7 +27,7 @@
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
@ -37,28 +37,28 @@ namespace OpenSim.Data
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); // private Dictionary<UUID, AvatarAppearance> aplist = new Dictionary<UUID, AvatarAppearance>();
public abstract UserProfileData GetUserByUUID(LLUUID user); public abstract UserProfileData GetUserByUUID(UUID user);
public abstract UserProfileData GetUserByName(string fname, string lname); public abstract UserProfileData GetUserByName(string fname, string lname);
public abstract UserAgentData GetAgentByUUID(LLUUID user); public abstract UserAgentData GetAgentByUUID(UUID user);
public abstract UserAgentData GetAgentByName(string name); public abstract UserAgentData GetAgentByName(string name);
public abstract UserAgentData GetAgentByName(string fname, string lname); public abstract UserAgentData GetAgentByName(string fname, string lname);
public abstract void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
public abstract void AddNewUserProfile(UserProfileData user); public abstract void AddNewUserProfile(UserProfileData user);
public abstract bool UpdateUserProfile(UserProfileData user); public abstract bool UpdateUserProfile(UserProfileData user);
public abstract void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle); public abstract void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle);
public abstract void AddNewUserAgent(UserAgentData agent); public abstract void AddNewUserAgent(UserAgentData agent);
public abstract void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms); public abstract void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
public abstract void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend); public abstract void RemoveUserFriend(UUID friendlistowner, UUID friend);
public abstract void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms); public abstract void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
public abstract List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); public abstract List<FriendListItem> GetUserFriendList(UUID friendlistowner);
public abstract bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); public abstract bool MoneyTransferRequest(UUID from, UUID to, uint amount);
public abstract bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); public abstract bool InventoryTransferRequest(UUID from, UUID to, UUID inventory);
public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); public abstract List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query);
public abstract AvatarAppearance GetUserAppearance(LLUUID user); public abstract AvatarAppearance GetUserAppearance(UUID user);
public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); public abstract void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
// public virtual AvatarAppearance GetUserAppearance(LLUUID user) { // public virtual AvatarAppearance GetUserAppearance(UUID user) {
// AvatarAppearance aa = null; // AvatarAppearance aa = null;
// try { // try {
// aa = aplist[user]; // aa = aplist[user];
@ -68,11 +68,11 @@ namespace OpenSim.Data
// } // }
// return aa; // return aa;
// } // }
// public virtual void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { // public virtual void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {
// aplist[user] = appearance; // aplist[user] = appearance;
// m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString()); // m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString());
// } // }
public abstract void ResetAttachments(LLUUID userID); public abstract void ResetAttachments(UUID userID);
public abstract string Version {get;} public abstract string Version {get;}
public abstract string Name {get;} public abstract string Name {get;}

View File

@ -26,23 +26,23 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AgentCircuitData public class AgentCircuitData
{ {
public LLUUID AgentID; public UUID AgentID;
public LLUUID BaseFolder; public UUID BaseFolder;
public string CapsPath = String.Empty; public string CapsPath = String.Empty;
public bool child; public bool child;
public uint circuitcode; public uint circuitcode;
public string firstname; public string firstname;
public LLUUID InventoryFolder; public UUID InventoryFolder;
public string lastname; public string lastname;
public LLUUID SecureSessionID; public UUID SecureSessionID;
public LLUUID SessionID; public UUID SessionID;
public LLVector3 startpos; public Vector3 startpos;
public AgentCircuitData() public AgentCircuitData()
{ {
@ -50,16 +50,16 @@ namespace OpenSim.Framework
public AgentCircuitData(sAgentCircuitData cAgent) public AgentCircuitData(sAgentCircuitData cAgent)
{ {
AgentID = new LLUUID(cAgent.AgentID); AgentID = new UUID(cAgent.AgentID);
SessionID = new LLUUID(cAgent.SessionID); SessionID = new UUID(cAgent.SessionID);
SecureSessionID = new LLUUID(cAgent.SecureSessionID); SecureSessionID = new UUID(cAgent.SecureSessionID);
startpos = new LLVector3(cAgent.startposx, cAgent.startposy, cAgent.startposz); startpos = new Vector3(cAgent.startposx, cAgent.startposy, cAgent.startposz);
firstname = cAgent.firstname; firstname = cAgent.firstname;
lastname = cAgent.lastname; lastname = cAgent.lastname;
circuitcode = cAgent.circuitcode; circuitcode = cAgent.circuitcode;
child = cAgent.child; child = cAgent.child;
InventoryFolder = new LLUUID(cAgent.InventoryFolder); InventoryFolder = new UUID(cAgent.InventoryFolder);
BaseFolder = new LLUUID(cAgent.BaseFolder); BaseFolder = new UUID(cAgent.BaseFolder);
CapsPath = cAgent.CapsPath; CapsPath = cAgent.CapsPath;
} }
} }
@ -87,9 +87,9 @@ namespace OpenSim.Framework
public sAgentCircuitData(AgentCircuitData cAgent) public sAgentCircuitData(AgentCircuitData cAgent)
{ {
AgentID = cAgent.AgentID.UUID; AgentID = cAgent.AgentID.Guid;
SessionID = cAgent.SessionID.UUID; SessionID = cAgent.SessionID.Guid;
SecureSessionID = cAgent.SecureSessionID.UUID; SecureSessionID = cAgent.SecureSessionID.Guid;
startposx = cAgent.startpos.X; startposx = cAgent.startpos.X;
startposy = cAgent.startpos.Y; startposy = cAgent.startpos.Y;
startposz = cAgent.startpos.Z; startposz = cAgent.startpos.Z;
@ -97,8 +97,8 @@ namespace OpenSim.Framework
lastname = cAgent.lastname; lastname = cAgent.lastname;
circuitcode = cAgent.circuitcode; circuitcode = cAgent.circuitcode;
child = cAgent.child; child = cAgent.child;
InventoryFolder = cAgent.InventoryFolder.UUID; InventoryFolder = cAgent.InventoryFolder.Guid;
BaseFolder = cAgent.BaseFolder.UUID; BaseFolder = cAgent.BaseFolder.Guid;
CapsPath = cAgent.CapsPath; CapsPath = cAgent.CapsPath;
} }
} }

View File

@ -26,7 +26,7 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -38,7 +38,7 @@ namespace OpenSim.Framework
{ {
} }
public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) public virtual AuthenticateResponse AuthenticateSession(UUID sessionID, UUID agentID, uint circuitcode)
{ {
AgentCircuitData validcircuit = null; AgentCircuitData validcircuit = null;
if (AgentCircuits.ContainsKey(circuitcode)) if (AgentCircuits.ContainsKey(circuitcode))
@ -86,9 +86,9 @@ namespace OpenSim.Framework
} }
} }
public LLVector3 GetPosition(uint circuitCode) public Vector3 GetPosition(uint circuitCode)
{ {
LLVector3 vec = new LLVector3(); Vector3 vec = new Vector3();
if (AgentCircuits.ContainsKey(circuitCode)) if (AgentCircuits.ContainsKey(circuitCode))
{ {
vec = AgentCircuits[circuitCode].startpos; vec = AgentCircuits[circuitCode].startpos;

View File

@ -1,21 +1,21 @@
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AgentUpdateArgs : EventArgs public class AgentUpdateArgs : EventArgs
{ {
public LLUUID AgentID; public UUID AgentID;
public LLQuaternion BodyRotation; public Quaternion BodyRotation;
public LLVector3 CameraAtAxis; public Vector3 CameraAtAxis;
public LLVector3 CameraCenter; public Vector3 CameraCenter;
public LLVector3 CameraLeftAxis; public Vector3 CameraLeftAxis;
public LLVector3 CameraUpAxis; public Vector3 CameraUpAxis;
public uint ControlFlags; public uint ControlFlags;
public float Far; public float Far;
public byte Flags; public byte Flags;
public LLQuaternion HeadRotation; public Quaternion HeadRotation;
public LLUUID SessionID; public UUID SessionID;
public byte State; public byte State;
} }
} }

View File

@ -26,7 +26,7 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -35,7 +35,7 @@ namespace OpenSim.Framework
{ {
private byte[] _data; private byte[] _data;
private string _description = String.Empty; private string _description = String.Empty;
private LLUUID _fullid; private UUID _fullid;
private bool _local = false; private bool _local = false;
private string _name = String.Empty; private string _name = String.Empty;
private bool _temporary = false; private bool _temporary = false;
@ -45,13 +45,13 @@ namespace OpenSim.Framework
{ {
} }
public AssetBase(LLUUID assetId, string name) public AssetBase(UUID assetId, string name)
{ {
FullID = assetId; FullID = assetId;
Name = name; Name = name;
} }
public virtual LLUUID FullID public virtual UUID FullID
{ {
get { return _fullid; } get { return _fullid; }
set { _fullid = value; } set { _fullid = value; }
@ -60,7 +60,7 @@ namespace OpenSim.Framework
public virtual string ID public virtual string ID
{ {
get { return _fullid.ToString(); } get { return _fullid.ToString(); }
set { _fullid = new LLUUID(value); } set { _fullid = new UUID(value); }
} }
public virtual byte[] Data public virtual byte[] Data

View File

@ -26,15 +26,15 @@
*/ */
using System.Text; using System.Text;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AssetLandmark : AssetBase public class AssetLandmark : AssetBase
{ {
public LLVector3 Position; public Vector3 Position;
public ulong RegionHandle; public ulong RegionHandle;
public LLUUID RegionID; public UUID RegionID;
public int Version; public int Version;
public AssetLandmark(AssetBase a) public AssetLandmark(AssetBase a)
@ -52,8 +52,8 @@ namespace OpenSim.Framework
string temp = Encoding.UTF8.GetString(Data).Trim(); string temp = Encoding.UTF8.GetString(Data).Trim();
string[] parts = temp.Split('\n'); string[] parts = temp.Split('\n');
int.TryParse(parts[0].Substring(17, 1), out Version); int.TryParse(parts[0].Substring(17, 1), out Version);
LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
LLVector3.TryParse(parts[2].Substring(10, parts[2].Length - 10), out Position); Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10), out Position);
ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle);
} }
} }

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Xml; using System.Xml;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
@ -46,7 +46,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
{ {
AssetBase asset = new AssetBase( AssetBase asset = new AssetBase(
new LLUUID(assetIdStr), new UUID(assetIdStr),
name name
); );
@ -88,7 +88,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
public void ForEachDefaultXmlAsset(Action<AssetBase> action) public void ForEachDefaultXmlAsset(Action<AssetBase> action)
{ {
string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.Xml");
ForEachDefaultXmlAsset(assetSetFilename, action); ForEachDefaultXmlAsset(assetSetFilename, action);
} }
@ -118,7 +118,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
} }
else else
{ {
m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.Xml does not exist! No assets loaded.");
} }
assets.ForEach(action); assets.ForEach(action);
@ -142,7 +142,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
for (int i = 0; i < source.Configs.Count; i++) for (int i = 0; i < source.Configs.Count; i++)
{ {
string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); string assetIdStr = source.Configs[i].GetString("assetID", UUID.Random().ToString());
string name = source.Configs[i].GetString("name", String.Empty); string name = source.Configs[i].GetString("name", String.Empty);
sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0);
string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty));

View File

@ -25,13 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public struct AssetRequest public struct AssetRequest
{ {
public LLUUID AssetID; public UUID AssetID;
public bool IsTexture; public bool IsTexture;
} }
} }

View File

@ -28,7 +28,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -42,10 +42,10 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
public class AssetRequestToClient public class AssetRequestToClient
{ {
public LLUUID RequestAssetID; public UUID RequestAssetID;
public AssetBase AssetInf; public AssetBase AssetInf;
public AssetBase ImageInfo; public AssetBase ImageInfo;
public LLUUID TransferRequestID; public UUID TransferRequestID;
public long DataPointer = 0; public long DataPointer = 0;
public int NumPackets = 0; public int NumPackets = 0;
public int PacketCounter = 0; public int PacketCounter = 0;

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -34,13 +34,13 @@ namespace OpenSim.Framework
public byte[] Data; public byte[] Data;
public string Name; public string Name;
public sbyte Type; public sbyte Type;
public LLUUID UUID; public UUID UUID;
public AssetStorage() public AssetStorage()
{ {
} }
public AssetStorage(LLUUID assetUUID) public AssetStorage(UUID assetUUID)
{ {
UUID = assetUUID; UUID = assetUUID;
} }

View File

@ -30,8 +30,8 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Security.Permissions; using System.Security.Permissions;
using libsecondlife; using OpenMetaverse;
using libsecondlife.Packets; using OpenMetaverse.Packets;
using OpenSim.Framework; using OpenSim.Framework;
namespace OpenSim.Framework namespace OpenSim.Framework
@ -58,20 +58,20 @@ namespace OpenSim.Framework
private readonly static int MAX_WEARABLES = 13; private readonly static int MAX_WEARABLES = 13;
private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); private static UUID BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); private static UUID BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); private static UUID SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
private static LLUUID SKIN_ITEM = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); private static UUID SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
private static LLUUID SHIRT_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111110"); private static UUID SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110");
private static LLUUID SHIRT_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); private static UUID SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
private static LLUUID PANTS_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111120"); private static UUID PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
private static LLUUID PANTS_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); private static UUID PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
public readonly static int VISUALPARAM_COUNT = 218; public readonly static int VISUALPARAM_COUNT = 218;
protected LLUUID m_owner; protected UUID m_owner;
public virtual LLUUID Owner public virtual UUID Owner
{ {
get { return m_owner; } get { return m_owner; }
set { m_owner = value; } set { m_owner = value; }
@ -100,107 +100,107 @@ namespace OpenSim.Framework
set { m_wearables = value; } set { m_wearables = value; }
} }
public virtual LLUUID BodyItem { public virtual UUID BodyItem {
get { return m_wearables[BODY].ItemID; } get { return m_wearables[BODY].ItemID; }
set { m_wearables[BODY].ItemID = value; } set { m_wearables[BODY].ItemID = value; }
} }
public virtual LLUUID BodyAsset { public virtual UUID BodyAsset {
get { return m_wearables[BODY].AssetID; } get { return m_wearables[BODY].AssetID; }
set { m_wearables[BODY].AssetID = value; } set { m_wearables[BODY].AssetID = value; }
} }
public virtual LLUUID SkinItem { public virtual UUID SkinItem {
get { return m_wearables[SKIN].ItemID; } get { return m_wearables[SKIN].ItemID; }
set { m_wearables[SKIN].ItemID = value; } set { m_wearables[SKIN].ItemID = value; }
} }
public virtual LLUUID SkinAsset { public virtual UUID SkinAsset {
get { return m_wearables[SKIN].AssetID; } get { return m_wearables[SKIN].AssetID; }
set { m_wearables[SKIN].AssetID = value; } set { m_wearables[SKIN].AssetID = value; }
} }
public virtual LLUUID HairItem { public virtual UUID HairItem {
get { return m_wearables[HAIR].ItemID; } get { return m_wearables[HAIR].ItemID; }
set { m_wearables[HAIR].ItemID = value; } set { m_wearables[HAIR].ItemID = value; }
} }
public virtual LLUUID HairAsset { public virtual UUID HairAsset {
get { return m_wearables[HAIR].AssetID; } get { return m_wearables[HAIR].AssetID; }
set { m_wearables[HAIR].AssetID = value; } set { m_wearables[HAIR].AssetID = value; }
} }
public virtual LLUUID EyesItem { public virtual UUID EyesItem {
get { return m_wearables[EYES].ItemID; } get { return m_wearables[EYES].ItemID; }
set { m_wearables[EYES].ItemID = value; } set { m_wearables[EYES].ItemID = value; }
} }
public virtual LLUUID EyesAsset { public virtual UUID EyesAsset {
get { return m_wearables[EYES].AssetID; } get { return m_wearables[EYES].AssetID; }
set { m_wearables[EYES].AssetID = value; } set { m_wearables[EYES].AssetID = value; }
} }
public virtual LLUUID ShirtItem { public virtual UUID ShirtItem {
get { return m_wearables[SHIRT].ItemID; } get { return m_wearables[SHIRT].ItemID; }
set { m_wearables[SHIRT].ItemID = value; } set { m_wearables[SHIRT].ItemID = value; }
} }
public virtual LLUUID ShirtAsset { public virtual UUID ShirtAsset {
get { return m_wearables[SHIRT].AssetID; } get { return m_wearables[SHIRT].AssetID; }
set { m_wearables[SHIRT].AssetID = value; } set { m_wearables[SHIRT].AssetID = value; }
} }
public virtual LLUUID PantsItem { public virtual UUID PantsItem {
get { return m_wearables[PANTS].ItemID; } get { return m_wearables[PANTS].ItemID; }
set { m_wearables[PANTS].ItemID = value; } set { m_wearables[PANTS].ItemID = value; }
} }
public virtual LLUUID PantsAsset { public virtual UUID PantsAsset {
get { return m_wearables[PANTS].AssetID; } get { return m_wearables[PANTS].AssetID; }
set { m_wearables[PANTS].AssetID = value; } set { m_wearables[PANTS].AssetID = value; }
} }
public virtual LLUUID ShoesItem { public virtual UUID ShoesItem {
get { return m_wearables[SHOES].ItemID; } get { return m_wearables[SHOES].ItemID; }
set { m_wearables[SHOES].ItemID = value; } set { m_wearables[SHOES].ItemID = value; }
} }
public virtual LLUUID ShoesAsset { public virtual UUID ShoesAsset {
get { return m_wearables[SHOES].AssetID; } get { return m_wearables[SHOES].AssetID; }
set { m_wearables[SHOES].AssetID = value; } set { m_wearables[SHOES].AssetID = value; }
} }
public virtual LLUUID SocksItem { public virtual UUID SocksItem {
get { return m_wearables[SOCKS].ItemID; } get { return m_wearables[SOCKS].ItemID; }
set { m_wearables[SOCKS].ItemID = value; } set { m_wearables[SOCKS].ItemID = value; }
} }
public virtual LLUUID SocksAsset { public virtual UUID SocksAsset {
get { return m_wearables[SOCKS].AssetID; } get { return m_wearables[SOCKS].AssetID; }
set { m_wearables[SOCKS].AssetID = value; } set { m_wearables[SOCKS].AssetID = value; }
} }
public virtual LLUUID JacketItem { public virtual UUID JacketItem {
get { return m_wearables[JACKET].ItemID; } get { return m_wearables[JACKET].ItemID; }
set { m_wearables[JACKET].ItemID = value; } set { m_wearables[JACKET].ItemID = value; }
} }
public virtual LLUUID JacketAsset { public virtual UUID JacketAsset {
get { return m_wearables[JACKET].AssetID; } get { return m_wearables[JACKET].AssetID; }
set { m_wearables[JACKET].AssetID = value; } set { m_wearables[JACKET].AssetID = value; }
} }
public virtual LLUUID GlovesItem { public virtual UUID GlovesItem {
get { return m_wearables[GLOVES].ItemID; } get { return m_wearables[GLOVES].ItemID; }
set { m_wearables[GLOVES].ItemID = value; } set { m_wearables[GLOVES].ItemID = value; }
} }
public virtual LLUUID GlovesAsset { public virtual UUID GlovesAsset {
get { return m_wearables[GLOVES].AssetID; } get { return m_wearables[GLOVES].AssetID; }
set { m_wearables[GLOVES].AssetID = value; } set { m_wearables[GLOVES].AssetID = value; }
} }
public virtual LLUUID UnderShirtItem { public virtual UUID UnderShirtItem {
get { return m_wearables[UNDERSHIRT].ItemID; } get { return m_wearables[UNDERSHIRT].ItemID; }
set { m_wearables[UNDERSHIRT].ItemID = value; } set { m_wearables[UNDERSHIRT].ItemID = value; }
} }
public virtual LLUUID UnderShirtAsset { public virtual UUID UnderShirtAsset {
get { return m_wearables[UNDERSHIRT].AssetID; } get { return m_wearables[UNDERSHIRT].AssetID; }
set { m_wearables[UNDERSHIRT].AssetID = value; } set { m_wearables[UNDERSHIRT].AssetID = value; }
} }
public virtual LLUUID UnderPantsItem { public virtual UUID UnderPantsItem {
get { return m_wearables[UNDERPANTS].ItemID; } get { return m_wearables[UNDERPANTS].ItemID; }
set { m_wearables[UNDERPANTS].ItemID = value; } set { m_wearables[UNDERPANTS].ItemID = value; }
} }
public virtual LLUUID UnderPantsAsset { public virtual UUID UnderPantsAsset {
get { return m_wearables[UNDERPANTS].AssetID; } get { return m_wearables[UNDERPANTS].AssetID; }
set { m_wearables[UNDERPANTS].AssetID = value; } set { m_wearables[UNDERPANTS].AssetID = value; }
} }
public virtual LLUUID SkirtItem { public virtual UUID SkirtItem {
get { return m_wearables[SKIRT].ItemID; } get { return m_wearables[SKIRT].ItemID; }
set { m_wearables[SKIRT].ItemID = value; } set { m_wearables[SKIRT].ItemID = value; }
} }
public virtual LLUUID SkirtAsset { public virtual UUID SkirtAsset {
get { return m_wearables[SKIRT].AssetID; } get { return m_wearables[SKIRT].AssetID; }
set { m_wearables[SKIRT].AssetID = value; } set { m_wearables[SKIRT].AssetID = value; }
} }
@ -217,9 +217,9 @@ namespace OpenSim.Framework
m_wearables[PANTS].ItemID = PANTS_ITEM; m_wearables[PANTS].ItemID = PANTS_ITEM;
} }
protected LLObject.TextureEntry m_texture; protected Primitive.TextureEntry m_texture;
public virtual LLObject.TextureEntry Texture public virtual Primitive.TextureEntry Texture
{ {
get { return m_texture; } get { return m_texture; }
set { m_texture = value; } set { m_texture = value; }
@ -242,13 +242,13 @@ namespace OpenSim.Framework
m_wearables[i] = new AvatarWearable(); m_wearables[i] = new AvatarWearable();
} }
m_serial = 0; m_serial = 0;
m_owner = LLUUID.Zero; m_owner = UUID.Zero;
m_visualparams = new byte[VISUALPARAM_COUNT]; m_visualparams = new byte[VISUALPARAM_COUNT];
SetDefaultWearables(); SetDefaultWearables();
m_texture = GetDefaultTexture(); m_texture = GetDefaultTexture();
} }
public AvatarAppearance(LLUUID avatarID, AvatarWearable[] wearables, byte[] visualParams) public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
{ {
m_owner = avatarID; m_owner = avatarID;
m_serial = 1; m_serial = 1;
@ -264,7 +264,7 @@ namespace OpenSim.Framework
/// <param name="visualParam"></param> /// <param name="visualParam"></param>
public virtual void SetAppearance(byte[] texture, List<byte> visualParam) public virtual void SetAppearance(byte[] texture, List<byte> visualParam)
{ {
LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length); Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
m_texture = textureEnt; m_texture = textureEnt;
m_visualparams = visualParam.ToArray(); m_visualparams = visualParam.ToArray();
@ -281,16 +281,16 @@ namespace OpenSim.Framework
m_wearables[wearableId] = wearable; m_wearables[wearableId] = wearable;
} }
public static LLObject.TextureEntry GetDefaultTexture() public static Primitive.TextureEntry GetDefaultTexture()
{ {
LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012");
textu.CreateFace(1).TextureID = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); textu.CreateFace(1).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
textu.CreateFace(2).TextureID = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); textu.CreateFace(2).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
textu.CreateFace(3).TextureID = new LLUUID("6522E74D-1660-4E7F-B601-6F48C1659A77"); textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77");
textu.CreateFace(4).TextureID = new LLUUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B"); textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B");
textu.CreateFace(5).TextureID = new LLUUID("00000000-0000-1111-9999-000000000010"); textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010");
textu.CreateFace(6).TextureID = new LLUUID("00000000-0000-1111-9999-000000000011"); textu.CreateFace(6).TextureID = new UUID("00000000-0000-1111-9999-000000000011");
return textu; return textu;
} }
@ -313,13 +313,13 @@ namespace OpenSim.Framework
throw new ArgumentNullException("info"); throw new ArgumentNullException("info");
} }
m_owner = new LLUUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid))); m_owner = new UUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid)));
m_serial = (int)info.GetValue("m_wearablesSerial", typeof(int)); m_serial = (int)info.GetValue("m_wearablesSerial", typeof(int));
m_visualparams = (byte[])info.GetValue("m_visualParams", typeof(byte[])); m_visualparams = (byte[])info.GetValue("m_visualParams", typeof(byte[]));
m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[])); m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[]));
byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[])); byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[]));
m_texture = new LLObject.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length); m_texture = new Primitive.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length);
m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float)); m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float));
@ -371,10 +371,10 @@ namespace OpenSim.Framework
public AvatarAppearance(Hashtable h) public AvatarAppearance(Hashtable h)
{ {
Owner = new LLUUID((string)h["owner"]); Owner = new UUID((string)h["owner"]);
Serial = Convert.ToInt32((string)h["serial"]); Serial = Convert.ToInt32((string)h["serial"]);
VisualParams = (byte[])h["visual_params"]; VisualParams = (byte[])h["visual_params"];
Texture = new LLObject.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length); Texture = new Primitive.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length);
AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]);
m_wearables = new AvatarWearable[MAX_WEARABLES]; m_wearables = new AvatarWearable[MAX_WEARABLES];
@ -384,32 +384,32 @@ namespace OpenSim.Framework
m_wearables[i] = new AvatarWearable(); m_wearables[i] = new AvatarWearable();
} }
BodyItem = new LLUUID((string)h["body_item"]); BodyItem = new UUID((string)h["body_item"]);
BodyAsset = new LLUUID((string)h["body_asset"]); BodyAsset = new UUID((string)h["body_asset"]);
SkinItem = new LLUUID((string)h["skin_item"]); SkinItem = new UUID((string)h["skin_item"]);
SkinAsset = new LLUUID((string)h["skin_asset"]); SkinAsset = new UUID((string)h["skin_asset"]);
HairItem = new LLUUID((string)h["hair_item"]); HairItem = new UUID((string)h["hair_item"]);
HairAsset = new LLUUID((string)h["hair_asset"]); HairAsset = new UUID((string)h["hair_asset"]);
EyesItem = new LLUUID((string)h["eyes_item"]); EyesItem = new UUID((string)h["eyes_item"]);
EyesAsset = new LLUUID((string)h["eyes_asset"]); EyesAsset = new UUID((string)h["eyes_asset"]);
ShirtItem = new LLUUID((string)h["shirt_item"]); ShirtItem = new UUID((string)h["shirt_item"]);
ShirtAsset = new LLUUID((string)h["shirt_asset"]); ShirtAsset = new UUID((string)h["shirt_asset"]);
PantsItem = new LLUUID((string)h["pants_item"]); PantsItem = new UUID((string)h["pants_item"]);
PantsAsset = new LLUUID((string)h["pants_asset"]); PantsAsset = new UUID((string)h["pants_asset"]);
ShoesItem = new LLUUID((string)h["shoes_item"]); ShoesItem = new UUID((string)h["shoes_item"]);
ShoesAsset = new LLUUID((string)h["shoes_asset"]); ShoesAsset = new UUID((string)h["shoes_asset"]);
SocksItem = new LLUUID((string)h["socks_item"]); SocksItem = new UUID((string)h["socks_item"]);
SocksAsset = new LLUUID((string)h["socks_asset"]); SocksAsset = new UUID((string)h["socks_asset"]);
JacketItem = new LLUUID((string)h["jacket_item"]); JacketItem = new UUID((string)h["jacket_item"]);
JacketAsset = new LLUUID((string)h["jacket_asset"]); JacketAsset = new UUID((string)h["jacket_asset"]);
GlovesItem = new LLUUID((string)h["gloves_item"]); GlovesItem = new UUID((string)h["gloves_item"]);
GlovesAsset = new LLUUID((string)h["gloves_asset"]); GlovesAsset = new UUID((string)h["gloves_asset"]);
UnderShirtItem = new LLUUID((string)h["undershirt_item"]); UnderShirtItem = new UUID((string)h["undershirt_item"]);
UnderShirtAsset = new LLUUID((string)h["undershirt_asset"]); UnderShirtAsset = new UUID((string)h["undershirt_asset"]);
UnderPantsItem = new LLUUID((string)h["underpants_item"]); UnderPantsItem = new UUID((string)h["underpants_item"]);
UnderPantsAsset = new LLUUID((string)h["underpants_asset"]); UnderPantsAsset = new UUID((string)h["underpants_asset"]);
SkirtItem = new LLUUID((string)h["skirt_item"]); SkirtItem = new UUID((string)h["skirt_item"]);
SkirtAsset = new LLUUID((string)h["skirt_asset"]); SkirtAsset = new UUID((string)h["skirt_asset"]);
if (h.ContainsKey("attachments")) if (h.ContainsKey("attachments"))
{ {
@ -427,7 +427,7 @@ namespace OpenSim.Framework
throw new ArgumentNullException("info"); throw new ArgumentNullException("info");
} }
info.AddValue("m_scenePresenceID", m_owner.UUID); info.AddValue("m_scenePresenceID", m_owner.Guid);
info.AddValue("m_wearablesSerial", m_serial); info.AddValue("m_wearablesSerial", m_serial);
info.AddValue("m_visualParams", m_visualparams); info.AddValue("m_visualParams", m_visualparams);
info.AddValue("m_wearables", m_wearables); info.AddValue("m_wearables", m_wearables);
@ -435,7 +435,7 @@ namespace OpenSim.Framework
info.AddValue("m_avatarHeight", m_avatarHeight); info.AddValue("m_avatarHeight", m_avatarHeight);
} }
private Dictionary<int, LLUUID[]> m_attachments = new Dictionary<int, LLUUID[]>(); private Dictionary<int, UUID[]> m_attachments = new Dictionary<int, UUID[]>();
public void SetAttachments(Hashtable data) public void SetAttachments(Hashtable data)
{ {
@ -451,14 +451,14 @@ namespace OpenSim.Framework
if (m_attachments.ContainsKey(attachpoint)) if (m_attachments.ContainsKey(attachpoint))
continue; continue;
LLUUID item; UUID item;
LLUUID asset; UUID asset;
Hashtable uuids = (Hashtable) e.Value; Hashtable uuids = (Hashtable) e.Value;
LLUUID.TryParse(uuids["item"].ToString(), out item); UUID.TryParse(uuids["item"].ToString(), out item);
LLUUID.TryParse(uuids["asset"].ToString(), out asset); UUID.TryParse(uuids["asset"].ToString(), out asset);
LLUUID[] attachment = new LLUUID[2]; UUID[] attachment = new UUID[2];
attachment[0] = item; attachment[0] = item;
attachment[1] = asset; attachment[1] = asset;
@ -473,10 +473,10 @@ namespace OpenSim.Framework
Hashtable ret = new Hashtable(); Hashtable ret = new Hashtable();
foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments) foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
{ {
int attachpoint = kvp.Key; int attachpoint = kvp.Key;
LLUUID[] uuids = kvp.Value; UUID[] uuids = kvp.Value;
Hashtable data = new Hashtable(); Hashtable data = new Hashtable();
data["item"] = uuids[0].ToString(); data["item"] = uuids[0].ToString();
@ -493,28 +493,28 @@ namespace OpenSim.Framework
return new List<int>(m_attachments.Keys); return new List<int>(m_attachments.Keys);
} }
public LLUUID GetAttachedItem(int attachpoint) public UUID GetAttachedItem(int attachpoint)
{ {
if (!m_attachments.ContainsKey(attachpoint)) if (!m_attachments.ContainsKey(attachpoint))
return LLUUID.Zero; return UUID.Zero;
return m_attachments[attachpoint][0]; return m_attachments[attachpoint][0];
} }
public LLUUID GetAttachedAsset(int attachpoint) public UUID GetAttachedAsset(int attachpoint)
{ {
if (!m_attachments.ContainsKey(attachpoint)) if (!m_attachments.ContainsKey(attachpoint))
return LLUUID.Zero; return UUID.Zero;
return m_attachments[attachpoint][1]; return m_attachments[attachpoint][1];
} }
public void SetAttachment(int attachpoint, LLUUID item, LLUUID asset) public void SetAttachment(int attachpoint, UUID item, UUID asset)
{ {
if (attachpoint == 0) if (attachpoint == 0)
return; return;
if (item == LLUUID.Zero) if (item == UUID.Zero)
{ {
if (m_attachments.ContainsKey(attachpoint)) if (m_attachments.ContainsKey(attachpoint))
m_attachments.Remove(attachpoint); m_attachments.Remove(attachpoint);
@ -522,15 +522,15 @@ namespace OpenSim.Framework
} }
if (!m_attachments.ContainsKey(attachpoint)) if (!m_attachments.ContainsKey(attachpoint))
m_attachments[attachpoint] = new LLUUID[2]; m_attachments[attachpoint] = new UUID[2];
m_attachments[attachpoint][0] = item; m_attachments[attachpoint][0] = item;
m_attachments[attachpoint][1] = asset; m_attachments[attachpoint][1] = asset;
} }
public int GetAttachpoint(LLUUID itemID) public int GetAttachpoint(UUID itemID)
{ {
foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments) foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
{ {
if (kvp.Value[0] == itemID) if (kvp.Value[0] == itemID)
{ {
@ -540,7 +540,7 @@ namespace OpenSim.Framework
return 0; return 0;
} }
public void DetachAttachment(LLUUID itemID) public void DetachAttachment(UUID itemID)
{ {
int attachpoint = GetAttachpoint(itemID); int attachpoint = GetAttachpoint(itemID);
@ -552,7 +552,7 @@ namespace OpenSim.Framework
{ {
List<string> strings = new List<string>(); List<string> strings = new List<string>();
foreach (KeyValuePair<int, LLUUID[]> e in m_attachments) foreach (KeyValuePair<int, UUID[]> e in m_attachments)
{ {
strings.Add(e.Key.ToString()); strings.Add(e.Key.ToString());
strings.Add(e.Value[0].ToString()); strings.Add(e.Value[0].ToString());
@ -572,13 +572,13 @@ namespace OpenSim.Framework
while (strings.Length - i > 2) while (strings.Length - i > 2)
{ {
int attachpoint = Int32.Parse(strings[i]); int attachpoint = Int32.Parse(strings[i]);
LLUUID item = new LLUUID(strings[i+1]); UUID item = new UUID(strings[i+1]);
LLUUID asset = new LLUUID(strings[i+2]); UUID asset = new UUID(strings[i+2]);
i += 3; i += 3;
if (!m_attachments.ContainsKey(attachpoint)) if (!m_attachments.ContainsKey(attachpoint))
{ {
m_attachments[attachpoint] = new LLUUID[2]; m_attachments[attachpoint] = new UUID[2];
m_attachments[attachpoint][0] = item; m_attachments[attachpoint][0] = item;
m_attachments[attachpoint][1] = asset; m_attachments[attachpoint][1] = asset;
} }

View File

@ -25,13 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AvatarPickerAvatar public class AvatarPickerAvatar
{ {
public LLUUID AvatarID; public UUID AvatarID;
public string firstName; public string firstName;
public string lastName; public string lastName;
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AvatarPickerReplyAgentDataArgs : EventArgs public class AvatarPickerReplyAgentDataArgs : EventArgs
{ {
public LLUUID AgentID; public UUID AgentID;
public LLUUID QueryID; public UUID QueryID;
} }
} }

View File

@ -1,11 +1,11 @@
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public class AvatarPickerReplyDataArgs : EventArgs public class AvatarPickerReplyDataArgs : EventArgs
{ {
public LLUUID AvatarID; public UUID AvatarID;
public byte[] FirstName; public byte[] FirstName;
public byte[] LastName; public byte[] LastName;
} }

View File

@ -28,21 +28,21 @@
using System; using System;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Security.Permissions; using System.Security.Permissions;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
[Serializable] [Serializable]
public class AvatarWearable : ISerializable public class AvatarWearable : ISerializable
{ {
public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); public UUID AssetID = new UUID("00000000-0000-0000-0000-000000000000");
public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
public AvatarWearable() public AvatarWearable()
{ {
} }
public AvatarWearable(LLUUID itemId, LLUUID assetId) public AvatarWearable(UUID itemId, UUID assetId)
{ {
AssetID = assetId; AssetID = assetId;
ItemID = itemId; ItemID = itemId;
@ -56,8 +56,8 @@ namespace OpenSim.Framework
throw new ArgumentNullException("info"); throw new ArgumentNullException("info");
} }
AssetID = new LLUUID((Guid) info.GetValue("AssetID", typeof (Guid))); AssetID = new UUID((Guid) info.GetValue("AssetID", typeof (Guid)));
ItemID = new LLUUID((Guid) info.GetValue("ItemID", typeof (Guid))); ItemID = new UUID((Guid) info.GetValue("ItemID", typeof (Guid)));
//System.Console.WriteLine("AvatarWearable Deserialize END"); //System.Console.WriteLine("AvatarWearable Deserialize END");
} }
@ -71,17 +71,17 @@ namespace OpenSim.Framework
{ {
defaultWearables[i] = new AvatarWearable(); defaultWearables[i] = new AvatarWearable();
} }
defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); defaultWearables[4].ItemID = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110");
defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); defaultWearables[5].ItemID = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120");
return defaultWearables; return defaultWearables;
} }
} }
@ -98,8 +98,8 @@ namespace OpenSim.Framework
throw new ArgumentNullException("info"); throw new ArgumentNullException("info");
} }
info.AddValue("AssetID", AssetID.UUID); info.AddValue("AssetID", AssetID.Guid);
info.AddValue("ItemID", ItemID.UUID); info.AddValue("ItemID", ItemID.Guid);
} }
#endregion #endregion

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -21,10 +21,10 @@ namespace OpenSim.Framework
public class Wearable public class Wearable
{ {
public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
public byte Type = 0; public byte Type = 0;
public Wearable(LLUUID itemId, byte type) public Wearable(UUID itemId, byte type)
{ {
ItemID = itemId; ItemID = itemId;
Type = type; Type = type;

View File

@ -1,13 +1,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
namespace Opensim.Framework namespace Opensim.Framework
{ {
// The delegate we will use for performing fetch from backing store // The delegate we will use for performing fetch from backing store
// //
public delegate Object FetchDelegate(LLUUID index); public delegate Object FetchDelegate(UUID index);
public delegate bool ExpireDelegate(LLUUID index); public delegate bool ExpireDelegate(UUID index);
// Strategy // Strategy
// //
@ -37,14 +37,14 @@ namespace Opensim.Framework
} }
// The base class of all cache objects. Implements comparison and sorting // The base class of all cache objects. Implements comparison and sorting
// by the LLUUID member. // by the UUID member.
// //
// This is not abstract because we need to instantiate it briefly as a // This is not abstract because we need to instantiate it briefly as a
// method parameter // method parameter
// //
public class CacheItemBase : IEquatable<CacheItemBase>, IComparable<CacheItemBase> public class CacheItemBase : IEquatable<CacheItemBase>, IComparable<CacheItemBase>
{ {
public LLUUID uuid; public UUID uuid;
public DateTime entered; public DateTime entered;
public DateTime lastUsed; public DateTime lastUsed;
public DateTime expires = new DateTime(0); public DateTime expires = new DateTime(0);
@ -59,14 +59,14 @@ namespace Opensim.Framework
{ {
} }
public CacheItemBase(LLUUID index) public CacheItemBase(UUID index)
{ {
uuid = index; uuid = index;
entered = DateTime.Now; entered = DateTime.Now;
lastUsed = entered; lastUsed = entered;
} }
public CacheItemBase(LLUUID index, DateTime ttl) public CacheItemBase(UUID index, DateTime ttl)
{ {
uuid = index; uuid = index;
entered = DateTime.Now; entered = DateTime.Now;
@ -96,23 +96,23 @@ namespace Opensim.Framework
{ {
private Object m_Data; private Object m_Data;
public MemoryCacheItem(LLUUID index) : public MemoryCacheItem(UUID index) :
base(index) base(index)
{ {
} }
public MemoryCacheItem(LLUUID index, DateTime ttl) : public MemoryCacheItem(UUID index, DateTime ttl) :
base(index, ttl) base(index, ttl)
{ {
} }
public MemoryCacheItem(LLUUID index, Object data) : public MemoryCacheItem(UUID index, Object data) :
base(index) base(index)
{ {
Store(data); Store(data);
} }
public MemoryCacheItem(LLUUID index, DateTime ttl, Object data) : public MemoryCacheItem(UUID index, DateTime ttl, Object data) :
base(index, ttl) base(index, ttl)
{ {
Store(data); Store(data);
@ -133,23 +133,23 @@ namespace Opensim.Framework
// //
public class FileCacheItem : CacheItemBase public class FileCacheItem : CacheItemBase
{ {
public FileCacheItem(LLUUID index) : public FileCacheItem(UUID index) :
base(index) base(index)
{ {
} }
public FileCacheItem(LLUUID index, DateTime ttl) : public FileCacheItem(UUID index, DateTime ttl) :
base(index, ttl) base(index, ttl)
{ {
} }
public FileCacheItem(LLUUID index, Object data) : public FileCacheItem(UUID index, Object data) :
base(index) base(index)
{ {
Store(data); Store(data);
} }
public FileCacheItem(LLUUID index, DateTime ttl, Object data) : public FileCacheItem(UUID index, DateTime ttl, Object data) :
base(index, ttl) base(index, ttl)
{ {
Store(data); Store(data);
@ -173,8 +173,8 @@ namespace Opensim.Framework
public class Cache public class Cache
{ {
private List<CacheItemBase> m_Index = new List<CacheItemBase>(); private List<CacheItemBase> m_Index = new List<CacheItemBase>();
private Dictionary<LLUUID, CacheItemBase> m_Lookup = private Dictionary<UUID, CacheItemBase> m_Lookup =
new Dictionary<LLUUID, CacheItemBase>(); new Dictionary<UUID, CacheItemBase>();
private CacheStrategy m_Strategy; private CacheStrategy m_Strategy;
private CacheMedium m_Medium; private CacheMedium m_Medium;
@ -285,7 +285,7 @@ namespace Opensim.Framework
// Get an item from cache. Return the raw item, not it's data // Get an item from cache. Return the raw item, not it's data
// //
protected virtual CacheItemBase GetItem(LLUUID index) protected virtual CacheItemBase GetItem(UUID index)
{ {
CacheItemBase item = null; CacheItemBase item = null;
@ -312,7 +312,7 @@ namespace Opensim.Framework
// Get an item from cache. Do not try to fetch from source if not // Get an item from cache. Do not try to fetch from source if not
// present. Just return null // present. Just return null
// //
public virtual Object Get(LLUUID index) public virtual Object Get(UUID index)
{ {
CacheItemBase item = GetItem(index); CacheItemBase item = GetItem(index);
@ -325,7 +325,7 @@ namespace Opensim.Framework
// Fetch an object from backing store if not cached, serve from // Fetch an object from backing store if not cached, serve from
// cache if it is. // cache if it is.
// //
public virtual Object Get(LLUUID index, FetchDelegate fetch) public virtual Object Get(UUID index, FetchDelegate fetch)
{ {
Object item = Get(index); Object item = Get(index);
if (item != null) if (item != null)
@ -366,7 +366,7 @@ namespace Opensim.Framework
return item.Retrieve(); return item.Retrieve();
} }
public virtual void Store(LLUUID index, Object data) public virtual void Store(UUID index, Object data)
{ {
Type container; Type container;
@ -384,12 +384,12 @@ namespace Opensim.Framework
Store(index, data, container); Store(index, data, container);
} }
public virtual void Store(LLUUID index, Object data, Type container) public virtual void Store(UUID index, Object data, Type container)
{ {
Store(index, data, container, new Object[] { index }); Store(index, data, container, new Object[] { index });
} }
public virtual void Store(LLUUID index, Object data, Type container, public virtual void Store(UUID index, Object data, Type container,
Object[] parameters) Object[] parameters)
{ {
Expire(false); Expire(false);
@ -493,7 +493,7 @@ namespace Opensim.Framework
} }
} }
public void Invalidate(LLUUID uuid) public void Invalidate(UUID uuid)
{ {
if (!m_Lookup.ContainsKey(uuid)) if (!m_Lookup.ContainsKey(uuid))
return; return;

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
@ -36,14 +37,14 @@ namespace OpenSim.Framework
public Guid AgentID; public Guid AgentID;
public bool alwaysrun; public bool alwaysrun;
public float AVHeight; public float AVHeight;
public sLLVector3 cameraPosition; public Vector3 cameraPosition;
public float drawdistance; public float drawdistance;
public float godlevel; public float godlevel;
public uint GroupAccess; public uint GroupAccess;
public sLLVector3 Position; public Vector3 Position;
public ulong regionHandle; public ulong regionHandle;
public byte[] throttles; public byte[] throttles;
public sLLVector3 Velocity; public Vector3 Velocity;
public ChildAgentDataUpdate() public ChildAgentDataUpdate()
{ {

View File

@ -28,8 +28,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using libsecondlife.Packets; using OpenMetaverse.Packets;
using log4net; using log4net;
namespace OpenSim.Framework namespace OpenSim.Framework
@ -117,7 +117,7 @@ namespace OpenSim.Framework
} }
} }
public void CloseAllCircuits(LLUUID agentId) public void CloseAllCircuits(UUID agentId)
{ {
uint[] circuits = GetAllCircuits(agentId); uint[] circuits = GetAllCircuits(agentId);
// We're using a for loop here so changes to the circuits don't cause it to completely fail. // We're using a for loop here so changes to the circuits don't cause it to completely fail.
@ -144,7 +144,7 @@ namespace OpenSim.Framework
} }
// [Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")] // [Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")]
public uint[] GetAllCircuits(LLUUID agentId) public uint[] GetAllCircuits(UUID agentId)
{ {
List<uint> circuits = new List<uint>(); List<uint> circuits = new List<uint>();
// Wasteful, I know // Wasteful, I know

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Collections; using System.Collections;
using libsecondlife; using OpenMetaverse;
using System.Collections.Generic; using System.Collections.Generic;
namespace OpenSim.Framework namespace OpenSim.Framework
@ -35,12 +35,12 @@ namespace OpenSim.Framework
public class DetectedObject public class DetectedObject
{ {
public DetectedObject() { } public DetectedObject() { }
public LLUUID groupUUID = LLUUID.Zero; public UUID groupUUID = UUID.Zero;
public LLUUID ownerUUID = LLUUID.Zero; public UUID ownerUUID = UUID.Zero;
public LLUUID keyUUID = LLUUID.Zero; public UUID keyUUID = UUID.Zero;
public LLVector3 posVector = LLVector3.Zero; public Vector3 posVector = Vector3.Zero;
public LLQuaternion rotQuat = LLQuaternion.Identity; public Quaternion rotQuat = Quaternion.Identity;
public LLVector3 velVector = LLVector3.Zero; public Vector3 velVector = Vector3.Zero;
public string nameStr = String.Empty; public string nameStr = String.Empty;
public int colliderType = 0; public int colliderType = 0;
} }

View File

@ -29,14 +29,14 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using libsecondlife.Packets; using OpenMetaverse.Packets;
using log4net; using log4net;
using OpenSim.Framework.Statistics; using OpenSim.Framework.Statistics;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {
public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset); public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
/// <summary> /// <summary>
/// Manages local cache of assets and their sending to viewers. /// Manages local cache of assets and their sending to viewers.
@ -58,17 +58,17 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// The cache of assets. This does not include textures. /// The cache of assets. This does not include textures.
/// </summary> /// </summary>
private Dictionary<LLUUID, AssetInfo> Assets; private Dictionary<UUID, AssetInfo> Assets;
/// <summary> /// <summary>
/// The cache of textures. /// The cache of textures.
/// </summary> /// </summary>
private Dictionary<LLUUID, TextureImage> Textures; private Dictionary<UUID, TextureImage> Textures;
/// <summary> /// <summary>
/// Assets requests which are waiting for asset server data. This includes texture requests /// Assets requests which are waiting for asset server data. This includes texture requests
/// </summary> /// </summary>
private Dictionary<LLUUID, AssetRequest> RequestedAssets; private Dictionary<UUID, AssetRequest> RequestedAssets;
/// <summary> /// <summary>
/// Asset requests with data which are ready to be sent back to requesters. This includes textures. /// Asset requests with data which are ready to be sent back to requesters. This includes textures.
@ -78,7 +78,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// Until the asset request is fulfilled, each asset request is associated with a list of requesters /// Until the asset request is fulfilled, each asset request is associated with a list of requesters
/// </summary> /// </summary>
private Dictionary<LLUUID, AssetRequestsList> RequestLists; private Dictionary<UUID, AssetRequestsList> RequestLists;
private readonly IAssetServer m_assetServer; private readonly IAssetServer m_assetServer;
@ -155,12 +155,12 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
private void Initialize() private void Initialize()
{ {
Assets = new Dictionary<LLUUID, AssetInfo>(); Assets = new Dictionary<UUID, AssetInfo>();
Textures = new Dictionary<LLUUID, TextureImage>(); Textures = new Dictionary<UUID, TextureImage>();
AssetRequests = new List<AssetRequest>(); AssetRequests = new List<AssetRequest>();
RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); RequestedAssets = new Dictionary<UUID, AssetRequest>();
RequestLists = new Dictionary<LLUUID, AssetRequestsList>(); RequestLists = new Dictionary<UUID, AssetRequestsList>();
} }
/// <summary> /// <summary>
@ -207,7 +207,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="assetId"></param></param> /// <param name="assetId"></param></param>
/// <returns></returns> /// <returns></returns>
//private AssetBase GetCachedAsset(LLUUID assetId) //private AssetBase GetCachedAsset(UUID assetId)
//{ //{
// AssetBase asset = null; // AssetBase asset = null;
@ -223,7 +223,7 @@ namespace OpenSim.Framework.Communications.Cache
// return asset; // return asset;
//} //}
private bool TryGetCachedAsset(LLUUID assetId, out AssetBase asset) private bool TryGetCachedAsset(UUID assetId, out AssetBase asset)
{ {
if (Textures.ContainsKey(assetId)) if (Textures.ContainsKey(assetId))
{ {
@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache
/// A callback invoked when the asset has either been found or not found. /// A callback invoked when the asset has either been found or not found.
/// If the asset was found this is called with the asset UUID and the asset data /// If the asset was found this is called with the asset UUID and the asset data
/// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param>
public void GetAsset(LLUUID assetId, AssetRequestCallback callback, bool isTexture) public void GetAsset(UUID assetId, AssetRequestCallback callback, bool isTexture)
{ {
//m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId); //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId);
@ -308,7 +308,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="assetID"></param> /// <param name="assetID"></param>
/// <param name="isTexture"></param> /// <param name="isTexture"></param>
/// <returns>null if the asset could not be retrieved</returns> /// <returns>null if the asset could not be retrieved</returns>
public AssetBase GetAsset(LLUUID assetID, bool isTexture) public AssetBase GetAsset(UUID assetID, bool isTexture)
{ {
// I'm not going over 3 seconds since this will be blocking processing of all the other inbound // I'm not going over 3 seconds since this will be blocking processing of all the other inbound
// packets from the client. // packets from the client.
@ -390,7 +390,7 @@ namespace OpenSim.Framework.Communications.Cache
/// this is a stop gap measure until we have such a thing. /// this is a stop gap measure until we have such a thing.
/// </summary> /// </summary>
public void ExpireAsset(LLUUID uuid) public void ExpireAsset(UUID uuid)
{ {
// uuid is unique, so no need to worry about it showing up // uuid is unique, so no need to worry about it showing up
// in the 2 caches differently. Also, locks are probably // in the 2 caches differently. Also, locks are probably
@ -495,7 +495,7 @@ namespace OpenSim.Framework.Communications.Cache
} }
// See IAssetReceiver // See IAssetReceiver
public void AssetNotFound(LLUUID assetID, bool IsTexture) public void AssetNotFound(UUID assetID, bool IsTexture)
{ {
//m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
@ -567,17 +567,17 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="transferRequest"></param> /// <param name="transferRequest"></param>
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{ {
LLUUID requestID = null; UUID requestID = null;
byte source = 2; byte source = 2;
if (transferRequest.TransferInfo.SourceType == 2) if (transferRequest.TransferInfo.SourceType == 2)
{ {
//direct asset request //direct asset request
requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); requestID = new UUID(transferRequest.TransferInfo.Params, 0);
} }
else if (transferRequest.TransferInfo.SourceType == 3) else if (transferRequest.TransferInfo.SourceType == 3)
{ {
//inventory asset request //inventory asset request
requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = 3; source = 3;
//Console.WriteLine("asset request " + requestID); //Console.WriteLine("asset request " + requestID);
} }
@ -678,10 +678,10 @@ namespace OpenSim.Framework.Communications.Cache
public class AssetRequest public class AssetRequest
{ {
public IClientAPI RequestUser; public IClientAPI RequestUser;
public LLUUID RequestAssetID; public UUID RequestAssetID;
public AssetInfo AssetInf; public AssetInfo AssetInf;
public TextureImage ImageInfo; public TextureImage ImageInfo;
public LLUUID TransferRequestID; public UUID TransferRequestID;
public long DataPointer = 0; public long DataPointer = 0;
public int NumPackets = 0; public int NumPackets = 0;
public int PacketCounter = 0; public int PacketCounter = 0;
@ -731,10 +731,10 @@ namespace OpenSim.Framework.Communications.Cache
public class AssetRequestsList public class AssetRequestsList
{ {
public LLUUID AssetID; public UUID AssetID;
public List<NewAssetRequest> Requests = new List<NewAssetRequest>(); public List<NewAssetRequest> Requests = new List<NewAssetRequest>();
public AssetRequestsList(LLUUID assetID) public AssetRequestsList(UUID assetID)
{ {
AssetID = assetID; AssetID = assetID;
} }
@ -742,10 +742,10 @@ namespace OpenSim.Framework.Communications.Cache
public class NewAssetRequest public class NewAssetRequest
{ {
public LLUUID AssetID; public UUID AssetID;
public AssetRequestCallback Callback; public AssetRequestCallback Callback;
public NewAssetRequest(LLUUID assetID, AssetRequestCallback callback) public NewAssetRequest(UUID assetID, AssetRequestCallback callback)
{ {
AssetID = assetID; AssetID = assetID;
Callback = callback; Callback = callback;

View File

@ -28,7 +28,7 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework.AssetLoader.Filesystem; using OpenSim.Framework.AssetLoader.Filesystem;
using OpenSim.Framework.Statistics; using OpenSim.Framework.Statistics;
@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache
m_receiver = receiver; m_receiver = receiver;
} }
public void RequestAsset(LLUUID assetID, bool isTexture) public void RequestAsset(UUID assetID, bool isTexture)
{ {
AssetRequest req = new AssetRequest(); AssetRequest req = new AssetRequest();
req.AssetID = assetID; req.AssetID = assetID;

View File

@ -30,24 +30,24 @@ using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {
internal delegate void AddItemDelegate(InventoryItemBase itemInfo); internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
internal delegate void DeleteItemDelegate(LLUUID itemID); internal delegate void DeleteItemDelegate(UUID itemID);
internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); internal delegate void CreateFolderDelegate(string folderName, UUID folderID, ushort folderType, UUID parentID);
internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); internal delegate void MoveFolderDelegate(UUID folderID, UUID parentID);
internal delegate void PurgeFolderDelegate(LLUUID folderID); internal delegate void PurgeFolderDelegate(UUID folderID);
internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); internal delegate void UpdateFolderDelegate(string name, UUID folderID, ushort type, UUID parentID);
internal delegate void SendInventoryDescendentsDelegate( internal delegate void SendInventoryDescendentsDelegate(
IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems);
public delegate void OnItemReceivedDelegate(LLUUID itemID); public delegate void OnItemReceivedDelegate(UUID itemID);
/// <summary> /// <summary>
/// Stores user profile and inventory data received from backend services for a particular user. /// Stores user profile and inventory data received from backend services for a particular user.
@ -84,12 +84,12 @@ namespace OpenSim.Framework.Communications.Cache
public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
private InventoryFolderImpl m_rootFolder; private InventoryFolderImpl m_rootFolder;
public LLUUID SessionID public UUID SessionID
{ {
get { return m_session_id; } get { return m_session_id; }
set { m_session_id = value; } set { m_session_id = value; }
} }
private LLUUID m_session_id = LLUUID.Zero; private UUID m_session_id = UUID.Zero;
/// <summary> /// <summary>
/// Constructor /// Constructor
@ -127,9 +127,9 @@ namespace OpenSim.Framework.Communications.Cache
/// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list /// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list
/// </summary> /// </summary>
/// <param name="folder"></param> /// <param name="folder"></param>
private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<LLUUID, IList<InventoryFolderImpl>> dictionary) private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<UUID, IList<InventoryFolderImpl>> dictionary)
{ {
LLUUID parentFolderId = folder.ParentID; UUID parentFolderId = folder.ParentID;
if (dictionary.ContainsKey(parentFolderId)) if (dictionary.ContainsKey(parentFolderId))
dictionary[parentFolderId].Add(folder); dictionary[parentFolderId].Add(folder);
@ -148,9 +148,9 @@ namespace OpenSim.Framework.Communications.Cache
/// heirarchy /// heirarchy
/// </summary> /// </summary>
/// <param name="parentId"> /// <param name="parentId">
/// A <see cref="LLUUID"/> /// A <see cref="UUID"/>
/// </param> /// </param>
private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<LLUUID, IList<InventoryFolderImpl>> folderDictionary) private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<UUID, IList<InventoryFolderImpl>> folderDictionary)
{ {
if (folderDictionary.ContainsKey(parentFolder.ID)) if (folderDictionary.ContainsKey(parentFolder.ID))
{ {
@ -208,19 +208,19 @@ namespace OpenSim.Framework.Communications.Cache
try try
{ {
// collection of all received folders, indexed by their parent ID // collection of all received folders, indexed by their parent ID
IDictionary<LLUUID, IList<InventoryFolderImpl>> receivedFolders = IDictionary<UUID, IList<InventoryFolderImpl>> receivedFolders =
new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); new Dictionary<UUID, IList<InventoryFolderImpl>>();
// Take all received folders, find the root folder, and put ther rest into // Take all received folders, find the root folder, and put ther rest into
// the pendingCategorizationFolders collection // the pendingCategorizationFolders collection
foreach (InventoryFolderImpl folder in folders) foreach (InventoryFolderImpl folder in folders)
AddFolderToDictionary(folder, receivedFolders); AddFolderToDictionary(folder, receivedFolders);
if (!receivedFolders.ContainsKey(LLUUID.Zero)) if (!receivedFolders.ContainsKey(UUID.Zero))
throw new Exception("Database did not return a root inventory folder"); throw new Exception("Database did not return a root inventory folder");
else else
{ {
IList<InventoryFolderImpl> rootFolderList = receivedFolders[LLUUID.Zero]; IList<InventoryFolderImpl> rootFolderList = receivedFolders[UUID.Zero];
m_rootFolder = rootFolderList[0]; m_rootFolder = rootFolderList[0];
if (rootFolderList.Count > 1) if (rootFolderList.Count > 1)
{ {
@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
rootFolderList[i].ID, RootFolder.ID); rootFolderList[i].ID, RootFolder.ID);
} }
} }
receivedFolders.Remove(LLUUID.Zero); receivedFolders.Remove(UUID.Zero);
} }
// Now take the pendingCategorizationFolders collection, and turn that into a tree, // Now take the pendingCategorizationFolders collection, and turn that into a tree,
@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications.Cache
ResolveReceivedFolders(RootFolder, receivedFolders); ResolveReceivedFolders(RootFolder, receivedFolders);
// Generate a warning for folders that are not part of the heirarchy // Generate a warning for folders that are not part of the heirarchy
foreach (KeyValuePair<LLUUID, IList<InventoryFolderImpl>> folderList in receivedFolders) foreach (KeyValuePair<UUID, IList<InventoryFolderImpl>> folderList in receivedFolders)
{ {
foreach (InventoryFolderImpl folder in folderList.Value) foreach (InventoryFolderImpl folder in folderList.Value)
m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name); m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name);
@ -314,7 +314,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="parentID"></param> /// <param name="parentID"></param>
/// <returns></returns> /// <returns></returns>
public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID) public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
@ -389,7 +389,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="parentID"></param> /// <param name="parentID"></param>
public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) public bool UpdateFolder(string name, UUID folderID, ushort type, UUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Cache
/// ///
/// <param name="folderID"></param> /// <param name="folderID"></param>
/// <param name="parentID"></param> /// <param name="parentID"></param>
public bool MoveFolder(LLUUID folderID, LLUUID parentID) public bool MoveFolder(UUID folderID, UUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
@ -487,7 +487,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// ///
/// <param name="folderID"></param> /// <param name="folderID"></param>
public bool PurgeFolder(LLUUID folderID) public bool PurgeFolder(UUID folderID)
{ {
// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
// folderID, remoteClient.Name, remoteClient.AgentId); // folderID, remoteClient.Name, remoteClient.AgentId);
@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (m_hasReceivedInventory) if (m_hasReceivedInventory)
{ {
if (item.Folder == LLUUID.Zero) if (item.Folder == UUID.Zero)
{ {
InventoryFolderImpl f = FindFolderForType(item.AssetType); InventoryFolderImpl f = FindFolderForType(item.AssetType);
if (f != null) if (f != null)
@ -607,7 +607,7 @@ namespace OpenSim.Framework.Communications.Cache
/// true on a successful delete or a if the request is queued. /// true on a successful delete or a if the request is queued.
/// Returns false on an immediate failure /// Returns false on an immediate failure
/// </returns> /// </returns>
public bool DeleteItem(LLUUID itemID) public bool DeleteItem(UUID itemID)
{ {
if (m_hasReceivedInventory) if (m_hasReceivedInventory)
{ {
@ -655,7 +655,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="fetchFolders"></param> /// <param name="fetchFolders"></param>
/// <param name="fetchItems"></param> /// <param name="fetchItems"></param>
/// <returns>true if the request was queued or successfully processed, false otherwise</returns> /// <returns>true if the request was queued or successfully processed, false otherwise</returns>
public bool SendInventoryDecendents(IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems) public bool SendInventoryDecendents(IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems)
{ {
if (m_hasReceivedInventory) if (m_hasReceivedInventory)
{ {

View File

@ -18,11 +18,13 @@ namespace OpenSim.Framework.Communications.Cache
} }
public override void StoreAsset(AssetBase asset) public override void StoreAsset(AssetBase asset)
{ {
string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0] byte[] idBytes = asset.FullID.Guid.ToByteArray();
+ Path.DirectorySeparatorChar + asset.FullID.Data[1];
if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0])) string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]); + Path.DirectorySeparatorChar + idBytes[1];
if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0]))
Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]);
if (!Directory.Exists(cdir)) if (!Directory.Exists(cdir))
Directory.CreateDirectory(cdir); Directory.CreateDirectory(cdir);
@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache
protected override AssetBase GetAsset(AssetRequest req) protected override AssetBase GetAsset(AssetRequest req)
{ {
string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0] byte[] idBytes = req.AssetID.Guid.ToByteArray();
+ Path.DirectorySeparatorChar + req.AssetID.Data[1];
string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
+ Path.DirectorySeparatorChar + idBytes[1];
if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"))
{ {
FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"); FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml");

View File

@ -27,7 +27,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using OpenMetaverse;
//using System.Reflection; //using System.Reflection;
//using log4net; //using log4net;
@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// Items that are contained in this folder /// Items that are contained in this folder
/// </summary> /// </summary>
public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); public Dictionary<UUID, InventoryItemBase> Items = new Dictionary<UUID, InventoryItemBase>();
/// <summary> /// <summary>
/// Child folders that are contained in this folder /// Child folders that are contained in this folder
/// </summary> /// </summary>
public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); public Dictionary<UUID, InventoryFolderImpl> SubFolders = new Dictionary<UUID, InventoryFolderImpl>();
// Constructors // Constructors
public InventoryFolderImpl(InventoryFolderBase folderbase) public InventoryFolderImpl(InventoryFolderBase folderbase)
@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folderName"></param> /// <param name="folderName"></param>
/// <param name="type"></param> /// <param name="type"></param>
/// <returns>The newly created subfolder. Returns null if the folder already exists</returns> /// <returns>The newly created subfolder. Returns null if the folder already exists</returns>
public InventoryFolderImpl CreateChildFolder(LLUUID folderID, string folderName, ushort type) public InventoryFolderImpl CreateChildFolder(UUID folderID, string folderName, ushort type)
{ {
lock (SubFolders) lock (SubFolders)
{ {
@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <returns>null if the item is not found</returns> /// <returns>null if the item is not found</returns>
public InventoryItemBase FindItem(LLUUID itemID) public InventoryItemBase FindItem(UUID itemID)
{ {
lock (Items) lock (Items)
{ {
@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="folderID"></param> /// <param name="folderID"></param>
/// <returns></returns> /// <returns></returns>
public bool DeleteItem(LLUUID itemID) public bool DeleteItem(UUID itemID)
{ {
bool found = false; bool found = false;
@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications.Cache
/// first. /// first.
/// </summary> /// </summary>
/// <returns>The requested folder if it exists, null if it does not.</returns> /// <returns>The requested folder if it exists, null if it does not.</returns>
public InventoryFolderImpl FindFolder(LLUUID folderID) public InventoryFolderImpl FindFolder(UUID folderID)
{ {
if (folderID == ID) if (folderID == ID)
return this; return this;

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Xml; using System.Xml;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
@ -44,29 +44,29 @@ namespace OpenSim.Framework.Communications.Cache
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); private UUID libOwner = new UUID("11111111-1111-0000-0000-000100bba000");
/// <summary> /// <summary>
/// Holds the root library folder and all its descendents. This is really only used during inventory /// Holds the root library folder and all its descendents. This is really only used during inventory
/// setup so that we don't have to repeatedly search the tree of library folders. /// setup so that we don't have to repeatedly search the tree of library folders.
/// </summary> /// </summary>
protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders protected Dictionary<UUID, InventoryFolderImpl> libraryFolders
= new Dictionary<LLUUID, InventoryFolderImpl>(); = new Dictionary<UUID, InventoryFolderImpl>();
public LibraryRootFolder() public LibraryRootFolder()
{ {
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
Owner = libOwner; Owner = libOwner;
ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); ID = new UUID("00000112-000f-0000-0000-000100bba000");
Name = "OpenSim Library"; Name = "OpenSim Library";
ParentID = LLUUID.Zero; ParentID = UUID.Zero;
Type = (short) 8; Type = (short) 8;
Version = (ushort) 1; Version = (ushort) 1;
libraryFolders.Add(ID, this); libraryFolders.Add(ID, this);
LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.Xml"));
// CreateLibraryItems(); // CreateLibraryItems();
} }
@ -81,40 +81,40 @@ namespace OpenSim.Framework.Communications.Cache
//private void CreateLibraryItems() //private void CreateLibraryItems()
//{ //{
// InventoryItemBase item = // InventoryItemBase item =
// CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), // CreateItem(new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"),
// new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", // new UUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape",
// (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0; // item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0; // item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item); // Items.Add(item.inventoryID, item);
// item = // item =
// CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), // CreateItem(new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"),
// new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", // new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin",
// (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0; // item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0; // item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item); // Items.Add(item.inventoryID, item);
// item = // item =
// CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), // CreateItem(new UUID("77c41e39-38f9-f75a-0000-585989bf0000"),
// new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", // new UUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt",
// (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0; // item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0; // item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item); // Items.Add(item.inventoryID, item);
// item = // item =
// CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), // CreateItem(new UUID("77c41e39-38f9-f75a-0000-5859892f1111"),
// new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", // new UUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants",
// (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0; // item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0; // item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item); // Items.Add(item.inventoryID, item);
//} //}
public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
int assetType, int invType, LLUUID parentFolderID) int assetType, int invType, UUID parentFolderID)
{ {
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner; item.Owner = libOwner;
@ -173,9 +173,9 @@ namespace OpenSim.Framework.Communications.Cache
{ {
InventoryFolderImpl folderInfo = new InventoryFolderImpl(); InventoryFolderImpl folderInfo = new InventoryFolderImpl();
folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); folderInfo.ID = new UUID(config.GetString("folderID", ID.ToString()));
folderInfo.Name = config.GetString("name", "unknown"); folderInfo.Name = config.GetString("name", "unknown");
folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); folderInfo.ParentID = new UUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.Type = (short)config.GetInt("type", 8); folderInfo.Type = (short)config.GetInt("type", 8);
folderInfo.Owner = libOwner; folderInfo.Owner = libOwner;
@ -207,9 +207,9 @@ namespace OpenSim.Framework.Communications.Cache
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner; item.Owner = libOwner;
item.Creator = libOwner; item.Creator = libOwner;
item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString())); item.ID = new UUID(config.GetString("inventoryID", ID.ToString()));
item.AssetID = new LLUUID(config.GetString("assetID", item.ID.ToString())); item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString()));
item.Folder = new LLUUID(config.GetString("folderID", ID.ToString())); item.Folder = new UUID(config.GetString("folderID", ID.ToString()));
item.Name = config.GetString("name", String.Empty); item.Name = config.GetString("name", String.Empty);
item.Description = config.GetString("description", item.Name); item.Description = config.GetString("description", item.Name);
item.InvType = config.GetInt("inventoryType", 0); item.InvType = config.GetInt("inventoryType", 0);
@ -270,7 +270,7 @@ namespace OpenSim.Framework.Communications.Cache
/// methods in the superclass /// methods in the superclass
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public Dictionary<LLUUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders()
{ {
return libraryFolders; return libraryFolders;
} }

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
@ -49,7 +49,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <summary> /// <summary>
/// Each user has a cached profile. /// Each user has a cached profile.
/// </summary> /// </summary>
private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>();
public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder(); public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder();
@ -63,9 +63,9 @@ namespace OpenSim.Framework.Communications.Cache
/// A new user has moved into a region in this instance so retrieve their profile from the user service. /// A new user has moved into a region in this instance so retrieve their profile from the user service.
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
public void AddNewUser(LLUUID userID) public void AddNewUser(UUID userID)
{ {
if (userID == LLUUID.Zero) if (userID == UUID.Zero)
return; return;
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
GetUserDetails(userID); GetUserDetails(userID);
@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns>true if the user was successfully removed, false otherwise</returns> /// <returns>true if the user was successfully removed, false otherwise</returns>
public bool RemoveUser(LLUUID userId) public bool RemoveUser(UUID userId)
{ {
lock (m_userProfiles) lock (m_userProfiles)
{ {
@ -99,7 +99,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
public void RequestInventoryForUser(LLUUID userID) public void RequestInventoryForUser(UUID userID)
{ {
CachedUserInfo userInfo = GetUserDetails(userID); CachedUserInfo userInfo = GetUserDetails(userID);
if (userInfo != null) if (userInfo != null)
@ -130,9 +130,9 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns>null if no user details are found</returns> /// <returns>null if no user details are found</returns>
public CachedUserInfo GetUserDetails(LLUUID userID) public CachedUserInfo GetUserDetails(UUID userID)
{ {
if (userID == LLUUID.Zero) if (userID == UUID.Zero)
return null; return null;
lock (m_userProfiles) lock (m_userProfiles)
@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <param name="userData"></param> /// <param name="userData"></param>
public void PreloadUserCache(LLUUID userID, UserProfileData userData) public void PreloadUserCache(UUID userID, UserProfileData userData)
{ {
if (userID == LLUUID.Zero) if (userID == UUID.Zero)
return; return;
lock (m_userProfiles) lock (m_userProfiles)
@ -192,8 +192,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folderType"></param> /// <param name="folderType"></param>
/// <param name="folderName"></param> /// <param name="folderName"></param>
/// <param name="parentID"></param> /// <param name="parentID"></param>
public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType,
string folderName, LLUUID parentID) string folderName, UUID parentID)
{ {
CachedUserInfo userProfile; CachedUserInfo userProfile;
@ -226,8 +226,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="parentID"></param> /// <param name="parentID"></param>
public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, public void HandleUpdateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort type, string name,
LLUUID parentID) UUID parentID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@ -257,7 +257,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <param name="folderID"></param> /// <param name="folderID"></param>
/// <param name="parentID"></param> /// <param name="parentID"></param>
public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID) public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
{ {
CachedUserInfo userProfile; CachedUserInfo userProfile;
@ -287,7 +287,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="fetchFolders"></param> /// <param name="fetchFolders"></param>
/// <param name="fetchItems"></param> /// <param name="fetchItems"></param>
/// <param name="sortOrder"></param> /// <param name="sortOrder"></param>
public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder) bool fetchFolders, bool fetchItems, int sortOrder)
{ {
// FIXME MAYBE: We're not handling sortOrder! // FIXME MAYBE: We're not handling sortOrder!
@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="fetchItems"></param> /// <param name="fetchItems"></param>
/// <param name="sortOrder"></param> /// <param name="sortOrder"></param>
/// <returns>null if the inventory look up failed</returns> /// <returns>null if the inventory look up failed</returns>
public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder) bool fetchFolders, bool fetchItems, int sortOrder)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <param name="folderID"></param> /// <param name="folderID"></param>
public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
{ {
CachedUserInfo userProfile; CachedUserInfo userProfile;
@ -426,7 +426,7 @@ namespace OpenSim.Framework.Communications.Cache
} }
} }
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
{ {
if (ownerID == libraryRoot.Owner) if (ownerID == libraryRoot.Owner)
{ {

View File

@ -30,7 +30,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using libsecondlife; using OpenMetaverse;
using log4net; using log4net;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
@ -40,21 +40,21 @@ using OpenSim.Region.Interfaces;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
public delegate void UpLoadedAsset( public delegate void UpLoadedAsset(
string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
byte[] data, string inventoryType, string assetType); byte[] data, string inventoryType, string assetType);
public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); public delegate UUID UpdateItem(UUID itemID, byte[] data);
public delegate void UpdateTaskScript(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data); public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data);
public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); public delegate void NewInventoryItem(UUID userID, InventoryItemBase item);
public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); public delegate UUID ItemUpdatedCallback(UUID userID, UUID itemID, byte[] data);
public delegate void TaskScriptUpdatedCallback(LLUUID userID, LLUUID itemID, LLUUID primID, public delegate void TaskScriptUpdatedCallback(UUID userID, UUID itemID, UUID primID,
bool isScriptRunning, byte[] data); bool isScriptRunning, byte[] data);
public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder); bool fetchFolders, bool fetchItems, int sortOrder);
/// <summary> /// <summary>
@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want /// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want
/// to just pass the whole Scene into CAPS. /// to just pass the whole Scene into CAPS.
/// </summary> /// </summary>
public delegate IClientAPI GetClientDelegate(LLUUID agentID); public delegate IClientAPI GetClientDelegate(UUID agentID);
public class Caps public class Caps
{ {
@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Capabilities
//private string eventQueue = "0100/"; //private string eventQueue = "0100/";
private BaseHttpServer m_httpListener; private BaseHttpServer m_httpListener;
private LLUUID m_agentID; private UUID m_agentID;
private AssetCache m_assetCache; private AssetCache m_assetCache;
private int m_eventQueueCount = 1; private int m_eventQueueCount = 1;
private Queue<string> m_capsEventQueue = new Queue<string>(); private Queue<string> m_capsEventQueue = new Queue<string>();
@ -113,7 +113,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public GetClientDelegate GetClient = null; public GetClientDelegate GetClient = null;
public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
LLUUID agent, bool dumpAssetsToFile, string regionName) UUID agent, bool dumpAssetsToFile, string regionName)
{ {
m_assetCache = assetCache; m_assetCache = assetCache;
m_capsObjectPath = capsPath; m_capsObjectPath = capsPath;
@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities
Hashtable hash = new Hashtable(); Hashtable hash = new Hashtable();
try try
{ {
hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
} }
catch (LLSD.LLSDParseException pe) catch (LLSD.LLSDParseException pe)
{ {
@ -388,7 +388,7 @@ namespace OpenSim.Framework.Communications.Capabilities
llsdItem.permissions.creator_id = invItem.Creator; llsdItem.permissions.creator_id = invItem.Creator;
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
llsdItem.permissions.group_id = LLUUID.Zero; llsdItem.permissions.group_id = UUID.Zero;
llsdItem.permissions.group_mask = 0; llsdItem.permissions.group_mask = 0;
llsdItem.permissions.is_owner_group = false; llsdItem.permissions.is_owner_group = false;
llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions; llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions;
@ -423,7 +423,7 @@ namespace OpenSim.Framework.Communications.Capabilities
LLSDMapLayer mapLayer = new LLSDMapLayer(); LLSDMapLayer mapLayer = new LLSDMapLayer();
mapLayer.Right = 5000; mapLayer.Right = 5000;
mapLayer.Top = 5000; mapLayer.Top = 5000;
mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
return mapLayer; return mapLayer;
} }
@ -522,7 +522,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName);
//m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
@ -573,8 +573,8 @@ namespace OpenSim.Framework.Communications.Capabilities
OSHttpRequest httpRequest, OSHttpResponse httpResponse) OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{ {
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
//libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); //OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
@ -636,9 +636,9 @@ namespace OpenSim.Framework.Communications.Capabilities
string assetName = llsdRequest.name; string assetName = llsdRequest.name;
string assetDes = llsdRequest.description; string assetDes = llsdRequest.description;
string capsBase = "/CAPS/" + m_capsObjectPath; string capsBase = "/CAPS/" + m_capsObjectPath;
LLUUID newAsset = LLUUID.Random(); UUID newAsset = UUID.Random();
LLUUID newInvItem = LLUUID.Random(); UUID newInvItem = UUID.Random();
LLUUID parentFolder = llsdRequest.folder_id; UUID parentFolder = llsdRequest.folder_id;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
AssetUploader uploader = AssetUploader uploader =
@ -662,8 +662,8 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="assetID"></param> /// <param name="assetID"></param>
/// <param name="inventoryItem"></param> /// <param name="inventoryItem"></param>
/// <param name="data"></param> /// <param name="data"></param>
public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID,
LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
string assetType) string assetType)
{ {
sbyte assType = 0; sbyte assType = 0;
@ -728,14 +728,14 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="itemID">Item to update</param> /// <param name="itemID">Item to update</param>
/// <param name="data">New asset data</param> /// <param name="data">New asset data</param>
/// <returns></returns> /// <returns></returns>
public LLUUID ItemUpdated(LLUUID itemID, byte[] data) public UUID ItemUpdated(UUID itemID, byte[] data)
{ {
if (ItemUpdatedCall != null) if (ItemUpdatedCall != null)
{ {
return ItemUpdatedCall(m_agentID, itemID, data); return ItemUpdatedCall(m_agentID, itemID, data);
} }
return LLUUID.Zero; return UUID.Zero;
} }
/// <summary> /// <summary>
@ -745,7 +745,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="primID">Prim containing item to update</param> /// <param name="primID">Prim containing item to update</param>
/// <param name="isScriptRunning">Signals whether the script to update is currently running</param> /// <param name="isScriptRunning">Signals whether the script to update is currently running</param>
/// <param name="data">New asset data</param> /// <param name="data">New asset data</param>
public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) public void TaskScriptUpdated(UUID itemID, UUID primID, bool isScriptRunning, byte[] data)
{ {
if (TaskScriptUpdatedCall != null) if (TaskScriptUpdatedCall != null)
{ {
@ -759,9 +759,9 @@ namespace OpenSim.Framework.Communications.Capabilities
private UpLoadedAsset handlerUpLoad = null; private UpLoadedAsset handlerUpLoad = null;
private string uploaderPath = String.Empty; private string uploaderPath = String.Empty;
private LLUUID newAssetID; private UUID newAssetID;
private LLUUID inventoryItemID; private UUID inventoryItemID;
private LLUUID parentFolder; private UUID parentFolder;
private BaseHttpServer httpListener; private BaseHttpServer httpListener;
private bool m_dumpAssetsToFile; private bool m_dumpAssetsToFile;
private string m_assetName = String.Empty; private string m_assetName = String.Empty;
@ -770,8 +770,8 @@ namespace OpenSim.Framework.Communications.Capabilities
private string m_invType = String.Empty; private string m_invType = String.Empty;
private string m_assetType = String.Empty; private string m_assetType = String.Empty;
public AssetUploader(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
LLUUID parentFolderID, string invType, string assetType, string path, UUID parentFolderID, string invType, string assetType, string path,
BaseHttpServer httpServer, bool dumpAssetsToFile) BaseHttpServer httpServer, bool dumpAssetsToFile)
{ {
m_assetName = assetName; m_assetName = assetName;
@ -795,7 +795,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <returns></returns> /// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param) public string uploaderCaps(byte[] data, string path, string param)
{ {
LLUUID inv = inventoryItemID; UUID inv = inventoryItemID;
string res = String.Empty; string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToString(); uploadComplete.new_asset = newAssetID.ToString();
@ -860,11 +860,11 @@ namespace OpenSim.Framework.Communications.Capabilities
private UpdateItem handlerUpdateItem = null; private UpdateItem handlerUpdateItem = null;
private string uploaderPath = String.Empty; private string uploaderPath = String.Empty;
private LLUUID inventoryItemID; private UUID inventoryItemID;
private BaseHttpServer httpListener; private BaseHttpServer httpListener;
private bool m_dumpAssetToFile; private bool m_dumpAssetToFile;
public ItemUpdater(LLUUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) public ItemUpdater(UUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile)
{ {
m_dumpAssetToFile = dumpAssetToFile; m_dumpAssetToFile = dumpAssetToFile;
@ -882,10 +882,10 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <returns></returns> /// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param) public string uploaderCaps(byte[] data, string path, string param)
{ {
LLUUID inv = inventoryItemID; UUID inv = inventoryItemID;
string res = String.Empty; string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
LLUUID assetID = LLUUID.Zero; UUID assetID = UUID.Zero;
handlerUpdateItem = OnUpLoad; handlerUpdateItem = OnUpLoad;
if (handlerUpdateItem != null) if (handlerUpdateItem != null)
{ {
@ -942,13 +942,13 @@ namespace OpenSim.Framework.Communications.Capabilities
private UpdateTaskScript handlerUpdateTaskScript = null; private UpdateTaskScript handlerUpdateTaskScript = null;
private string uploaderPath = String.Empty; private string uploaderPath = String.Empty;
private LLUUID inventoryItemID; private UUID inventoryItemID;
private LLUUID primID; private UUID primID;
private bool isScriptRunning; private bool isScriptRunning;
private BaseHttpServer httpListener; private BaseHttpServer httpListener;
private bool m_dumpAssetToFile; private bool m_dumpAssetToFile;
public TaskInventoryScriptUpdater(LLUUID inventoryItemID, LLUUID primID, int isScriptRunning, public TaskInventoryScriptUpdater(UUID inventoryItemID, UUID primID, int isScriptRunning,
string path, BaseHttpServer httpServer, bool dumpAssetToFile) string path, BaseHttpServer httpServer, bool dumpAssetToFile)
{ {
m_dumpAssetToFile = dumpAssetToFile; m_dumpAssetToFile = dumpAssetToFile;

View File

@ -32,7 +32,7 @@ using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -158,9 +158,9 @@ namespace OpenSim.Framework.Communications.Capabilities
{ {
throw new Exception("ulong in LLSD is currently not implemented, fix me!"); throw new Exception("ulong in LLSD is currently not implemented, fix me!");
} }
else if (obj is LLUUID) else if (obj is UUID)
{ {
LLUUID u = (LLUUID) obj; UUID u = (UUID) obj;
writer.WriteStartElement(String.Empty, "uuid", String.Empty); writer.WriteStartElement(String.Empty, "uuid", String.Empty);
writer.WriteString(u.ToString()); writer.WriteString(u.ToString());
writer.WriteEndElement(); writer.WriteEndElement();
@ -294,11 +294,11 @@ namespace OpenSim.Framework.Communications.Capabilities
if (reader.IsEmptyElement) if (reader.IsEmptyElement)
{ {
reader.Read(); reader.Read();
return LLUUID.Zero; return UUID.Zero;
} }
reader.Read(); reader.Read();
ret = new LLUUID(reader.ReadString().Trim()); ret = new UUID(reader.ReadString().Trim());
break; break;
} }
case "string": case "string":
@ -476,9 +476,9 @@ namespace OpenSim.Framework.Communications.Capabilities
{ {
return GetSpaces(indent) + "- float " + obj.ToString() + "\n"; return GetSpaces(indent) + "- float " + obj.ToString() + "\n";
} }
else if (obj is LLUUID) else if (obj is UUID)
{ {
return GetSpaces(indent) + "- uuid " + ((LLUUID) obj).ToString() + Environment.NewLine; return GetSpaces(indent) + "- uuid " + ((UUID) obj).ToString() + Environment.NewLine;
} }
else if (obj is Hashtable) else if (obj is Hashtable)
{ {
@ -509,7 +509,7 @@ namespace OpenSim.Framework.Communications.Capabilities
} }
else if (obj is byte[]) else if (obj is byte[])
{ {
return GetSpaces(indent) + "- binary\n" + Helpers.FieldToHexString((byte[]) obj, GetSpaces(indent)) + return GetSpaces(indent) + "- binary\n" + Utils.BytesToHexString((byte[]) obj, GetSpaces(indent)) +
Environment.NewLine; Environment.NewLine;
} }
else else
@ -568,14 +568,14 @@ namespace OpenSim.Framework.Communications.Capabilities
} }
case 'u': case 'u':
{ {
if (llsd.Length < 17) throw new LLSDParseException("LLUUID value type with no value"); if (llsd.Length < 17) throw new LLSDParseException("UUID value type with no value");
LLUUID value; UUID value;
endPos = FindEnd(llsd, 1); endPos = FindEnd(llsd, 1);
if (LLUUID.TryParse(llsd.Substring(1, endPos - 1), out value)) if (UUID.TryParse(llsd.Substring(1, endPos - 1), out value))
return value; return value;
else else
throw new LLSDParseException("Failed to parse LLUUID value type"); throw new LLSDParseException("Failed to parse UUID value type");
} }
case 'b': case 'b':
//byte[] value = new byte[llsd.Length - 1]; //byte[] value = new byte[llsd.Length - 1];

View File

@ -26,7 +26,7 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public class LLSDAssetUploadComplete public class LLSDAssetUploadComplete
{ {
public string new_asset = String.Empty; public string new_asset = String.Empty;
public LLUUID new_inventory_item = LLUUID.Zero; public UUID new_inventory_item = UUID.Zero;
public string state = String.Empty; public string state = String.Empty;
//public bool success = false; //public bool success = false;

View File

@ -26,7 +26,7 @@
*/ */
using System; using System;
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -35,7 +35,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{ {
public string asset_type = String.Empty; public string asset_type = String.Empty;
public string description = String.Empty; public string description = String.Empty;
public LLUUID folder_id = LLUUID.Zero; public UUID folder_id = UUID.Zero;
public string inventory_type = String.Empty; public string inventory_type = String.Empty;
public string name = String.Empty; public string name = String.Empty;

View File

@ -86,8 +86,8 @@ namespace OpenSim.Framework.Communications.Capabilities
writer.WriteString(fieldName); writer.WriteString(fieldName);
writer.WriteEndElement(); writer.WriteEndElement();
LLSD.LLSDWriteOne(writer, fieldValue); LLSD.LLSDWriteOne(writer, fieldValue);
// libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
// writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue)); // writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue));
} }
} }
writer.WriteEndElement(); writer.WriteEndElement();
@ -111,8 +111,8 @@ namespace OpenSim.Framework.Communications.Capabilities
else else
{ {
LLSD.LLSDWriteOne(writer, obj); LLSD.LLSDWriteOne(writer, obj);
//libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( //OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
// writer, libsecondlife.StructuredData.LLSD.FromObject(obj)); // writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj));
} }
} }
@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities
FieldInfo field = myType.GetField(keyName); FieldInfo field = myType.GetField(keyName);
if (field != null) if (field != null)
{ {
// if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) // if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap)
if (enumerator.Value is Hashtable) if (enumerator.Value is Hashtable)
{ {
object fieldValue = field.GetValue(obj); object fieldValue = field.GetValue(obj);
DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
// DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue); // DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue);
} }
else if (enumerator.Value is ArrayList) else if (enumerator.Value is ArrayList)
{ {

View File

@ -25,17 +25,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
[LLSDMap] [LLSDMap]
public class LLSDInventoryItem public class LLSDInventoryItem
{ {
public LLUUID parent_id; public UUID parent_id;
public LLUUID asset_id; public UUID asset_id;
public LLUUID item_id; public UUID item_id;
public LLSDPermissions permissions; public LLSDPermissions permissions;
public string type; public string type;
public string inv_type; public string inv_type;
@ -50,9 +50,9 @@ namespace OpenSim.Framework.Communications.Capabilities
[LLSDMap] [LLSDMap]
public class LLSDPermissions public class LLSDPermissions
{ {
public LLUUID creator_id; public UUID creator_id;
public LLUUID owner_id; public UUID owner_id;
public LLUUID group_id; public UUID group_id;
public int base_mask; public int base_mask;
public int owner_mask; public int owner_mask;
public int group_mask; public int group_mask;
@ -77,8 +77,8 @@ namespace OpenSim.Framework.Communications.Capabilities
[LLSDMap] [LLSDMap]
public class LLSDFetchInventoryDescendents public class LLSDFetchInventoryDescendents
{ {
public LLUUID folder_id; public UUID folder_id;
public LLUUID owner_id; public UUID owner_id;
public int sort_order; public int sort_order;
public bool fetch_folders; public bool fetch_folders;
public bool fetch_items; public bool fetch_items;
@ -87,11 +87,11 @@ namespace OpenSim.Framework.Communications.Capabilities
[LLSDMap] [LLSDMap]
public class LLSDInventoryFolderContents public class LLSDInventoryFolderContents
{ {
public LLUUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-" public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-"
public int descendents; public int descendents;
public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
public LLSDArray items = new LLSDArray(); public LLSDArray items = new LLSDArray();
public LLUUID owner___id; // and of course we can't have field names with "-" in public UUID owner___id; // and of course we can't have field names with "-" in
public int version; public int version;
} }
} }

View File

@ -25,14 +25,14 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
[LLSDMap] [LLSDMap]
public class LLSDItemUpdate public class LLSDItemUpdate
{ {
public LLUUID item_id; public UUID item_id;
public LLSDItemUpdate() public LLSDItemUpdate()
{ {

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public int Right = 0; public int Right = 0;
public int Top = 0; public int Top = 0;
public int Bottom = 0; public int Bottom = 0;
public LLUUID ImageID = LLUUID.Zero; public UUID ImageID = UUID.Zero;
public LLSDMapLayer() public LLSDMapLayer()
{ {

View File

@ -26,14 +26,14 @@
* *
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
[LLSDType("MAP")] [LLSDType("MAP")]
public class LLSDRemoteParcelResponse public class LLSDRemoteParcelResponse
{ {
public LLUUID parcel_id; public UUID parcel_id;
public LLSDRemoteParcelResponse() public LLSDRemoteParcelResponse()
{ {

View File

@ -53,8 +53,8 @@ namespace OpenSim.Framework.Communications.Capabilities
//string requestBody = streamReader.ReadToEnd(); //string requestBody = streamReader.ReadToEnd();
//streamReader.Close(); //streamReader.Close();
// libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) // OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)
// libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); // OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
TRequest llsdRequest = new TRequest(); TRequest llsdRequest = new TRequest();

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -35,12 +35,12 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <summary> /// <summary>
/// The task inventory item that was updated /// The task inventory item that was updated
/// </summary> /// </summary>
public LLUUID item_id; public UUID item_id;
/// <summary> /// <summary>
/// The task that was updated /// The task that was updated
/// </summary> /// </summary>
public LLUUID task_id; public UUID task_id;
/// <summary> /// <summary>
/// State of the upload. So far have only even seen this set to "complete" /// State of the upload. So far have only even seen this set to "complete"

View File

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using libsecondlife; using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -35,12 +35,12 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <summary> /// <summary>
/// The item containing the script to update /// The item containing the script to update
/// </summary> /// </summary>
public LLUUID item_id; public UUID item_id;
/// <summary> /// <summary>
/// The task containing the script /// The task containing the script
/// </summary> /// </summary>
public LLUUID task_id; public UUID task_id;
/// <summary> /// <summary>
/// Signals whether the script is currently active /// Signals whether the script is currently active

Some files were not shown because too many files have changed in this diff Show More