* ZOMG Wtf Comments?

* OpenGrid.Framework.Data is now well documented
zircon^2
Adam Frisby 2007-06-01 23:34:37 +00:00
parent aba0f0774c
commit a7fe1b63f3
9 changed files with 450 additions and 39 deletions

View File

@ -39,6 +39,7 @@ namespace OpenGridServices.InventoryServer
MainConsole.Instance.WriteLine("Starting HTTP server"); MainConsole.Instance.WriteLine("Starting HTTP server");
BaseHttpServer httpServer = new BaseHttpServer(8004); BaseHttpServer httpServer = new BaseHttpServer(8004);
httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest);
//httpServer.AddRestHandler("GET","/rootfolders/",Rest //httpServer.AddRestHandler("GET","/rootfolders/",Rest
} }

View File

@ -12,7 +12,7 @@
* 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 <copyright holder> ``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 <copyright holder> BE LIABLE FOR ANY * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
@ -32,8 +32,15 @@ using Db4objects.Db4o;
namespace OpenGrid.Config.GridConfigDb4o namespace OpenGrid.Config.GridConfigDb4o
{ {
/// <summary>
/// A grid configuration interface for returning the DB4o Config Provider
/// </summary>
public class Db40ConfigPlugin: IGridConfig public class Db40ConfigPlugin: IGridConfig
{ {
/// <summary>
/// Loads and returns a configuration objeect
/// </summary>
/// <returns>A grid configuration object</returns>
public GridConfig GetConfigObject() public GridConfig GetConfigObject()
{ {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loading Db40Config dll"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loading Db40Config dll");
@ -41,49 +48,81 @@ namespace OpenGrid.Config.GridConfigDb4o
} }
} }
/// <summary>
/// A DB4o based Gridserver configuration object
/// </summary>
public class DbGridConfig : GridConfig public class DbGridConfig : GridConfig
{ {
/// <summary>
/// The DB4o Database
/// </summary>
private IObjectContainer db; private IObjectContainer db;
/// <summary>
/// User configuration for the Grid Config interfaces
/// </summary>
public void LoadDefaults() { public void LoadDefaults() {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
// About the grid options
this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team"); this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
// Asset Options
this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server","null"); this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server","null"); this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); // User Server Options
this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server","null"); this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server","null"); this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server","null");
this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims","null"); // Region Server Options
this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims","null"); this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims","null");
this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims","null");
} }
/// <summary>
/// Initialises a new configuration object
/// </summary>
public override void InitConfig() { public override void InitConfig() {
try { try {
// Perform Db4o initialisation
db = Db4oFactory.OpenFile("opengrid.yap"); db = Db4oFactory.OpenFile("opengrid.yap");
// Locate the grid configuration object
IObjectSet result = db.Get(typeof(DbGridConfig)); IObjectSet result = db.Get(typeof(DbGridConfig));
// Found?
if(result.Count==1) { if(result.Count==1) {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
foreach (DbGridConfig cfg in result) { foreach (DbGridConfig cfg in result) {
// Import each setting into this class
// Grid Settings
this.GridOwner=cfg.GridOwner; this.GridOwner=cfg.GridOwner;
// Asset Settings
this.DefaultAssetServer=cfg.DefaultAssetServer; this.DefaultAssetServer=cfg.DefaultAssetServer;
this.AssetSendKey=cfg.AssetSendKey; this.AssetSendKey=cfg.AssetSendKey;
this.AssetRecvKey=cfg.AssetRecvKey; this.AssetRecvKey=cfg.AssetRecvKey;
// User Settings
this.DefaultUserServer=cfg.DefaultUserServer; this.DefaultUserServer=cfg.DefaultUserServer;
this.UserSendKey=cfg.UserSendKey; this.UserSendKey=cfg.UserSendKey;
this.UserRecvKey=cfg.UserRecvKey; this.UserRecvKey=cfg.UserRecvKey;
// Region Settings
this.SimSendKey=cfg.SimSendKey; this.SimSendKey=cfg.SimSendKey;
this.SimRecvKey=cfg.SimRecvKey; this.SimRecvKey=cfg.SimRecvKey;
} }
// Create a new configuration object from this class
} else { } else {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
// Load default settings into this class
LoadDefaults(); LoadDefaults();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Writing out default settings to local database");
// Saves to the database file...
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Writing out default settings to local database");
db.Set(this); db.Set(this);
// Closes file locks
db.Close(); db.Close();
} }
} catch(Exception e) { } catch(Exception e) {
@ -91,19 +130,28 @@ namespace OpenGrid.Config.GridConfigDb4o
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString()); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
} }
// Grid Settings
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid settings loaded:"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid settings loaded:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid owner: " + this.GridOwner); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid owner: " + this.GridOwner);
// Asset Settings
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default asset server: " + this.DefaultAssetServer); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default asset server: " + this.DefaultAssetServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to asset server: " + this.AssetSendKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to asset server: " + this.AssetSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from asset server: " + this.AssetRecvKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from asset server: " + this.AssetRecvKey);
// User Settings
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default user server: " + this.DefaultUserServer); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default user server: " + this.DefaultUserServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to user server: " + this.UserSendKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to user server: " + this.UserSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from user server: " + this.UserRecvKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from user server: " + this.UserRecvKey);
// Region Settings
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to sims: " + this.SimSendKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to sims: " + this.SimSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from sims: " + this.SimRecvKey); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from sims: " + this.SimRecvKey);
} }
/// <summary>
/// Closes down the database and releases filesystem locks
/// </summary>
public void Shutdown() { public void Shutdown() {
db.Close(); db.Close();
} }

View File

@ -1,3 +1,29 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

View File

@ -1,18 +1,69 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenGrid.Framework.Data namespace OpenGrid.Framework.Data
{ {
/// <summary>
/// The severity of an individual log message
/// </summary>
public enum LogSeverity : int public enum LogSeverity : int
{ {
/// <summary>
/// Critical: systems failure
/// </summary>
CRITICAL = 1, CRITICAL = 1,
/// <summary>
/// Major: warning prior to systems failure
/// </summary>
MAJOR = 2, MAJOR = 2,
/// <summary>
/// Medium: an individual non-critical task failed
/// </summary>
MEDIUM = 3, MEDIUM = 3,
/// <summary>
/// Low: Informational warning
/// </summary>
LOW = 4, LOW = 4,
/// <summary>
/// Info: Information
/// </summary>
INFO = 5, INFO = 5,
/// <summary>
/// Verbose: Debug Information
/// </summary>
VERBOSE = 6 VERBOSE = 6
} }
/// <summary>
/// An interface to a LogData storage system
/// </summary>
public interface ILogData public interface ILogData
{ {
void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage); void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);

View File

@ -1,3 +1,29 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

View File

@ -1,3 +1,29 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@ -5,27 +31,75 @@ using libsecondlife;
namespace OpenGrid.Framework.Data namespace OpenGrid.Framework.Data
{ {
/// <summary>
/// Inventory Item - contains all the properties associated with an individual inventory piece.
/// </summary>
public class InventoryItemBase public class InventoryItemBase
{ {
/// <summary>
/// A UUID containing the ID for the inventory item itself
/// </summary>
public LLUUID inventoryID; public LLUUID inventoryID;
/// <summary>
/// The UUID of the associated asset on the asset server
/// </summary>
public LLUUID assetID; public LLUUID assetID;
/// <summary>
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
/// </summary>
public int type; public int type;
/// <summary>
/// The folder this item is contained in (NULL_KEY = Inventory Root)
/// </summary>
public LLUUID parentFolderID; public LLUUID parentFolderID;
/// <summary>
/// The owner of this inventory item
/// </summary>
public LLUUID avatarID; public LLUUID avatarID;
/// <summary>
/// The name of the inventory item (must be less than 64 characters)
/// </summary>
public string inventoryName; public string inventoryName;
/// <summary>
/// The description of the inventory item (must be less than 64 characters)
/// </summary>
public string inventoryDescription; public string inventoryDescription;
/// <summary>
/// A mask containing the permissions for the next owner (cannot be enforced)
/// </summary>
public uint inventoryNextPermissions; public uint inventoryNextPermissions;
/// <summary>
/// A mask containing permissions for the current owner (cannot be enforced)
/// </summary>
public uint inventoryCurrentPermissions; public uint inventoryCurrentPermissions;
} }
/// <summary>
/// A Class for folders which contain users inventory
/// </summary>
public class InventoryFolderBase public class InventoryFolderBase
{ {
/// <summary>
/// The name of the folder (64 characters or less)
/// </summary>
public string name; public string name;
/// <summary>
/// The agent who's inventory this is contained by
/// </summary>
public LLUUID agentID; public LLUUID agentID;
/// <summary>
/// The folder this folder is contained in (NULL_KEY for root)
/// </summary>
public LLUUID parentID; public LLUUID parentID;
/// <summary>
/// The UUID for this folder
/// </summary>
public LLUUID folderID; public LLUUID folderID;
} }
/// <summary>
/// An interface for accessing inventory data from a storage server
/// </summary>
public interface IInventoryData public interface IInventoryData
{ {
/// <summary> /// <summary>

View File

@ -1,9 +1,38 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace OpenGrid.Framework.Data namespace OpenGrid.Framework.Data
{ {
/// <summary>
/// A class which contains information known to the grid server about a region
/// </summary>
public class SimProfileData public class SimProfileData
{ {
/// <summary> /// <summary>

View File

@ -1,3 +1,29 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@ -5,6 +31,9 @@ using libsecondlife;
namespace OpenGrid.Framework.Data namespace OpenGrid.Framework.Data
{ {
/// <summary>
/// An interface for connecting to user storage servers.
/// </summary>
public interface IUserData public interface IUserData
{ {
/// <summary> /// <summary>

View File

@ -1,3 +1,29 @@
/*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@ -5,50 +31,151 @@ using libsecondlife;
namespace OpenGrid.Framework.Data namespace OpenGrid.Framework.Data
{ {
/// <summary>
/// Information about a particular user known to the userserver
/// </summary>
public class UserProfileData public class UserProfileData
{ {
/// <summary>
/// The ID value for this user
/// </summary>
public LLUUID UUID; public LLUUID UUID;
public string username; // The configurable part of the users username
public string surname; // The users surname (can be used to indicate user class - eg 'Test User' or 'Test Admin')
public string passwordHash; // Hash of the users password /// <summary>
public string passwordSalt; // Salt for the users password /// The first component of a users account name
/// </summary>
public string username;
/// <summary>
/// The second component of a users account name
/// </summary>
public string surname;
public ulong homeRegion; // RegionHandle of home /// <summary>
public LLVector3 homeLocation; // Home Location inside the sim /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
public LLVector3 homeLookAt; // Coordinates where the user is looking /// </summary>
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
public string passwordHash;
/// <summary>
/// The salt used for the users hash, should be 32 bytes or longer
/// </summary>
public string passwordSalt;
/// <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
/// </summary>
public ulong homeRegion;
/// <summary>
/// The coordinates inside the region of the home location
/// </summary>
public LLVector3 homeLocation;
/// <summary>
/// Where the user will be looking when they rez.
/// </summary>
public LLVector3 homeLookAt;
public int created; // UNIX Epoch Timestamp (User Creation) /// <summary>
public int lastLogin; // UNIX Epoch Timestamp (Last Login Time) /// A UNIX Timestamp (seconds since epoch) for the users creation
/// </summary>
public int created;
/// <summary>
/// A UNIX Timestamp for the users last login date / time
/// </summary>
public int lastLogin;
public string userInventoryURI; // URI to inventory server for this user /// <summary>
public string userAssetURI; // URI to asset server for this user /// A URI to the users inventory server, used for foreigners and large grids
/// </summary>
public string userInventoryURI;
/// <summary>
/// A URI to the users asset server, used for foreigners and large grids.
/// </summary>
public string userAssetURI;
public uint profileCanDoMask; // Profile window "I can do" mask /// <summary>
/// A uint mask containing the "I can do" fields of the users profile
/// </summary>
public uint profileCanDoMask;
/// <summary>
/// A uint mask containing the "I want to do" part of the users profile
/// </summary>
public uint profileWantDoMask; // Profile window "I want to" mask public uint profileWantDoMask; // Profile window "I want to" mask
public string profileAboutText; // My about window text /// <summary>
public string profileFirstText; // First Life Text /// The about text listed in a users profile.
/// </summary>
public string profileAboutText;
/// <summary>
/// The first life about text listed in a users profile
/// </summary>
public string profileFirstText;
public LLUUID profileImage; // My avatars profile image /// <summary>
public LLUUID profileFirstImage; // First-life image /// The profile image for an avatar stored on the asset server
public UserAgentData currentAgent; // The users last agent /// </summary>
public LLUUID profileImage;
/// <summary>
/// The profile image for the users first life tab
/// </summary>
public LLUUID profileFirstImage;
/// <summary>
/// The users last registered agent (filled in on the user server)
/// </summary>
public UserAgentData currentAgent;
} }
/// <summary>
/// Information about a users session
/// </summary>
public class UserAgentData public class UserAgentData
{ {
public LLUUID UUID; // Account ID /// <summary>
public string agentIP; // The IP of the agent /// The UUID of the users avatar (not the agent!)
public uint agentPort; // The port of the agent /// </summary>
public bool agentOnline; // The online status of the agent public LLUUID UUID;
public LLUUID sessionID; // The session ID for the agent (used by client) /// <summary>
public LLUUID secureSessionID; // The secure session ID for the agent (used by client) /// The IP address of the user
public LLUUID regionID; // The region ID the agent occupies /// </summary>
public int loginTime; // EPOCH based Timestamp public string agentIP;
public int logoutTime; // Timestamp or 0 if N/A /// <summary>
public LLUUID currentRegion; // UUID of the users current region /// The port of the user
public ulong currentHandle; // RegionHandle of the users current region /// </summary>
public LLVector3 currentPos; // Current position in the region public uint agentPort;
/// <summary>
/// Is the user online?
/// </summary>
public bool agentOnline;
/// <summary>
/// The session ID for the user (also the agent ID)
/// </summary>
public LLUUID sessionID;
/// <summary>
/// The "secure" session ID for the user
/// </summary>
/// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
public LLUUID secureSessionID;
/// <summary>
/// The region the user logged into initially
/// </summary>
public LLUUID regionID;
/// <summary>
/// A unix timestamp from when the user logged in
/// </summary>
public int loginTime;
/// <summary>
/// When this agent expired and logged out, 0 if still online
/// </summary>
public int logoutTime;
/// <summary>
/// Current region the user is logged into
/// </summary>
public LLUUID currentRegion;
/// <summary>
/// Region handle of the current region the user is in
/// </summary>
public ulong currentHandle;
/// <summary>
/// The position of the user within the region
/// </summary>
public LLVector3 currentPos;
} }
} }