aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data
diff options
context:
space:
mode:
authorMW2007-05-24 12:16:50 +0000
committerMW2007-05-24 12:16:50 +0000
commit3376b82501000692d6dac24b051af738cdaf2737 (patch)
tree90ed0a5d4955236f011fa63fce9d555186b0d179 /OpenGrid.Framework.Data
parentAdded "terrain save grdmap <filename> <gradientmap>" function to console. Gra... (diff)
downloadopensim-SC_OLD-3376b82501000692d6dac24b051af738cdaf2737.zip
opensim-SC_OLD-3376b82501000692d6dac24b051af738cdaf2737.tar.gz
opensim-SC_OLD-3376b82501000692d6dac24b051af738cdaf2737.tar.bz2
opensim-SC_OLD-3376b82501000692d6dac24b051af738cdaf2737.tar.xz
Some more code refactoring, plus a restructuring of the directories so that the Grid servers can be a separate solution to the region server.
Diffstat (limited to 'OpenGrid.Framework.Data')
-rw-r--r--OpenGrid.Framework.Data/GridData.cs83
-rw-r--r--OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj104
-rw-r--r--OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build46
-rw-r--r--OpenGrid.Framework.Data/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGrid.Framework.Data/SimProfileData.cs84
-rw-r--r--OpenGrid.Framework.Data/UserData.cs89
-rw-r--r--OpenGrid.Framework.Data/UserProfileData.cs54
7 files changed, 0 insertions, 495 deletions
diff --git a/OpenGrid.Framework.Data/GridData.cs b/OpenGrid.Framework.Data/GridData.cs
deleted file mode 100644
index 6dad37e..0000000
--- a/OpenGrid.Framework.Data/GridData.cs
+++ /dev/null
@@ -1,83 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenGrid.Framework.Data
6{
7 public enum DataResponse
8 {
9 RESPONSE_OK,
10 RESPONSE_AUTHREQUIRED,
11 RESPONSE_INVALIDCREDENTIALS,
12 RESPONSE_ERROR
13 }
14
15 /// <summary>
16 /// A standard grid interface
17 /// </summary>
18 public interface IGridData
19 {
20 /// <summary>
21 /// Returns a sim profile from a regionHandle
22 /// </summary>
23 /// <param name="regionHandle">A 64bit Region Handle</param>
24 /// <returns>A simprofile</returns>
25 SimProfileData GetProfileByHandle(ulong regionHandle);
26
27 /// <summary>
28 /// Returns a sim profile from a UUID
29 /// </summary>
30 /// <param name="UUID">A 128bit UUID</param>
31 /// <returns>A sim profile</returns>
32 SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
33
34 /// <summary>
35 /// Returns all profiles within the specified range
36 /// </summary>
37 /// <param name="Xmin">Minimum sim coordinate (X)</param>
38 /// <param name="Ymin">Minimum sim coordinate (Y)</param>
39 /// <param name="Xmax">Maximum sim coordinate (X)</param>
40 /// <param name="Ymin">Maximum sim coordinate (Y)</param>
41 /// <returns>An array containing all the sim profiles in the specified range</returns>
42 SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
43
44 /// <summary>
45 /// Authenticates a sim by use of it's recv key.
46 /// WARNING: Insecure
47 /// </summary>
48 /// <param name="UUID">The UUID sent by the sim</param>
49 /// <param name="regionHandle">The regionhandle sent by the sim</param>
50 /// <param name="simrecvkey">The recieving key sent by the sim</param>
51 /// <returns>Whether the sim has been authenticated</returns>
52 bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
53
54 /// <summary>
55 /// Initialises the interface
56 /// </summary>
57 void Initialise();
58
59 /// <summary>
60 /// Closes the interface
61 /// </summary>
62 void Close();
63
64 /// <summary>
65 /// The plugin being loaded
66 /// </summary>
67 /// <returns>A string containing the plugin name</returns>
68 string getName();
69
70 /// <summary>
71 /// The plugins version
72 /// </summary>
73 /// <returns>A string containing the plugin version</returns>
74 string getVersion();
75
76 /// <summary>
77 /// Adds a new profile to the database
78 /// </summary>
79 /// <param name="profile">The profile to add</param>
80 /// <returns>RESPONSE_OK if successful, error if not.</returns>
81 DataResponse AddProfile(SimProfileData profile);
82 }
83}
diff --git a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
deleted file mode 100644
index 201f7ba..0000000
--- a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenGrid.Framework.Data</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenGrid.Framework.Data</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System.Xml" >
66 <HintPath>System.Xml.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Data" >
70 <HintPath>System.Data.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="libsecondlife.dll" >
74 <HintPath>..\bin\libsecondlife.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 </ItemGroup>
80 <ItemGroup>
81 <Compile Include="GridData.cs">
82 <SubType>Code</SubType>
83 </Compile>
84 <Compile Include="SimProfileData.cs">
85 <SubType>Code</SubType>
86 </Compile>
87 <Compile Include="UserData.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="UserProfileData.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="Properties\AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 </ItemGroup>
97 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
98 <PropertyGroup>
99 <PreBuildEvent>
100 </PreBuildEvent>
101 <PostBuildEvent>
102 </PostBuildEvent>
103 </PropertyGroup>
104</Project>
diff --git a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
deleted file mode 100644
index a3fd771..0000000
--- a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.Framework.Data" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenGrid.Framework.Data" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="GridData.cs" />
15 <include name="SimProfileData.cs" />
16 <include name="UserData.cs" />
17 <include name="UserProfileData.cs" />
18 <include name="Properties/AssemblyInfo.cs" />
19 </sources>
20 <references basedir="${project::get-base-directory()}">
21 <lib>
22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib>
25 <include name="System.dll" />
26 <include name="System.Xml.dll" />
27 <include name="System.Data.dll" />
28 <include name="../bin/libsecondlife.dll" />
29 </references>
30 </csc>
31 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
32 <mkdir dir="${project::get-base-directory()}/../bin/"/>
33 <copy todir="${project::get-base-directory()}/../bin/">
34 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
35 <include name="*.dll"/>
36 <include name="*.exe"/>
37 </fileset>
38 </copy>
39 </target>
40 <target name="clean">
41 <delete dir="${bin.dir}" failonerror="false" />
42 <delete dir="${obj.dir}" failonerror="false" />
43 </target>
44 <target name="doc" description="Creates documentation.">
45 </target>
46</project>
diff --git a/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs b/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1446673..0000000
--- a/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.Framework.Data")]
13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGrid.Framework.Data/SimProfileData.cs
deleted file mode 100644
index c66610e..0000000
--- a/OpenGrid.Framework.Data/SimProfileData.cs
+++ /dev/null
@@ -1,84 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenGrid.Framework.Data
6{
7 public class SimProfileData
8 {
9 /// <summary>
10 /// The name of the region
11 /// </summary>
12 public string regionName = "";
13
14 /// <summary>
15 /// A 64-bit number combining map position into a (mostly) unique ID
16 /// </summary>
17 public ulong regionHandle;
18
19 /// <summary>
20 /// OGS/OpenSim Specific ID for a region
21 /// </summary>
22 public libsecondlife.LLUUID UUID;
23
24 /// <summary>
25 /// Coordinates of the region
26 /// </summary>
27 public uint regionLocX;
28 public uint regionLocY;
29 public uint regionLocZ; // Reserved (round-robin, layers, etc)
30
31 /// <summary>
32 /// Authentication secrets
33 /// </summary>
34 /// <remarks>Not very secure, needs improvement.</remarks>
35 public string regionSendKey = "";
36 public string regionRecvKey = "";
37 public string regionSecret = "";
38
39 /// <summary>
40 /// Whether the region is online
41 /// </summary>
42 public bool regionOnline;
43
44 /// <summary>
45 /// Information about the server that the region is currently hosted on
46 /// </summary>
47 public string serverIP = "";
48 public uint serverPort;
49 public string serverURI = "";
50
51 /// <summary>
52 /// Set of optional overrides. Can be used to create non-eulicidean spaces.
53 /// </summary>
54 public ulong regionNorthOverrideHandle;
55 public ulong regionSouthOverrideHandle;
56 public ulong regionEastOverrideHandle;
57 public ulong regionWestOverrideHandle;
58
59 /// <summary>
60 /// Optional: URI Location of the region database
61 /// </summary>
62 /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
63 public string regionDataURI = "";
64
65 /// <summary>
66 /// Region Asset Details
67 /// </summary>
68 public string regionAssetURI = "";
69 public string regionAssetSendKey = "";
70 public string regionAssetRecvKey = "";
71
72 /// <summary>
73 /// Region Userserver Details
74 /// </summary>
75 public string regionUserURI = "";
76 public string regionUserSendKey = "";
77 public string regionUserRecvKey = "";
78
79 /// <summary>
80 /// Region Map Texture Asset
81 /// </summary>
82 public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006");
83 }
84}
diff --git a/OpenGrid.Framework.Data/UserData.cs b/OpenGrid.Framework.Data/UserData.cs
deleted file mode 100644
index 1b37957..0000000
--- a/OpenGrid.Framework.Data/UserData.cs
+++ /dev/null
@@ -1,89 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5
6namespace OpenGrid.Framework.Data
7{
8 public interface IUserData
9 {
10 /// <summary>
11 /// Returns a user profile from a database via their UUID
12 /// </summary>
13 /// <param name="user">The accounts UUID</param>
14 /// <returns>The user data profile</returns>
15 UserProfileData getUserByUUID(LLUUID user);
16
17 /// <summary>
18 /// Returns a users profile by searching their username
19 /// </summary>
20 /// <param name="name">The users username</param>
21 /// <returns>The user data profile</returns>
22 UserProfileData getUserByName(string name);
23
24 /// <summary>
25 /// Returns a users profile by searching their username parts
26 /// </summary>
27 /// <param name="fname">Account firstname</param>
28 /// <param name="lname">Account lastname</param>
29 /// <returns>The user data profile</returns>
30 UserProfileData getUserByName(string fname, string lname);
31
32 /// <summary>
33 /// Returns the current agent for a user searching by it's UUID
34 /// </summary>
35 /// <param name="user">The users UUID</param>
36 /// <returns>The current agent session</returns>
37 UserAgentData getAgentByUUID(LLUUID user);
38
39 /// <summary>
40 /// Returns the current session agent for a user searching by username
41 /// </summary>
42 /// <param name="name">The users account name</param>
43 /// <returns>The current agent session</returns>
44 UserAgentData getAgentByName(string name);
45
46 /// <summary>
47 /// Returns the current session agent for a user searching by username parts
48 /// </summary>
49 /// <param name="fname">The users first account name</param>
50 /// <param name="lname">The users account surname</param>
51 /// <returns>The current agent session</returns>
52 UserAgentData getAgentByName(string fname, string lname);
53
54 /// <summary>
55 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
56 /// </summary>
57 /// <param name="from">The account to transfer from</param>
58 /// <param name="to">The account to transfer to</param>
59 /// <param name="amount">The amount to transfer</param>
60 /// <returns>Successful?</returns>
61 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
62
63 /// <summary>
64 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
65 /// </summary>
66 /// <param name="from">User to transfer from</param>
67 /// <param name="to">User to transfer to</param>
68 /// <param name="inventory">Specified inventory item</param>
69 /// <returns>Successful?</returns>
70 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
71
72 /// <summary>
73 /// Returns the plugin version
74 /// </summary>
75 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
76 string getVersion();
77
78 /// <summary>
79 /// Returns the plugin name
80 /// </summary>
81 /// <returns>Plugin name, eg MySQL User Provider</returns>
82 string getName();
83
84 /// <summary>
85 /// Initialises the plugin (artificial constructor)
86 /// </summary>
87 void Initialise();
88 }
89}
diff --git a/OpenGrid.Framework.Data/UserProfileData.cs b/OpenGrid.Framework.Data/UserProfileData.cs
deleted file mode 100644
index 3f42762..0000000
--- a/OpenGrid.Framework.Data/UserProfileData.cs
+++ /dev/null
@@ -1,54 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5
6namespace OpenGrid.Framework.Data
7{
8 public class UserProfileData
9 {
10 public LLUUID UUID;
11 public string username; // The configurable part of the users username
12 public string surname; // The users surname (can be used to indicate user class - eg 'Test User' or 'Test Admin')
13
14 public string passwordHash; // Hash of the users password
15 public string passwordSalt; // Salt for the users password
16
17 public ulong homeRegion; // RegionHandle of home
18 public LLVector3 homeLocation; // Home Location inside the sim
19 public LLVector3 homeLookAt; // Coordinates where the user is looking
20
21
22 public int created; // UNIX Epoch Timestamp (User Creation)
23 public int lastLogin; // UNIX Epoch Timestamp (Last Login Time)
24
25 public string userInventoryURI; // URI to inventory server for this user
26 public string userAssetURI; // URI to asset server for this user
27
28 public uint profileCanDoMask; // Profile window "I can do" mask
29 public uint profileWantDoMask; // Profile window "I want to" mask
30
31 public string profileAboutText; // My about window text
32 public string profileFirstText; // First Life Text
33
34 public LLUUID profileImage; // My avatars profile image
35 public LLUUID profileFirstImage; // First-life image
36 public UserAgentData currentAgent; // The users last agent
37 }
38
39 public class UserAgentData
40 {
41 public LLUUID UUID; // Account ID
42 public string agentIP; // The IP of the agent
43 public uint agentPort; // The port of the agent
44 public bool agentOnline; // The online status of the agent
45 public LLUUID sessionID; // The session ID for the agent (used by client)
46 public LLUUID secureSessionID; // The secure session ID for the agent (used by client)
47 public LLUUID regionID; // The region ID the agent occupies
48 public int loginTime; // EPOCH based Timestamp
49 public int logoutTime; // Timestamp or 0 if N/A
50 public LLUUID currentRegion; // UUID of the users current region
51 public ulong currentHandle; // RegionHandle of the users current region
52 public LLVector3 currentPos; // Current position in the region
53 }
54}