mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Overall: - Removed all 'TG' prefixes on classes and enums Service: - TGStationServer => ServerInstance - TGServerService => Service - Moved all ServerInstance partial classes to a subfolder - Moved ChatProvider classes, delegate, and interface to a namespace - Moved EventID and ChatMessageType to their own .cs files - Moved SanitizeTopicString to Program - ServerService.cs => Service.cs - Fixed ProjectInstaller being in it's own namespace instead of TGServerService Interface: - Moved ExitCode enum to Command class - Moved all components to a namespace - Moved all component enums to Enumerations.cs - DDInteropCallHolder => DreamDaemonBridge - Move PullRequestInfo and DreamDaemonBridge to their own .cs files - Changes the type of ChannelFactory cache from Dictionary<Type, ChannelFactory> to IDictionary<Type, ChannelFactory>
58 lines
2.2 KiB
C#
58 lines
2.2 KiB
C#
using System.ServiceModel;
|
|
|
|
namespace TGServiceInterface.Components
|
|
{
|
|
/// <summary>
|
|
/// Manage the group that is used to access the service, can only be used by an administrator
|
|
/// </summary>
|
|
[ServiceContract]
|
|
public interface ITGAdministration
|
|
{
|
|
/// <summary>
|
|
/// Get the port used for remote operation
|
|
/// </summary>
|
|
/// <returns>The port used for remote operation</returns>
|
|
[OperationContract]
|
|
ushort RemoteAccessPort();
|
|
|
|
/// <summary>
|
|
/// Set the port used for remote operation
|
|
/// Requires a service restart to take effect
|
|
/// </summary>
|
|
/// <param name="port">The new port to use for remote operation</param>
|
|
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
|
[OperationContract]
|
|
string SetRemoteAccessPort(ushort port);
|
|
|
|
/// <summary>
|
|
/// Returns the name of the windows group allowed to use the service other than administrator
|
|
/// </summary>
|
|
/// <returns>The name of the windows group allowed to use the service other than administrator, "ADMIN" if it's unset, <see langword="null"/> on failure</returns>
|
|
[OperationContract]
|
|
string GetCurrentAuthorizedGroup();
|
|
|
|
/// <summary>
|
|
/// Searches the windows machine for the group named <paramref name="groupName"/>, sets it as the authorized group if it's found
|
|
/// </summary>
|
|
/// <param name="groupName">The name of the windows group to search for or null to clear the setting</param>
|
|
/// <returns>The name of the windows group that is now authorized to use the service on success, <see langword="null"/> on failure, "ADMIN" on clearing</returns>
|
|
[OperationContract]
|
|
string SetAuthorizedGroup(string groupName);
|
|
|
|
/// <summary>
|
|
/// Moves the entire server installation, requires no operations to be running
|
|
/// </summary>
|
|
/// <param name="new_location">The new path to place the server</param>
|
|
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
|
[OperationContract]
|
|
string MoveServer(string new_location);
|
|
|
|
/// <summary>
|
|
/// Renames the current static folder to a backup name and recreates is from the current repo using TGS3.json
|
|
/// </summary>
|
|
/// <returns><see langword="null"/> on success, error message on failure</returns>
|
|
[OperationContract]
|
|
string RecreateStaticFolder();
|
|
}
|
|
}
|