2007-05-04 03:25:20 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
namespace OpenGrid.Framework.Data
|
|
|
|
{
|
2007-05-05 23:04:47 +00:00
|
|
|
public enum DataResponse
|
|
|
|
{
|
|
|
|
RESPONSE_OK,
|
|
|
|
RESPONSE_AUTHREQUIRED,
|
|
|
|
RESPONSE_INVALIDCREDENTIALS,
|
|
|
|
RESPONSE_ERROR
|
|
|
|
}
|
|
|
|
|
2007-05-04 07:01:37 +00:00
|
|
|
/// <summary>
|
|
|
|
/// A standard grid interface
|
|
|
|
/// </summary>
|
2007-05-04 03:25:20 +00:00
|
|
|
public interface IGridData
|
|
|
|
{
|
2007-05-04 07:01:37 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Returns a sim profile from a regionHandle
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="regionHandle">A 64bit Region Handle</param>
|
|
|
|
/// <returns>A simprofile</returns>
|
2007-05-04 03:25:20 +00:00
|
|
|
SimProfileData GetProfileByHandle(ulong regionHandle);
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns a sim profile from a UUID
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="UUID">A 128bit UUID</param>
|
|
|
|
/// <returns>A sim profile</returns>
|
2007-05-04 03:25:20 +00:00
|
|
|
SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Authenticates a sim by use of it's recv key.
|
|
|
|
/// WARNING: Insecure
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="UUID">The UUID sent by the sim</param>
|
|
|
|
/// <param name="regionHandle">The regionhandle sent by the sim</param>
|
|
|
|
/// <param name="simrecvkey">The recieving key sent by the sim</param>
|
|
|
|
/// <returns>Whether the sim has been authenticated</returns>
|
2007-05-04 03:25:20 +00:00
|
|
|
bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initialises the interface
|
|
|
|
/// </summary>
|
2007-05-04 03:25:20 +00:00
|
|
|
void Initialise();
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Closes the interface
|
|
|
|
/// </summary>
|
2007-05-04 04:19:30 +00:00
|
|
|
void Close();
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The plugin being loaded
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>A string containing the plugin name</returns>
|
2007-05-04 06:51:18 +00:00
|
|
|
string getName();
|
2007-05-04 07:01:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The plugins version
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>A string containing the plugin version</returns>
|
2007-05-04 06:51:18 +00:00
|
|
|
string getVersion();
|
2007-05-05 23:04:47 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Adds a new profile to the database
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="profile">The profile to add</param>
|
|
|
|
/// <returns>RESPONSE_OK if successful, error if not.</returns>
|
|
|
|
DataResponse AddProfile(SimProfileData profile);
|
2007-05-04 03:25:20 +00:00
|
|
|
}
|
|
|
|
}
|