using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenGrid.Framework.Data
{
public interface IUserData
{
///
/// Returns a user profile from a database via their UUID
///
/// The accounts UUID
/// The user data profile
UserProfileData getUserByUUID(LLUUID user);
///
/// Returns a users profile by searching their username
///
/// The users username
/// The user data profile
UserProfileData getUserByName(string name);
///
/// Returns a users profile by searching their username parts
///
/// Account firstname
/// Account lastname
/// The user data profile
UserProfileData getUserByName(string fname, string lname);
///
/// Returns the current agent for a user searching by it's UUID
///
/// The users UUID
/// The current agent session
UserAgentData getAgentByUUID(LLUUID user);
///
/// Returns the current session agent for a user searching by username
///
/// The users account name
/// The current agent session
UserAgentData getAgentByName(string name);
///
/// Returns the current session agent for a user searching by username parts
///
/// The users first account name
/// The users account surname
/// The current agent session
UserAgentData getAgentByName(string fname, string lname);
///
/// Adds a new User profile to the database
///
/// UserProfile to add
void addNewUserProfile(UserProfileData user);
///
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
///
/// The account to transfer from
/// The account to transfer to
/// The amount to transfer
/// Successful?
bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
///
/// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
///
/// User to transfer from
/// User to transfer to
/// Specified inventory item
/// Successful?
bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
///
/// Returns the plugin version
///
/// Plugin version in MAJOR.MINOR.REVISION.BUILD format
string getVersion();
///
/// Returns the plugin name
///
/// Plugin name, eg MySQL User Provider
string getName();
///
/// Initialises the plugin (artificial constructor)
///
void Initialise();
}
}