1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 13:51:47 -05:00

Channel API: new getURI method. Applied to common plugins

This commit is contained in:
f4exb 2020-10-03 04:47:20 +02:00
parent 7d3adee2b0
commit a93a93cec0
27 changed files with 54 additions and 27 deletions

View File

@ -76,7 +76,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = objectName(); } virtual void getTitle(QString& title) { title = objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -70,7 +70,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -69,7 +69,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = objectName(); } virtual void getTitle(QString& title) { title = objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -78,7 +78,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -41,7 +41,8 @@ public:
~DATVDemod(); ~DATVDemod();
virtual void destroy() { delete this; } virtual void destroy() { delete this; }
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = objectName(); } virtual void getTitle(QString& title) { title = objectName(); }
virtual qint64 getCenterFrequency() const { return m_settings.m_centerFrequency; } virtual qint64 getCenterFrequency() const { return m_settings.m_centerFrequency; }

View File

@ -71,7 +71,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -84,7 +84,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -70,7 +70,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -73,7 +73,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -69,7 +69,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -71,7 +71,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = "File Sink"; } virtual void getTitle(QString& title) { title = "File Sink"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }

View File

@ -68,7 +68,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -91,7 +91,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = "Local Sink"; } virtual void getTitle(QString& title) { title = "Local Sink"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }

View File

@ -70,7 +70,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = "Remote Sink"; } virtual void getTitle(QString& title) { title = "Remote Sink"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }

View File

@ -77,7 +77,8 @@ public:
virtual void stop(); virtual void stop();
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -174,7 +174,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return 0; } virtual qint64 getCenterFrequency() const { return 0; }

View File

@ -89,7 +89,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = "Local Sink"; } virtual void getTitle(QString& title) { title = "Local Sink"; }
virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } virtual qint64 getCenterFrequency() const { return m_frequencyOffset; }

View File

@ -181,7 +181,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -253,7 +253,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -185,7 +185,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -181,7 +181,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -102,7 +102,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -183,7 +183,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -181,7 +181,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -164,7 +164,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return 0; } virtual qint64 getCenterFrequency() const { return 0; }

View File

@ -102,7 +102,8 @@ public:
virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples); virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples);
virtual bool handleMessage(const Message& cmd); virtual bool handleMessage(const Message& cmd);
virtual void getIdentifier(QString& id) { id = objectName(); } virtual void getIdentifier(QString& id) { id = m_channelId; }
virtual const QString& getURI() const { return m_channelIdURI; }
virtual void getTitle(QString& title) { title = m_settings.m_title; } virtual void getTitle(QString& title) { title = m_settings.m_title; }
virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; } virtual qint64 getCenterFrequency() const { return m_settings.m_inputFrequencyOffset; }

View File

@ -49,6 +49,7 @@ public:
virtual void destroy() = 0; virtual void destroy() = 0;
virtual void getIdentifier(QString& id) = 0; virtual void getIdentifier(QString& id) = 0;
virtual const QString& getURI() const = 0;
virtual void getTitle(QString& title) = 0; virtual void getTitle(QString& title) = 0;
virtual void setName(const QString& name) { m_name = name; } virtual void setName(const QString& name) { m_name = name; }
virtual const QString& getName() const { return m_name; } virtual const QString& getName() const { return m_name; }