mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Sanely namespaces the project
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace TGS.Interface.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Used for managing <see cref="ITGInstance"/>s
|
||||
/// </summary>
|
||||
[ServiceContract]
|
||||
public interface ITGInstanceManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ITGInstance"/>
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the instance</param>
|
||||
/// <param name="path">The path to the instance</param>
|
||||
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
||||
[OperationContract]
|
||||
string CreateInstance(string Name, string path);
|
||||
|
||||
/// <summary>
|
||||
/// Registers an existing server instance
|
||||
/// </summary>
|
||||
/// <param name="path">The path to the instance</param>
|
||||
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
||||
[OperationContract]
|
||||
string ImportInstance(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if an instance is online
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the instance</param>
|
||||
/// <returns><see langword="true"/> if the Instance exists and is online, <see langword="false"/> otherwise</returns>
|
||||
[OperationContract]
|
||||
bool InstanceEnabled(string Name);
|
||||
|
||||
/// <summary>
|
||||
/// Sets an instance's enabled status
|
||||
/// </summary>
|
||||
/// <param name="Name">The instance whom's status should be changed</param>
|
||||
/// <param name="enabled"><see langword="true"/> to enable the instance, <see langword="false"/> to disable it</param>
|
||||
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
||||
[OperationContract]
|
||||
string SetInstanceEnabled(string Name, bool enabled);
|
||||
|
||||
/// <summary>
|
||||
/// Renames an instance, this will restart the instance if it is enabled
|
||||
/// </summary>
|
||||
/// <param name="name">The current name of the instance</param>
|
||||
/// <param name="new_name">The new name of the instance</param>
|
||||
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
||||
[OperationContract]
|
||||
string RenameInstance(string name, string new_name);
|
||||
|
||||
/// <summary>
|
||||
/// Disables and unregisters an instance, allowing the folder and data to be manipulated manually
|
||||
/// </summary>
|
||||
/// <param name="name">The instance to detach</param>
|
||||
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
||||
[OperationContract]
|
||||
string DetachInstance(string name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user