mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Alias actions. Adds capability to alert when an alias is active in one of the decoded messages. Alias actions include: beep, play an audio clip, or run a script. Additional actions can easily be added.
This commit is contained in:
@@ -19,9 +19,11 @@ package alias;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import alias.action.AliasAction;
|
||||
import audio.AudioType;
|
||||
|
||||
public class Alias
|
||||
@@ -30,6 +32,7 @@ public class Alias
|
||||
private int mColor;
|
||||
private String mIconName;
|
||||
private ArrayList<AliasID> mAliasIDs = new ArrayList<AliasID>();
|
||||
private List<AliasAction> mAliasActions = new ArrayList<AliasAction>();
|
||||
|
||||
public Alias()
|
||||
{
|
||||
@@ -98,6 +101,31 @@ public class Alias
|
||||
mAliasIDs.remove( id );
|
||||
}
|
||||
|
||||
public List<AliasAction> getAction()
|
||||
{
|
||||
return mAliasActions;
|
||||
}
|
||||
|
||||
public void setAction( List<AliasAction> actions )
|
||||
{
|
||||
mAliasActions = actions;
|
||||
}
|
||||
|
||||
public void addAliasAction( AliasAction action )
|
||||
{
|
||||
mAliasActions.add( action );
|
||||
}
|
||||
|
||||
public void removeAliasAction( AliasAction action )
|
||||
{
|
||||
mAliasActions.remove( action );
|
||||
}
|
||||
|
||||
public boolean hasActions()
|
||||
{
|
||||
return !mAliasActions.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasAudioType()
|
||||
{
|
||||
for( AliasID id: mAliasIDs )
|
||||
|
||||
Reference in New Issue
Block a user