mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-01 14:20:11 +01:00
2022-10-30 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdcatch(1) to use the notification mechanism instead of the 'PurgeEvent' command. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -23577,3 +23577,6 @@
|
||||
2022-10-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in rdcatch(1) that caused status indication
|
||||
to break for record events.
|
||||
2022-10-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored rdcatch(1) to use the notification mechanism instead of
|
||||
the 'PurgeEvent' command.
|
||||
|
||||
@@ -578,40 +578,6 @@
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="sect.rdcatch_purge_event">
|
||||
<title>Purge Event Operation</title>
|
||||
<para>
|
||||
Emitted by <command>rdcatch</command><manvolnum>1</manvolnum> to
|
||||
report purging of a one-shot event.
|
||||
</para>
|
||||
<table xml:id="table.rdcatch_purge_event" frame="all" pgwide="0">
|
||||
<title>RDCatch Event Request Fields</title>
|
||||
<tgroup cols="2" align="left" colsep="1" rowsep="1">
|
||||
<colspec colname="Field" colwidth="2.0*"/>
|
||||
<colspec colname="Value" colwidth="2.0*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Field</entry>
|
||||
<entry>Value</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Hostname</entry>
|
||||
<entry>String, from STATIONS.NAME</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Operation</entry>
|
||||
<entry>Integer. 4 [RDCatchEvent::PurgeEventOp]</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Event ID</entry>
|
||||
<entry>
|
||||
Unsigned Integer, from RECORDINGS.ID.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -216,19 +216,6 @@ bool RDCatchEvent::read(const QString &str)
|
||||
}
|
||||
}
|
||||
|
||||
if(ok&&(op==RDCatchEvent::PurgeEventOp)) {
|
||||
if(f0.size()!=4) {
|
||||
return false;
|
||||
}
|
||||
unsigned id=f0.at(3).toUInt(&ok);
|
||||
if(ok) {
|
||||
d_operation=op;
|
||||
d_host_name=f0.at(1);
|
||||
d_event_id=id;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -261,10 +248,6 @@ QString RDCatchEvent::write() const
|
||||
ret+=QString::asprintf(" %d",d_cut_number);
|
||||
break;
|
||||
|
||||
case RDCatchEvent::PurgeEventOp:
|
||||
ret+=QString::asprintf(" %u",d_event_id);
|
||||
break;
|
||||
|
||||
case RDCatchEvent::DeckStatusQueryOp:
|
||||
case RDCatchEvent::NullOp:
|
||||
case RDCatchEvent::LastOp:
|
||||
@@ -307,11 +290,6 @@ QString RDCatchEvent::dump() const
|
||||
ret+=QString::asprintf("cut number: %d\n",d_cut_number);
|
||||
break;
|
||||
|
||||
case RDCatchEvent::PurgeEventOp:
|
||||
ret+="operation: RDCatchEvent::PurgeEventOpOp\n";
|
||||
ret+=QString::asprintf("event id: %u\n",d_event_id);
|
||||
break;
|
||||
|
||||
case RDCatchEvent::NullOp:
|
||||
case RDCatchEvent::LastOp:
|
||||
break;
|
||||
|
||||
@@ -31,7 +31,7 @@ class RDCatchEvent
|
||||
public:
|
||||
enum Operation {NullOp=0,DeckEventProcessedOp=1,
|
||||
DeckStatusQueryOp=2,DeckStatusResponseOp=3,
|
||||
PurgeEventOp=4,LastOp=5};
|
||||
LastOp=5};
|
||||
RDCatchEvent(RDDeck::Status status);
|
||||
RDCatchEvent();
|
||||
Operation operation() const;
|
||||
|
||||
@@ -805,10 +805,6 @@ void MainWidget::catchEventReceivedData(RDCatchEvent *evt)
|
||||
// printf("%s\n",evt->dump().toUtf8().constData());
|
||||
|
||||
switch(evt->operation()) {
|
||||
case RDCatchEvent::PurgeEventOp:
|
||||
catch_recordings_model->removeRecord(evt->eventId());
|
||||
break;
|
||||
|
||||
case RDCatchEvent::DeckStatusResponseOp:
|
||||
if(evt->eventId()>0) {
|
||||
if(!catch_recordings_model->refresh(evt->eventId())) {
|
||||
|
||||
@@ -477,7 +477,6 @@ void MainObject::catchEventReceivedData(RDCatchEvent *evt)
|
||||
|
||||
case RDCatchEvent::DeckEventProcessedOp:
|
||||
case RDCatchEvent::DeckStatusResponseOp:
|
||||
case RDCatchEvent::PurgeEventOp:
|
||||
case RDCatchEvent::NullOp:
|
||||
case RDCatchEvent::LastOp:
|
||||
break;
|
||||
@@ -2447,11 +2446,11 @@ void MainObject::PurgeEvent(int event)
|
||||
catch_events[event].id());
|
||||
RDSqlQuery::apply(sql);
|
||||
|
||||
RDCatchEvent *evt=new RDCatchEvent();
|
||||
evt->setOperation(RDCatchEvent::PurgeEventOp);
|
||||
evt->setEventId(catch_events[event].id());
|
||||
rda->ripc()->sendCatchEvent(evt);
|
||||
delete evt;
|
||||
RDNotification *notify=new RDNotification(RDNotification::CatchEventType,
|
||||
RDNotification::DeleteAction,
|
||||
catch_events[event].id());
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
delete notify;
|
||||
|
||||
switch(catch_events[event].type()) {
|
||||
case RDRecording::Recording:
|
||||
|
||||
Reference in New Issue
Block a user