Now IPC messages are ok.

parent ee97073f
......@@ -45,7 +45,7 @@ void SkyliveAuth::startPlugin()
void SkyliveAuth::receiveMessage(SKMessage::SKMessage msg)
{
std::cout << "SkyliveAuth receive" << msg.handle << std::endl;
std::cout << "SkyliveAuth msg received: " << msg.handle.toStdString() << std::endl;
}
void SkyliveAuth::sendMessage(SKMessage::SKMessage msg)
......
......@@ -40,13 +40,13 @@
void SkyliveProtocol::startPlugin()
{
std::cout << "SkyliveProtocol initialized in thread " << thread() << std::endl;
std::string prova("ANTANI STA PROVA!!");
SKMessage::SKMessage prova("ANTANI STA PROVA!!");
sendMessage(prova);
}
void SkyliveProtocol::receiveMessage(SKMessage::SKMessage msg)
{
std::cout << "SkyliveProtocol receive" << msg.handle << std::endl;
std::cout << "SkyliveProtocol msg received: " << msg.handle.toStdString() << std::endl;
}
void SkyliveProtocol::sendMessage(SKMessage::SKMessage msg)
......
......@@ -35,38 +35,39 @@
#include <QTime>
#include <QHash>
#include <QString>
#include <iostream>
#include "ipcmsg.h"
SKMessage::SKMessage(std::string s, std::string h, QHash<std::string, std::string > p)
SKMessage::SKMessage(QString s, QString h, QHash<QString, QString > p)
{
handle=h;
sender=s;
parameters=p;
time = QTime::currentTime();
std::cout << "SKMessage initialized " << handle << std::endl;
std::cout << "SKMessage initialized " << handle.toStdString() << std::endl;
}
SKMessage::SKMessage(std::string h, QHash<std::string, std::string > p)
SKMessage::SKMessage(QString h, QHash<QString, QString > p)
{
sender= std::string("unknown");
sender= QString("unknown");
time = QTime::currentTime();
parameters = p;
handle = h;
}
SKMessage::SKMessage(std::string h)
SKMessage::SKMessage(QString h)
{
sender= std::string("unknown");
sender= QString("unknown");
handle = h;
time = QTime::currentTime();
}
SKMessage::SKMessage()
{
sender= std::string("unknown");
handle = std::string("none");
sender= QString("unknown");
handle = QString("none");
time = QTime::currentTime();
}
......
......@@ -38,7 +38,7 @@
#include <QTime>
#include <QHash>
#include <iostream>
#include <QString>
/*
* SKMessage
......@@ -54,13 +54,13 @@ class SKMessage
~SKMessage();
QTime time;
std::string sender;
std::string handle;
QHash<std::string, std::string > parameters;
QString sender;
QString handle;
QHash<QString, QString > parameters;
SKMessage(std::string s, std::string h, QHash<std::string, std::string > p);
SKMessage(std::string h, QHash<std::string, std::string > p);
SKMessage(std::string h);
SKMessage(QString s, QString h, QHash<QString, QString > p);
SKMessage(QString h, QHash<QString, QString > p);
SKMessage(QString h);
};
......
......@@ -68,5 +68,5 @@ MainWin::~MainWin()
void MainWin::msgFromCore(SKMessage::SKMessage &msg)
{
std::cout << "Message from core: " << msg.handle << std::endl;
std::cout << "MainWindow msg reveived: " << msg.handle.toStdString() << std::endl;
}
......@@ -55,11 +55,10 @@ void SkyliveX::initialize()
}
// read messages from plugins and dispatch to others
void SkyliveX::process()
{
SKMessage::SKMessage sarca("ANTANI!");
sendMessage(sarca);
//SKMessage::SKMessage sarca("ANTANI!");
//sendMessage(sarca);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment