Commit 181e0c38 by NitefullWind

1. 加入事件发送和响应代码. 2. Home使用fmp_setting读取配置信息。

parent 36a3b281
...@@ -17,3 +17,10 @@ Level=1 ...@@ -17,3 +17,10 @@ Level=1
[Syncer] [Syncer]
Server=http://www.baidu.com Server=http://www.baidu.com
Timer=10 Timer=10
[Home]
Server=http://115.159.226.87:20001/api/user/login
StoreId=fm99999
PartnerId=1371
;动画开关,0:关闭 1:开启
Animation=1
\ No newline at end of file
#include "fmp_epay_p.h" #include "fmp_epay_p.h"
#include "fmp_pe_handlers.h"
class ctkPluginContext; class ctkPluginContext;
FMPePay::FMPePay(ctkPluginContext *context) FMPePay::FMPePay(ctkPluginContext *context)
: FMPePayInterface(context), : FMPePayInterface(context),
_inited(false), _inited(false),
d_ptr(new FMPePayPrivate) d_ptr(new FMPePayPrivate)
{ {
FMPStartEventHandler *ste_handler = new FMPStartEventHandler(_ctx, this);
} }
int FMPePay::StopService() int FMPePay::StopService()
......
...@@ -9,13 +9,15 @@ TEMPLATE = lib ...@@ -9,13 +9,15 @@ TEMPLATE = lib
SOURCES += \ SOURCES += \
fmp_epay.cpp \ fmp_epay.cpp \
fmp_epay_p.cpp \ fmp_epay_p.cpp \
fmp_epay_plugin.cpp fmp_epay_plugin.cpp \
fmp_pe_handlers.cpp
HEADERS +=\ HEADERS +=\
fmp_epay.h \ fmp_epay.h \
fmp_epay_i.h \ fmp_epay_i.h \
fmp_epay_p.h \ fmp_epay_p.h \
fmp_epay_plugin_p.h fmp_epay_plugin_p.h \
fmp_pe_handlers.h
unix { unix {
target.path = /usr/lib target.path = /usr/lib
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
#include <ctkPluginContext.h> #include <ctkPluginContext.h>
#include <ctkServiceReference.h> #include <ctkServiceReference.h>
#include <QDebug> #include <QDebug>
#include "fmp_pe_handlers.h"
int FMPePayPrivate::StartService() int FMPePayPrivate::StartService()
{ {
qDebug() << "======== ePay init ==========="; qDebug() << "======== ePay init ===========";
Q_Q(FMPePay); Q_Q(FMPePay);
q->_inited = true; q->_inited = true;
return FMP_SUCCESS; return FMP_SUCCESS;
} }
......
#include <fmp_logger_i.h>
#include "fmp_pe_handlers.h"
#include "fmp_epay.h"
FMPStartEventHandler::FMPStartEventHandler(ctkPluginContext *ctx, FMPePay *epay)
: FMPePayEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_ACK_START "/"
+ QString::number(ctx->getPlugin()->getPluginId()), epay),
_ctx(ctx)
{
FMPProps props;
props[ctkEventConstants::EVENT_TOPIC] = _topic;
_ctx->registerService<ctkEventHandler>(this, props);
}
void FMPStartEventHandler::handleEvent(const ctkEvent &event)
{
qDebug() << "=======-------";
if (_epay) {
if (event.getProperty(FMP_PROPKEY_AGREED).toBool()) {
// _epay->UpgradeOldPlugins(event.getProperty(FMP_PROPKEY_PID_LIST).toList());
_epay->Pay();
}
else {
FMP_WARN_CTX(_ctx) << "Refused start request" << event.getTopic();
}
}
else {
FMP_DEBUG_CTX(_ctx) << "No handler instance for event" << event.getTopic();
}
}
#ifndef FMP_MANAGER_EVENT_HANDLERS_H
#define FMP_MANAGER_EVENT_HANDLERS_H
#include <QObject>
#include <service/event/ctkEventConstants.h>
#include <service/event/ctkEventHandler.h>
class FMPePay;
class FMPePayEventHandler : public ctkEventHandler
{
public:
explicit FMPePayEventHandler(const QString &topic, FMPePay *epay) : _epay(epay), _topic(topic) {}
protected:
FMPePay* _epay;
const QString _topic;
};
/**
* 升级事件处理类
* @brief The FMPUpgradeEventHandler class
*/
class FMPStartEventHandler : public QObject, public FMPePayEventHandler
{
Q_OBJECT
Q_INTERFACES(ctkEventHandler)
public:
explicit FMPStartEventHandler(ctkPluginContext *ctx, FMPePay *epay);
void handleEvent(const ctkEvent &event);
private:
ctkPluginContext* _ctx;
};
#endif // FMP_MANAGER_EVENT_HANDLERS_H
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
#include <fmp_logger_i.h>
#include "fmp_he_handlers.h"
#include "fmp_home.h"
FMPStartEventHandler::FMPStartEventHandler(ctkPluginContext *ctx, FMPHome *home)
: FMPHomeEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_REQ_START "/*" , home),
_ctx(ctx)
{
FMPProps props;
props[ctkEventConstants::EVENT_TOPIC] = _topic;
_ctx->registerService<ctkEventHandler>(this, props);
}
void FMPStartEventHandler::handleEvent(const ctkEvent &event)
{
qDebug() << "===========";
if (_home) {
QString ack_topic = event.getTopic();
//! com/fmp/services/REQ_START/id
ack_topic.replace(FMPE_SERVICE_REQ_START, FMPE_SERVICE_ACK_START);
FMPProps props;
props[FMP_PROPKEY_AGREED] = _home->isLogined();
_home->PostEvent(ack_topic, props);
}
else {
FMP_DEBUG_CTX(_ctx) << "No handler instance for event" << event.getTopic();
}
}
#ifndef FMP_MANAGER_EVENT_HANDLERS_H
#define FMP_MANAGER_EVENT_HANDLERS_H
#include <QObject>
#include <service/event/ctkEventConstants.h>
#include <service/event/ctkEventHandler.h>
class FMPHome;
class FMPHomeEventHandler : public ctkEventHandler
{
public:
explicit FMPHomeEventHandler(const QString &topic, FMPHome *home) : _home(home), _topic(topic) {}
protected:
FMPHome* _home;
const QString _topic;
};
class FMPStartEventHandler : public QObject, public FMPHomeEventHandler
{
Q_OBJECT
Q_INTERFACES(ctkEventHandler)
public:
explicit FMPStartEventHandler(ctkPluginContext *ctx, FMPHome *home);
void handleEvent(const ctkEvent &event);
private:
ctkPluginContext* _ctx;
};
#endif // FMP_MANAGER_EVENT_HANDLERS_H
...@@ -28,6 +28,12 @@ int FMPHome::StopService() ...@@ -28,6 +28,12 @@ int FMPHome::StopService()
return d->Uninit(); return d->Uninit();
} }
void FMPHome::StartPlugins(const QVariantList &pids)
{
Q_D(FMPHome);
d->StartPlugins(pids);
}
int FMPHome::login() int FMPHome::login()
{ {
Q_D(FMPHome); Q_D(FMPHome);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
class ctkPluginContext; class ctkPluginContext;
class FMPHomePrivate; class FMPHomePrivate;
class FMPStartEventHandler;
class FMPHome : public QObject, public FMPHomeInterface class FMPHome : public QObject, public FMPHomeInterface
{ {
...@@ -21,9 +22,17 @@ public: ...@@ -21,9 +22,17 @@ public:
int StartService(); int StartService();
int StopService(); int StopService();
void StartPlugins(const QVariantList &pids);
int login();
bool isLogined();
QString userName();
private: private:
FMPHomePrivate *d_ptr; FMPHomePrivate *d_ptr;
bool _inited; bool _inited;
friend class FMPStartEventHandler;
}; };
#endif // FMP_HOME_H #endif // FMP_HOME_H
...@@ -20,7 +20,8 @@ SOURCES +=\ ...@@ -20,7 +20,8 @@ SOURCES +=\
fmp_wnd.cpp \ fmp_wnd.cpp \
fmp_login.cpp \ fmp_login.cpp \
fmp_num_pad.cpp \ fmp_num_pad.cpp \
fmnetwork.cpp fmnetwork.cpp \
fmp_he_handlers.cpp
HEADERS += fmp_home.h \ HEADERS += fmp_home.h \
fmp_home_plugin_p.h \ fmp_home_plugin_p.h \
...@@ -31,7 +32,8 @@ HEADERS += fmp_home.h \ ...@@ -31,7 +32,8 @@ HEADERS += fmp_home.h \
fmp_login.h \ fmp_login.h \
menubutton.h \ menubutton.h \
fmp_num_pad.h \ fmp_num_pad.h \
fmnetwork.h fmnetwork.h \
fmp_he_handlers.h
FORMS += \ FORMS += \
fmp_home_navwindow.ui \ fmp_home_navwindow.ui \
......
...@@ -5,13 +5,15 @@ ...@@ -5,13 +5,15 @@
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QParallelAnimationGroup> #include <QParallelAnimationGroup>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <fmp_settings_i.h>
NavWindow::NavWindow(QWidget *parent) : NavWindow::NavWindow(FMPSettingsInterface *&settings, QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::NavWindow), ui(new Ui::NavWindow),
_btn_group(new QButtonGroup(this)), _btn_group(new QButtonGroup(this)),
_animationShow(new QParallelAnimationGroup(this)), _animationShow(new QParallelAnimationGroup(this)),
PI(3.1415926) PI(3.1415926),
_settings(settings)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->navMainBtn->setMovedItem(this); ui->navMainBtn->setMovedItem(this);
...@@ -21,7 +23,7 @@ NavWindow::NavWindow(QWidget *parent) : ...@@ -21,7 +23,7 @@ NavWindow::NavWindow(QWidget *parent) :
MenuUiProp.distance = 100; MenuUiProp.distance = 100;
MenuUiProp.beginAngle = -(PI*0.45); MenuUiProp.beginAngle = -(PI*0.45);
MenuUiProp.endAngle = (PI*0.45); MenuUiProp.endAngle = (PI*0.45);
isUseAnimation = true; isUseAnimation = _settings->GetBool(FMP_INIKEY_HOMEANIMATION);
setNavStatus(Default); setNavStatus(Default);
......
...@@ -12,6 +12,7 @@ class NavWindow; ...@@ -12,6 +12,7 @@ class NavWindow;
class QButtonGroup; class QButtonGroup;
class QAbstractButton; class QAbstractButton;
class QParallelAnimationGroup; class QParallelAnimationGroup;
class FMPSettingsInterface;
class NavWindow : public QDialog class NavWindow : public QDialog
{ {
...@@ -30,7 +31,7 @@ public: ...@@ -30,7 +31,7 @@ public:
Message Message
}; };
explicit NavWindow(QWidget *parent = 0); explicit NavWindow(FMPSettingsInterface* &settings, QWidget *parent = 0);
~NavWindow(); ~NavWindow();
public slots: public slots:
...@@ -77,6 +78,8 @@ private: ...@@ -77,6 +78,8 @@ private:
}; };
MenuUiProps MenuUiProp; MenuUiProps MenuUiProp;
bool isUseAnimation; bool isUseAnimation;
FMPSettingsInterface *_settings;
}; };
#endif // NAVWINDOW_H #endif // NAVWINDOW_H
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
#include <ctkPluginContext.h> #include <ctkPluginContext.h>
#include <ctkServiceReference.h> #include <ctkServiceReference.h>
#include <QDebug> #include <QDebug>
#include <fmp_epay_i.h>
#include <fmp_settings_i.h>
#include "fmp_login.h" #include "fmp_login.h"
#include "fmp_he_handlers.h"
FMPHomePrivate::FMPHomePrivate(FMPHome *q) FMPHomePrivate::FMPHomePrivate(FMPHome *q)
: q_ptr(q), : q_ptr(q),
_navWindow(new NavWindow),
_isLogined(false), _isLogined(false),
_userName(""), _userName(""),
_errorMsg("") _errorMsg("")
...@@ -22,13 +24,18 @@ FMPHomePrivate::~FMPHomePrivate() ...@@ -22,13 +24,18 @@ FMPHomePrivate::~FMPHomePrivate()
int FMPHomePrivate::Init() int FMPHomePrivate::Init()
{ {
Q_Q(FMPHome);
_settings = q->GetService<FMPSettingsInterface>(q->_ctx);
_navWindow = new NavWindow(_settings);
FMPStartEventHandler* handler = new FMPStartEventHandler(q->_ctx, q);
if(login() != FMP_SUCCESS) { if(login() != FMP_SUCCESS) {
return FMP_FAILURE; return FMP_FAILURE;
} }
_navWindow->show(); _navWindow->show();
connect(_navWindow, SIGNAL(menuBtnClicked(QString)), this, SLOT(onMenuBtnClicked(QString))); connect(_navWindow, SIGNAL(menuBtnClicked(QString)), this, SLOT(onMenuBtnClicked(QString)));
Q_Q(FMPHome);
q->_inited = true; q->_inited = true;
return FMP_SUCCESS; return FMP_SUCCESS;
} }
...@@ -48,9 +55,16 @@ int FMPHomePrivate::Uninit() ...@@ -48,9 +55,16 @@ int FMPHomePrivate::Uninit()
return FMP_SUCCESS; return FMP_SUCCESS;
} }
void FMPHomePrivate::StartPlugins(const QVariantList &pids)
{
qDebug() << pids;
}
int FMPHomePrivate::login() int FMPHomePrivate::login()
{ {
FMPLogin loginWnd; FMPLogin loginWnd(_settings->GetString(FMP_INIKEY_LOGINSERVER),
_settings->GetString(FMP_INIKEY_LOGINSTOREID),
_settings->GetString(FMP_INIKEY_LOGINPARTNERID));
loginWnd.exec(); loginWnd.exec();
if(loginWnd.isLogined()) { if(loginWnd.isLogined()) {
_isLogined = true; _isLogined = true;
...@@ -64,11 +78,13 @@ int FMPHomePrivate::login() ...@@ -64,11 +78,13 @@ int FMPHomePrivate::login()
void FMPHomePrivate::onMenuBtnClicked(QString btnName) void FMPHomePrivate::onMenuBtnClicked(QString btnName)
{ {
qDebug() << "====" << __FUNCTION__ << btnName;
Q_Q(FMPHome); Q_Q(FMPHome);
FMP_DEBUG_CTX(q->_ctx) << "Menu clicked: " << btnName;
if(btnName == "huiyuanshezhi") if(btnName == "payment") {
{ FMPePayInterface *e = q->GetService<FMPePayInterface>(q->_ctx);
FMP_DEBUG_CTX(q->_ctx) << "Menu clicked"; e->StartService();
} else if(btnName == "tool") {
qDebug() << "tool menu";
} }
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
class NavWindow; class NavWindow;
class FMPLogin; class FMPLogin;
class FMPSettingsInterface;
class FMPHomePrivate : public QObject class FMPHomePrivate : public QObject
{ {
...@@ -16,6 +17,7 @@ public: ...@@ -16,6 +17,7 @@ public:
int Init(); int Init();
int Uninit(); int Uninit();
void StartPlugins(const QVariantList &pids);
int login(); int login();
public slots: public slots:
...@@ -30,6 +32,7 @@ public: ...@@ -30,6 +32,7 @@ public:
private: private:
NavWindow *_navWindow; NavWindow *_navWindow;
FMPSettingsInterface *_settings;
}; };
#endif // FMP_HOME_P_H #endif // FMP_HOME_P_H
...@@ -9,12 +9,15 @@ ...@@ -9,12 +9,15 @@
#include "fmnetwork.h" #include "fmnetwork.h"
#include <QDebug> #include <QDebug>
FMPLogin::FMPLogin(QDialog *parent) : FMPLogin::FMPLogin(QString url, QString storeId, QString partnerId, QDialog *parent) :
FMPWnd(parent), FMPWnd(parent),
ui(new Ui::FMPLogin), ui(new Ui::FMPLogin),
_numPad(new FMNumPad), _numPad(new FMNumPad),
_userName(""), _userName(""),
_errorMsg("") _errorMsg(""),
_url(url),
_storeId(storeId),
_partnerId(partnerId)
{ {
ui->setupUi(this); ui->setupUi(this);
connect(_numPad, SIGNAL(digit_confirm()), this, SLOT(on_login_btn_clicked())); connect(_numPad, SIGNAL(digit_confirm()), this, SLOT(on_login_btn_clicked()));
...@@ -48,15 +51,14 @@ void FMPLogin::on_login_btn_clicked() ...@@ -48,15 +51,14 @@ void FMPLogin::on_login_btn_clicked()
bool FMPLogin::login(QString userName, QString password) bool FMPLogin::login(QString userName, QString password)
{ {
_userName = ""; _userName = "";
QString url = "http://115.159.226.87:20001/api/user/login";
QByteArray reqData = tr("{\"StoreId\": \"%1\",\"PartnerId\": \"%2\",\"UserId\": \"%3\",\"Pwd\": \"%4\"}") QByteArray reqData = tr("{\"StoreId\": \"%1\",\"PartnerId\": \"%2\",\"UserId\": \"%3\",\"Pwd\": \"%4\"}")
.arg("fm99999") .arg(_storeId)
.arg("1371") .arg(_partnerId)
.arg(userName) .arg(userName)
.arg(password).toLatin1(); .arg(password).toLatin1();
QByteArray rspData; QByteArray rspData;
FMNetwork net; FMNetwork net;
if(net.post(url, &reqData, &rspData)) { if(net.post(_url, &reqData, &rspData)) {
// 解析返回的数据 // 解析返回的数据
QJsonParseError error; QJsonParseError error;
QJsonDocument json = QJsonDocument::fromJson(rspData, &error); QJsonDocument json = QJsonDocument::fromJson(rspData, &error);
......
...@@ -14,7 +14,7 @@ class FMPLogin : public FMPWnd ...@@ -14,7 +14,7 @@ class FMPLogin : public FMPWnd
Q_OBJECT Q_OBJECT
public: public:
explicit FMPLogin(QDialog *parent = 0); explicit FMPLogin(QString url, QString storeId, QString partnerId, QDialog *parent = 0);
~FMPLogin(); ~FMPLogin();
/** /**
...@@ -41,6 +41,10 @@ private: ...@@ -41,6 +41,10 @@ private:
FMNumPad* _numPad; FMNumPad* _numPad;
QString _userName; QString _userName;
QString _errorMsg; QString _errorMsg;
const QString _url;
const QString _storeId;
const QString _partnerId;
}; };
#endif // FMP_LOGIN_H #endif // FMP_LOGIN_H
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <fmp_logger_i.h> #include <fmp_logger_i.h>
#include <fmp_settings_i.h> #include <fmp_settings_i.h>
#include <fmp_syncer_i.h> #include <fmp_syncer_i.h>
#include <fmp_home_i.h>
FMPluginManager::FMPluginManager() : FMPluginManager::FMPluginManager() :
_ctx(nullptr), _ctx(nullptr),
...@@ -201,7 +200,7 @@ void FMPluginManager::OnPluginsChanged(const QString &path) ...@@ -201,7 +200,7 @@ void FMPluginManager::OnPluginsChanged(const QString &path)
if (!expired_plugins.isEmpty()) { if (!expired_plugins.isEmpty()) {
FMPProps props; FMPProps props;
props[FMP_PROPKEY_PID_LIST] = expired_plugins; props[FMP_PROPKEY_PID_LIST] = expired_plugins;
PostEvent(QString(FMP_TOPICS_SERVICES) + "/" + FMPE_SERVICE_REQ_UPDATE, props); PostEvent(QString(FMP_TOPICS_SERVICES) + FMPE_SERVICE_REQ_UPDATE, props);
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "fmp_manager.h" #include "fmp_manager.h"
FMPUpgradeEventHandler::FMPUpgradeEventHandler(ctkPluginContext *ctx, FMPluginManager *pm) FMPUpgradeEventHandler::FMPUpgradeEventHandler(ctkPluginContext *ctx, FMPluginManager *pm)
: FMPManagerEventHandler(FMP_TOPICS_SERVICES "/" FMPE_SERVICE_REQ_UPDATE, pm), : FMPManagerEventHandler(FMP_TOPICS_SERVICES FMPE_SERVICE_REQ_UPDATE, pm),
_ctx(ctx) _ctx(ctx)
{ {
FMPProps props; FMPProps props;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
...@@ -20,5 +20,9 @@ ...@@ -20,5 +20,9 @@
#define FMP_INIKEY_LOGSIZE "Log/Size" #define FMP_INIKEY_LOGSIZE "Log/Size"
#define FMP_INIKEY_LOGLEVEL "Log/Level" #define FMP_INIKEY_LOGLEVEL "Log/Level"
#define FMP_INIKEY_LOGINSERVER "Home/Server"
#define FMP_INIKEY_LOGINSTOREID "Home/StoreId"
#define FMP_INIKEY_LOGINPARTNERID "Home/PartnerId"
#define FMP_INIKEY_HOMEANIMATION "Home/Animation"
#endif // FMP_SETTINGS_DEF_H #endif // FMP_SETTINGS_DEF_H
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
...@@ -8,13 +8,11 @@ QT -= gui ...@@ -8,13 +8,11 @@ QT -= gui
TEMPLATE = lib TEMPLATE = lib
SOURCES += \ SOURCES += \
fmupdater.cpp \
fmp_syncer.cpp \ fmp_syncer.cpp \
fmp_syncer_p.cpp \ fmp_syncer_p.cpp \
fmp_syncer_plugin.cpp fmp_syncer_plugin.cpp
HEADERS += \ HEADERS += \
fmupdater.h \
fmp_syncer.h \ fmp_syncer.h \
fmp_syncer_i.h \ fmp_syncer_i.h \
fmp_syncer_p.h \ fmp_syncer_p.h \
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 7 #define VER_BUILD 10
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
...@@ -21,7 +21,8 @@ public: ...@@ -21,7 +21,8 @@ public:
int StartService() int StartService()
{ {
QString topic = FMP_TOPICS_SERVICES; QString topic = FMP_TOPICS_SERVICES;
topic += QString::number(_ctx->getPlugin()->getPluginId()) + "/" + FMPE_SERVICE_REQ_START; topic += FMPE_SERVICE_REQ_START;
topic += "/" + QString::number(_ctx->getPlugin()->getPluginId());
return PostEvent(topic); return PostEvent(topic);
} }
......
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