using System.ServiceModel; namespace TGServiceInterface { /// /// The status of the compiler /// public enum TGCompilerStatus { /// /// Game folder is broken or does not exist /// Uninitialized, /// /// Game folder is being created /// Initializing, /// /// Game folder is setup, does not imply the dmb is compiled /// Initialized, /// /// Game is being compiled /// Compiling, } /// /// For managing the Game A/B/Live folders, compiling, and hotswapping them /// [ServiceContract] public interface ITGCompiler { /// /// Sets up the symlinks for hotswapping game code /// this will reset everything (except the static directories) /// this will not reset the static directories /// requires the repository to be set up and locks it for the duration of the operation /// does not compile the game /// runs asyncronously /// /// true if the operation began, false if it could not start [OperationContract] bool Initialize(); /// /// 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 compiler to be initialized /// runs asyncronously /// /// If true no message for compilation start will be printed /// true if the operation began, false if it could not start [OperationContract] bool Compile(bool silent = false); /// /// Cancels the current compilation /// /// null on success, error message on failure [OperationContract] string Cancel(); /// /// Returns the current compiler status /// /// The current compiler status [OperationContract] TGCompilerStatus GetStatus(); /// /// Returns the error message of the last operation /// Reading this will clear the stored value /// /// the error message of the last operation if it failed or null if it succeeded [OperationContract] string CompileError(); /// /// Returns the relative path of the dme the compiler will look for without the .dme part /// /// The relative path of the dme the compiler will look for without the .dme part [OperationContract] string ProjectName(); /// /// Sets the relative path of the dme the compiler will look for without the .dme part /// /// The relative path of the dme the compiler will look for without the .dme part [OperationContract] void SetProjectName(string projectName); } }