39 lines
1.9 KiB
C#
39 lines
1.9 KiB
C#
namespace MelonVPNCore
|
|
{
|
|
public static class Messages
|
|
{
|
|
public static string EOF = "<EOF>";
|
|
public static string Code = "80d168e76f6bd40efe897881f35bcd895459e42a";
|
|
public static string StatusMsg = "STATUS::" + Code + EOF;
|
|
public static string OnlineMsg = "ONLINE::" + Code + EOF;
|
|
public static string OfflineMsg = "OFFLINE::" + Code + EOF;
|
|
public static string StartMsg = "START::" + Code + EOF;
|
|
public static string StopMsg = "STOP::" + Code + EOF;
|
|
public static string ErrorMsg = "ERROR::" + Code + EOF;
|
|
public static string ClientListStartMsg = "CLIENTLIST::" + Code + "::";
|
|
public static string ClientListEmptyMsg = ClientListStartMsg + "[]" + EOF;
|
|
public static string StartingMsg = "STARTING::" + Code + EOF;
|
|
public static string RestartingMsg = "RESTARTING::" + Code + EOF;
|
|
public static string RestartOnMsg = "RESTART::ON::" + Code + EOF;
|
|
public static string RestartOffMsg = "RESTART::OFF::" + Code + EOF;
|
|
|
|
public static string GetMessage(DataMessage a)
|
|
{
|
|
if (a == DataMessage.Status) return StatusMsg;
|
|
if (a == DataMessage.Online) return OnlineMsg;
|
|
if (a == DataMessage.Offline) return OfflineMsg;
|
|
if (a == DataMessage.Start) return StartMsg;
|
|
if (a == DataMessage.Stop) return StopMsg;
|
|
if (a == DataMessage.Error) return ErrorMsg;
|
|
if (a == DataMessage.Starting) return StartingMsg;
|
|
if (a == DataMessage.Restarting) return RestartingMsg;
|
|
if (a == DataMessage.RestartOn) return RestartOnMsg;
|
|
if (a == DataMessage.RestartOff) return RestartOffMsg;
|
|
if (a == DataMessage.Blank) return EOF;
|
|
return EOF;
|
|
}
|
|
|
|
public static string GetClientListMessage(string a) => ClientListStartMsg + a + EOF;
|
|
}
|
|
}
|