namespace AsterNET.Manager.Action
{
///
/// The QueuePauseAction makes a queue member temporarily unavailabe (or available again).
/// It is implemented in apps/app_queue.c
/// Available since Asterisk 1.2.
///
public class QueuePauseAction : ManagerAction
{
///
/// Creates a new empty QueuePauseAction.
///
public QueuePauseAction()
{
}
///
/// Creates a new QueuePauseAction that makes the member on the given
/// interface unavailable on all queues.
///
/// the interface of the member to make unavailable
public QueuePauseAction(string iface)
{
this.Interface = iface;
Paused = true;
}
///
/// Creates a new QueuePauseAction that makes the member on the given
/// interface unavailable on the given queue.
///
/// the interface of the member to make unavailable
/// the queue the member is made unvailable on
public QueuePauseAction(string iface, string queue)
{
this.Interface = iface;
this.Queue = queue;
Paused = true;
}
///
/// Creates a new QueuePauseAction that makes the member on the given
/// interface available or unavailable on all queues.
///
/// the interface of the member to make unavailable
/// true to make the member unavailbale, false to make the member available
public QueuePauseAction(string iface, bool paused)
{
this.Interface = iface;
this.Paused = paused;
}
///
/// Creates a new QueuePauseAction that makes the member on the given
/// interface unavailable on the given queue.
///
/// the interface of the member to make unavailable
/// the queue the member is made unvailable on
/// true to make the member unavailbale, false to make the member available
public QueuePauseAction(string iface, string queue, bool paused)
{
this.Interface = iface;
this.Queue = queue;
this.Paused = paused;
}
///
/// Get the name of this action, i.e. "QueuePause".
///
public override string Action
{
get { return "QueuePause"; }
}
///
/// Get/Set the interface of the member to make available or unavailable.
/// This property is mandatory.
///
public string Interface { get; set; }
///
/// Get/Set Returns the name of the queue the member is made available or unavailable on.
///
public string Queue { get; set; }
///
/// Get/Set if the member is made available or unavailable.
/// true to make the member unavailbale,
/// false make the member available
///
public bool Paused { get; set; }
}
}