namespace StreamBuddy.PluginInterface.DB
{
    /// <summary>
    /// Defines a series of functions for accessing persistant values
    /// </summary>
    public interface IValueStore
    {
        /// <summary>
        /// Checks if a persistant value exists with the given name.
        /// </summary>
        /// <param name="Name">The name of the value to check for, case-insensitive.</param>
        /// <returns>Does the value exist for the object</returns>
        bool HasValue(string Name);
        /// <summary>
        /// Set/Update the stored value with the given name.
        /// </summary>
        /// <typeparam name="T">The type of the value to store.</typeparam>
        /// <param name="Name">The name of the value, case-insensitive.</param>
        /// <param name="value">The value to store.</param>
        void SetValue<T>(string Name, T value) where T : System.IConvertible;
        /// <summary>
        /// Get the stored value with the given name.
        /// </summary>
        /// <typeparam name="T">The type of the value to retrieve.</typeparam>
        /// <param name="Name">The name of the value, case-insensitive</param>
        /// <returns>The value that was stored, or <seealso cref="default(T)"/> if it doesn't exist.</returns>
        T GetValue<T>(string Name) where T : System.IConvertible;
        /// <summary>
        /// Remove a stored value from the persistant store.
        /// </summary>
        /// <param name="Name">The name of the value to remove, case-insensitive</param>
        void RemoveValue(string Name);
    }
}
