using System;
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
{
private string iface;
private bool paused;
private string queue;
///
/// Get the name of this action, i.e. "QueuePause".
///
override public 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 { return this.iface; }
set { this.iface = value; }
}
///
/// Get/Set Returns the name of the queue the member is made available or unavailable on.
///
public string Queue
{
get { return this.queue; }
set { this.queue = value; }
}
///
/// 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 { return this.paused; }
set { this.paused = value; }
}
///
/// 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.iface = iface;
this.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.iface = iface;
this.queue = queue;
this.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.iface = 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.iface = iface;
this.queue = queue;
this.paused = paused;
}
}
}