2014-01-08 14:16:39 +00:00
|
|
|
namespace AsterNET.Manager.Event
|
2013-01-18 15:55:50 +00:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// A ShutdownEvent is triggered when the asterisk server is shut down or restarted.<br/>
|
2015-01-04 14:26:32 +00:00
|
|
|
/// It is implemented in asterisk.c
|
2013-01-18 15:55:50 +00:00
|
|
|
/// </summary>
|
|
|
|
public class ShutdownEvent : ConnectionStateEvent
|
|
|
|
{
|
|
|
|
private string shutdown;
|
|
|
|
private bool restart = false;
|
|
|
|
private string file;
|
|
|
|
private string func;
|
|
|
|
private int line;
|
|
|
|
private int sequencenumber;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the kind of shutdown or restart. Possible values are "Uncleanly" and "Cleanly". A
|
|
|
|
/// shutdown is considered unclean if there are any active channels when the system is shut down.
|
|
|
|
/// </summary>
|
|
|
|
public string Shutdown
|
|
|
|
{
|
|
|
|
get { return shutdown; }
|
|
|
|
set { this.shutdown = value; }
|
|
|
|
}
|
|
|
|
/// <summary>
|
2015-01-04 14:26:32 +00:00
|
|
|
/// Get/Set true if the server has been restarted; false if it has been halted.
|
2013-01-18 15:55:50 +00:00
|
|
|
/// </summary>
|
|
|
|
public bool Restart
|
|
|
|
{
|
|
|
|
get { return restart; }
|
|
|
|
set { this.restart = value; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public string File
|
|
|
|
{
|
|
|
|
get { return file; }
|
|
|
|
set { file = value; }
|
|
|
|
}
|
|
|
|
public string Func
|
|
|
|
{
|
|
|
|
get { return func; }
|
|
|
|
set { func = value; }
|
|
|
|
}
|
|
|
|
public int Line
|
|
|
|
{
|
|
|
|
get { return line; }
|
|
|
|
set { line = value; }
|
|
|
|
}
|
|
|
|
public int SequenceNumber
|
|
|
|
{
|
|
|
|
get { return sequencenumber; }
|
|
|
|
set { sequencenumber = value; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public ShutdownEvent(ManagerConnection source)
|
|
|
|
: base(source)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|