aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data/IGridData.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-02 14:49:35 +0000
committerSean Dague2008-04-02 14:49:35 +0000
commitb28ef3ca142270623cfb322301395509bc9fc6d9 (patch)
treef89409101df265a9cf886f3bfd5743e36b25721a /OpenSim/Framework/Data/IGridData.cs
parent* Added AvatarAppearance.sql for MSSQL (diff)
downloadopensim-SC_OLD-b28ef3ca142270623cfb322301395509bc9fc6d9.zip
opensim-SC_OLD-b28ef3ca142270623cfb322301395509bc9fc6d9.tar.gz
opensim-SC_OLD-b28ef3ca142270623cfb322301395509bc9fc6d9.tar.bz2
opensim-SC_OLD-b28ef3ca142270623cfb322301395509bc9fc6d9.tar.xz
refactor, make the file name the class name
Diffstat (limited to 'OpenSim/Framework/Data/IGridData.cs')
-rw-r--r--OpenSim/Framework/Data/IGridData.cs118
1 files changed, 118 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data/IGridData.cs b/OpenSim/Framework/Data/IGridData.cs
new file mode 100644
index 0000000..af51d0d
--- /dev/null
+++ b/OpenSim/Framework/Data/IGridData.cs
@@ -0,0 +1,118 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using libsecondlife;
30
31namespace OpenSim.Framework.Data
32{
33 public enum DataResponse
34 {
35 RESPONSE_OK,
36 RESPONSE_AUTHREQUIRED,
37 RESPONSE_INVALIDCREDENTIALS,
38 RESPONSE_ERROR
39 }
40
41 /// <summary>
42 /// A standard grid interface
43 /// </summary>
44 public interface IGridData
45 {
46 /// <summary>
47 /// Returns a sim profile from a regionHandle
48 /// </summary>
49 /// <param name="regionHandle">A 64bit Region Handle</param>
50 /// <returns>A simprofile</returns>
51 RegionProfileData GetProfileByHandle(ulong regionHandle);
52
53 /// <summary>
54 /// Returns a sim profile from a UUID
55 /// </summary>
56 /// <param name="UUID">A 128bit UUID</param>
57 /// <returns>A sim profile</returns>
58 RegionProfileData GetProfileByLLUUID(LLUUID UUID);
59
60 /// <summary>
61 /// Returns a sim profile from a string match
62 /// </summary>
63 /// <param name="regionName">A string for a partial region name match</param>
64 /// <returns>A sim profile</returns>
65 RegionProfileData GetProfileByString(string regionName);
66
67 /// <summary>
68 /// Returns all profiles within the specified range
69 /// </summary>
70 /// <param name="Xmin">Minimum sim coordinate (X)</param>
71 /// <param name="Ymin">Minimum sim coordinate (Y)</param>
72 /// <param name="Xmax">Maximum sim coordinate (X)</param>
73 /// <param name="Ymin">Maximum sim coordinate (Y)</param>
74 /// <returns>An array containing all the sim profiles in the specified range</returns>
75 RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
76
77 /// <summary>
78 /// Authenticates a sim by use of its recv key.
79 /// WARNING: Insecure
80 /// </summary>
81 /// <param name="UUID">The UUID sent by the sim</param>
82 /// <param name="regionHandle">The regionhandle sent by the sim</param>
83 /// <param name="simrecvkey">The receiving key sent by the sim</param>
84 /// <returns>Whether the sim has been authenticated</returns>
85 bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey);
86
87 /// <summary>
88 /// Initialises the interface
89 /// </summary>
90 void Initialise();
91
92 /// <summary>
93 /// Closes the interface
94 /// </summary>
95 void Close();
96
97 /// <summary>
98 /// The plugin being loaded
99 /// </summary>
100 /// <returns>A string containing the plugin name</returns>
101 string getName();
102
103 /// <summary>
104 /// The plugins version
105 /// </summary>
106 /// <returns>A string containing the plugin version</returns>
107 string getVersion();
108
109 /// <summary>
110 /// Adds a new profile to the database
111 /// </summary>
112 /// <param name="profile">The profile to add</param>
113 /// <returns>RESPONSE_OK if successful, error if not.</returns>
114 DataResponse AddProfile(RegionProfileData profile);
115
116 ReservationData GetReservationAtPoint(uint x, uint y);
117 }
118}