diff --git a/monitord/plugins/libmplugin_mqtt.cpp b/monitord/plugins/libmplugin_mqtt.cpp new file mode 100644 index 0000000..a6a357e --- /dev/null +++ b/monitord/plugins/libmplugin_mqtt.cpp @@ -0,0 +1,55 @@ +/* + * libmplugin_mqtt.cpp + * + * Created on: 06.01.2017 + * Author: kalle + */ + + +#include "libmplugin_mqtt.h" +#include + +#ifndef DD + #define DD(msg) std::cout << "[" << __FUNCTION__ << "]: " << msg << std::endl +#endif + + + +MonitorPlugInMQTT::MonitorPlugInMQTT() +{ + DD("start"); +} + + +MonitorPlugInMQTT::~MonitorPlugInMQTT() +{ + DD("start"); +} + + +bool MonitorPlugInMQTT::initProcessing(class MonitorConfiguration* configPtr,XMLNode config) +{ + DD("start"); + return true; +} + + +bool MonitorPlugInMQTT::processResult(class ModuleResultBase *pRes) +{ + DD("start"); + return true; +} + + +bool MonitorPlugInMQTT::quitProcessing() +{ + DD("start"); + return true; +} + + +void MonitorPlugInMQTT::Show() +{ + DD("start"); +} + diff --git a/monitord/plugins/libmplugin_mqtt.h b/monitord/plugins/libmplugin_mqtt.h new file mode 100644 index 0000000..254a5ea --- /dev/null +++ b/monitord/plugins/libmplugin_mqtt.h @@ -0,0 +1,67 @@ +/* + * libmplugin_mqtt.h + * + * Created on: 06.01.2017 + * Author: kalle + */ + +#ifndef MONITORD_PLUGINS_LIBMPLUGIN_MQTT_H_ +#define MONITORD_PLUGINS_LIBMPLUGIN_MQTT_H_ + + +#include "mplugin.h" +#include "../MonitorLogging.h" + + + +class MonitorPlugInMQTT : public MonitorPlugIn +{ + public: + /** + * @brief pLugin constructor + */ + MonitorPlugInMQTT(); + + /** + * @brief plugin destructor + */ + virtual ~MonitorPlugInMQTT(); + + // virtual functions + virtual bool initProcessing(class MonitorConfiguration* configPtr,XMLNode config); + virtual bool processResult(class ModuleResultBase *pRes); + virtual bool quitProcessing(); + virtual void Show(); + + + // variables + bool bConnected = false; +}; + + +class MonitorPlugInMQTTFactory : public MonitorPlugInFactory +{ + public: + MonitorPlugInMQTTFactory() + { + } + + ~MonitorPlugInMQTTFactory() + { + } + + virtual MonitorPlugIn * CreatePlugIn() + { + return new MonitorPlugInMQTT() ; + } +}; + + + +DLL_EXPORT void * factory0( void ) +{ + return new MonitorPlugInMQTTFactory; +} + + +#endif /* MONITORD_PLUGINS_LIBMPLUGIN_MQTT_H_ */