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:
Fred Gleason
2018-03-21 15:54:50 -04:00
parent e3fb53d0cf
commit 471c6498fd
13 changed files with 96 additions and 3 deletions

View File

@@ -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) {