mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
NOTE: only the gui components and settings handling have been implemented. Actual recording playback is not yet implemented. Partial checkin of initial P25 decoder development. NOTE: P25 decoder is not yet functional.
88 lines
1.4 KiB
Java
88 lines
1.4 KiB
Java
package source.recording;
|
|
|
|
import java.io.File;
|
|
|
|
import javax.xml.bind.annotation.XmlAttribute;
|
|
import javax.xml.bind.annotation.XmlTransient;
|
|
|
|
public class RecordingConfiguration
|
|
{
|
|
private File mRecording;
|
|
private String mFilePath;
|
|
private String mAlias;
|
|
private long mCenterFrequency;
|
|
|
|
public RecordingConfiguration()
|
|
{
|
|
mAlias = "New Recording";
|
|
}
|
|
|
|
public RecordingConfiguration( String filePath,
|
|
String alias,
|
|
long centerFrequency )
|
|
{
|
|
mFilePath = filePath;
|
|
mAlias = alias;
|
|
mCenterFrequency = centerFrequency;
|
|
|
|
updateFile();
|
|
}
|
|
|
|
private void updateFile()
|
|
{
|
|
if( mFilePath != null )
|
|
{
|
|
try
|
|
{
|
|
mRecording = new File( mFilePath );
|
|
}
|
|
catch( Exception e )
|
|
{
|
|
throw new IllegalArgumentException( "There was an error while "
|
|
+ "accessing the recording source [" + mFilePath + "]", e );
|
|
}
|
|
}
|
|
}
|
|
|
|
@XmlTransient
|
|
public File getRecording()
|
|
{
|
|
return mRecording;
|
|
}
|
|
|
|
@XmlAttribute( name = "file_path" )
|
|
public String getFilePath()
|
|
{
|
|
return mFilePath;
|
|
}
|
|
|
|
public void setFilePath( String filePath )
|
|
{
|
|
mFilePath = filePath;
|
|
|
|
updateFile();
|
|
}
|
|
|
|
@XmlAttribute( name = "alias" )
|
|
public String getAlias()
|
|
{
|
|
return mAlias;
|
|
}
|
|
|
|
public void setAlias( String alias )
|
|
{
|
|
mAlias = alias;
|
|
}
|
|
|
|
@XmlAttribute( name = "center_frequency" )
|
|
public long getCenterFrequency()
|
|
{
|
|
return mCenterFrequency;
|
|
}
|
|
|
|
public void setCenterFrequency( long frequency )
|
|
{
|
|
mCenterFrequency = frequency;
|
|
}
|
|
}
|