namespace Asterisk.NET.Manager.Event
{
///
/// A ShutdownEvent is triggered when the asterisk server is shut down or restarted.
/// It is implemented in asterisk.c
///
public class ShutdownEvent : ConnectionStateEvent
{
private string shutdown;
private bool restart = false;
private string file;
private string func;
private int line;
private int sequencenumber;
///
/// 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.
///
public string Shutdown
{
get { return shutdown; }
set { this.shutdown = value; }
}
///
/// Get/Set true
if the server has been restarted; false
if it has been halted.
///
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)
{
}
}
}