mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2018-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added support for cart notifications to the RDXport service. * Added support for notifications to rdimport(1).
This commit is contained in:
@@ -128,6 +128,23 @@ Xport::Xport(QObject *parent)
|
||||
XmlExit("Invalid User",403,"rdxport.cpp",LINE_NUMBER);
|
||||
}
|
||||
|
||||
//
|
||||
// Connect to ripcd(8)
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),
|
||||
this,SLOT(ripcConnectedData(bool)));
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
}
|
||||
|
||||
|
||||
void Xport::ripcConnectedData(bool state)
|
||||
{
|
||||
if(!state) {
|
||||
XmlExit("unable to connect to ripc service",500,"rdxport.cpp",LINE_NUMBER);
|
||||
Exit(0);
|
||||
}
|
||||
|
||||
//
|
||||
// Read Command Variable and Dispatch
|
||||
//
|
||||
@@ -393,6 +410,16 @@ void Xport::TryCreateTicket(const QString &name)
|
||||
}
|
||||
|
||||
|
||||
void Xport::SendNotification(RDNotification::Type type,
|
||||
RDNotification::Action action,const QVariant &id)
|
||||
{
|
||||
RDNotification *notify=new RDNotification(type,action,id);
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
qApp->processEvents();
|
||||
delete notify;
|
||||
}
|
||||
|
||||
|
||||
void Xport::Exit(int code)
|
||||
{
|
||||
if(xport_post!=NULL) {
|
||||
|
||||
Reference in New Issue
Block a user