using System.ServiceModel; namespace TGServiceInterface.Components { /// /// Interface for managing the actual BYOND game server /// [ServiceContract] public interface ITGDreamDaemon { /// /// Gets the status of DreamDaemon /// /// The appropriate [OperationContract] DreamDaemonStatus DaemonStatus(); /// /// Returns a human readable string of the current server status /// /// If , the status will include the server's current visibility and security levels /// A human readable of the current server status [OperationContract] string StatusString(bool includeMetaInfo); /// /// Check if a call to will fail. Of course, be aware of race conditions with other interfaces /// /// The error that would occur, otherwise [OperationContract] string CanStart(); /// /// Starts the server if it isn't running /// /// on success or error message on failure [OperationContract] string Start(); /// /// Immediately kills the server /// /// on success or error message on failure [OperationContract] string Stop(); /// /// Immediately kills and restarts the server /// /// on success or error message on failure [OperationContract] string Restart(); /// /// Restart the server after the currently running world reboots. Has no effect if the server isn't running /// [OperationContract] void RequestRestart(); /// /// Stop the server after the currently running world reboots. Has no effect if the server isn't running /// [OperationContract] void RequestStop(); /// /// Get the configured (not necessarily running) security level /// /// The configured (not necessarily running) [OperationContract] DreamDaemonSecurity SecurityLevel(); /// /// Sets the security level of the server. Requires server reboot to apply. Calls . Note that anything higher than Trusted will disable interop from DD /// /// The new security level /// if the change was immediately applied, otherwise and a call to was made [OperationContract] bool SetSecurityLevel(DreamDaemonSecurity level); /// /// Get the configured port. Not necessarily the running port if it has since changed /// /// The configured port [OperationContract] ushort Port(); /// /// Set the port to host DD on. Requires reboot to apply. Calls . /// /// The new port [OperationContract] void SetPort(ushort new_port); /// /// Check if the watchdog will start when the service starts /// /// if autostart is enabled, otherwise [OperationContract] bool Autostart(); /// /// Set the autostart config /// /// to start the watchdog with the service, to disable that functionality [OperationContract] void SetAutostart(bool on); /// /// Check if the BYOND webclient is currently enabled for the server /// /// if the webclient is enabled, otherwise [OperationContract] bool Webclient(); /// /// Set the webclient config. Calls /// /// to enable the byond webclient for the server, otherwise [OperationContract] void SetWebclient(bool on); /// /// Checks if a server stop has been requested /// /// if has been called since the last server start, otherwise [OperationContract] bool ShutdownInProgress(); /// /// Sends a message to everyone on the server /// /// The message to send /// on success, error message on failure [OperationContract] string WorldAnnounce(string msg); /// /// Returns the number of connected players. Requires game to use API version >= 3.1.0.1 /// /// The number of connected players or -1 on error [OperationContract] int PlayerCount(); } }