2014-01-08 14:16:39 +00:00
|
|
|
namespace AsterNET.Manager.Action
|
2013-01-18 15:55:50 +00:00
|
|
|
{
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The QueuePauseAction makes a queue member temporarily unavailabe (or available again).<br />
|
2015-01-04 14:26:32 +00:00
|
|
|
/// It is implemented in apps/app_queue.c<br />
|
2015-01-03 15:37:29 +00:00
|
|
|
/// Available since Asterisk 1.2.
|
|
|
|
/// </summary>
|
|
|
|
public class QueuePauseAction : ManagerAction
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new empty QueuePauseAction.
|
|
|
|
/// </summary>
|
|
|
|
public QueuePauseAction()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new QueuePauseAction that makes the member on the given
|
|
|
|
/// interface unavailable on all queues.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="iface">the interface of the member to make unavailable</param>
|
|
|
|
public QueuePauseAction(string iface)
|
|
|
|
{
|
|
|
|
this.Interface = iface;
|
|
|
|
Paused = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new QueuePauseAction that makes the member on the given
|
|
|
|
/// interface unavailable on the given queue.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="iface">the interface of the member to make unavailable</param>
|
|
|
|
/// <param name="queue">the queue the member is made unvailable on</param>
|
|
|
|
public QueuePauseAction(string iface, string queue)
|
|
|
|
{
|
|
|
|
this.Interface = iface;
|
|
|
|
this.Queue = queue;
|
|
|
|
Paused = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new QueuePauseAction that makes the member on the given
|
|
|
|
/// interface available or unavailable on all queues.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="iface">the interface of the member to make unavailable</param>
|
2015-01-04 14:26:32 +00:00
|
|
|
/// <param name="paused">true to make the member unavailbale, false to make the member available</param>
|
2015-01-03 15:37:29 +00:00
|
|
|
public QueuePauseAction(string iface, bool paused)
|
|
|
|
{
|
|
|
|
this.Interface = iface;
|
|
|
|
this.Paused = paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new QueuePauseAction that makes the member on the given
|
|
|
|
/// interface unavailable on the given queue.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="iface">the interface of the member to make unavailable</param>
|
|
|
|
/// <param name="queue">the queue the member is made unvailable on</param>
|
2015-01-04 14:26:32 +00:00
|
|
|
/// <param name="paused">true to make the member unavailbale, false to make the member available</param>
|
2015-01-03 15:37:29 +00:00
|
|
|
public QueuePauseAction(string iface, string queue, bool paused)
|
|
|
|
{
|
|
|
|
this.Interface = iface;
|
|
|
|
this.Queue = queue;
|
|
|
|
this.Paused = paused;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the name of this action, i.e. "QueuePause".
|
|
|
|
/// </summary>
|
|
|
|
public override string Action
|
|
|
|
{
|
|
|
|
get { return "QueuePause"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the interface of the member to make available or unavailable.<br />
|
|
|
|
/// This property is mandatory.
|
|
|
|
/// </summary>
|
|
|
|
public string Interface { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set Returns the name of the queue the member is made available or unavailable on.
|
|
|
|
/// </summary>
|
|
|
|
public string Queue { get; set; }
|
2013-01-18 15:55:50 +00:00
|
|
|
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Get/Set if the member is made available or unavailable.<br />
|
2015-01-04 14:26:32 +00:00
|
|
|
/// true to make the member unavailbale,<br />
|
|
|
|
/// false make the member available
|
2015-01-03 15:37:29 +00:00
|
|
|
/// </summary>
|
|
|
|
public bool Paused { get; set; }
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
}
|