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 />
|
|
|
|
/// 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>
|
2018-07-16 09:05:46 +00:00
|
|
|
/// The name of the interface (tech/name) to pause or unpause.<br />
|
2015-01-03 15:37:29 +00:00
|
|
|
/// This property is mandatory.
|
|
|
|
/// </summary>
|
|
|
|
public string Interface { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
2018-07-16 09:05:46 +00:00
|
|
|
/// The name of the queue in which to pause or unpause this member.<br />
|
|
|
|
/// If null, the member will be paused or unpaused in all the queues it is a member of.
|
2015-01-03 15:37:29 +00:00
|
|
|
/// </summary>
|
|
|
|
public string Queue { get; set; }
|
2013-01-18 15:55:50 +00:00
|
|
|
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
2018-07-16 09:05:46 +00:00
|
|
|
/// Pause or unpause the interface.<br />
|
|
|
|
// Set to 'true' to pause the member or 'false' to unpause.
|
2015-01-03 15:37:29 +00:00
|
|
|
/// </summary>
|
|
|
|
public bool Paused { get; set; }
|
2018-07-16 09:05:46 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Text description, returned in the event QueueMemberPaused.
|
|
|
|
/// </summary>
|
|
|
|
public string Reason { get; set; }
|
2015-01-03 15:37:29 +00:00
|
|
|
}
|
2018-07-16 09:05:46 +00:00
|
|
|
}
|