asternet/Asterisk.2013/Asterisk.NET/Manager/Action/GetVarAction.cs

54 lines
1.7 KiB
C#
Raw Normal View History

2014-01-08 14:16:39 +00:00
namespace AsterNET.Manager.Action
{
2015-01-03 15:37:29 +00:00
/// <summary>
/// The GetVarAction queries for a channel variable.
/// </summary>
public class GetVarAction : ManagerAction
{
/// <summary>
/// Creates a new empty GetVarAction.
/// </summary>
public GetVarAction()
{
}
/// <summary>
/// Creates a new GetVarAction that queries for the given global variable.
/// </summary>
/// <param name="variable">the name of the global variable to query.</param>
public GetVarAction(string variable)
{
Variable = variable;
}
2015-01-03 15:37:29 +00:00
/// <summary>
/// Creates a new GetVarAction that queries for the given local channel variable.
/// </summary>
/// <param name="channel">the name of the channel, for example "SIP/1234-9cd".</param>
/// <param name="variable">the name of the variable to query.</param>
public GetVarAction(string channel, string variable)
{
Channel = channel;
Variable = variable;
}
2015-01-03 15:37:29 +00:00
/// <summary>
/// Get the name of this action, i.e. "GetVar".
/// </summary>
public override string Action
{
get { return "GetVar"; }
}
2015-01-03 15:37:29 +00:00
/// <summary>
/// Get/Set the name of the channel, if you query for a local channel variable.
/// Leave empty to query for a global variable.
/// </summary>
public string Channel { get; set; }
2015-01-03 15:37:29 +00:00
/// <summary>
/// Get/Set the name of the variable to query.
/// </summary>
public string Variable { get; set; }
}
}