using System; using System.Collections.Generic; using System.Text; namespace OpenGrid.Framework.Data { public enum DataResponse { RESPONSE_OK, RESPONSE_AUTHREQUIRED, RESPONSE_INVALIDCREDENTIALS, RESPONSE_ERROR } /// /// A standard grid interface /// public interface IGridData { /// /// Returns a sim profile from a regionHandle /// /// A 64bit Region Handle /// A simprofile SimProfileData GetProfileByHandle(ulong regionHandle); /// /// Returns a sim profile from a UUID /// /// A 128bit UUID /// A sim profile SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID); /// /// Returns all profiles within the specified range /// /// Minimum sim coordinate (X) /// Minimum sim coordinate (Y) /// Maximum sim coordinate (X) /// Maximum sim coordinate (Y) /// An array containing all the sim profiles in the specified range SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); /// /// Authenticates a sim by use of it's recv key. /// WARNING: Insecure /// /// The UUID sent by the sim /// The regionhandle sent by the sim /// The recieving key sent by the sim /// Whether the sim has been authenticated bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); /// /// Initialises the interface /// void Initialise(); /// /// Closes the interface /// void Close(); /// /// The plugin being loaded /// /// A string containing the plugin name string getName(); /// /// The plugins version /// /// A string containing the plugin version string getVersion(); /// /// Adds a new profile to the database /// /// The profile to add /// RESPONSE_OK if successful, error if not. DataResponse AddProfile(SimProfileData profile); } }