Files
tgstation-server/TGServiceInterface/Components/Byond.cs
T
Cyberboss 3137be7abb Massive sanity reorganization of project structure
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>
2017-10-20 14:00:09 -04:00

44 lines
1.7 KiB
C#

using System.ServiceModel;
namespace TGServiceInterface.Components
{
/// <summary>
/// For managing the BYOND installation the server runs
/// </summary>
[ServiceContract]
public interface ITGByond
{
/// <summary>
/// Gets the current status of any BYOND updates
/// </summary>
/// <returns>The current status of the byond updater</returns>
[OperationContract]
ByondStatus CurrentStatus();
/// <summary>
/// updates the used byond version to that of version <paramref name="major"/>.<paramref name="minor"/>. The change won't take place until DD reboots. Calls <see cref="ITGDreamDaemon.RequestRestart"/> if blocked by a running DD instance. Runs asyncronously, use <see cref="CurrentStatus"/> to check progress
/// </summary>
/// <param name="major">Major BYOND version. E.g. 511</param>
/// <param name="minor">Minor BYOND version. E.g. 1381</param>
/// <returns><see langword="true"/> if the update started, <see langword="false"/> if another operation was in progress or DreamDaemon is running</returns>
[OperationContract]
bool UpdateToVersion(int major, int minor);
/// <summary>
/// Check the last update error. Checking this will clear the value
/// </summary>
/// <returns>The last update error, if any. <see langword="null"/> otherwise.</returns>
[OperationContract]
string GetError();
/// <summary>
/// Get the currently installed version as a string formatted as Major.Minor
/// </summary>
/// <param name="type">The type of version to retrieve</param>
/// <returns><see langword="null"/> if no version is detected, the version string otherwise</returns>
[OperationContract]
string GetVersion(ByondVersion type);
}
}