Sanely namespaces the project

This commit is contained in:
Cyberboss
2017-11-12 23:48:49 -05:00
parent cc364a75d6
commit 6e54f622de
154 changed files with 2434 additions and 2434 deletions
@@ -0,0 +1,33 @@
using System.ServiceModel;
namespace TGS.Interface.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>
/// 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>
/// 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();
}
}
+43
View File
@@ -0,0 +1,43 @@
using System.ServiceModel;
namespace TGS.Interface.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);
}
}
+41
View File
@@ -0,0 +1,41 @@
using System.Collections.Generic;
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Interface for handling chat bot
/// </summary>
[ServiceContract]
public interface ITGChat
{
/// <summary>
/// Sets a chat provider <paramref name="info"/>
/// </summary>
/// <param name="info">The info to set</param>
[OperationContract]
string SetProviderInfo(ChatSetupInfo info);
/// <summary>
/// Returns <see cref="ChatSetupInfo"/> for all <see cref="ChatProvider"/>s
/// </summary>
/// <returns>A list of all <see cref="ChatSetupInfo"/>s</returns>
[OperationContract]
IList<ChatSetupInfo> ProviderInfos();
/// <summary>
/// Checks connection status
/// </summary>
/// <param name="providerType">The type of provider to check if connected</param>
/// <returns><see langword="true"/> if connected, <see langword="false"/> otherwise</returns>
[OperationContract]
bool Connected(ChatProvider providerType);
/// <summary>
/// Reconnect a specific <paramref name="providerType"/> to it's chat service
/// </summary>
/// <param name="providerType">The type of provider to reconnect</param>
/// <returns><see langword="null"/> on success, error message <see cref="string"/> on failure</returns>
[OperationContract]
string Reconnect(ChatProvider providerType);
}
}
+61
View File
@@ -0,0 +1,61 @@
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// For managing the Game A/B/Live folders, compiling, and hotswapping them
/// </summary>
[ServiceContract]
public interface ITGCompiler
{
/// <summary>
/// Sets up the symlinks for hotswapping game code. This will reset everything in the Game folder. Requires the repository to be set up and locks it once the compilation stage starts. Runs asyncronously from this call
/// </summary>
/// <returns><see langword="true"/> if the operation began, <see langword="false"/> if it could not start</returns>
[OperationContract]
bool Initialize();
/// <summary>
/// Does all the necessary actions to take the revision currently in the repository and compile it to be run on the next server reboot. Requires BYOND to be set up and the <see cref="GetStatus"/> to return <see cref="CompilerStatus.Initialized"/>. Runs asyncronously
/// </summary>
/// <param name="silent">If <see langword="true"/> no message for compilation start will be printed</param>
/// <returns><see langword="true"/> if the operation began, <see langword="false"/> if it could not start</returns>
[OperationContract]
bool Compile(bool silent = false);
/// <summary>
/// Cancels the current compilation
/// </summary>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string Cancel();
/// <summary>
/// Returns the current compiler status
/// </summary>
/// <returns>The current compiler status</returns>
[OperationContract]
CompilerStatus GetStatus();
/// <summary>
/// Returns the error message of the last operation. Reading this will clear the stored value
/// </summary>
/// <returns>the error message of the last operation if it failed or <see langword="null"/> if it succeeded</returns>
[OperationContract]
string CompileError();
/// <summary>
/// Returns the relative path of the dme the compiler will look for without the .dme part
/// </summary>
/// <returns>The relative path of the dme the compiler will look for without the .dme part</returns>
[OperationContract]
string ProjectName();
/// <summary>
/// Sets the relative path of the dme the compiler will look for without the .dme part
/// </summary>
/// <param name="projectName">The relative path of the dme the compiler will look for without the .dme part</param>
[OperationContract]
void SetProjectName(string projectName);
}
}
+57
View File
@@ -0,0 +1,57 @@
using System.Collections.Generic;
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// For modifying the in game config
/// Most if not all of these will not apply until the next server reboot
/// </summary>
[ServiceContract]
public interface ITGConfig
{
/// <summary>
/// Returns the file contents of the specified server directory
/// Subdirectories will be prefixed with '/'
/// </summary>
/// <param name="subpath">Subdirectory to enumerate, enumerates the root directory if null</param>
/// <param name="error">null on success, error message on failure</param>
/// <param name="unauthorized">This will be true if error is set to a message that indicates the current user does not have access to the specified file</param>
/// <returns>A list of files in the enumerated static directory on success, null on failure</returns>
[OperationContract]
IList<string> ListStaticDirectory(string subpath, out string error, out bool unauthorized);
/// <summary>
/// Read from a static file
/// </summary>
/// <param name="staticRelativePath">The path from the Static dir. E.g. config/config.txt</param>
/// <param name="repo">if true, the file will be read from the repository instead of the static dir</param>
/// <param name="error">null on success, error message on failure</param>
/// <param name="unauthorized">This will be true if error is set to a message that indicates the current user does not have access to the specified file</param>
/// <returns>The full text of the file on success, null on failure</returns>
/// <exception cref="CommunicationException">Along with implied disconnect exceptions, if the file exceeds transfer limits</exception>
[OperationContract]
string ReadText(string staticRelativePath, bool repo, out string error, out bool unauthorized);
/// <summary>
/// Write to a static file
/// </summary>
/// <param name="staticRelativePath">The path from the Static dir. E.g. config/config.txt</param>
/// <param name="data">The full text of the config file</param>
/// <param name="unauthorized">This will be true if error is set to a message that indicates the current user does not have access to the specified file</param>
/// <returns>null on success, error message on failure</returns>
/// <exception cref="CommunicationException">Along with implied disconnect exceptions, if the file exceeds transfer limits</exception>
[OperationContract]
string WriteText(string staticRelativePath, string data, out bool unauthorized);
/// <summary>
/// Deletes the target static file
/// </summary>
/// <param name="staticRelativePath">The path from the Static dir. E.g. config/config.txt</param>
/// <param name="unauthorized">This will be true if error is set to a message that indicates the current user does not have access to the specified file</param>
/// <returns>null on success, error message on failure</returns>
[OperationContract]
string DeleteFile(string staticRelativePath, out bool unauthorized);
}
}
+17
View File
@@ -0,0 +1,17 @@
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Used for testing connections to the service without authentication
/// </summary>
[ServiceContract]
public interface ITGConnectivity
{
/// <summary>
/// Does nothing on the server end, but if the call completes, you can be sure you are connected. WCF won't throw until you try until you actually use the API
/// </summary>
[OperationContract]
void VerifyConnection();
}
}
+146
View File
@@ -0,0 +1,146 @@
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Interface for managing the actual BYOND game server
/// </summary>
[ServiceContract]
public interface ITGDreamDaemon
{
/// <summary>
/// Gets the status of DreamDaemon
/// </summary>
/// <returns>The appropriate <see cref="DreamDaemonStatus"/></returns>
[OperationContract]
DreamDaemonStatus DaemonStatus();
/// <summary>
/// Returns a human readable string of the current server status
/// </summary>
/// <param name="includeMetaInfo">If <see langword="true"/>, the status will include the server's current visibility and security levels</param>
/// <returns>A human readable <see cref="string"/> of the current server status</returns>
[OperationContract]
string StatusString(bool includeMetaInfo);
/// <summary>
/// Check if a call to <see cref="Start"/> will fail. Of course, be aware of race conditions with other interfaces
/// </summary>
/// <returns>The error that would occur, <see langword="null"/> otherwise</returns>
[OperationContract]
string CanStart();
/// <summary>
/// Starts the server if it isn't running
/// </summary>
/// <returns><see langword="null"/> on success or error message on failure</returns>
[OperationContract]
string Start();
/// <summary>
/// Immediately kills the server
/// </summary>
/// <returns><see langword="null"/> on success or error message on failure</returns>
[OperationContract]
string Stop();
/// <summary>
/// Immediately kills and restarts the server
/// </summary>
/// <returns><see langword="null"/> on success or error message on failure</returns>
[OperationContract]
string Restart();
/// <summary>
/// Restart the server after the currently running world reboots. Has no effect if the server isn't running
/// </summary>
[OperationContract]
void RequestRestart();
/// <summary>
/// Stop the server after the currently running world reboots. Has no effect if the server isn't running
/// </summary>
[OperationContract]
void RequestStop();
/// <summary>
/// Get the configured (not necessarily running) security level
/// </summary>
/// <returns>The configured (not necessarily running) <see cref="DreamDaemonSecurity"/></returns>
[OperationContract]
DreamDaemonSecurity SecurityLevel();
/// <summary>
/// Sets the security level of the server. Requires server reboot to apply. Calls <see cref="RequestRestart"/>. Note that anything higher than Trusted will disable interop from DD
/// </summary>
/// <param name="level">The new security level</param>
/// <returns><see langword="true"/> if the change was immediately applied, <see langword="false"/> otherwise and a call to <see cref="RequestRestart"/> was made</returns>
[OperationContract]
bool SetSecurityLevel(DreamDaemonSecurity level);
/// <summary>
/// Get the configured port. Not necessarily the running port if it has since changed
/// </summary>
/// <returns>The configured port</returns>
[OperationContract]
ushort Port();
/// <summary>
/// Set the port to host DD on. Requires reboot to apply. Calls <see cref="RequestRestart"/>.
/// </summary>
/// <param name="new_port">The new port</param>
[OperationContract]
void SetPort(ushort new_port);
/// <summary>
/// Check if the watchdog will start when the service starts
/// </summary>
/// <returns><see langword="true"/> if autostart is enabled, <see langword="false"/> otherwise</returns>
[OperationContract]
bool Autostart();
/// <summary>
/// Set the autostart config
/// </summary>
/// <param name="on"><see langword="true"/> to start the watchdog with the service, <see langword="false"/> to disable that functionality</param>
[OperationContract]
void SetAutostart(bool on);
/// <summary>
/// Check if the BYOND webclient is currently enabled for the server
/// </summary>
/// <returns><see langword="true"/> if the webclient is enabled, <see langword="false"/> otherwise</returns>
[OperationContract]
bool Webclient();
/// <summary>
/// Set the webclient config. Calls <see cref="RequestRestart"/>
/// </summary>
/// <param name="on"><see langword="true"/> to enable the byond webclient for the server, <see langword="false"/> otherwise</param>
[OperationContract]
void SetWebclient(bool on);
/// <summary>
/// Checks if a server stop has been requested
/// </summary>
/// <returns><see langword="true"/> if <see cref="RequestStop"/> has been called since the last server start, <see langword="false"/> otherwise</returns>
[OperationContract]
bool ShutdownInProgress();
/// <summary>
/// Sends a message to everyone on the server
/// </summary>
/// <param name="msg">The message to send</param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string WorldAnnounce(string msg);
/// <summary>
/// Returns the number of connected players. Requires game to use API version >= 3.1.0.1
/// </summary>
/// <returns>The number of connected players or -1 on error</returns>
[OperationContract]
int PlayerCount();
}
}
+25
View File
@@ -0,0 +1,25 @@
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Metadata for a server instance
/// </summary>
[ServiceContract]
public interface ITGInstance
{
/// <summary>
/// Return the directory of the server on the host machine
/// </summary>
/// <returns>The path to the directory on success, null on failure</returns>
[OperationContract]
string ServerDirectory();
/// <summary>
/// Retrieve's the service's version
/// </summary>
/// <returns>The service's version</returns>
[OperationContract]
string Version();
}
}
@@ -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);
}
}
+19
View File
@@ -0,0 +1,19 @@
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Used by DreamDaemon to access the interop API with call()(). Restrictions are in place so that only a DreamDaemon instance launched by the service can use this API
/// </summary>
[ServiceContract]
public interface ITGInterop
{
/// <summary>
/// Called from /world/ExportService(command)
/// </summary>
/// <param name="command">The command to run</param>
/// <returns><see langword="true"/> on success, <see langword="false"/> on failure</returns>
[OperationContract]
bool InteropMessage(string command);
}
}
+26
View File
@@ -0,0 +1,26 @@
using System.Collections.Generic;
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Used for general authentication and listing <see cref="ITGInstance"/>s
/// </summary>
[ServiceContract]
public interface ITGLanding
{
/// <summary>
/// Retrieve's the service's version
/// </summary>
/// <returns>The service's version</returns>
[OperationContract]
string Version();
/// <summary>
/// List instances that the caller can access
/// </summary>
/// <returns>A <see cref="IDictionary{TKey, TValue}"/> of instance names relating to their paths</returns>
[OperationContract]
IList<InstanceMetadata> ListInstances();
}
}
+194
View File
@@ -0,0 +1,194 @@
using System.Collections.Generic;
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Interface for managing the code repository
/// </summary>
[ServiceContract]
public interface ITGRepository
{
/// <summary>
/// If the repo is currently undergoing an operation
/// </summary>
/// <returns><see langword="true"/> if the repo is busy, <see langword="false"/> otherwise</returns>
[OperationContract]
bool OperationInProgress();
/// <summary>
/// Gets the progress of repository operations, not all operations are supported
/// </summary>
/// <returns>A value between 0 and 100 inclusive representing the progress of the current operation or -1 if the operation cannot be monitored</returns>
[OperationContract]
int CheckoutProgress();
/// <summary>
/// Check if the repository is valid, if not <see cref="Setup(string, string)"/> must be called
/// </summary>
/// <returns><see langword="true"/> if the repository is valid, <see langword="false"/> otherwise</returns>
[OperationContract]
bool Exists();
/// <summary>
/// Deletes whatever may be left over and clones the repo at <paramref name="remote"/> and checks out <paramref name="branch"/>. Will move config and data dirs to a backup location if they exist. Runs asyncronously
/// </summary>
/// <param name="remote">The address of the repo to clone. If ssh protocol is used, private_key.txt and public_key.txt must exist in the server RepoKey directory.</param>
/// <param name="branch">The branch of the repo to checkout</param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string Setup(string remote, string branch = "master");
/// <summary>
/// Gets the sha of the current HEAD
/// </summary>
/// <param name="useTracked">If set to true and HEAD is currently a branch, will instead return the sha of the tracked remote branch if it exists</param>
/// <param name="error"><see langword="null"/> on success, error message on failure</param>
/// <returns>The sha of the current HEAD on success, <see langword="null"/> on failure</returns>
[OperationContract]
string GetHead(bool useTracked, out string error);
/// <summary>
/// Gets the name of the current branch
/// </summary>
/// <param name="error"><see langword="null"/> on success, error message on failure</param>
/// <returns>The name of the current branch on success, <see langword="null"/> on failure</returns>
[OperationContract]
string GetBranch(out string error);
/// <summary>
/// Gets the url of the current origin
/// </summary>
/// <param name="error"><see langword="null"/> on success, error message on failure</param>
/// <returns>The url of the current origin on success, <see langword="null"/> on failure</returns>
[OperationContract]
string GetRemote(out string error);
/// <summary>
/// Hard checks out the passed object name
/// </summary>
/// <param name="objectName">The branch, commit, or tag to checkout</param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string Checkout(string objectName);
/// <summary>
/// Fetches the origin and merges it into the current branch
/// </summary>
/// <param name="reset">If <see langword="true"/>, the operation will perform a hard reset instead of a merge</param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string Update(bool reset);
/// <summary>
/// Runs git reset --hard
/// </summary>
/// <param name="tracked">Changes command to git reset --hard origin/branch_name if <see langword="true"/></param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string Reset(bool tracked);
/// <summary>
/// Merges the target pull request into the current branch if the remote is a github repository
/// </summary>
/// <param name="PRnumber">The github pull request number in the remote repository</param>
/// <param name="atSHA">The SHA of the pull request to merge</param>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string MergePullRequest(int PRnumber, string atSHA = null);
/// <summary>
/// Get the currently merged pull requests. Note that switching branches will delete this list and switching back won't restore it
/// </summary>
/// <param name="error"><see langword="null"/> on success, error message on failure</param>
/// <returns>A <see cref="IList{T}"/> of <see cref="PullRequestInfo"/></returns>
[OperationContract]
List<PullRequestInfo> MergedPullRequests(out string error);
/// <summary>
/// Gets the name of the configured git committer
/// </summary>
/// <returns>The name of the configured git committer</returns>
[OperationContract]
string GetCommitterName();
/// <summary>
/// Sets the name of the configured git committer
/// </summary>
/// <param name="newName">The name to set</param>
[OperationContract]
void SetCommitterName(string newName);
/// <summary>
/// Gets the email of the configured git committer
/// </summary>
/// <returns>The email of the configured git committer</returns>
[OperationContract]
string GetCommitterEmail();
/// <summary>
/// Sets the email of the configured git committer
/// </summary>
/// <param name="newEmail">The email to set</param>
[OperationContract]
void SetCommitterEmail(string newEmail);
/// <summary>
/// Updates the html changelog
/// </summary>
/// <param name="error"><see langword="null"/> on success, error on failure</param>
/// <returns>The output of the python script</returns>
[OperationContract]
string GenerateChangelog(out string error);
/// <summary>
/// Pushes the paths listed in TGS3.json to the currentl git remote. No other commit differences may exist for this function to succeed
/// </summary>
/// <returns><see langword="null"/> on success, error on failure</returns>
[OperationContract]
string SynchronizePush();
/// <summary>
/// List the tagged commits of the repo at which compiles took place
/// </summary>
/// <param name="error"><see langword="null"/> on success, error message on failure</param>
/// <returns>A <see cref="IDictionary{TKey, TValue}"/> of tag name -> commit on success, <see langword="null"/> on failure</returns>
[OperationContract]
IDictionary<string, string> ListBackups(out string error);
/// <summary>
/// Updates the cached TGS3.json to the repo's version. Compiles will not succeed if these two to not match
/// </summary>
/// <returns><see langword="null"/> on success, error message on failure</returns>
[OperationContract]
string UpdateTGS3Json();
/// <summary>
/// (De)Activate and set the interval for the automatic server updater
/// </summary>
/// <param name="newInterval">Interval to check for updates in minutes, disables if 0</param>
[OperationContract]
void SetAutoUpdateInterval(ulong newInterval);
/// <summary>
/// Get the current autoupdate interval
/// </summary>
/// <returns>The current auto update interval or 0 if it's disabled</returns>
[OperationContract]
ulong AutoUpdateInterval();
/// <summary>
/// Check if we push a temporary branch to the remote when we make testmerge commits
/// </summary>
/// <returns><see langword="true"/> if we publish testmerge commits to the remote, <see langword="false"/> otherwise</returns>
[OperationContract]
bool PushTestmergeCommits();
/// <summary>
/// Set if we push a temporary branch to the remote when we make testmerge commits
/// </summary>
/// <param name="newValue"><see langword="true"/> if we testmerge commits should be published to the remote, <see langword="false"/> otherwise</param>
[OperationContract]
void SetPushTestmergeCommits(bool newValue);
}
}
+57
View File
@@ -0,0 +1,57 @@
using System.Collections.Generic;
using System.ServiceModel;
namespace TGS.Interface.Components
{
/// <summary>
/// Interface for managing the service
/// </summary>
[ServiceContract]
public interface ITGSService
{
/// <summary>
/// Next stop of the service will not close DD and sets a flag for it to reattach once it restarts
/// </summary>
[OperationContract]
void PrepareForUpdate();
/// <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>null on success, error message on failure</returns>
[OperationContract]
string SetRemoteAccessPort(ushort port);
/// <summary>
/// Retrieve's the service's version
/// </summary>
/// <returns>The service's version</returns>
[OperationContract]
string Version();
/// <summary>
/// Sets the path to the python 2.7 installation
/// </summary>
/// <param name="path">The new path</param>
/// <returns><see langword="true"/> if the path exists, <see langword="false"/> otherwise</returns>
[OperationContract]
bool SetPythonPath(string path);
/// <summary>
/// Gets the path to the python 2.7 installation
/// </summary>
/// <returns>The path to the python 2.7 installation</returns>
[OperationContract]
string PythonPath();
}
}