Commit 6f354728 by Carwyn

1.更新插件重命名

parent 77383f7f
...@@ -11,15 +11,6 @@ class FMPSyncerInterface : public FMPBaseInterface ...@@ -11,15 +11,6 @@ class FMPSyncerInterface : public FMPBaseInterface
{ {
public: public:
virtual void Sync() = 0; virtual void Sync() = 0;
//! Base
int SetProperties(const FMPProps &props)
{
Q_UNUSED(props)
return FMP_SUCCESS;
}
}; };
Q_DECLARE_INTERFACE(FMPSyncerInterface, "com.fmp.syncer") Q_DECLARE_INTERFACE(FMPSyncerInterface, "com.fmp.syncer")
......
#include "fmp_synchronizer.h"
#include "fmp_synchronizer_p.h"
#include <ctkPluginContext.h>
#include <QDebug>
FMPSynchronizer::FMPSynchronizer(ctkPluginContext *ctx)
:d_ptr(new FMPSynchronizerPrivate(this))
{
}
#ifndef FMP_SYNCHRONIZER_H
#define FMP_SYNCHRONIZER_H
#include <QObject>
#include "fmp_synchronizer_i.h"
class ctkPluginContext;
class FMPSynchronizerPrivate;
class FMPSynchronizer : public QObject, public FMPSyncInterface
{
Q_OBJECT
Q_INTERFACES(FMPSyncInterface)
Q_DECLARE_PRIVATE(FMPSynchronizer)
public:
explicit FMPSynchronizer(ctkPluginContext *ctx);
//! BaseInterface
int StartService(const FMPProps &props) { return FMP_SUCCESS; }
int StopService() { return FMP_SUCCESS; }
public:
//! SyncInterface
void Sync() {}
private:
FMPSynchronizerPrivate *d_ptr;
};
#endif // FMP_SYNCHRONIZER_H
#ifndef FMP_SYNCHRONIZER_I_H
#define FMP_SYNCHRONIZER_I_H
#include <fmp_base_i.h>
class FMPSyncInterface : public FMPluginInterface
{
public:
virtual void Sync() = 0;
};
Q_DECLARE_INTERFACE(FMPSyncInterface, "fmp.synchronizer")
#endif // FMP_SYNCHRONIZER_I_H
#include "fmp_synchronizer_p.h"
#ifndef FMP_SYNCHRONIZER_P_H
#define FMP_SYNCHRONIZER_P_H
#include "fmp_synchronizer.h"
class FMPSynchronizerPrivate
{
Q_DECLARE_PUBLIC(FMPSynchronizer)
public:
explicit FMPSynchronizerPrivate(FMPSynchronizer *q) : q_ptr(q) {}
public:
FMPSynchronizer *q_ptr;
};
#endif // FMP_SYNCHRONIZER_P_H
/*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=============================================================================*/
#include "fmp_synchronizer_plugin_p.h"
#include "fmp_synchronizer.h"
#include <QtPlugin>
#include <QStringList>
#include <QDebug>
FMPSyncPlugin::FMPSyncPlugin()
: _sync_service(0)
{
}
void FMPSyncPlugin::start(ctkPluginContext* context)
{
_sync_service = new FMPSynchronizer(context);
context->registerService(QStringList("FMPSyncInterface"), _sync_service);
}
void FMPSyncPlugin::stop(ctkPluginContext* context)
{
Q_UNUSED(context)
if (_sync_service)
{
delete _sync_service;
_sync_service = 0;
}
}
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2(fmp_synchronizer, FMPSyncPlugin)
#endif
#ifndef FMP_LOGGER_PLUGIN_P_H
#define FMP_LOGGER_PLUGIN_P_H
#include <ctkPluginActivator.h>
class FMPSynchronizer;
class FMPSyncPlugin : public QObject, public ctkPluginActivator
{
Q_OBJECT
Q_INTERFACES(ctkPluginActivator)
#if (QT_VERSION > QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA(IID "fmp_synchronizer")
#endif
public:
explicit FMPSyncPlugin();
void start(ctkPluginContext* context);
void stop(ctkPluginContext* context);
private:
FMPSynchronizer* _sync_service;
}; // FMPLoggerPlugin
#endif // FMP_LOGGER_PLUGIN_P_H
Plugin-SymbolicName: fmp.synchronizer
Plugin-Version: 0.1.0
Plugin-Name: fmp.synchronizer
Plugin-Copyright: Freemud Ltd. Copyright (C) 2014-2017
Plugin-Vendor: Freemud
<RCC>
<qresource prefix="/fmp.synchronizer/META-INF">
<file>MANIFEST.MF</file>
</qresource>
</RCC>
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by fmproxy_service.rc
// ¶һĬֵ
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
#ifndef _VERSION_H_
#define _VERSION_H_
#define VER_MAJOR 0
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 5
//! Convert version numbers to string
#define _STR(S) #S
#define STR(S) _STR(S)
#define _MAK_VER(maj, min, rev, build) STR(##maj.##min.##rev.##build\0)
#define MAK_VER(maj, min, rev, build) _MAK_VER(maj, min, rev, build)
//! Resource version infomation
#define RES_FILE_VER VER_MAJOR,VER_MINOR,VER_REVISION,VER_BUILD
#define RES_PRODUCT_VER VER_MAJOR,VER_MINOR,VER_REVISION,VER_BUILD
#define RES_STR_FILE_VER MAK_VER(VER_MAJOR, VER_MINOR, VER_REVISION, VER_BUILD)
#define RES_STR_PRODUCT_VER MAK_VER(VER_MAJOR, VER_MINOR, VER_REVISION, VER_BUILD)
#define RES_COMPANY_NAME "上海非码网络科技有限公司\0"
#define RES_COPYRIGHT "Freemud Ltd. Copyright (C) 2014-2017\0"
#define RES_FILE_DESC "fmp.synchronizer\0"
#define RES_INTER_NAME "fmp.synchronizer\0"
#define RES_FILE_NAME "fmp.synchronizer\0"
#define RES_PRODUCT_NAME "fmp.synchronizer\0"
#define RES_FILE_EXT "*\0"
#endif //!_VERSION_H_
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