mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-05 16:20:14 +01:00
2018-03-25 Fred Gleason <fredg@paravelsystems.com>
* Added support for notifications to rdlogmanager(1).
This commit is contained in:
@@ -338,6 +338,7 @@ void GenerateLog::createData()
|
||||
}
|
||||
}
|
||||
}
|
||||
SendNotification(RDNotification::DeleteAction,log->name());
|
||||
log->removeTracks(rda->station(),rda->user(),rda->config());
|
||||
|
||||
//
|
||||
@@ -376,6 +377,7 @@ void GenerateLog::createData()
|
||||
return;
|
||||
}
|
||||
log->updateTracks();
|
||||
SendNotification(RDNotification::AddAction,log->name());
|
||||
delete log;
|
||||
delete svc;
|
||||
|
||||
@@ -465,6 +467,7 @@ void GenerateLog::musicData()
|
||||
delete svc;
|
||||
return;
|
||||
}
|
||||
SendNotification(RDNotification::ModifyAction,log->name());
|
||||
delete log;
|
||||
delete svc;
|
||||
if(!report.isEmpty()) {
|
||||
@@ -515,6 +518,7 @@ void GenerateLog::trafficData()
|
||||
delete svc;
|
||||
return;
|
||||
}
|
||||
SendNotification(RDNotification::ModifyAction,log->name());
|
||||
delete log;
|
||||
delete svc;
|
||||
if(!report.isEmpty()) {
|
||||
@@ -641,3 +645,13 @@ void GenerateLog::UpdateControls()
|
||||
delete svc;
|
||||
fileScanData();
|
||||
}
|
||||
|
||||
|
||||
void GenerateLog::SendNotification(RDNotification::Action action,
|
||||
const QString &logname)
|
||||
{
|
||||
RDNotification *notify=new RDNotification(RDNotification::LogType,
|
||||
action,QVariant(logname));
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
delete notify;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user