as per the "Filesystem cleanup for OpenSim repository" mailing list thread. Have flattened the OpenSim.Framework project/namespace. The problem is that the namespace is still wrong as its "OpenSim.Framework" while the directory is "OpenSim\Framework\General" , so we need to decide if we change the directory or correct the namespace.

Note this has lead to a big flat project, but I think a lot of the files we most likely don't even use any longer. And others belong in other projects/namespaces anyway.
afrisby
MW 2007-10-29 21:46:25 +00:00
parent f6e8cbbd06
commit 3d8219f6c7
145 changed files with 4749 additions and 4776 deletions

View File

@ -34,8 +34,7 @@ using System.Threading;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache

View File

@ -36,8 +36,7 @@ using Nini.Config;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {

View File

@ -6,8 +6,7 @@ using libsecondlife;
using Nini.Config; using Nini.Config;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {
@ -18,18 +17,18 @@ namespace OpenSim.Framework.Communications.Cache
protected Thread _localAssetServerThread; protected Thread _localAssetServerThread;
protected IAssetProvider m_assetProviderPlugin; protected IAssetProvider m_assetProviderPlugin;
protected object syncLock = new object(); protected object syncLock = new object();
protected abstract void StoreAsset(AssetBase asset); protected abstract void StoreAsset(AssetBase asset);
protected abstract void CommitAssets(); protected abstract void CommitAssets();
protected abstract void RunRequests(); protected abstract void RunRequests();
public void LoadDefaultAssets() public void LoadDefaultAssets()
{ {
MainLog.Instance.Verbose("SQL ASSET SERVER", "Setting up asset database"); MainLog.Instance.Verbose("SQL ASSET SERVER", "Setting up asset database");
ForEachDefaultAsset(StoreAsset ); ForEachDefaultAsset(StoreAsset);
ForEachXmlAsset(StoreAsset ); ForEachXmlAsset(StoreAsset);
CommitAssets(); CommitAssets();
} }
@ -37,10 +36,11 @@ namespace OpenSim.Framework.Communications.Cache
public AssetServerBase() public AssetServerBase()
{ {
OpenSim.Framework.Console.MainLog.Instance.Verbose("ASSETSERVER","Starting asset storage system"); OpenSim.Framework.Console.MainLog.Instance.Verbose("ASSETSERVER","Starting asset storage system");
this._assetRequests = new BlockingQueue<ARequest>(); this._assetRequests = new BlockingQueue<ARequest>();
this._localAssetServerThread = new Thread( RunRequests ); this._localAssetServerThread = new Thread(RunRequests);
this._localAssetServerThread.IsBackground = true; this._localAssetServerThread.IsBackground = true;
this._localAssetServerThread.Start(); this._localAssetServerThread.Start();
} }
@ -96,13 +96,13 @@ namespace OpenSim.Framework.Communications.Cache
} }
public virtual void Close() public virtual void Close()
{ {
_localAssetServerThread.Abort( ); _localAssetServerThread.Abort();
} }
public void SetServerInfo(string ServerUrl, string ServerKey) public void SetServerInfo(string ServerUrl, string ServerKey)
{ {
} }
public virtual List<AssetBase> GetDefaultAssets() public virtual List<AssetBase> GetDefaultAssets()
@ -149,13 +149,13 @@ namespace OpenSim.Framework.Communications.Cache
if (!String.IsNullOrEmpty(filename)) if (!String.IsNullOrEmpty(filename))
{ {
MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename ); MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename);
LoadAsset(asset, isImage, filename); LoadAsset(asset, isImage, filename);
} }
else else
{ {
MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name ); MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name);
} }
return asset; return asset;
@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications.Cache
public void ForEachXmlAsset(Action<AssetBase> action) public void ForEachXmlAsset(Action<AssetBase> action)
{ {
List<AssetBase> assets = new List<AssetBase>(); List<AssetBase> assets = new List<AssetBase>();
// System.Console.WriteLine("trying loading asset into database"); // System.Console.WriteLine("trying loading asset into database");
string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml");
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {
@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications.Cache
for (int i = 0; i < source.Configs.Count; i++) for (int i = 0; i < source.Configs.Count; i++)
{ {
// System.Console.WriteLine("loading asset into database"); // System.Console.WriteLine("loading asset into database");
string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated());
string name = source.Configs[i].GetString("name", ""); string name = source.Configs[i].GetString("name", "");
sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0); sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0);
@ -183,7 +183,7 @@ namespace OpenSim.Framework.Communications.Cache
newAsset.Type = type; newAsset.Type = type;
newAsset.InvType = invType; newAsset.InvType = invType;
assets.Add(newAsset); assets.Add(newAsset);
} }
} }
assets.ForEach(action); assets.ForEach(action);

View File

@ -32,8 +32,7 @@ using System.Text;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache

View File

@ -34,8 +34,7 @@ using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Capabilities; using OpenSim.Region.Capabilities;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;

View File

@ -26,7 +26,7 @@
* *
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {

View File

@ -36,8 +36,7 @@ using libsecondlife;
using Nini.Config; using Nini.Config;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache

View File

@ -32,8 +32,7 @@ using System.Text;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {

View File

@ -31,8 +31,7 @@ using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
using Nini.Config; using Nini.Config;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache

View File

@ -33,8 +33,7 @@ using libsecondlife;
using Nini.Config; using Nini.Config;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {
@ -42,14 +41,12 @@ namespace OpenSim.Framework.Communications.Cache
{ {
public SQLAssetServer(string pluginName) public SQLAssetServer(string pluginName)
{ {
// _assetRequests = new BlockingQueue<ARequest>();
AddPlugin(pluginName); AddPlugin(pluginName);
} }
public SQLAssetServer(IAssetProvider assetProvider) public SQLAssetServer(IAssetProvider assetProvider)
{ {
m_assetProviderPlugin = assetProvider; m_assetProviderPlugin = assetProvider;
} }
public void AddPlugin(string FileName) public void AddPlugin(string FileName)

View File

@ -33,8 +33,8 @@ using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {

View File

@ -33,8 +33,7 @@ using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Region.Capabilities namespace OpenSim.Region.Capabilities
{ {

View File

@ -30,9 +30,8 @@ using libsecondlife;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Net; using System.Net;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {

View File

@ -26,7 +26,7 @@
* *
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {

View File

@ -31,7 +31,7 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {

View File

@ -33,7 +33,7 @@ using libsecondlife;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {

View File

@ -34,13 +34,9 @@ using System.Security.Cryptography;
using libsecondlife; using libsecondlife;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder; using InventoryFolder = OpenSim.Framework.InventoryFolder;
namespace OpenSim.Framework.UserManagement namespace OpenSim.Framework.UserManagement
{ {

View File

@ -33,12 +33,11 @@ using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using libsecondlife; using libsecondlife;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.UserManagement namespace OpenSim.Framework.UserManagement
{ {

View File

@ -32,7 +32,7 @@ using System.Net;
using System.IO; using System.IO;
using System.Text; using System.Text;
using OpenSim.Framework.Configuration.Interfaces; using OpenSim.Framework;
namespace OpenSim.Framework.Configuration.HTTP namespace OpenSim.Framework.Configuration.HTTP
{ {

View File

@ -30,7 +30,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
namespace OpenSim.Framework.Configuration.HTTP namespace OpenSim.Framework.Configuration.HTTP
{ {

View File

@ -29,9 +29,7 @@ using System;
using System.IO; using System.IO;
using System.Xml; using System.Xml;
using OpenSim.Framework.Interfaces; using OpenSim.Framework;
using OpenSim.Framework.Configuration.Interfaces;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Configuration namespace OpenSim.Framework.Configuration
{ {

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using Db4objects.Db4o; using Db4objects.Db4o;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Data.DB4o namespace OpenSim.Framework.Data.DB4o
{ {

View File

@ -28,8 +28,8 @@
using System; using System;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
namespace OpenSim.Framework.Data.DB4o namespace OpenSim.Framework.Data.DB4o
{ {

View File

@ -33,7 +33,7 @@ using MySql.Data.MySqlClient;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Data.MySQL namespace OpenSim.Framework.Data.MySQL
{ {

View File

@ -30,7 +30,7 @@ using System.IO;
using System.Data; using System.Data;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;

View File

@ -34,7 +34,7 @@ using libsecondlife;
using MySql.Data.MySqlClient; using MySql.Data.MySqlClient;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
namespace OpenSim.Framework.Data.MySQL namespace OpenSim.Framework.Data.MySQL

View File

@ -29,7 +29,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
namespace OpenSim.Framework.Data.MySQL namespace OpenSim.Framework.Data.MySQL

View File

@ -28,12 +28,12 @@
using System; using System;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using System.Data; using System.Data;
using System.Data.SqlTypes; using System.Data.SqlTypes;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
namespace OpenSim.Framework.Data.SQLite namespace OpenSim.Framework.Data.SQLite

View File

@ -28,7 +28,7 @@
using System; using System;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using System.Data; using System.Data;
using System.Data.SqlTypes; using System.Data.SqlTypes;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;

View File

@ -32,8 +32,8 @@ using System.Text;
using System.Reflection; using System.Reflection;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using libsecondlife; using libsecondlife;
using System.Data; using System.Data;

View File

@ -28,8 +28,8 @@
using System; using System;
using System.IO; using System.IO;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using System.Data; using System.Data;
using System.Data.SqlTypes; using System.Data.SqlTypes;
using Mono.Data.SqliteClient; using Mono.Data.SqliteClient;

View File

@ -1,257 +1,257 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.PolicyManager namespace OpenSim.Framework
{ {
// ACL Class // ACL Class
// Modelled after the structure of the Zend ACL Framework Library // Modelled after the structure of the Zend ACL Framework Library
// with one key difference - the tree will search for all matching // with one key difference - the tree will search for all matching
// permissions rather than just the first. Deny permissions will // permissions rather than just the first. Deny permissions will
// override all others. // override all others.
#region ACL Core Class #region ACL Core Class
/// <summary> /// <summary>
/// Access Control List Engine /// Access Control List Engine
/// </summary> /// </summary>
public class ACL public class ACL
{ {
Dictionary<string, Role> Roles = new Dictionary<string, Role>(); Dictionary<string, Role> Roles = new Dictionary<string, Role>();
Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); Dictionary<string, Resource> Resources = new Dictionary<string, Resource>();
public ACL AddRole(Role role) public ACL AddRole(Role role)
{ {
if (Roles.ContainsKey(role.Name)) if (Roles.ContainsKey(role.Name))
throw new AlreadyContainsRoleException(role); throw new AlreadyContainsRoleException(role);
Roles.Add(role.Name, role); Roles.Add(role.Name, role);
return this; return this;
} }
public ACL AddResource(Resource resource) public ACL AddResource(Resource resource)
{ {
Resources.Add(resource.Name, resource); Resources.Add(resource.Name, resource);
return this; return this;
} }
public Permission HasPermission(string role, string resource) public Permission HasPermission(string role, string resource)
{ {
if (!Roles.ContainsKey(role)) if (!Roles.ContainsKey(role))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource)) if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
return Roles[role].RequestPermission(resource); return Roles[role].RequestPermission(resource);
} }
public ACL GrantPermission(string role, string resource) public ACL GrantPermission(string role, string resource)
{ {
if (!Roles.ContainsKey(role)) if (!Roles.ContainsKey(role))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource)) if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.Allow); Roles[role].GivePermission(resource, Permission.Allow);
return this; return this;
} }
public ACL DenyPermission(string role, string resource) public ACL DenyPermission(string role, string resource)
{ {
if (!Roles.ContainsKey(role)) if (!Roles.ContainsKey(role))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource)) if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.Deny); Roles[role].GivePermission(resource, Permission.Deny);
return this; return this;
} }
public ACL ResetPermission(string role, string resource) public ACL ResetPermission(string role, string resource)
{ {
if (!Roles.ContainsKey(role)) if (!Roles.ContainsKey(role))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource)) if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException(); throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.None); Roles[role].GivePermission(resource, Permission.None);
return this; return this;
} }
} }
#endregion #endregion
#region Exceptions #region Exceptions
/// <summary> /// <summary>
/// Thrown when an ACL attempts to add a duplicate role. /// Thrown when an ACL attempts to add a duplicate role.
/// </summary> /// </summary>
public class AlreadyContainsRoleException : Exception public class AlreadyContainsRoleException : Exception
{ {
protected Role m_role; protected Role m_role;
public Role ErrorRole public Role ErrorRole
{ {
get { return m_role; } get { return m_role; }
} }
public AlreadyContainsRoleException(Role role) public AlreadyContainsRoleException(Role role)
{ {
m_role = role; m_role = role;
} }
public override string ToString() public override string ToString()
{ {
return "This ACL already contains a role called '" + m_role.Name + "'."; return "This ACL already contains a role called '" + m_role.Name + "'.";
} }
} }
#endregion #endregion
#region Roles and Resources #region Roles and Resources
/// <summary> /// <summary>
/// Does this Role have permission to access a specified Resource? /// Does this Role have permission to access a specified Resource?
/// </summary> /// </summary>
public enum Permission { Deny, None, Allow }; public enum Permission { Deny, None, Allow };
/// <summary> /// <summary>
/// A role class, for use with Users or Groups /// A role class, for use with Users or Groups
/// </summary> /// </summary>
public class Role public class Role
{ {
private string m_name; private string m_name;
private Role[] m_parents; private Role[] m_parents;
private Dictionary<string, Permission> m_resources = new Dictionary<string, Permission>(); private Dictionary<string, Permission> m_resources = new Dictionary<string, Permission>();
public string Name public string Name
{ {
get { return m_name; } get { return m_name; }
} }
public Permission RequestPermission(string resource) public Permission RequestPermission(string resource)
{ {
return RequestPermission(resource, Permission.None); return RequestPermission(resource, Permission.None);
} }
public Permission RequestPermission(string resource, Permission current) public Permission RequestPermission(string resource, Permission current)
{ {
// Deny permissions always override any others // Deny permissions always override any others
if (current == Permission.Deny) if (current == Permission.Deny)
return current; return current;
Permission temp = Permission.None; Permission temp = Permission.None;
// Pickup non-None permissions // Pickup non-None permissions
if (m_resources.ContainsKey(resource) && m_resources[resource] != Permission.None) if (m_resources.ContainsKey(resource) && m_resources[resource] != Permission.None)
temp = m_resources[resource]; temp = m_resources[resource];
if (m_parents != null) if (m_parents != null)
{ {
foreach (Role parent in m_parents) foreach (Role parent in m_parents)
{ {
temp = parent.RequestPermission(resource, temp); temp = parent.RequestPermission(resource, temp);
} }
} }
return temp; return temp;
} }
public void GivePermission(string resource, Permission perm) public void GivePermission(string resource, Permission perm)
{ {
m_resources[resource] = perm; m_resources[resource] = perm;
} }
public Role(string name) public Role(string name)
{ {
m_name = name; m_name = name;
m_parents = null; m_parents = null;
} }
public Role(string name, Role[] parents) public Role(string name, Role[] parents)
{ {
m_name = name; m_name = name;
m_parents = parents; m_parents = parents;
} }
} }
public class Resource public class Resource
{ {
private string m_name; private string m_name;
public string Name public string Name
{ {
get { return m_name; } get { return m_name; }
} }
public Resource(string name) public Resource(string name)
{ {
m_name = name; m_name = name;
} }
} }
#endregion #endregion
#region Tests #region Tests
class ACLTester class ACLTester
{ {
public ACLTester() public ACLTester()
{ {
ACL acl = new ACL(); ACL acl = new ACL();
Role Guests = new Role("Guests"); Role Guests = new Role("Guests");
acl.AddRole(Guests); acl.AddRole(Guests);
Role[] parents = new Role[0]; Role[] parents = new Role[0];
parents[0] = Guests; parents[0] = Guests;
Role JoeGuest = new Role("JoeGuest", parents); Role JoeGuest = new Role("JoeGuest", parents);
acl.AddRole(JoeGuest); acl.AddRole(JoeGuest);
Resource CanBuild = new Resource("CanBuild"); Resource CanBuild = new Resource("CanBuild");
acl.AddResource(CanBuild); acl.AddResource(CanBuild);
acl.GrantPermission("Guests", "CanBuild"); acl.GrantPermission("Guests", "CanBuild");
acl.HasPermission("JoeGuest", "CanBuild"); acl.HasPermission("JoeGuest", "CanBuild");
} }
} }
#endregion #endregion
} }

View File

@ -28,9 +28,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class AgentCircuitManager public class AgentCircuitManager
{ {

View File

@ -1,49 +1,49 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
using System; using System;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
[Serializable] [Serializable]
public class AgentCircuitData public class AgentCircuitData
{ {
public AgentCircuitData() { } public AgentCircuitData() { }
public LLUUID AgentID; public LLUUID AgentID;
public LLUUID SessionID; public LLUUID SessionID;
public LLUUID SecureSessionID; public LLUUID SecureSessionID;
public LLVector3 startpos; public LLVector3 startpos;
public string firstname; public string firstname;
public string lastname; public string lastname;
public uint circuitcode; public uint circuitcode;
public bool child; public bool child;
public LLUUID InventoryFolder; public LLUUID InventoryFolder;
public LLUUID BaseFolder; public LLUUID BaseFolder;
public string CapsPath = ""; public string CapsPath = "";
} }
} }

View File

@ -28,10 +28,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Inventory
namespace OpenSim.Framework
{ {
public class AgentInventory public class AgentInventory
{ {

View File

@ -1,72 +1,72 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class AvatarWearable public class AvatarWearable
{ {
public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
public AvatarWearable() public AvatarWearable()
{ {
} }
public AvatarWearable( LLUUID itemId, LLUUID assetId ) public AvatarWearable( LLUUID itemId, LLUUID assetId )
{ {
AssetID = assetId; AssetID = assetId;
ItemID = itemId; ItemID = itemId;
} }
public static AvatarWearable[] DefaultWearables public static AvatarWearable[] DefaultWearables
{ {
get get
{ {
AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
for (int i = 0; i < 13; i++) for (int i = 0; i < 13; i++)
{ {
defaultWearables[i] = new AvatarWearable(); defaultWearables[i] = new AvatarWearable();
} }
defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9");
defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000");
defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110");
defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111");
defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120");
return defaultWearables; return defaultWearables;
} }
} }
} }
} }

View File

@ -1,56 +1,56 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
[Serializable] [Serializable]
public class AssetBase public class AssetBase
{ {
public byte[] Data; public byte[] Data;
public LLUUID FullID; public LLUUID FullID;
public sbyte Type; public sbyte Type;
public sbyte InvType; public sbyte InvType;
public string Name = ""; public string Name = "";
public string Description = ""; public string Description = "";
public bool Local = false; public bool Local = false;
public bool Temporary = false; public bool Temporary = false;
public AssetBase() public AssetBase()
{ {
} }
public AssetBase(LLUUID assetId, string name) public AssetBase(LLUUID assetId, string name)
{ {
FullID = assetId; FullID = assetId;
Name = name; Name = name;
} }
} }
} }

View File

@ -1,83 +1,83 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.Configuration namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// UserConfig -- For User Server Configuration /// UserConfig -- For User Server Configuration
/// </summary> /// </summary>
public class AssetConfig public class AssetConfig
{ {
public string DefaultStartupMsg = ""; public string DefaultStartupMsg = "";
public string DatabaseProvider = ""; public string DatabaseProvider = "";
public static uint DefaultHttpPort = 8003; public static uint DefaultHttpPort = 8003;
public uint HttpPort = DefaultHttpPort; public uint HttpPort = DefaultHttpPort;
private ConfigurationMember configMember; private ConfigurationMember configMember;
public AssetConfig(string description, string filename) public AssetConfig(string description, string filename)
{ {
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
configMember.performConfigurationRetrieve(); configMember.performConfigurationRetrieve();
} }
public void loadConfigurationOptions() public void loadConfigurationOptions()
{ {
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false);
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false);
} }
public bool handleIncomingConfiguration(string configuration_key, object configuration_result) public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{ {
switch (configuration_key) switch (configuration_key)
{ {
case "default_startup_message": case "default_startup_message":
this.DefaultStartupMsg = (string)configuration_result; this.DefaultStartupMsg = (string)configuration_result;
break; break;
case "database_provider": case "database_provider":
this.DatabaseProvider = (string)configuration_result; this.DatabaseProvider = (string)configuration_result;
break; break;
case "http_port": case "http_port":
HttpPort = (uint)configuration_result; HttpPort = (uint)configuration_result;
break; break;
} }
return true; return true;
} }
} }
} }

View File

@ -1,59 +1,59 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class AssetLandmark : AssetBase public class AssetLandmark : AssetBase
{ {
public int Version; public int Version;
public LLVector3 Position; public LLVector3 Position;
public LLUUID RegionID; public LLUUID RegionID;
public AssetLandmark(AssetBase a) public AssetLandmark(AssetBase a)
{ {
this.Data = a.Data; this.Data = a.Data;
this.FullID = a.FullID; this.FullID = a.FullID;
this.Type = a.Type; this.Type = a.Type;
this.InvType = a.InvType; this.InvType = a.InvType;
this.Name = a.Name; this.Name = a.Name;
this.Description = a.Description; this.Description = a.Description;
InternData(); InternData();
} }
private void InternData() private void InternData()
{ {
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); LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID);
LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position);
} }
} }
} }

View File

@ -1,47 +1,47 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class AssetStorage public class AssetStorage
{ {
public AssetStorage() { public AssetStorage() {
} }
public AssetStorage(LLUUID assetUUID) { public AssetStorage(LLUUID assetUUID) {
UUID=assetUUID; UUID=assetUUID;
} }
public byte[] Data; public byte[] Data;
public sbyte Type; public sbyte Type;
public string Name; public string Name;
public LLUUID UUID; public LLUUID UUID;
} }
} }

View File

@ -1,43 +1,43 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
public class AuthenticateResponse public class AuthenticateResponse
{ {
public bool Authorised; public bool Authorised;
public Login LoginInfo; public Login LoginInfo;
public AuthenticateResponse() public AuthenticateResponse()
{ {
} }
} }
} }

View File

@ -28,7 +28,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
namespace OpenSim.Framework.Utilities namespace OpenSim.Framework
{ {
public class BlockingQueue<T> public class BlockingQueue<T>
{ {

View File

@ -1,415 +1,414 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Net; using System.Net;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Configuration.Interfaces; using System.Globalization;
using System.Globalization;
namespace OpenSim.Framework
namespace OpenSim.Framework.Configuration {
{ public class ConfigurationMember
public class ConfigurationMember {
{ public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); public delegate void ConfigurationOptionsLoad();
public delegate void ConfigurationOptionsLoad();
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); private string configurationFilename = "";
private string configurationFilename = ""; private string configurationDescription = "";
private string configurationDescription = "";
private ConfigurationOptionsLoad loadFunction;
private ConfigurationOptionsLoad loadFunction; private ConfigurationOptionResult resultFunction;
private ConfigurationOptionResult resultFunction;
private IGenericConfig configurationPlugin = null;
private IGenericConfig configurationPlugin = null; /// <summary>
/// <summary> /// This is the default configuration DLL loaded
/// This is the default configuration DLL loaded /// </summary>
/// </summary> private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll";
private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) {
{ this.configurationFilename = configuration_filename;
this.configurationFilename = configuration_filename; this.configurationDescription = configuration_description;
this.configurationDescription = configuration_description; this.loadFunction = load_function;
this.loadFunction = load_function; this.resultFunction = result_function;
this.resultFunction = result_function; }
}
public void setConfigurationFilename(string filename)
public void setConfigurationFilename(string filename) {
{ configurationFilename = filename;
configurationFilename = filename; }
} public void setConfigurationDescription(string desc)
public void setConfigurationDescription(string desc) {
{ configurationDescription = desc;
configurationDescription = desc; }
}
public void setConfigurationResultFunction(ConfigurationOptionResult result)
public void setConfigurationResultFunction(ConfigurationOptionResult result) {
{ resultFunction = result;
resultFunction = result; }
}
public void forceConfigurationPluginLibrary(string dll_filename)
public void forceConfigurationPluginLibrary(string dll_filename) {
{ configurationPluginFilename = dll_filename;
configurationPluginFilename = dll_filename; }
} public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt) {
{ ConfigurationOption configOption = new ConfigurationOption();
ConfigurationOption configOption = new ConfigurationOption(); configOption.configurationKey = configuration_key;
configOption.configurationKey = configuration_key; configOption.configurationQuestion = configuration_question;
configOption.configurationQuestion = configuration_question; configOption.configurationDefault = configuration_default;
configOption.configurationDefault = configuration_default; configOption.configurationType = configuration_type;
configOption.configurationType = configuration_type; configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;
configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;
if ((configuration_key != "" && configuration_question != "") || (configuration_key != "" && use_default_no_prompt))
if ((configuration_key != "" && configuration_question != "") || (configuration_key != "" && use_default_no_prompt)) {
{ if (!configurationOptions.Contains(configOption))
if (!configurationOptions.Contains(configOption)) {
{ configurationOptions.Add(configOption);
configurationOptions.Add(configOption); }
} }
} else
else {
{ MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")");
MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")"); }
} }
}
public void performConfigurationRetrieve()
public void performConfigurationRetrieve() {
{ configurationPlugin = this.LoadConfigDll(configurationPluginFilename);
configurationPlugin = this.LoadConfigDll(configurationPluginFilename); configurationOptions.Clear();
configurationOptions.Clear(); if(loadFunction == null)
if(loadFunction == null) {
{ MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration."); return;
return; }
}
if(resultFunction == null)
if(resultFunction == null) {
{ MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration."); return;
return; }
}
MainLog.Instance.Verbose("Calling Configuration Load Function...");
MainLog.Instance.Verbose("Calling Configuration Load Function..."); this.loadFunction();
this.loadFunction();
if(configurationOptions.Count <= 0)
if(configurationOptions.Count <= 0) {
{ MainLog.Instance.Error("No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration.");
MainLog.Instance.Error("No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration."); return;
return; }
}
bool useFile = true;
bool useFile = true; if (configurationPlugin == null)
if (configurationPlugin == null) {
{ MainLog.Instance.Error("Configuration Plugin NOT LOADED!");
MainLog.Instance.Error("Configuration Plugin NOT LOADED!"); return;
return; }
}
if (configurationFilename.Trim() != "")
if (configurationFilename.Trim() != "") {
{ configurationPlugin.SetFileName(configurationFilename);
configurationPlugin.SetFileName(configurationFilename); configurationPlugin.LoadData();
configurationPlugin.LoadData(); useFile = true;
useFile = true; }
} else
else {
{ MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file.");
MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); useFile = false;
useFile = false; }
}
foreach (ConfigurationOption configOption in configurationOptions)
foreach (ConfigurationOption configOption in configurationOptions) {
{ bool convertSuccess = false;
bool convertSuccess = false; object return_result = null;
object return_result = null; string errorMessage = "";
string errorMessage = ""; bool ignoreNextFromConfig = false;
bool ignoreNextFromConfig = false; while (convertSuccess == false)
while (convertSuccess == false) {
{
string console_result = "";
string console_result = ""; string attribute = null;
string attribute = null; if (useFile)
if (useFile) {
{ if (!ignoreNextFromConfig)
if (!ignoreNextFromConfig) {
{ attribute = configurationPlugin.GetAttribute(configOption.configurationKey);
attribute = configurationPlugin.GetAttribute(configOption.configurationKey); }
} else
else {
{ ignoreNextFromConfig = false;
ignoreNextFromConfig = false; }
} }
}
if (attribute == null)
if (attribute == null) {
{ if (configOption.configurationUseDefaultNoPrompt)
if (configOption.configurationUseDefaultNoPrompt) {
{ console_result = configOption.configurationDefault;
console_result = configOption.configurationDefault; }
} else
else {
{
if (configurationDescription.Trim() != "")
if (configurationDescription.Trim() != "") {
{ console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault);
console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault); }
} else
else {
{ console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault);
console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault); }
} }
} }
} else
else {
{ console_result = attribute;
console_result = attribute; }
}
switch (configOption.configurationType)
switch (configOption.configurationType) {
{ case ConfigurationOption.ConfigurationTypes.TYPE_STRING:
case ConfigurationOption.ConfigurationTypes.TYPE_STRING: return_result = console_result;
return_result = console_result; convertSuccess = true;
convertSuccess = true; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY:
case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY: if (console_result.Length > 0)
if (console_result.Length > 0) {
{ return_result = console_result;
return_result = console_result; convertSuccess = true;
convertSuccess = true; }
} errorMessage = "a string that is not empty";
errorMessage = "a string that is not empty"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN:
case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN: bool boolResult;
bool boolResult; if (Boolean.TryParse(console_result, out boolResult))
if (Boolean.TryParse(console_result, out boolResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = boolResult;
return_result = boolResult; }
} errorMessage = "'true' or 'false' (Boolean)";
errorMessage = "'true' or 'false' (Boolean)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_BYTE:
case ConfigurationOption.ConfigurationTypes.TYPE_BYTE: byte byteResult;
byte byteResult; if (Byte.TryParse(console_result, out byteResult))
if (Byte.TryParse(console_result, out byteResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = byteResult;
return_result = byteResult; }
} errorMessage = "a byte (Byte)";
errorMessage = "a byte (Byte)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER:
case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER: char charResult;
char charResult; if (Char.TryParse(console_result, out charResult))
if (Char.TryParse(console_result, out charResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = charResult;
return_result = charResult; }
} errorMessage = "a character (Char)";
errorMessage = "a character (Char)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_INT16:
case ConfigurationOption.ConfigurationTypes.TYPE_INT16: short shortResult;
short shortResult; if (Int16.TryParse(console_result, out shortResult))
if (Int16.TryParse(console_result, out shortResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = shortResult;
return_result = shortResult; }
} errorMessage = "a signed 32 bit integer (short)";
errorMessage = "a signed 32 bit integer (short)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_INT32:
case ConfigurationOption.ConfigurationTypes.TYPE_INT32: int intResult;
int intResult; if (Int32.TryParse(console_result, out intResult))
if (Int32.TryParse(console_result, out intResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = intResult;
return_result = intResult;
}
} errorMessage = "a signed 32 bit integer (int)";
errorMessage = "a signed 32 bit integer (int)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_INT64:
case ConfigurationOption.ConfigurationTypes.TYPE_INT64: long longResult;
long longResult; if (Int64.TryParse(console_result, out longResult))
if (Int64.TryParse(console_result, out longResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = longResult;
return_result = longResult; }
} errorMessage = "a signed 32 bit integer (long)";
errorMessage = "a signed 32 bit integer (long)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS:
case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS: IPAddress ipAddressResult;
IPAddress ipAddressResult; if (IPAddress.TryParse(console_result, out ipAddressResult))
if (IPAddress.TryParse(console_result, out ipAddressResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = ipAddressResult;
return_result = ipAddressResult; }
} errorMessage = "an IP Address (IPAddress)";
errorMessage = "an IP Address (IPAddress)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID:
case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID: LLUUID uuidResult;
LLUUID uuidResult; if (LLUUID.TryParse(console_result, out uuidResult))
if (LLUUID.TryParse(console_result, out uuidResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = uuidResult;
return_result = uuidResult; }
} errorMessage = "a UUID (LLUUID)";
errorMessage = "a UUID (LLUUID)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3:
case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3: LLVector3 vectorResult;
LLVector3 vectorResult; if (LLVector3.TryParse(console_result, out vectorResult))
if (LLVector3.TryParse(console_result, out vectorResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = vectorResult;
return_result = vectorResult; }
} errorMessage = "a vector (LLVector3)";
errorMessage = "a vector (LLVector3)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_UINT16:
case ConfigurationOption.ConfigurationTypes.TYPE_UINT16: ushort ushortResult;
ushort ushortResult; if (UInt16.TryParse(console_result, out ushortResult))
if (UInt16.TryParse(console_result, out ushortResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = ushortResult;
return_result = ushortResult; }
} errorMessage = "an unsigned 16 bit integer (ushort)";
errorMessage = "an unsigned 16 bit integer (ushort)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_UINT32:
case ConfigurationOption.ConfigurationTypes.TYPE_UINT32: uint uintResult;
uint uintResult; if (UInt32.TryParse(console_result, out uintResult))
if (UInt32.TryParse(console_result, out uintResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = uintResult;
return_result = uintResult;
}
} errorMessage = "an unsigned 32 bit integer (uint)";
errorMessage = "an unsigned 32 bit integer (uint)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_UINT64:
case ConfigurationOption.ConfigurationTypes.TYPE_UINT64: ulong ulongResult;
ulong ulongResult; if (UInt64.TryParse(console_result, out ulongResult))
if (UInt64.TryParse(console_result, out ulongResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = ulongResult;
return_result = ulongResult; }
} errorMessage = "an unsigned 64 bit integer (ulong)";
errorMessage = "an unsigned 64 bit integer (ulong)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: float floatResult;
float floatResult; if (float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out floatResult))
if (float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out floatResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = floatResult;
return_result = floatResult; }
} errorMessage = "a single-precision floating point number (float)";
errorMessage = "a single-precision floating point number (float)"; break;
break; case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: double doubleResult;
double doubleResult; if (Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out doubleResult))
if (Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out doubleResult)) {
{ convertSuccess = true;
convertSuccess = true; return_result = doubleResult;
return_result = doubleResult; }
} errorMessage = "an double-precision floating point number (double)";
errorMessage = "an double-precision floating point number (double)"; break;
break; }
}
if (convertSuccess)
if (convertSuccess) {
{ if (useFile)
if (useFile) {
{ configurationPlugin.SetAttribute(configOption.configurationKey, console_result);
configurationPlugin.SetAttribute(configOption.configurationKey, console_result); }
}
if (!this.resultFunction(configOption.configurationKey, return_result))
if (!this.resultFunction(configOption.configurationKey, return_result)) {
{ Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again.");
Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again."); convertSuccess = false;
convertSuccess = false; ignoreNextFromConfig = true;
ignoreNextFromConfig = true; }
} }
} else
else {
{ if (configOption.configurationUseDefaultNoPrompt)
if (configOption.configurationUseDefaultNoPrompt) {
{ MainLog.Instance.Error("CONFIG", string.Format("[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
MainLog.Instance.Error("CONFIG", string.Format("[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename)); convertSuccess = true;
convertSuccess = true; }
} else
else {
{ MainLog.Instance.Warn("CONFIG", string.Format("[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
MainLog.Instance.Warn("CONFIG", string.Format("[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename)); ignoreNextFromConfig = true;
ignoreNextFromConfig = true; }
} }
} }
} }
}
if(useFile)
if(useFile) {
{ configurationPlugin.Commit();
configurationPlugin.Commit(); configurationPlugin.Close();
configurationPlugin.Close(); }
} }
}
private IGenericConfig LoadConfigDll(string dllName)
private IGenericConfig LoadConfigDll(string dllName) {
{ Assembly pluginAssembly = Assembly.LoadFrom(dllName);
Assembly pluginAssembly = Assembly.LoadFrom(dllName); IGenericConfig plug = null;
IGenericConfig plug = null;
foreach (Type pluginType in pluginAssembly.GetTypes())
foreach (Type pluginType in pluginAssembly.GetTypes()) {
{ if (pluginType.IsPublic)
if (pluginType.IsPublic) {
{ if (!pluginType.IsAbstract)
if (!pluginType.IsAbstract) {
{ Type typeInterface = pluginType.GetInterface("IGenericConfig", true);
Type typeInterface = pluginType.GetInterface("IGenericConfig", true);
if (typeInterface != null)
if (typeInterface != null) {
{ plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); }
} }
} }
} }
}
pluginAssembly = null;
pluginAssembly = null; return plug;
return plug; }
}
public void forceSetConfigurationOption(string configuration_key, string configuration_value)
public void forceSetConfigurationOption(string configuration_key, string configuration_value) {
{ this.configurationPlugin.LoadData();
this.configurationPlugin.LoadData(); this.configurationPlugin.SetAttribute(configuration_key, configuration_value);
this.configurationPlugin.SetAttribute(configuration_key, configuration_value); this.configurationPlugin.Commit();
this.configurationPlugin.Commit(); this.configurationPlugin.Close();
this.configurationPlugin.Close(); }
} }
} }
}

View File

@ -1,64 +1,64 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.Configuration namespace OpenSim.Framework
{ {
public class ConfigurationOption public class ConfigurationOption
{ {
public enum ConfigurationTypes public enum ConfigurationTypes
{ {
TYPE_STRING, TYPE_STRING,
TYPE_STRING_NOT_EMPTY, TYPE_STRING_NOT_EMPTY,
TYPE_UINT16, TYPE_UINT16,
TYPE_UINT32, TYPE_UINT32,
TYPE_UINT64, TYPE_UINT64,
TYPE_INT16, TYPE_INT16,
TYPE_INT32, TYPE_INT32,
TYPE_INT64, TYPE_INT64,
TYPE_IP_ADDRESS, TYPE_IP_ADDRESS,
TYPE_CHARACTER, TYPE_CHARACTER,
TYPE_BOOLEAN, TYPE_BOOLEAN,
TYPE_BYTE, TYPE_BYTE,
TYPE_LLUUID, TYPE_LLUUID,
TYPE_LLVECTOR3, TYPE_LLVECTOR3,
TYPE_FLOAT, TYPE_FLOAT,
TYPE_DOUBLE TYPE_DOUBLE
}; };
public string configurationKey = ""; public string configurationKey = "";
public string configurationQuestion = ""; public string configurationQuestion = "";
public string configurationDefault = ""; public string configurationDefault = "";
public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING; public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING;
public bool configurationUseDefaultNoPrompt = false; public bool configurationUseDefaultNoPrompt = false;
} }
} }

View File

@ -1,121 +1,121 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.Configuration namespace OpenSim.Framework
{ {
public class GridConfig public class GridConfig
{ {
public string GridOwner = ""; public string GridOwner = "";
public string DefaultAssetServer = ""; public string DefaultAssetServer = "";
public string AssetSendKey = ""; public string AssetSendKey = "";
public string AssetRecvKey = ""; public string AssetRecvKey = "";
public string DefaultUserServer = ""; public string DefaultUserServer = "";
public string UserSendKey = ""; public string UserSendKey = "";
public string UserRecvKey = ""; public string UserRecvKey = "";
public string SimSendKey = ""; public string SimSendKey = "";
public string SimRecvKey = ""; public string SimRecvKey = "";
public string DatabaseProvider = ""; public string DatabaseProvider = "";
public static uint DefaultHttpPort = 8001; public static uint DefaultHttpPort = 8001;
public uint HttpPort = DefaultHttpPort; public uint HttpPort = DefaultHttpPort;
private ConfigurationMember configMember; private ConfigurationMember configMember;
public GridConfig(string description, string filename) public GridConfig(string description, string filename)
{ {
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
configMember.performConfigurationRetrieve(); configMember.performConfigurationRetrieve();
} }
public void loadConfigurationOptions() public void loadConfigurationOptions()
{ {
configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false); configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false);
configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", false);
configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false); configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false);
configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false); configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false);
configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false);
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false); configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false);
configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false); configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false);
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false);
} }
public bool handleIncomingConfiguration(string configuration_key, object configuration_result) public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{ {
switch (configuration_key) switch (configuration_key)
{ {
case "grid_owner": case "grid_owner":
this.GridOwner = (string)configuration_result; this.GridOwner = (string)configuration_result;
break; break;
case "default_asset_server": case "default_asset_server":
this.DefaultAssetServer = (string)configuration_result; this.DefaultAssetServer = (string)configuration_result;
break; break;
case "asset_send_key": case "asset_send_key":
this.AssetSendKey = (string)configuration_result; this.AssetSendKey = (string)configuration_result;
break; break;
case "asset_recv_key": case "asset_recv_key":
this.AssetRecvKey = (string)configuration_result; this.AssetRecvKey = (string)configuration_result;
break; break;
case "default_user_server": case "default_user_server":
this.DefaultUserServer = (string)configuration_result; this.DefaultUserServer = (string)configuration_result;
break; break;
case "user_send_key": case "user_send_key":
this.UserSendKey = (string)configuration_result; this.UserSendKey = (string)configuration_result;
break; break;
case "user_recv_key": case "user_recv_key":
this.UserRecvKey = (string)configuration_result; this.UserRecvKey = (string)configuration_result;
break; break;
case "sim_send_key": case "sim_send_key":
this.SimSendKey = (string)configuration_result; this.SimSendKey = (string)configuration_result;
break; break;
case "sim_recv_key": case "sim_recv_key":
this.SimRecvKey = (string)configuration_result; this.SimRecvKey = (string)configuration_result;
break; break;
case "database_provider": case "database_provider":
this.DatabaseProvider = (string)configuration_result; this.DatabaseProvider = (string)configuration_result;
break; break;
case "http_port": case "http_port":
HttpPort = (uint)configuration_result; HttpPort = (uint)configuration_result;
break; break;
} }
return true; return true;
} }
} }
} }

View File

@ -1,45 +1,45 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using OpenSim.Framework.Types; using OpenSim.Framework;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
public interface IAssetProvider : IPlugin public interface IAssetProvider : IPlugin
{ {
AssetBase FetchAsset(LLUUID uuid); AssetBase FetchAsset(LLUUID uuid);
void CreateAsset(AssetBase asset); void CreateAsset(AssetBase asset);
void UpdateAsset(AssetBase asset); void UpdateAsset(AssetBase asset);
bool ExistsAsset(LLUUID uuid); bool ExistsAsset(LLUUID uuid);
void CommitAssets(); // force a sync to the database void CommitAssets(); // force a sync to the database
} }
} }

View File

@ -1,71 +1,71 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// Description of IAssetServer. /// Description of IAssetServer.
/// </summary> /// </summary>
public interface IAssetServer public interface IAssetServer
{ {
void SetReceiver(IAssetReceiver receiver); void SetReceiver(IAssetReceiver receiver);
void FetchAsset(LLUUID assetID, bool isTexture); void FetchAsset(LLUUID assetID, bool isTexture);
void UpdateAsset(AssetBase asset); void UpdateAsset(AssetBase asset);
void StoreAndCommitAsset(AssetBase asset); void StoreAndCommitAsset(AssetBase asset);
void Close(); void Close();
void LoadAsset(AssetBase info, bool image, string filename); void LoadAsset(AssetBase info, bool image, string filename);
List<AssetBase> GetDefaultAssets(); List<AssetBase> GetDefaultAssets();
AssetBase CreateImageAsset(string assetIdStr, string name, string filename); AssetBase CreateImageAsset(string assetIdStr, string name, string filename);
void ForEachDefaultAsset(Action<AssetBase> action); void ForEachDefaultAsset(Action<AssetBase> action);
AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage); AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage);
void ForEachXmlAsset(Action<AssetBase> action); void ForEachXmlAsset(Action<AssetBase> action);
} }
// could change to delegate? // could change to delegate?
public interface IAssetReceiver public interface IAssetReceiver
{ {
void AssetReceived(AssetBase asset, bool IsTexture); void AssetReceived(AssetBase asset, bool IsTexture);
void AssetNotFound(LLUUID assetID); void AssetNotFound(LLUUID assetID);
} }
public interface IAssetPlugin public interface IAssetPlugin
{ {
IAssetServer GetAssetServer(); IAssetServer GetAssetServer();
} }
public struct ARequest public struct ARequest
{ {
public LLUUID AssetID; public LLUUID AssetID;
public bool IsTexture; public bool IsTexture;
} }
} }

View File

@ -1,390 +1,390 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
// Base Args Interface // Base Args Interface
public interface IEventArgs public interface IEventArgs
{ {
IScene Scene IScene Scene
{ {
get; get;
set; set;
} }
IClientAPI Sender IClientAPI Sender
{ {
get; get;
set; set;
} }
} }
public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock);
public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
public enum ChatTypeEnum { Whisper = 0, Say = 1, Shout = 2, Broadcast = 0xFF }; public enum ChatTypeEnum { Whisper = 0, Say = 1, Shout = 2, Broadcast = 0xFF };
/// <summary> /// <summary>
/// ChatFromViewer Arguments /// ChatFromViewer Arguments
/// </summary> /// </summary>
public class ChatFromViewerArgs : EventArgs, IEventArgs public class ChatFromViewerArgs : EventArgs, IEventArgs
{ {
protected string m_message; protected string m_message;
protected ChatTypeEnum m_type; protected ChatTypeEnum m_type;
protected int m_channel; protected int m_channel;
protected LLVector3 m_position; protected LLVector3 m_position;
protected string m_from; protected string m_from;
protected IClientAPI m_sender; protected IClientAPI m_sender;
protected IScene m_scene; protected IScene m_scene;
/// <summary> /// <summary>
/// The message sent by the user /// The message sent by the user
/// </summary> /// </summary>
public string Message public string Message
{ {
get { return m_message; } get { return m_message; }
set { m_message = value; } set { m_message = value; }
} }
/// <summary> /// <summary>
/// The type of message, eg say, shout, broadcast. /// The type of message, eg say, shout, broadcast.
/// </summary> /// </summary>
public ChatTypeEnum Type public ChatTypeEnum Type
{ {
get { return m_type; } get { return m_type; }
set { m_type = value; } set { m_type = value; }
} }
/// <summary> /// <summary>
/// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero.
/// </summary> /// </summary>
public int Channel public int Channel
{ {
get { return m_channel; } get { return m_channel; }
set { m_channel = value; } set { m_channel = value; }
} }
/// <summary> /// <summary>
/// The position of the sender at the time of the message broadcast. /// The position of the sender at the time of the message broadcast.
/// </summary> /// </summary>
public LLVector3 Position public LLVector3 Position
{ {
get { return m_position; } get { return m_position; }
set { m_position = value; } set { m_position = value; }
} }
/// <summary> /// <summary>
/// The name of the sender (needed for scripts) /// The name of the sender (needed for scripts)
/// </summary> /// </summary>
public string From public string From
{ {
get { return m_from; } get { return m_from; }
set { m_from = value; } set { m_from = value; }
} }
/// <summary> /// <summary>
/// The client responsible for sending the message, or null. /// The client responsible for sending the message, or null.
/// </summary> /// </summary>
public IClientAPI Sender public IClientAPI Sender
{ {
get { return m_sender; } get { return m_sender; }
set { m_sender = value; } set { m_sender = value; }
} }
public IScene Scene public IScene Scene
{ {
get { return m_scene; } get { return m_scene; }
set { m_scene = value; } set { m_scene = value; }
} }
public ChatFromViewerArgs() public ChatFromViewerArgs()
{ {
m_position = new LLVector3(); m_position = new LLVector3();
} }
} }
public class TextureRequestArgs : EventArgs public class TextureRequestArgs : EventArgs
{ {
protected LLUUID m_requestedAssetID; protected LLUUID m_requestedAssetID;
private sbyte m_discardLevel; private sbyte m_discardLevel;
private uint m_packetNumber; private uint m_packetNumber;
public uint PacketNumber public uint PacketNumber
{ {
get { return m_packetNumber; } get { return m_packetNumber; }
set { m_packetNumber = value; } set { m_packetNumber = value; }
} }
public sbyte DiscardLevel public sbyte DiscardLevel
{ {
get { return m_discardLevel; } get { return m_discardLevel; }
set { m_discardLevel = value; } set { m_discardLevel = value; }
} }
public LLUUID RequestedAssetID public LLUUID RequestedAssetID
{ {
get { return m_requestedAssetID; } get { return m_requestedAssetID; }
set { m_requestedAssetID = value; } set { m_requestedAssetID = value; }
} }
} }
public delegate void TextureRequest(Object sender, TextureRequestArgs e); public delegate void TextureRequest(Object sender, TextureRequestArgs e);
public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list
public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos);
public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq); public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq);
public delegate void LinkObjects(uint parent, List<uint> children); public delegate void LinkObjects(uint parent, List<uint> children);
public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
public delegate void DisconnectUser(); public delegate void DisconnectUser();
public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
public delegate void GenericCall(IClientAPI remoteClient); public delegate void GenericCall(IClientAPI remoteClient);
public delegate void GenericCall2(); public delegate void GenericCall2();
public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary. public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
public delegate void GenericCall5(IClientAPI remoteClient, bool status); public delegate void GenericCall5(IClientAPI remoteClient, bool status);
public delegate void GenericCall6(LLUUID uid); public delegate void GenericCall6(LLUUID uid);
public delegate void GenericCall7(uint localID, string message); public delegate void GenericCall7(uint localID, string message);
public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data); public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data);
public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags); public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags);
public delegate void StatusChange(bool status); public delegate void StatusChange(bool status);
public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID); public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID);
public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID);
public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client); public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client);
public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
public delegate void CreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); public delegate void CreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
public delegate void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); public delegate void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
public delegate void FetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); public delegate void FetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
public delegate void UpdateInventoryItemTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); public delegate void UpdateInventoryItemTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID);
public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal); public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal);
public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName);
public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
public interface IClientAPI public interface IClientAPI
{ {
event ImprovedInstantMessage OnInstantMessage; event ImprovedInstantMessage OnInstantMessage;
event ChatFromViewer OnChatFromViewer; event ChatFromViewer OnChatFromViewer;
event TextureRequest OnRequestTexture; event TextureRequest OnRequestTexture;
event RezObject OnRezObject; event RezObject OnRezObject;
event ModifyTerrain OnModifyTerrain; event ModifyTerrain OnModifyTerrain;
event SetAppearance OnSetAppearance; event SetAppearance OnSetAppearance;
event StartAnim OnStartAnim; event StartAnim OnStartAnim;
event LinkObjects OnLinkObjects; event LinkObjects OnLinkObjects;
event RequestMapBlocks OnRequestMapBlocks; event RequestMapBlocks OnRequestMapBlocks;
event TeleportLocationRequest OnTeleportLocationRequest; event TeleportLocationRequest OnTeleportLocationRequest;
event DisconnectUser OnDisconnectUser; event DisconnectUser OnDisconnectUser;
event RequestAvatarProperties OnRequestAvatarProperties; event RequestAvatarProperties OnRequestAvatarProperties;
event GenericCall4 OnDeRezObject; event GenericCall4 OnDeRezObject;
event GenericCall OnRegionHandShakeReply; event GenericCall OnRegionHandShakeReply;
event GenericCall OnRequestWearables; event GenericCall OnRequestWearables;
event GenericCall2 OnCompleteMovementToRegion; event GenericCall2 OnCompleteMovementToRegion;
event UpdateAgent OnAgentUpdate; event UpdateAgent OnAgentUpdate;
event AgentRequestSit OnAgentRequestSit; event AgentRequestSit OnAgentRequestSit;
event AgentSit OnAgentSit; event AgentSit OnAgentSit;
event GenericCall OnRequestAvatarsData; event GenericCall OnRequestAvatarsData;
event AddNewPrim OnAddPrim; event AddNewPrim OnAddPrim;
event ObjectDuplicate OnObjectDuplicate; event ObjectDuplicate OnObjectDuplicate;
event UpdateVector OnGrabObject; event UpdateVector OnGrabObject;
event ObjectSelect OnDeGrabObject; event ObjectSelect OnDeGrabObject;
event MoveObject OnGrabUpdate; event MoveObject OnGrabUpdate;
event UpdateShape OnUpdatePrimShape; event UpdateShape OnUpdatePrimShape;
event ObjectExtraParams OnUpdateExtraParams; event ObjectExtraParams OnUpdateExtraParams;
event ObjectSelect OnObjectSelect; event ObjectSelect OnObjectSelect;
event ObjectDeselect OnObjectDeselect; event ObjectDeselect OnObjectDeselect;
event GenericCall7 OnObjectDescription; event GenericCall7 OnObjectDescription;
event GenericCall7 OnObjectName; event GenericCall7 OnObjectName;
event UpdatePrimFlags OnUpdatePrimFlags; event UpdatePrimFlags OnUpdatePrimFlags;
event UpdatePrimTexture OnUpdatePrimTexture; event UpdatePrimTexture OnUpdatePrimTexture;
event UpdateVector OnUpdatePrimGroupPosition; event UpdateVector OnUpdatePrimGroupPosition;
event UpdateVector OnUpdatePrimSinglePosition; event UpdateVector OnUpdatePrimSinglePosition;
event UpdatePrimRotation OnUpdatePrimGroupRotation; event UpdatePrimRotation OnUpdatePrimGroupRotation;
event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
event UpdateVector OnUpdatePrimScale; event UpdateVector OnUpdatePrimScale;
event StatusChange OnChildAgentStatus; event StatusChange OnChildAgentStatus;
event GenericCall2 OnStopMovement; event GenericCall2 OnStopMovement;
event GenericCall6 OnRemoveAvatar; event GenericCall6 OnRemoveAvatar;
event CreateNewInventoryItem OnCreateNewInventoryItem; event CreateNewInventoryItem OnCreateNewInventoryItem;
event CreateInventoryFolder OnCreateNewInventoryFolder; event CreateInventoryFolder OnCreateNewInventoryFolder;
event FetchInventoryDescendents OnFetchInventoryDescendents; event FetchInventoryDescendents OnFetchInventoryDescendents;
event FetchInventory OnFetchInventory; event FetchInventory OnFetchInventory;
event RequestTaskInventory OnRequestTaskInventory; event RequestTaskInventory OnRequestTaskInventory;
event UpdateInventoryItemTransaction OnUpdateInventoryItem; event UpdateInventoryItemTransaction OnUpdateInventoryItem;
event UDPAssetUploadRequest OnAssetUploadRequest; event UDPAssetUploadRequest OnAssetUploadRequest;
event XferReceive OnXferReceive; event XferReceive OnXferReceive;
event RequestXfer OnRequestXfer; event RequestXfer OnRequestXfer;
event ConfirmXfer OnConfirmXfer; event ConfirmXfer OnConfirmXfer;
event RezScript OnRezScript; event RezScript OnRezScript;
event UpdateTaskInventory OnUpdateTaskInventory; event UpdateTaskInventory OnUpdateTaskInventory;
event RemoveTaskInventory OnRemoveTaskItem; event RemoveTaskInventory OnRemoveTaskItem;
event UUIDNameRequest OnNameFromUUIDRequest; event UUIDNameRequest OnNameFromUUIDRequest;
event ParcelPropertiesRequest OnParcelPropertiesRequest; event ParcelPropertiesRequest OnParcelPropertiesRequest;
event ParcelDivideRequest OnParcelDivideRequest; event ParcelDivideRequest OnParcelDivideRequest;
event ParcelJoinRequest OnParcelJoinRequest; event ParcelJoinRequest OnParcelJoinRequest;
event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
event ParcelSelectObjects OnParcelSelectObjects; event ParcelSelectObjects OnParcelSelectObjects;
event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
event EstateOwnerMessageRequest OnEstateOwnerMessage; event EstateOwnerMessageRequest OnEstateOwnerMessage;
LLVector3 StartPos LLVector3 StartPos
{ {
get; get;
set; set;
} }
LLUUID AgentId LLUUID AgentId
{ {
get; get;
} }
LLUUID SessionId LLUUID SessionId
{ {
get; get;
} }
string FirstName string FirstName
{ {
get; get;
} }
string LastName string LastName
{ {
get; get;
} }
uint CircuitCode uint CircuitCode
{ {
get; get;
set; set;
} }
void OutPacket(Packet newPack); void OutPacket(Packet newPack);
void SendWearables(AvatarWearable[] wearables); void SendWearables(AvatarWearable[] wearables);
void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry);
void SendStartPingCheck(byte seq); void SendStartPingCheck(byte seq);
void SendKillObject(ulong regionHandle, uint localID); void SendKillObject(ulong regionHandle, uint localID);
void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId); void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
void SendRegionHandshake(RegionInfo regionInfo); void SendRegionHandshake(RegionInfo regionInfo);
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp); void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
void SendLayerData(float[] map); void SendLayerData(float[] map);
void SendLayerData(int px, int py, float[] map); void SendLayerData(int px, int py, float[] map);
void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint ); void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint );
AgentCircuitData RequestClientInfo(); AgentCircuitData RequestClientInfo();
void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL ); void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL );
void SendMapBlock(List<MapBlockData> mapBlocks); void SendMapBlock(List<MapBlockData> mapBlocks);
void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL); void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL);
void SendTeleportCancel(); void SendTeleportCancel();
void SendTeleportLocationStart(); void SendTeleportLocationStart();
void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID); void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID);
void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity, LLQuaternion rotation); void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity, LLQuaternion rotation);
void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations); void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations);
void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem, LLQuaternion rotation); void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem, LLQuaternion rotation);
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items);
void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
void SendInventoryItemUpdate(InventoryItemBase Item); void SendInventoryItemUpdate(InventoryItemBase Item);
void SendRemoveInventoryItem(LLUUID itemID); void SendRemoveInventoryItem(LLUUID itemID);
void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
void SendXferPacket(ulong xferID, uint packet, byte[] data); void SendXferPacket(ulong xferID, uint packet, byte[] data);
void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID); void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID);
void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags); void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags);
void SendNameReply(LLUUID profileId, string firstname, string lastname); void SendNameReply(LLUUID profileId, string firstname, string lastname);
void SendAlertMessage(string message); void SendAlertMessage(string message);
void SendAgentAlertMessage(string message, bool modal); void SendAgentAlertMessage(string message, bool modal);
void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
bool AddMoney( int debit ); bool AddMoney( int debit );
void SendViewerTime(int phase); void SendViewerTime(int phase);
void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
void SetDebug(int newDebug); void SetDebug(int newDebug);
void InPacket(Packet NewPack); void InPacket(Packet NewPack);
void Close(); void Close();
event ViewerEffectEventHandler OnViewerEffect; event ViewerEffectEventHandler OnViewerEffect;
event Action<IClientAPI> OnLogout; event Action<IClientAPI> OnLogout;
event Action<IClientAPI> OnConnectionClosed; event Action<IClientAPI> OnConnectionClosed;
void SendLogoutPacket(); void SendLogoutPacket();
} }
} }

View File

@ -1,40 +1,40 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
namespace OpenSim.Framework.Configuration.Interfaces namespace OpenSim.Framework
{ {
public interface IGenericConfig public interface IGenericConfig
{ {
void SetFileName(string fileName); void SetFileName(string fileName);
void LoadData(); void LoadData();
void LoadDataFromString(string data); void LoadDataFromString(string data);
string GetAttribute(string attributeName); string GetAttribute(string attributeName);
bool SetAttribute(string attributeName, string attributeValue); bool SetAttribute(string attributeName, string attributeValue);
void Commit(); void Commit();
void Close(); void Close();
} }
} }

View File

@ -1,57 +1,57 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// This interface, describes a generic plugin /// This interface, describes a generic plugin
/// </summary> /// </summary>
public interface IPlugin public interface IPlugin
{ {
/// <summary> /// <summary>
/// Returns the plugin version /// Returns the plugin version
/// </summary> /// </summary>
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
string Version { get; } string Version { get; }
/// <summary> /// <summary>
/// Returns the plugin name /// Returns the plugin name
/// </summary> /// </summary>
/// <returns>Plugin name, eg MySQL User Provider</returns> /// <returns>Plugin name, eg MySQL User Provider</returns>
string Name { get; } string Name { get; }
/// <summary> /// <summary>
/// Initialises the plugin (artificial constructor) /// Initialises the plugin (artificial constructor)
/// </summary> /// </summary>
void Initialise(); void Initialise();
} }
} }

View File

@ -28,7 +28,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {

View File

@ -1,47 +1,47 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework
{ {
public interface IScene public interface IScene
{ {
void AddNewClient(IClientAPI client, bool child); void AddNewClient(IClientAPI client, bool child);
void RemoveClient(LLUUID agentID); void RemoveClient(LLUUID agentID);
RegionInfo RegionInfo { get; } RegionInfo RegionInfo { get; }
object SyncRoot { get; } object SyncRoot { get; }
uint NextLocalId { get; } uint NextLocalId { get; }
ClientManager ClientManager ClientManager ClientManager
{ {
get; get;
} }
} }
} }

View File

@ -1,135 +1,135 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Data namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// An interface for connecting to user storage servers. /// An interface for connecting to user storage servers.
/// </summary> /// </summary>
public interface IUserData public interface IUserData
{ {
/// <summary> /// <summary>
/// Returns a user profile from a database via their UUID /// Returns a user profile from a database via their UUID
/// </summary> /// </summary>
/// <param name="user">The accounts UUID</param> /// <param name="user">The accounts UUID</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData GetUserByUUID(LLUUID user); UserProfileData GetUserByUUID(LLUUID user);
/// <summary> /// <summary>
/// Returns a users profile by searching their username /// Returns a users profile by searching their username
/// </summary> /// </summary>
/// <param name="name">The users username</param> /// <param name="name">The users username</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData GetUserByName(string name); UserProfileData GetUserByName(string name);
/// <summary> /// <summary>
/// Returns a users profile by searching their username parts /// Returns a users profile by searching their username parts
/// </summary> /// </summary>
/// <param name="fname">Account firstname</param> /// <param name="fname">Account firstname</param>
/// <param name="lname">Account lastname</param> /// <param name="lname">Account lastname</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData GetUserByName(string fname, string lname); UserProfileData GetUserByName(string fname, string lname);
/// <summary> /// <summary>
/// Returns the current agent for a user searching by it's UUID /// Returns the current agent for a user searching by it's UUID
/// </summary> /// </summary>
/// <param name="user">The users UUID</param> /// <param name="user">The users UUID</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData GetAgentByUUID(LLUUID user); UserAgentData GetAgentByUUID(LLUUID user);
/// <summary> /// <summary>
/// Returns the current session agent for a user searching by username /// Returns the current session agent for a user searching by username
/// </summary> /// </summary>
/// <param name="name">The users account name</param> /// <param name="name">The users account name</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData GetAgentByName(string name); UserAgentData GetAgentByName(string name);
/// <summary> /// <summary>
/// Returns the current session agent for a user searching by username parts /// Returns the current session agent for a user searching by username parts
/// </summary> /// </summary>
/// <param name="fname">The users first account name</param> /// <param name="fname">The users first account name</param>
/// <param name="lname">The users account surname</param> /// <param name="lname">The users account surname</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData GetAgentByName(string fname, string lname); UserAgentData GetAgentByName(string fname, string lname);
/// <summary> /// <summary>
/// Adds a new User profile to the database /// Adds a new User profile to the database
/// </summary> /// </summary>
/// <param name="user">UserProfile to add</param> /// <param name="user">UserProfile to add</param>
void AddNewUserProfile(UserProfileData user); void AddNewUserProfile(UserProfileData user);
/// <summary> /// <summary>
/// Updates an existing user profile /// Updates an existing user profile
/// </summary> /// </summary>
/// <param name="user">UserProfile to update</param> /// <param name="user">UserProfile to update</param>
bool UpdateUserProfile(UserProfileData user); bool UpdateUserProfile(UserProfileData user);
/// <summary> /// <summary>
/// Adds a new agent to the database /// Adds a new agent to the database
/// </summary> /// </summary>
/// <param name="agent">The agent to add</param> /// <param name="agent">The agent to add</param>
void AddNewUserAgent(UserAgentData agent); void AddNewUserAgent(UserAgentData agent);
/// <summary> /// <summary>
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
/// </summary> /// </summary>
/// <param name="from">The account to transfer from</param> /// <param name="from">The account to transfer from</param>
/// <param name="to">The account to transfer to</param> /// <param name="to">The account to transfer to</param>
/// <param name="amount">The amount to transfer</param> /// <param name="amount">The amount to transfer</param>
/// <returns>Successful?</returns> /// <returns>Successful?</returns>
bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount);
/// <summary> /// <summary>
/// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
/// </summary> /// </summary>
/// <param name="from">User to transfer from</param> /// <param name="from">User to transfer from</param>
/// <param name="to">User to transfer to</param> /// <param name="to">User to transfer to</param>
/// <param name="inventory">Specified inventory item</param> /// <param name="inventory">Specified inventory item</param>
/// <returns>Successful?</returns> /// <returns>Successful?</returns>
bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
/// <summary> /// <summary>
/// Returns the plugin version /// Returns the plugin version
/// </summary> /// </summary>
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
string GetVersion(); string GetVersion();
/// <summary> /// <summary>
/// Returns the plugin name /// Returns the plugin name
/// </summary> /// </summary>
/// <returns>Plugin name, eg MySQL User Provider</returns> /// <returns>Plugin name, eg MySQL User Provider</returns>
string getName(); string getName();
/// <summary> /// <summary>
/// Initialises the plugin (artificial constructor) /// Initialises the plugin (artificial constructor)
/// </summary> /// </summary>
void Initialise(); void Initialise();
} }
} }

View File

@ -1,49 +1,49 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Framework.Interfaces namespace OpenSim.Framework.Interfaces
{ {
public interface IUserService public interface IUserService
{ {
UserProfileData GetUserProfile(string firstName, string lastName); UserProfileData GetUserProfile(string firstName, string lastName);
UserProfileData GetUserProfile(string name); UserProfileData GetUserProfile(string name);
UserProfileData GetUserProfile(LLUUID userId); UserProfileData GetUserProfile(LLUUID userId);
void clearUserAgent(LLUUID avatarID); void clearUserAgent(LLUUID avatarID);
UserProfileData SetupMasterUser(string firstName, string lastName); UserProfileData SetupMasterUser(string firstName, string lastName);
UserProfileData SetupMasterUser(string firstName, string lastName, string password); UserProfileData SetupMasterUser(string firstName, string lastName, string password);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="user"></param> /// <param name="user"></param>
void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
} }
} }

View File

@ -1,228 +1,228 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// Inventory Item - contains all the properties associated with an individual inventory piece. /// Inventory Item - contains all the properties associated with an individual inventory piece.
/// </summary> /// </summary>
public class InventoryItemBase public class InventoryItemBase
{ {
/// <summary> /// <summary>
/// A UUID containing the ID for the inventory item itself /// A UUID containing the ID for the inventory item itself
/// </summary> /// </summary>
public LLUUID inventoryID; public LLUUID inventoryID;
/// <summary> /// <summary>
/// The UUID of the associated asset on the asset server /// The UUID of the associated asset on the asset server
/// </summary> /// </summary>
public LLUUID assetID; public LLUUID assetID;
/// <summary> /// <summary>
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
/// </summary> /// </summary>
public int assetType; public int assetType;
/// <summary> /// <summary>
/// The type of inventory item. (Can be slightly different to the asset type /// The type of inventory item. (Can be slightly different to the asset type
/// </summary> /// </summary>
public int invType; public int invType;
/// <summary> /// <summary>
/// The folder this item is contained in /// The folder this item is contained in
/// </summary> /// </summary>
public LLUUID parentFolderID; public LLUUID parentFolderID;
/// <summary> /// <summary>
/// The owner of this inventory item /// The owner of this inventory item
/// </summary> /// </summary>
public LLUUID avatarID; public LLUUID avatarID;
/// <summary> /// <summary>
/// The creator of this item /// The creator of this item
/// </summary> /// </summary>
public LLUUID creatorsID; public LLUUID creatorsID;
/// <summary> /// <summary>
/// The name of the inventory item (must be less than 64 characters) /// The name of the inventory item (must be less than 64 characters)
/// </summary> /// </summary>
public string inventoryName; public string inventoryName;
/// <summary> /// <summary>
/// The description of the inventory item (must be less than 64 characters) /// The description of the inventory item (must be less than 64 characters)
/// </summary> /// </summary>
public string inventoryDescription; public string inventoryDescription;
/// <summary> /// <summary>
/// A mask containing the permissions for the next owner (cannot be enforced) /// A mask containing the permissions for the next owner (cannot be enforced)
/// </summary> /// </summary>
public uint inventoryNextPermissions; public uint inventoryNextPermissions;
/// <summary> /// <summary>
/// A mask containing permissions for the current owner (cannot be enforced) /// A mask containing permissions for the current owner (cannot be enforced)
/// </summary> /// </summary>
public uint inventoryCurrentPermissions; public uint inventoryCurrentPermissions;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public uint inventoryBasePermissions; public uint inventoryBasePermissions;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public uint inventoryEveryOnePermissions; public uint inventoryEveryOnePermissions;
} }
/// <summary> /// <summary>
/// A Class for folders which contain users inventory /// A Class for folders which contain users inventory
/// </summary> /// </summary>
public class InventoryFolderBase public class InventoryFolderBase
{ {
/// <summary> /// <summary>
/// The name of the folder (64 characters or less) /// The name of the folder (64 characters or less)
/// </summary> /// </summary>
public string name; public string name;
/// <summary> /// <summary>
/// The agent who's inventory this is contained by /// The agent who's inventory this is contained by
/// </summary> /// </summary>
public LLUUID agentID; public LLUUID agentID;
/// <summary> /// <summary>
/// The folder this folder is contained in /// The folder this folder is contained in
/// </summary> /// </summary>
public LLUUID parentID; public LLUUID parentID;
/// <summary> /// <summary>
/// The UUID for this folder /// The UUID for this folder
/// </summary> /// </summary>
public LLUUID folderID; public LLUUID folderID;
/// <summary> /// <summary>
/// Tyep of Items normally stored in this folder /// Tyep of Items normally stored in this folder
/// </summary> /// </summary>
public short type; public short type;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public ushort version; public ushort version;
} }
/// <summary> /// <summary>
/// An interface for accessing inventory data from a storage server /// An interface for accessing inventory data from a storage server
/// </summary> /// </summary>
public interface IInventoryData public interface IInventoryData
{ {
/// <summary> /// <summary>
/// Initialises the interface /// Initialises the interface
/// </summary> /// </summary>
void Initialise(); void Initialise();
/// <summary> /// <summary>
/// Closes the interface /// Closes the interface
/// </summary> /// </summary>
void Close(); void Close();
/// <summary> /// <summary>
/// The plugin being loaded /// The plugin being loaded
/// </summary> /// </summary>
/// <returns>A string containing the plugin name</returns> /// <returns>A string containing the plugin name</returns>
string getName(); string getName();
/// <summary> /// <summary>
/// The plugins version /// The plugins version
/// </summary> /// </summary>
/// <returns>A string containing the plugin version</returns> /// <returns>A string containing the plugin version</returns>
string getVersion(); string getVersion();
/// <summary> /// <summary>
/// Returns a list of inventory items contained within the specified folder /// Returns a list of inventory items contained within the specified folder
/// </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>
List<InventoryItemBase> getInventoryInFolder(LLUUID folderID); List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
/// <summary> /// <summary>
/// Returns a list of the root folders within a users inventory /// Returns a list of the root folders within a users inventory
/// </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>
List<InventoryFolderBase> getUserRootFolders(LLUUID user); List<InventoryFolderBase> getUserRootFolders(LLUUID user);
/// <summary> /// <summary>
/// Returns the users inventory root folder. /// Returns the users inventory root folder.
/// </summary> /// </summary>
/// <param name="user">The UUID of the user who is having inventory being returned</param> /// <param name="user">The UUID of the user who is having inventory being returned</param>
/// <returns>Root inventory folder</returns> /// <returns>Root inventory folder</returns>
InventoryFolderBase getUserRootFolder(LLUUID user); InventoryFolderBase getUserRootFolder(LLUUID user);
/// <summary> /// <summary>
/// Returns a list of inventory folders contained in the folder 'parentID' /// Returns a list of inventory folders contained in the folder 'parentID'
/// </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>
List<InventoryFolderBase> getInventoryFolders(LLUUID parentID); List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
/// <summary> /// <summary>
/// Returns an inventory item by its UUID /// Returns an inventory item by its UUID
/// </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>
InventoryItemBase getInventoryItem(LLUUID item); InventoryItemBase getInventoryItem(LLUUID item);
/// <summary> /// <summary>
/// Returns a specified inventory folder by its UUID /// Returns a specified inventory folder by its UUID
/// </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>
InventoryFolderBase getInventoryFolder(LLUUID folder); InventoryFolderBase getInventoryFolder(LLUUID folder);
/// <summary> /// <summary>
/// Creates a new inventory item based on item /// Creates a new inventory item based on item
/// </summary> /// </summary>
/// <param name="item">The item to be created</param> /// <param name="item">The item to be created</param>
void addInventoryItem(InventoryItemBase item); void addInventoryItem(InventoryItemBase item);
/// <summary> /// <summary>
/// Updates an inventory item with item (updates based on ID) /// Updates an inventory item with item (updates based on ID)
/// </summary> /// </summary>
/// <param name="item">The updated item</param> /// <param name="item">The updated item</param>
void updateInventoryItem(InventoryItemBase item); void updateInventoryItem(InventoryItemBase item);
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="item"></param>
void deleteInventoryItem(LLUUID item); void deleteInventoryItem(LLUUID item);
/// <summary> /// <summary>
/// Adds a new folder specified by folder /// Adds a new folder specified by folder
/// </summary> /// </summary>
/// <param name="folder">The inventory folder</param> /// <param name="folder">The inventory folder</param>
void addInventoryFolder(InventoryFolderBase folder); void addInventoryFolder(InventoryFolderBase folder);
/// <summary> /// <summary>
/// Updates a folder based on its ID with folder /// Updates a folder based on its ID with folder
/// </summary> /// </summary>
/// <param name="folder">The inventory folder</param> /// <param name="folder">The inventory folder</param>
void updateInventoryFolder(InventoryFolderBase folder); void updateInventoryFolder(InventoryFolderBase folder);
/// <summary> /// <summary>
/// Deletes a folder based on its ID with folder /// Deletes a folder based on its ID with folder
/// </summary> /// </summary>
/// <param name="folder">The id of the folder</param> /// <param name="folder">The id of the folder</param>
void deleteInventoryFolder(LLUUID folder); void deleteInventoryFolder(LLUUID folder);
} }
} }

View File

@ -1,120 +1,120 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class LandData public class LandData
{ {
public byte[] landBitmapByteArray = new byte[512]; public byte[] landBitmapByteArray = new byte[512];
public string landName = "Your Parcel"; public string landName = "Your Parcel";
public string landDesc = ""; public string landDesc = "";
public LLUUID ownerID = new LLUUID(); public LLUUID ownerID = new LLUUID();
public bool isGroupOwned = false; public bool isGroupOwned = false;
public LLVector3 AABBMin = new LLVector3(); public LLVector3 AABBMin = new LLVector3();
public LLVector3 AABBMax = new LLVector3(); public LLVector3 AABBMax = new LLVector3();
public int area = 0; public int area = 0;
public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
public int claimDate = 0; //Unemplemented public int claimDate = 0; //Unemplemented
public int claimPrice = 0; //Unemplemented public int claimPrice = 0; //Unemplemented
public LLUUID groupID = new LLUUID(); //Unemplemented public LLUUID groupID = new LLUUID(); //Unemplemented
public int groupPrims = 0; public int groupPrims = 0;
public int otherPrims = 0; public int otherPrims = 0;
public int ownerPrims = 0; public int ownerPrims = 0;
public int selectedPrims = 0; public int selectedPrims = 0;
public int simwidePrims = 0; public int simwidePrims = 0;
public int simwideArea = 0; public int simwideArea = 0;
public int salePrice = 0; //Unemeplemented. Parcels price. public int salePrice = 0; //Unemeplemented. Parcels price.
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts | (uint)Parcel.ParcelFlags.SoundLocal ; public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts | (uint)Parcel.ParcelFlags.SoundLocal ;
public byte landingType = 0; public byte landingType = 0;
public byte mediaAutoScale = 0; public byte mediaAutoScale = 0;
public LLUUID mediaID = LLUUID.Zero; public LLUUID mediaID = LLUUID.Zero;
public int localID = 0; public int localID = 0;
public LLUUID globalID = new LLUUID(); public LLUUID globalID = new LLUUID();
public string mediaURL = ""; public string mediaURL = "";
public string musicURL = ""; public string musicURL = "";
public float passHours = 0; public float passHours = 0;
public int passPrice = 0; public int passPrice = 0;
public LLUUID snapshotID = LLUUID.Zero; public LLUUID snapshotID = LLUUID.Zero;
public LLVector3 userLocation = new LLVector3(); public LLVector3 userLocation = new LLVector3();
public LLVector3 userLookAt = new LLVector3(); public LLVector3 userLookAt = new LLVector3();
public LandData() public LandData()
{ {
globalID = LLUUID.Random(); globalID = LLUUID.Random();
} }
public LandData Copy() public LandData Copy()
{ {
LandData landData = new LandData(); LandData landData = new LandData();
landData.AABBMax = this.AABBMax; landData.AABBMax = this.AABBMax;
landData.AABBMin = this.AABBMin; landData.AABBMin = this.AABBMin;
landData.area = this.area; landData.area = this.area;
landData.auctionID = this.auctionID; landData.auctionID = this.auctionID;
landData.authBuyerID = this.authBuyerID; landData.authBuyerID = this.authBuyerID;
landData.category = this.category; landData.category = this.category;
landData.claimDate = this.claimDate; landData.claimDate = this.claimDate;
landData.claimPrice = this.claimPrice; landData.claimPrice = this.claimPrice;
landData.globalID = this.globalID; landData.globalID = this.globalID;
landData.groupID = this.groupID; landData.groupID = this.groupID;
landData.groupPrims = this.groupPrims; landData.groupPrims = this.groupPrims;
landData.otherPrims = this.otherPrims; landData.otherPrims = this.otherPrims;
landData.ownerPrims = this.ownerPrims; landData.ownerPrims = this.ownerPrims;
landData.selectedPrims = this.selectedPrims; landData.selectedPrims = this.selectedPrims;
landData.isGroupOwned = this.isGroupOwned; landData.isGroupOwned = this.isGroupOwned;
landData.localID = this.localID; landData.localID = this.localID;
landData.landingType = this.landingType; landData.landingType = this.landingType;
landData.mediaAutoScale = this.mediaAutoScale; landData.mediaAutoScale = this.mediaAutoScale;
landData.mediaID = this.mediaID; landData.mediaID = this.mediaID;
landData.mediaURL = this.mediaURL; landData.mediaURL = this.mediaURL;
landData.musicURL = this.musicURL; landData.musicURL = this.musicURL;
landData.ownerID = this.ownerID; landData.ownerID = this.ownerID;
landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone(); landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone();
landData.landDesc = this.landDesc; landData.landDesc = this.landDesc;
landData.landFlags = this.landFlags; landData.landFlags = this.landFlags;
landData.landName = this.landName; landData.landName = this.landName;
landData.landStatus = this.landStatus; landData.landStatus = this.landStatus;
landData.passHours = this.passHours; landData.passHours = this.passHours;
landData.passPrice = this.passPrice; landData.passPrice = this.passPrice;
landData.salePrice = this.salePrice; landData.salePrice = this.salePrice;
landData.snapshotID = this.snapshotID; landData.snapshotID = this.snapshotID;
landData.userLocation = this.userLocation; landData.userLocation = this.userLocation;
landData.userLookAt = this.userLookAt; landData.userLookAt = this.userLookAt;
return landData; return landData;
} }
} }
} }

View File

@ -1,50 +1,50 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class Login public class Login
{ {
public string First = "Test"; public string First = "Test";
public string Last = "User"; public string Last = "User";
public LLUUID Agent; public LLUUID Agent;
public LLUUID Session; public LLUUID Session;
public LLUUID SecureSession = LLUUID.Zero; public LLUUID SecureSession = LLUUID.Zero;
public LLUUID InventoryFolder; public LLUUID InventoryFolder;
public LLUUID BaseFolder; public LLUUID BaseFolder;
public uint CircuitCode; public uint CircuitCode;
public string CapsPath =""; public string CapsPath ="";
public LLVector3 StartPos; public LLVector3 StartPos;
public Login() public Login()
{ {
StartPos = new LLVector3(128, 128, 70); StartPos = new LLVector3(128, 128, 70);
} }
} }
} }

View File

@ -1,51 +1,51 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class MapBlockData public class MapBlockData
{ {
public uint Flags; public uint Flags;
public ushort X; public ushort X;
public ushort Y; public ushort Y;
public byte Agents; public byte Agents;
public byte Access; public byte Access;
public byte WaterHeight; public byte WaterHeight;
public LLUUID MapImageId; public LLUUID MapImageId;
public String Name; public String Name;
public uint RegionFlags; public uint RegionFlags;
public MapBlockData() public MapBlockData()
{ {
} }
} }
} }

View File

@ -1,42 +1,42 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class NeighbourInfo public class NeighbourInfo
{ {
public NeighbourInfo() public NeighbourInfo()
{ {
} }
public ulong regionhandle; public ulong regionhandle;
public uint RegionLocX; public uint RegionLocX;
public uint RegionLocY; public uint RegionLocY;
public string sim_ip; public string sim_ip;
public uint sim_port; public uint sim_port;
} }
} }

View File

@ -1,94 +1,94 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using Nini.Config; using Nini.Config;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public class NetworkServersInfo public class NetworkServersInfo
{ {
public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"; public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/";
public string AssetSendKey = ""; public string AssetSendKey = "";
public string GridURL = ""; public string GridURL = "";
public string GridSendKey = ""; public string GridSendKey = "";
public string GridRecvKey = ""; public string GridRecvKey = "";
public string UserURL = ""; public string UserURL = "";
public string UserSendKey = ""; public string UserSendKey = "";
public string UserRecvKey = ""; public string UserRecvKey = "";
public bool isSandbox; public bool isSandbox;
public static int DefaultHttpListenerPort = 9000; public static int DefaultHttpListenerPort = 9000;
public int HttpListenerPort = DefaultHttpListenerPort; public int HttpListenerPort = DefaultHttpListenerPort;
public static int RemotingListenerPort = 8895; public static int RemotingListenerPort = 8895;
public NetworkServersInfo() public NetworkServersInfo()
{ {
} }
public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY) public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY)
{ {
m_defaultHomeLocX = defaultHomeLocX; m_defaultHomeLocX = defaultHomeLocX;
m_defaultHomeLocY = defaultHomeLocY; m_defaultHomeLocY = defaultHomeLocY;
} }
private uint? m_defaultHomeLocX; private uint? m_defaultHomeLocX;
public uint DefaultHomeLocX public uint DefaultHomeLocX
{ {
get { return m_defaultHomeLocX.Value; } get { return m_defaultHomeLocX.Value; }
} }
private uint? m_defaultHomeLocY; private uint? m_defaultHomeLocY;
public uint DefaultHomeLocY public uint DefaultHomeLocY
{ {
get { return m_defaultHomeLocY.Value; } get { return m_defaultHomeLocY.Value; }
} }
public void loadFromConfiguration(IConfigSource config) public void loadFromConfiguration(IConfigSource config)
{ {
m_defaultHomeLocX = (uint)config.Configs["StandAlone"].GetInt("default_location_x", 1000); m_defaultHomeLocX = (uint)config.Configs["StandAlone"].GetInt("default_location_x", 1000);
m_defaultHomeLocY = (uint)config.Configs["StandAlone"].GetInt("default_location_y", 1000); m_defaultHomeLocY = (uint)config.Configs["StandAlone"].GetInt("default_location_y", 1000);
HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort);
RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort);
GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); GridURL = config.Configs["Network"].GetString("grid_server_url", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString());
GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null"); GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null");
GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null"); GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null");
UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString()); UserURL = config.Configs["Network"].GetString("user_server_url", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString());
UserSendKey = config.Configs["Network"].GetString("user_send_key", "null"); UserSendKey = config.Configs["Network"].GetString("user_send_key", "null");
UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
} }
} }
} }

View File

@ -1,224 +1,224 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System.Xml.Serialization; using System.Xml.Serialization;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
public enum ProfileShape : byte public enum ProfileShape : byte
{ {
Circle = 0, Circle = 0,
Square = 1, Square = 1,
IsometricTriangle = 2, IsometricTriangle = 2,
EquilateralTriangle = 3, EquilateralTriangle = 3,
RightTriangle = 4, RightTriangle = 4,
HalfCircle = 5 HalfCircle = 5
} }
public enum HollowShape : byte public enum HollowShape : byte
{ {
Same = 0, Same = 0,
Circle = 16, Circle = 16,
Square = 32, Square = 32,
Triangle = 48 Triangle = 48
} }
public enum PCodeEnum : byte public enum PCodeEnum : byte
{ {
Primitive = 9, Primitive = 9,
Avatar = 47 Avatar = 47
} }
public enum Extrusion : byte public enum Extrusion : byte
{ {
Straight = 16, Straight = 16,
Curve1 = 32, Curve1 = 32,
Curve2 = 48, Curve2 = 48,
Flexible = 128 Flexible = 128
} }
public class PrimitiveBaseShape public class PrimitiveBaseShape
{ {
private static byte[] m_defaultTextureEntry; private static byte[] m_defaultTextureEntry;
public byte PCode; public byte PCode;
public ushort PathBegin; public ushort PathBegin;
public ushort PathEnd; public ushort PathEnd;
public byte PathScaleX; public byte PathScaleX;
public byte PathScaleY; public byte PathScaleY;
public byte PathShearX; public byte PathShearX;
public byte PathShearY; public byte PathShearY;
public sbyte PathSkew; public sbyte PathSkew;
public ushort ProfileBegin; public ushort ProfileBegin;
public ushort ProfileEnd; public ushort ProfileEnd;
public LLVector3 Scale; public LLVector3 Scale;
public byte PathCurve; public byte PathCurve;
public byte ProfileCurve; public byte ProfileCurve;
public ushort ProfileHollow; public ushort ProfileHollow;
public sbyte PathRadiusOffset; public sbyte PathRadiusOffset;
public byte PathRevolutions; public byte PathRevolutions;
public sbyte PathTaperX; public sbyte PathTaperX;
public sbyte PathTaperY; public sbyte PathTaperY;
public sbyte PathTwist; public sbyte PathTwist;
public sbyte PathTwistBegin; public sbyte PathTwistBegin;
public byte[] TextureEntry; // a LL textureEntry in byte[] format public byte[] TextureEntry; // a LL textureEntry in byte[] format
public byte[] ExtraParams; public byte[] ExtraParams;
public ProfileShape ProfileShape public ProfileShape ProfileShape
{ {
get get
{ {
return (ProfileShape)(ProfileCurve & 0xf); return (ProfileShape)(ProfileCurve & 0xf);
} }
set set
{ {
byte oldValueMasked = (byte)(ProfileCurve & 0xf0); byte oldValueMasked = (byte)(ProfileCurve & 0xf0);
ProfileCurve = (byte)(oldValueMasked | (byte)value); ProfileCurve = (byte)(oldValueMasked | (byte)value);
} }
} }
[XmlIgnore] [XmlIgnore]
public HollowShape HollowShape public HollowShape HollowShape
{ {
get get
{ {
return (HollowShape)(ProfileHollow & 0xf0); return (HollowShape)(ProfileHollow & 0xf0);
} }
set set
{ {
byte oldValueMasked = (byte)(ProfileHollow & 0xf0); byte oldValueMasked = (byte)(ProfileHollow & 0xf0);
ProfileHollow = (byte)(oldValueMasked | (byte)value); ProfileHollow = (byte)(oldValueMasked | (byte)value);
} }
} }
public LLVector3 PrimScale public LLVector3 PrimScale
{ {
get get
{ {
return this.Scale; return this.Scale;
} }
} }
static PrimitiveBaseShape() static PrimitiveBaseShape()
{ {
m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes();
} }
public PrimitiveBaseShape() public PrimitiveBaseShape()
{ {
PCode = (byte)PCodeEnum.Primitive; PCode = (byte)PCodeEnum.Primitive;
ExtraParams = new byte[1]; ExtraParams = new byte[1];
TextureEntry = m_defaultTextureEntry; TextureEntry = m_defaultTextureEntry;
} }
//void returns need to change of course //void returns need to change of course
public virtual void GetMesh() public virtual void GetMesh()
{ {
} }
public PrimitiveBaseShape Copy() public PrimitiveBaseShape Copy()
{ {
return (PrimitiveBaseShape)this.MemberwiseClone(); return (PrimitiveBaseShape)this.MemberwiseClone();
} }
} }
public class GenericShape : PrimitiveBaseShape public class GenericShape : PrimitiveBaseShape
{ {
public GenericShape() public GenericShape()
: base() : base()
{ {
} }
} }
public class BoxShape : PrimitiveBaseShape public class BoxShape : PrimitiveBaseShape
{ {
public BoxShape() public BoxShape()
: base() : base()
{ {
PathCurve = (byte)Extrusion.Straight; PathCurve = (byte)Extrusion.Straight;
ProfileShape = ProfileShape.Square; ProfileShape = ProfileShape.Square;
PathScaleX = 100; PathScaleX = 100;
PathScaleY = 100; PathScaleY = 100;
} }
public BoxShape(float side) public BoxShape(float side)
: this() : this()
{ {
SetSide(side); SetSide(side);
} }
public void SetSide(float side) public void SetSide(float side)
{ {
Scale = new LLVector3(side, side, side); Scale = new LLVector3(side, side, side);
} }
public static BoxShape Default public static BoxShape Default
{ {
get get
{ {
BoxShape boxShape = new BoxShape(); BoxShape boxShape = new BoxShape();
boxShape.SetSide(0.5f); boxShape.SetSide(0.5f);
return boxShape; return boxShape;
} }
} }
} }
public class CylinderShape : PrimitiveBaseShape public class CylinderShape : PrimitiveBaseShape
{ {
public CylinderShape() public CylinderShape()
: base() : base()
{ {
PathCurve = (byte)Extrusion.Straight; PathCurve = (byte)Extrusion.Straight;
ProfileShape = ProfileShape.Circle; ProfileShape = ProfileShape.Circle;
PathScaleX = 100; PathScaleX = 100;
PathScaleY = 100; PathScaleY = 100;
} }
public CylinderShape(float radius, float heigth) public CylinderShape(float radius, float heigth)
: this() : this()
{ {
SetRadius(radius); SetRadius(radius);
SetHeigth(heigth); SetHeigth(heigth);
} }
private void SetHeigth(float heigth) private void SetHeigth(float heigth)
{ {
Scale.Z = heigth; Scale.Z = heigth;
} }
private void SetRadius(float radius) private void SetRadius(float radius)
{ {
Scale.X = Scale.Y = radius * 2f; Scale.X = Scale.Y = radius * 2f;
} }
} }
} }

View File

@ -27,7 +27,7 @@
*/ */
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,149 +1,149 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Net; using System.Net;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// A class for manipulating RegionHandle coordinates /// A class for manipulating RegionHandle coordinates
/// </summary> /// </summary>
class RegionHandle class RegionHandle
{ {
private UInt64 handle; private UInt64 handle;
/// <summary> /// <summary>
/// Initialises a new grid-aware RegionHandle /// Initialises a new grid-aware RegionHandle
/// </summary> /// </summary>
/// <param name="ip">IP Address of the Grid Server for this region</param> /// <param name="ip">IP Address of the Grid Server for this region</param>
/// <param name="x">Grid X Coordinate</param> /// <param name="x">Grid X Coordinate</param>
/// <param name="y">Grid Y Coordinate</param> /// <param name="y">Grid Y Coordinate</param>
public RegionHandle(string ip, short x, short y) public RegionHandle(string ip, short x, short y)
{ {
IPAddress addr = IPAddress.Parse(ip); IPAddress addr = IPAddress.Parse(ip);
if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address");
uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0);
// Split the IP address in half // Split the IP address in half
short a = (short)((baseHandle << 16) & 0xFFFF); short a = (short)((baseHandle << 16) & 0xFFFF);
short b = (short)((baseHandle << 0) & 0xFFFF); short b = (short)((baseHandle << 0) & 0xFFFF);
// Raise the bounds a little // Raise the bounds a little
uint nx = (uint)x; uint nx = (uint)x;
uint ny = (uint)y; uint ny = (uint)y;
// Multiply grid coords to get region coords // Multiply grid coords to get region coords
nx *= 256; nx *= 256;
ny *= 256; ny *= 256;
// Stuff the IP address in too // Stuff the IP address in too
nx = (uint)a << 16; nx = (uint)a << 16;
ny = (uint)b << 16; ny = (uint)b << 16;
handle = ((UInt64)nx << 32) | (uint)ny; handle = ((UInt64)nx << 32) | (uint)ny;
} }
/// <summary> /// <summary>
/// Initialises a new RegionHandle that is not inter-grid aware /// Initialises a new RegionHandle that is not inter-grid aware
/// </summary> /// </summary>
/// <param name="x">Grid X Coordinate</param> /// <param name="x">Grid X Coordinate</param>
/// <param name="y">Grid Y Coordinate</param> /// <param name="y">Grid Y Coordinate</param>
public RegionHandle(uint x, uint y) public RegionHandle(uint x, uint y)
{ {
handle = ((x * 256) << 32) | (y * 256); handle = ((x * 256) << 32) | (y * 256);
} }
/// <summary> /// <summary>
/// Initialises a new RegionHandle from an existing value /// Initialises a new RegionHandle from an existing value
/// </summary> /// </summary>
/// <param name="Region">A U64 RegionHandle</param> /// <param name="Region">A U64 RegionHandle</param>
public RegionHandle(UInt64 Region) public RegionHandle(UInt64 Region)
{ {
handle = Region; handle = Region;
} }
/// <summary> /// <summary>
/// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy.
/// </summary> /// </summary>
/// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks>
/// <returns>Region Handle including IP Address encoding</returns> /// <returns>Region Handle including IP Address encoding</returns>
public UInt64 getTeleportHandle() public UInt64 getTeleportHandle()
{ {
return handle; return handle;
} }
/// <summary> /// <summary>
/// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds.
/// </summary> /// </summary>
/// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns>
public UInt64 getNeighbourHandle() public UInt64 getNeighbourHandle()
{ {
UInt64 mask = 0x0000FFFF0000FFFF; UInt64 mask = 0x0000FFFF0000FFFF;
return handle | mask; return handle | mask;
} }
/// <summary> /// <summary>
/// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle
/// </summary> /// </summary>
/// <returns>Grid Server IP Address</returns> /// <returns>Grid Server IP Address</returns>
public IPAddress getGridIP() public IPAddress getGridIP()
{ {
uint a = (uint)((handle >> 16) & 0xFFFF); uint a = (uint)((handle >> 16) & 0xFFFF);
uint b = (uint)((handle >> 48) & 0xFFFF); uint b = (uint)((handle >> 48) & 0xFFFF);
return new IPAddress((long)(a << 16) | (long)b); return new IPAddress((long)(a << 16) | (long)b);
} }
/// <summary> /// <summary>
/// Returns the X Coordinate from a Grid-Encoded RegionHandle /// Returns the X Coordinate from a Grid-Encoded RegionHandle
/// </summary> /// </summary>
/// <returns>X Coordinate</returns> /// <returns>X Coordinate</returns>
public uint getGridX() public uint getGridX()
{ {
uint x = (uint)((handle >> 32) & 0xFFFF); uint x = (uint)((handle >> 32) & 0xFFFF);
return x; return x;
} }
/// <summary> /// <summary>
/// Returns the Y Coordinate from a Grid-Encoded RegionHandle /// Returns the Y Coordinate from a Grid-Encoded RegionHandle
/// </summary> /// </summary>
/// <returns>Y Coordinate</returns> /// <returns>Y Coordinate</returns>
public uint getGridY() public uint getGridY()
{ {
uint y = (uint)((handle >> 0) & 0xFFFF); uint y = (uint)((handle >> 0) & 0xFFFF);
return y; return y;
} }
} }
} }

View File

@ -1,350 +1,347 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Globalization; using System.Globalization;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using Nini.Config; using Nini.Config;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Framework.Configuration; namespace OpenSim.Framework
{
public class SimpleRegionInfo
namespace OpenSim.Framework.Types {
{ public SimpleRegionInfo()
public class SimpleRegionInfo {
{ }
public SimpleRegionInfo()
{ public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
} {
public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) m_regionLocX = regionLocX;
{ m_regionLocY = regionLocY;
m_regionLocX = regionLocX; m_internalEndPoint = internalEndPoint;
m_regionLocY = regionLocY; m_externalHostName = externalUri;
}
m_internalEndPoint = internalEndPoint;
m_externalHostName = externalUri; public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port)
} {
public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) m_regionLocX = regionLocX;
{ m_regionLocY = regionLocY;
m_regionLocX = regionLocX; m_externalHostName = externalUri;
m_regionLocY = regionLocY;
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
m_externalHostName = externalUri; }
m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); public LLUUID RegionID = new LLUUID();
}
private uint m_remotingPort;
public LLUUID RegionID = new LLUUID(); public uint RemotingPort
{
private uint m_remotingPort; get
public uint RemotingPort {
{ return m_remotingPort;
get }
{ set
return m_remotingPort; {
} m_remotingPort = value;
set }
{ }
m_remotingPort = value;
} public string RemotingAddress;
}
public string RemotingAddress; public IPEndPoint ExternalEndPoint
{
get
public IPEndPoint ExternalEndPoint {
{ // Old one defaults to IPv6
get //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
{
// Old one defaults to IPv6 IPAddress ia = null;
//return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); // If it is already an IP, don't resolve it - just return directly
if (IPAddress.TryParse(m_externalHostName, out ia))
IPAddress ia = null; return new IPEndPoint(ia, m_internalEndPoint.Port);
// If it is already an IP, don't resolve it - just return directly
if (IPAddress.TryParse(m_externalHostName, out ia)) // Reset for next check
return new IPEndPoint(ia, m_internalEndPoint.Port); ia = null;
// Reset for next check
ia = null; // New method favors IPv4
foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
{
// New method favors IPv4 if (ia == null)
foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) ia = Adr;
{
if (ia == null) if (Adr.AddressFamily == AddressFamily.InterNetwork)
ia = Adr; {
ia = Adr;
if (Adr.AddressFamily == AddressFamily.InterNetwork) break;
{ }
ia = Adr;
break; }
}
return new IPEndPoint(ia, m_internalEndPoint.Port);
} }
return new IPEndPoint(ia, m_internalEndPoint.Port); set
} {
m_externalHostName = value.ToString();
set }
{ }
m_externalHostName = value.ToString();
} protected string m_externalHostName;
} public string ExternalHostName
{
protected string m_externalHostName; get
public string ExternalHostName {
{ return m_externalHostName;
get }
{ set
return m_externalHostName; {
} m_externalHostName = value;
set }
{ }
m_externalHostName = value;
} protected IPEndPoint m_internalEndPoint;
} public IPEndPoint InternalEndPoint
{
protected IPEndPoint m_internalEndPoint; get
public IPEndPoint InternalEndPoint {
{ return m_internalEndPoint;
get }
{ set
return m_internalEndPoint; {
} m_internalEndPoint = value;
set }
{ }
m_internalEndPoint = value;
} protected uint? m_regionLocX;
} public uint RegionLocX
{
protected uint? m_regionLocX; get
public uint RegionLocX {
{ return m_regionLocX.Value;
get }
{ set
return m_regionLocX.Value; {
} m_regionLocX = value;
set }
{ }
m_regionLocX = value;
} protected uint? m_regionLocY;
} public uint RegionLocY
{
protected uint? m_regionLocY; get
public uint RegionLocY {
{ return m_regionLocY.Value;
get }
{ set
return m_regionLocY.Value; {
} m_regionLocY = value;
set }
{ }
m_regionLocY = value;
} public ulong RegionHandle
} {
get
public ulong RegionHandle {
{ return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
get }
{ }
return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); }
}
} public class RegionInfo : SimpleRegionInfo
} {
public string RegionName = "";
public class RegionInfo : SimpleRegionInfo
{ public string DataStore = "";
public string RegionName = ""; public bool isSandbox = false;
public string DataStore = ""; public LLUUID MasterAvatarAssignedUUID = new LLUUID();
public bool isSandbox = false; public string MasterAvatarFirstName = "";
public string MasterAvatarLastName = "";
public LLUUID MasterAvatarAssignedUUID = new LLUUID(); public string MasterAvatarSandboxPassword = "";
public string MasterAvatarFirstName = "";
public string MasterAvatarLastName = ""; // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
public string MasterAvatarSandboxPassword = ""; private static EstateSettings m_estateSettings;
public EstateSettings EstateSettings
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote. {
private static EstateSettings m_estateSettings; get
public EstateSettings EstateSettings {
{ if( m_estateSettings == null )
get {
{ m_estateSettings = new EstateSettings();
if( m_estateSettings == null ) }
{
m_estateSettings = new EstateSettings(); return m_estateSettings;
} }
return m_estateSettings; }
}
public ConfigurationMember configMember;
} public RegionInfo(string description, string filename)
{
public ConfigurationMember configMember; configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
public RegionInfo(string description, string filename) configMember.performConfigurationRetrieve();
{ }
configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
configMember.performConfigurationRetrieve(); public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
} base(regionLocX, regionLocY, internalEndPoint, externalUri)
{
public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
base(regionLocX, regionLocY, internalEndPoint, externalUri)
{ }
public RegionInfo()
} {
public RegionInfo() }
{
//not in use, should swap to nini though.
} public void LoadFromNiniSource(IConfigSource source)
{
//not in use, should swap to nini though. this.LoadFromNiniSource(source, "RegionInfo");
public void LoadFromNiniSource(IConfigSource source) }
{
this.LoadFromNiniSource(source, "RegionInfo"); //not in use, should swap to nini though.
} public void LoadFromNiniSource(IConfigSource source, string sectionName)
{
//not in use, should swap to nini though. string errorMessage = "";
public void LoadFromNiniSource(IConfigSource source, string sectionName) this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated()));
{ this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
string errorMessage = ""; this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db");
this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0");
this.DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); IPAddress ipAddressResult;
if (IPAddress.TryParse(ipAddress, out ipAddressResult))
string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); {
IPAddress ipAddressResult; this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0);
if (IPAddress.TryParse(ipAddress, out ipAddressResult)) }
{ else
this.m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); {
} errorMessage = "needs an IP Address (IPAddress)";
else }
{ this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort);
errorMessage = "needs an IP Address (IPAddress)";
} string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1");
this.m_internalEndPoint.Port = source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); if (externalHost != "SYSTEMIP")
{
string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); this.m_externalHostName = externalHost;
if (externalHost != "SYSTEMIP") }
{ else
this.m_externalHostName = externalHost; {
} this.m_externalHostName = Util.GetLocalHost().ToString();
else }
{
this.m_externalHostName = Util.GetLocalHost().ToString(); this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test");
} this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User");
this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test");
this.MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test");
this.MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); if (errorMessage != "")
this.MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); {
// a error
if (errorMessage != "") }
{ }
// a error
} public void loadConfigurationOptions()
} {
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true);
public void loadConfigurationOptions() configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false);
{ configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false);
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Region (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false);
configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Region Name", "OpenSim Test", false); configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false); configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false);
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false);
configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false);
configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false); }
configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false);
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false); public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
} {
switch (configuration_key)
public bool handleIncomingConfiguration(string configuration_key, object configuration_result) {
{ case "sim_UUID":
switch (configuration_key) this.RegionID = (LLUUID)configuration_result;
{ break;
case "sim_UUID": case "sim_name":
this.RegionID = (LLUUID)configuration_result; this.RegionName = (string)configuration_result;
break; break;
case "sim_name": case "sim_location_x":
this.RegionName = (string)configuration_result; this.m_regionLocX = (uint)configuration_result;
break; break;
case "sim_location_x": case "sim_location_y":
this.m_regionLocX = (uint)configuration_result; this.m_regionLocY = (uint)configuration_result;
break; break;
case "sim_location_y": case "datastore":
this.m_regionLocY = (uint)configuration_result; this.DataStore = (string)configuration_result;
break; break;
case "datastore": case "internal_ip_address":
this.DataStore = (string)configuration_result; IPAddress address = (IPAddress)configuration_result;
break; this.m_internalEndPoint = new IPEndPoint(address, 0);
case "internal_ip_address": break;
IPAddress address = (IPAddress)configuration_result; case "internal_ip_port":
this.m_internalEndPoint = new IPEndPoint(address, 0); this.m_internalEndPoint.Port = (int)configuration_result;
break; break;
case "internal_ip_port": case "external_host_name":
this.m_internalEndPoint.Port = (int)configuration_result; if ((string)configuration_result != "SYSTEMIP")
break; {
case "external_host_name": this.m_externalHostName = (string)configuration_result;
if ((string)configuration_result != "SYSTEMIP") }
{ else
this.m_externalHostName = (string)configuration_result; {
} this.m_externalHostName = Util.GetLocalHost().ToString();
else }
{ break;
this.m_externalHostName = Util.GetLocalHost().ToString(); case "master_avatar_first":
} this.MasterAvatarFirstName = (string)configuration_result;
break; break;
case "master_avatar_first": case "master_avatar_last":
this.MasterAvatarFirstName = (string)configuration_result; this.MasterAvatarLastName = (string)configuration_result;
break; break;
case "master_avatar_last": case "master_avatar_pass":
this.MasterAvatarLastName = (string)configuration_result; string tempMD5Passwd = (string)configuration_result;
break; this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
case "master_avatar_pass": break;
string tempMD5Passwd = (string)configuration_result; }
this.MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
break; return true;
} }
return true; }
} }
}
}

View File

@ -1,155 +1,155 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
class UUID class UUID
{ {
public LLUUID llUUID; public LLUUID llUUID;
public UUID(string uuid) public UUID(string uuid)
{ {
llUUID = new LLUUID(uuid); llUUID = new LLUUID(uuid);
} }
public UUID(byte[] uuid) public UUID(byte[] uuid)
{ {
llUUID = new LLUUID(uuid, 0); llUUID = new LLUUID(uuid, 0);
} }
public UUID(byte[] uuid, int offset) public UUID(byte[] uuid, int offset)
{ {
llUUID = new LLUUID(uuid, offset); llUUID = new LLUUID(uuid, offset);
} }
public UUID() public UUID()
{ {
llUUID = LLUUID.Zero; llUUID = LLUUID.Zero;
} }
public UUID(ulong uuid) public UUID(ulong uuid)
{ {
llUUID = new LLUUID(uuid); llUUID = new LLUUID(uuid);
} }
public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth)
{ {
byte[] uuid = new byte[16]; byte[] uuid = new byte[16];
byte[] n = BitConverter.GetBytes(first); byte[] n = BitConverter.GetBytes(first);
n.CopyTo(uuid, 0); n.CopyTo(uuid, 0);
n = BitConverter.GetBytes(second); n = BitConverter.GetBytes(second);
n.CopyTo(uuid, 4); n.CopyTo(uuid, 4);
n = BitConverter.GetBytes(third); n = BitConverter.GetBytes(third);
n.CopyTo(uuid, 8); n.CopyTo(uuid, 8);
n = BitConverter.GetBytes(fourth); n = BitConverter.GetBytes(fourth);
n.CopyTo(uuid, 12); n.CopyTo(uuid, 12);
llUUID = new LLUUID(uuid,0); llUUID = new LLUUID(uuid,0);
} }
public override string ToString() public override string ToString()
{ {
return llUUID.ToString(); return llUUID.ToString();
} }
public string ToStringHyphenated() public string ToStringHyphenated()
{ {
return llUUID.ToStringHyphenated(); return llUUID.ToStringHyphenated();
} }
public byte[] GetBytes() public byte[] GetBytes()
{ {
return llUUID.GetBytes(); return llUUID.GetBytes();
} }
public UInt32[] GetInts() public UInt32[] GetInts()
{ {
UInt32[] ints = new UInt32[4]; UInt32[] ints = new UInt32[4];
ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); ints[0] = BitConverter.ToUInt32(llUUID.Data, 0);
ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); ints[1] = BitConverter.ToUInt32(llUUID.Data, 4);
ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); ints[2] = BitConverter.ToUInt32(llUUID.Data, 8);
ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); ints[3] = BitConverter.ToUInt32(llUUID.Data, 12);
return ints; return ints;
} }
public LLUUID GetLLUUID() public LLUUID GetLLUUID()
{ {
return llUUID; return llUUID;
} }
public uint CRC() public uint CRC()
{ {
return llUUID.CRC(); return llUUID.CRC();
} }
public override int GetHashCode() public override int GetHashCode()
{ {
return llUUID.GetHashCode(); return llUUID.GetHashCode();
} }
public void Combine(UUID other) public void Combine(UUID other)
{ {
llUUID.Combine(other.GetLLUUID()); llUUID.Combine(other.GetLLUUID());
} }
public void Combine(LLUUID other) public void Combine(LLUUID other)
{ {
llUUID.Combine(other); llUUID.Combine(other);
} }
public override bool Equals(Object other) public override bool Equals(Object other)
{ {
return llUUID.Equals(other); return llUUID.Equals(other);
} }
public static bool operator ==(UUID a, UUID b) public static bool operator ==(UUID a, UUID b)
{ {
return a.llUUID.Equals(b.GetLLUUID()); return a.llUUID.Equals(b.GetLLUUID());
} }
public static bool operator !=(UUID a, UUID b) public static bool operator !=(UUID a, UUID b)
{ {
return !a.llUUID.Equals(b.GetLLUUID()); return !a.llUUID.Equals(b.GetLLUUID());
} }
public static bool operator ==(UUID a, LLUUID b) public static bool operator ==(UUID a, LLUUID b)
{ {
return a.Equals(b); return a.Equals(b);
} }
public static bool operator !=(UUID a, LLUUID b) public static bool operator !=(UUID a, LLUUID b)
{ {
return !a.Equals(b); return !a.Equals(b);
} }
} }
} }

View File

@ -1,98 +1,98 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenSim.Framework.Configuration namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// UserConfig -- For User Server Configuration /// UserConfig -- For User Server Configuration
/// </summary> /// </summary>
public class UserConfig public class UserConfig
{ {
public string DefaultStartupMsg = ""; public string DefaultStartupMsg = "";
public string GridServerURL = ""; public string GridServerURL = "";
public string GridSendKey = ""; public string GridSendKey = "";
public string GridRecvKey = ""; public string GridRecvKey = "";
public string DatabaseProvider = ""; public string DatabaseProvider = "";
public static uint DefaultHttpPort = 8002; public static uint DefaultHttpPort = 8002;
public uint HttpPort = DefaultHttpPort; public uint HttpPort = DefaultHttpPort;
private ConfigurationMember configMember; private ConfigurationMember configMember;
public UserConfig(string description, string filename) public UserConfig(string description, string filename)
{ {
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
configMember.performConfigurationRetrieve(); configMember.performConfigurationRetrieve();
} }
public void loadConfigurationOptions() public void loadConfigurationOptions()
{ {
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false);
configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false);
configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false);
configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false);
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false);
} }
public bool handleIncomingConfiguration(string configuration_key, object configuration_result) public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{ {
switch (configuration_key) switch (configuration_key)
{ {
case "default_startup_message": case "default_startup_message":
this.DefaultStartupMsg = (string)configuration_result; this.DefaultStartupMsg = (string)configuration_result;
break; break;
case "default_grid_server": case "default_grid_server":
this.GridServerURL = (string)configuration_result; this.GridServerURL = (string)configuration_result;
break; break;
case "grid_send_key": case "grid_send_key":
this.GridSendKey = (string)configuration_result; this.GridSendKey = (string)configuration_result;
break; break;
case "grid_recv_key": case "grid_recv_key":
this.GridRecvKey = (string)configuration_result; this.GridRecvKey = (string)configuration_result;
break; break;
case "database_provider": case "database_provider":
this.DatabaseProvider = (string)configuration_result; this.DatabaseProvider = (string)configuration_result;
break; break;
case "http_port": case "http_port":
HttpPort = (uint)configuration_result; HttpPort = (uint)configuration_result;
break; break;
} }
return true; return true;
} }
} }
} }

View File

@ -1,191 +1,191 @@
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright * * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the * * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System; using System;
using libsecondlife; using libsecondlife;
namespace OpenSim.Framework.Types namespace OpenSim.Framework
{ {
/// <summary> /// <summary>
/// Information about a particular user known to the userserver /// Information about a particular user known to the userserver
/// </summary> /// </summary>
public class UserProfileData public class UserProfileData
{ {
/// <summary> /// <summary>
/// The ID value for this user /// The ID value for this user
/// </summary> /// </summary>
public LLUUID UUID; public LLUUID UUID;
/// <summary> /// <summary>
/// The first component of a users account name /// The first component of a users account name
/// </summary> /// </summary>
public string username; public string username;
/// <summary> /// <summary>
/// The second component of a users account name /// The second component of a users account name
/// </summary> /// </summary>
public string surname; public string surname;
/// <summary> /// <summary>
/// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
/// </summary> /// </summary>
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
public string passwordHash; public string passwordHash;
/// <summary> /// <summary>
/// The salt used for the users hash, should be 32 bytes or longer /// The salt used for the users hash, should be 32 bytes or longer
/// </summary> /// </summary>
public string passwordSalt; public string passwordSalt;
/// <summary> /// <summary>
/// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
/// </summary> /// </summary>
public ulong homeRegion public ulong homeRegion
{ {
get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); } get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); }
set { set {
homeRegionX = (uint)(value >> 40); homeRegionX = (uint)(value >> 40);
homeRegionY = (((uint)(value)) >> 8); homeRegionY = (((uint)(value)) >> 8);
} }
} }
public uint homeRegionX; public uint homeRegionX;
public uint homeRegionY; public uint homeRegionY;
/// <summary> /// <summary>
/// The coordinates inside the region of the home location /// The coordinates inside the region of the home location
/// </summary> /// </summary>
public LLVector3 homeLocation; public LLVector3 homeLocation;
/// <summary> /// <summary>
/// Where the user will be looking when they rez. /// Where the user will be looking when they rez.
/// </summary> /// </summary>
public LLVector3 homeLookAt; public LLVector3 homeLookAt;
/// <summary> /// <summary>
/// A UNIX Timestamp (seconds since epoch) for the users creation /// A UNIX Timestamp (seconds since epoch) for the users creation
/// </summary> /// </summary>
public int created; public int created;
/// <summary> /// <summary>
/// A UNIX Timestamp for the users last login date / time /// A UNIX Timestamp for the users last login date / time
/// </summary> /// </summary>
public int lastLogin; public int lastLogin;
public LLUUID rootInventoryFolderID; public LLUUID rootInventoryFolderID;
/// <summary> /// <summary>
/// A URI to the users inventory server, used for foreigners and large grids /// A URI to the users inventory server, used for foreigners and large grids
/// </summary> /// </summary>
public string userInventoryURI = String.Empty; public string userInventoryURI = String.Empty;
/// <summary> /// <summary>
/// A URI to the users asset server, used for foreigners and large grids. /// A URI to the users asset server, used for foreigners and large grids.
/// </summary> /// </summary>
public string userAssetURI = String.Empty; public string userAssetURI = String.Empty;
/// <summary> /// <summary>
/// A uint mask containing the "I can do" fields of the users profile /// A uint mask containing the "I can do" fields of the users profile
/// </summary> /// </summary>
public uint profileCanDoMask; public uint profileCanDoMask;
/// <summary> /// <summary>
/// A uint mask containing the "I want to do" part of the users profile /// A uint mask containing the "I want to do" part of the users profile
/// </summary> /// </summary>
public uint profileWantDoMask; // Profile window "I want to" mask public uint profileWantDoMask; // Profile window "I want to" mask
/// <summary> /// <summary>
/// The about text listed in a users profile. /// The about text listed in a users profile.
/// </summary> /// </summary>
public string profileAboutText = String.Empty; public string profileAboutText = String.Empty;
/// <summary> /// <summary>
/// The first life about text listed in a users profile /// The first life about text listed in a users profile
/// </summary> /// </summary>
public string profileFirstText = String.Empty; public string profileFirstText = String.Empty;
/// <summary> /// <summary>
/// The profile image for an avatar stored on the asset server /// The profile image for an avatar stored on the asset server
/// </summary> /// </summary>
public LLUUID profileImage; public LLUUID profileImage;
/// <summary> /// <summary>
/// The profile image for the users first life tab /// The profile image for the users first life tab
/// </summary> /// </summary>
public LLUUID profileFirstImage; public LLUUID profileFirstImage;
/// <summary> /// <summary>
/// The users last registered agent (filled in on the user server) /// The users last registered agent (filled in on the user server)
/// </summary> /// </summary>
public UserAgentData currentAgent; public UserAgentData currentAgent;
} }
/// <summary> /// <summary>
/// Information about a users session /// Information about a users session
/// </summary> /// </summary>
public class UserAgentData public class UserAgentData
{ {
/// <summary> /// <summary>
/// The UUID of the users avatar (not the agent!) /// The UUID of the users avatar (not the agent!)
/// </summary> /// </summary>
public LLUUID UUID; public LLUUID UUID;
/// <summary> /// <summary>
/// The IP address of the user /// The IP address of the user
/// </summary> /// </summary>
public string agentIP = String.Empty; public string agentIP = String.Empty;
/// <summary> /// <summary>
/// The port of the user /// The port of the user
/// </summary> /// </summary>
public uint agentPort; public uint agentPort;
/// <summary> /// <summary>
/// Is the user online? /// Is the user online?
/// </summary> /// </summary>
public bool agentOnline; public bool agentOnline;
/// <summary> /// <summary>
/// The session ID for the user (also the agent ID) /// The session ID for the user (also the agent ID)
/// </summary> /// </summary>
public LLUUID sessionID; public LLUUID sessionID;
/// <summary> /// <summary>
/// The "secure" session ID for the user /// The "secure" session ID for the user
/// </summary> /// </summary>
/// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks> /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
public LLUUID secureSessionID; public LLUUID secureSessionID;
/// <summary> /// <summary>
/// The region the user logged into initially /// The region the user logged into initially
/// </summary> /// </summary>
public LLUUID regionID; public LLUUID regionID;
/// <summary> /// <summary>
/// A unix timestamp from when the user logged in /// A unix timestamp from when the user logged in
/// </summary> /// </summary>
public int loginTime; public int loginTime;
/// <summary> /// <summary>
/// When this agent expired and logged out, 0 if still online /// When this agent expired and logged out, 0 if still online
/// </summary> /// </summary>
public int logoutTime; public int logoutTime;
/// <summary> /// <summary>
/// Current region the user is logged into /// Current region the user is logged into
/// </summary> /// </summary>
public LLUUID currentRegion; public LLUUID currentRegion;
/// <summary> /// <summary>
/// Region handle of the current region the user is in /// Region handle of the current region the user is in
/// </summary> /// </summary>
public ulong currentHandle; public ulong currentHandle;
/// <summary> /// <summary>
/// The position of the user within the region /// The position of the user within the region
/// </summary> /// </summary>
public LLVector3 currentPos; public LLVector3 currentPos;
} }
} }

View File

@ -35,7 +35,7 @@ using libsecondlife;
using Nini.Config; using Nini.Config;
namespace OpenSim.Framework.Utilities namespace OpenSim.Framework
{ {
public class Util public class Util
{ {

View File

@ -33,13 +33,13 @@ using System.Reflection;
using libsecondlife; using libsecondlife;
using Nini.Config; using Nini.Config;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
namespace OpenSim.Grid.AssetServer namespace OpenSim.Grid.AssetServer

View File

@ -5,7 +5,7 @@ using System.Xml.Serialization;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;

View File

@ -36,9 +36,9 @@ using Nwc.XmlRpc;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
namespace OpenSim.Grid.GridServer namespace OpenSim.Grid.GridServer
{ {

View File

@ -34,8 +34,8 @@ using System.Timers;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using Timer=System.Timers.Timer; using Timer=System.Timers.Timer;

View File

@ -37,7 +37,7 @@ using OpenSim.Region.Environment.Interfaces;
using OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler; using OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler;
using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using System.Runtime.Remoting.Lifetime; using System.Runtime.Remoting.Lifetime;
namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
@ -584,7 +584,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
public string llList2Key(List<string> src, int index) public string llList2Key(List<string> src, int index)
{ {
//return OpenSim.Framework.Types.ToStringHyphenated(src[index]); //return OpenSim.Framework.ToStringHyphenated(src[index]);
return src[index].ToString(); return src[index].ToString();
} }

View File

@ -30,7 +30,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Interfaces; using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes.Scripting; using OpenSim.Region.Environment.Scenes.Scripting;
namespace OpenSim.Grid.ScriptEngine.DotNetEngine namespace OpenSim.Grid.ScriptEngine.DotNetEngine

View File

@ -31,7 +31,7 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
namespace OpenSim.Grid.ScriptServer namespace OpenSim.Grid.ScriptServer
{ {

View File

@ -34,8 +34,8 @@ using libsecondlife;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer
{ {

View File

@ -32,9 +32,9 @@ using System.Net;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
using OpenSim.Framework.UserManagement; using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer

View File

@ -29,9 +29,9 @@ using System;
using System.Collections; using System.Collections;
using System.Net; using System.Net;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.UserManagement; using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using libsecondlife; using libsecondlife;
namespace OpenSim.Grid.UserServer namespace OpenSim.Grid.UserServer

View File

@ -46,7 +46,7 @@ namespace OpenSim
Console.Write("Performing compatibility checks... "); Console.Write("Performing compatibility checks... ");
string supported = ""; string supported = "";
if (OpenSim.Framework.Utilities.Util.IsEnvironmentSupported(ref supported)) if (OpenSim.Framework.Util.IsEnvironmentSupported(ref supported))
{ {
Console.WriteLine(" Environment is compatible.\n"); Console.WriteLine(" Environment is compatible.\n");
} }

View File

@ -8,8 +8,8 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Region.ClientStack; using OpenSim.Region.ClientStack;
using OpenSim.Region.Communications.Local; using OpenSim.Region.Communications.Local;
using OpenSim.Region.Communications.OGS1; using OpenSim.Region.Communications.OGS1;
@ -18,7 +18,7 @@ using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
using System.Globalization; using System.Globalization;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using RegionInfo = OpenSim.Framework.Types.RegionInfo; using RegionInfo = OpenSim.Framework.RegionInfo;
namespace OpenSim namespace OpenSim
{ {

View File

@ -35,17 +35,17 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Region.ClientStack; using OpenSim.Region.ClientStack;
using OpenSim.Region.Communications.Local; using OpenSim.Region.Communications.Local;
using OpenSim.Region.Communications.OGS1; using OpenSim.Region.Communications.OGS1;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
using OpenSim.Framework.Configuration; using OpenSim.Framework;
using System.Globalization; using System.Globalization;
using RegionInfo = OpenSim.Framework.Types.RegionInfo; using RegionInfo = OpenSim.Framework.RegionInfo;
namespace OpenSim namespace OpenSim
{ {

View File

@ -34,8 +34,8 @@ using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack
{ {
@ -769,13 +769,17 @@ namespace OpenSim.Region.ClientStack
viewertime.TimeInfo.SecPerYear = 365000; viewertime.TimeInfo.SecPerYear = 365000;
viewertime.TimeInfo.SunPhase = 1; viewertime.TimeInfo.SunPhase = 1;
int sunPhase = (phase + 2) / 2; int sunPhase = (phase + 2) / 2;
if ((sunPhase < 12) || (sunPhase > 36)) if ((sunPhase < 6) || (sunPhase > 36))
{ {
viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f); viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f);
//Console.WriteLine("sending night"); //Console.WriteLine("sending night");
} }
else else
{ {
if (sunPhase < 12)
{
sunPhase = 12;
}
sunPhase = sunPhase - 12; sunPhase = sunPhase - 12;
float yValue = 0.1f * (sunPhase); float yValue = 0.1f * (sunPhase);
if (yValue > 1.2f) { yValue = yValue - 1.2f; } if (yValue > 1.2f) { yValue = yValue - 1.2f; }

View File

@ -29,6 +29,7 @@ using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework;
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack
{ {

View File

@ -33,7 +33,7 @@ using System.Timers;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities; using OpenSim.Framework;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack

View File

@ -30,9 +30,7 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework.Inventory; using OpenSim.Framework;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;

View File

@ -36,10 +36,6 @@ using libsecondlife.Packets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using Timer = System.Timers.Timer; using Timer = System.Timers.Timer;
namespace OpenSim.Region.ClientStack namespace OpenSim.Region.ClientStack

View File

@ -31,7 +31,7 @@ using System.Net.Sockets;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using libsecondlife; using libsecondlife;

View File

@ -33,7 +33,7 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
using libsecondlife; using libsecondlife;

View File

@ -32,7 +32,7 @@ using System.Net.Sockets;
using libsecondlife.Packets; using libsecondlife.Packets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;

View File

@ -29,7 +29,7 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {

View File

@ -29,7 +29,7 @@ using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Types; using OpenSim.Framework;
using System.Collections; using System.Collections;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {

View File

@ -31,10 +31,8 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.UserManagement; using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Inventory;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {
@ -184,7 +182,7 @@ namespace OpenSim.Region.Communications.Local
ArrayList AgentInventoryArray = new ArrayList(); ArrayList AgentInventoryArray = new ArrayList();
Hashtable TempHash; Hashtable TempHash;
foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values) foreach (OpenSim.Framework.InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
{ {
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.FolderName; TempHash["name"] = InvFolder.FolderName;

View File

@ -28,7 +28,7 @@
using System; using System;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.UserManagement; using OpenSim.Framework.UserManagement;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local

View File

@ -28,7 +28,7 @@
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;

View File

@ -42,7 +42,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework;
using OpenSim.Region.Communications.Local; using OpenSim.Region.Communications.Local;
namespace OpenSim.Region.Communications.OGS1 namespace OpenSim.Region.Communications.OGS1
@ -140,7 +140,7 @@ namespace OpenSim.Region.Communications.OGS1
int port = Convert.ToInt32(neighbourData["sim_port"]); int port = Convert.ToInt32(neighbourData["sim_port"]);
string externalUri = (string)neighbourData["sim_uri"]; string externalUri = (string)neighbourData["sim_uri"];
string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString(); string externalIpStr = OpenSim.Framework.Util.GetHostFromDNS(simIp).ToString();
SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port);
sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]);
sri.RegionID = new LLUUID((string)neighbourData["uuid"]); sri.RegionID = new LLUUID((string)neighbourData["uuid"]);

View File

@ -28,7 +28,7 @@
using System; using System;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Region.Communications.OGS1 namespace OpenSim.Region.Communications.OGS1
{ {

View File

@ -30,7 +30,7 @@ using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Types; using OpenSim.Framework;
namespace OpenSim.Region.Communications.OGS1 namespace OpenSim.Region.Communications.OGS1

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