add_subdirectory(libs)
add_subdirectory(main)
-#add_subdirectory(plugins)
+add_subdirectory(plugins)
--- /dev/null
+add_subdirectory(Test)
--- /dev/null
+# Name of the target
+set(TARGET Test)
+
+# Qt modules
+include(${QT_USE_FILE})
+
+# Include files
+include_directories(${eVaf_INCLUDE})
+
+# Required eVaf libraries
+set(eVaf_LIBRARIES CommonLib PluginsLib)
+
+# Source files
+set(SRCS
+ factory.cpp
+ test.cpp
+)
+
+# Header files for the meta-object compiler
+set(MOC_HDRS
+ factory.h
+ test.h
+)
+
+# Version info resource file for Windows builds
+if(WIN32)
+ set(SRCS ${SRCS} version.rc)
+endif(WIN32)
+
+qt4_wrap_cpp(MOC_SRCS ${MOC_HDRS})
+
+add_library(${TARGET} SHARED ${SRCS} ${MOC_SRCS})
+
+target_link_libraries(${TARGET} ${QT_LIBRARIES} ${eVaf_LIBRARIES})
+
+install(TARGETS ${TARGET} DESTINATION bin)
--- /dev/null
+/**
+ * @file plugins/Test/factory.cpp
+ * @brief eVaf test plugin factory
+ * @author Enar Vaikene
+ *
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#include "factory.h"
+#include "test.h"
+#include "version.h"
+
+#include <Common/iLogger>
+
+#include <QtCore>
+
+using namespace eVaf::Test;
+
+VER_EXPORT_VERSION_INFO()
+Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, Factory)
+
+
+//-------------------------------------------------------------------
+
+Factory::Factory()
+ : Plugins::iPluginFactory()
+ , mTest(0)
+{
+ setObjectName(QString("%1-Factory").arg(VER_MODULE_NAME_STR));
+
+ EVAF_INFO("%s created", qPrintable(objectName()));
+}
+
+Factory::~Factory()
+{
+ if (mTest)
+ delete mTest;
+
+ EVAF_INFO("%s destroyed", qPrintable(objectName()));
+}
+
+QObject * Factory::create(QString const & name)
+{
+ if (name == "Test") {
+ if (mTest == 0)
+ mTest = new Internal::TestPlugin;
+ return mTest;
+ }
+ else
+ return 0;
+}
--- /dev/null
+/**
+ * @file plugins/Test/factory.h
+ * @brief eVaf test plugin factory
+ * @author Enar Vaikene
+ *
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#ifndef __TEST_FACTORY_H
+#define __TEST_FACTORY_H
+
+#include <Plugins/iPluginFactory>
+
+namespace eVaf {
+
+/**
+ * Module for testing the eVaf application framework.
+ */
+namespace Test {
+
+/**
+ * Internal implementation of the test module.
+ */
+namespace Internal {
+ class TestPlugin;
+} // namespace eVaf::Test::Internal
+
+
+/**
+ * Plugin factory class for the test plugin
+ */
+class Factory : public Plugins::iPluginFactory
+{
+ Q_OBJECT
+
+public:
+
+ Factory();
+
+ virtual ~Factory();
+
+ virtual QObject * create(QString const & name);
+
+
+private: // Members
+
+ Internal::TestPlugin * mTest;
+
+};
+
+} // namespace eVaf::Test
+} // namespace eVaf
+
+#endif // factory.h
--- /dev/null
+/**
+ * @file plugins/Test/test.cpp
+ * @brief eVaf test plugin
+ * @author Enar Vaikene
+*
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#include "test.h"
+#include "version.h"
+
+#include <Common/iLogger>
+
+#include <QtCore>
+
+using namespace eVaf;
+using namespace eVaf::Test::Internal;
+
+
+//-------------------------------------------------------------------
+
+TestPlugin::TestPlugin()
+ : Plugins::iPlugin()
+ , mReady(false)
+{
+ setObjectName(QString("%1-TestPlugin").arg(VER_MODULE_NAME_STR));
+
+ EVAF_INFO("%s created", qPrintable(objectName()));
+}
+
+TestPlugin::~TestPlugin()
+{
+ EVAF_INFO("%s destroyed", qPrintable(objectName()));
+}
+
+bool TestPlugin::init(QString const & args)
+{
+ mReady = true;
+
+ EVAF_INFO("%s initialized", qPrintable(objectName()));
+
+ return true;
+}
+
+void TestPlugin::done()
+{
+ mReady = false;
+
+ EVAF_INFO("%s finalized", qPrintable(objectName()));
+}
--- /dev/null
+/**
+ * @file plugins/Test/test.h
+ * @brief eVaf test plugin
+ * @author Enar Vaikene
+*
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#ifndef __TEST_TEST_H
+#define __TEST_TEST_H
+
+#include <Plugins/iPlugin>
+
+#include <QObject>
+#include <QString>
+
+namespace eVaf {
+
+namespace Test {
+namespace Internal {
+
+/**
+ * Test module
+ */
+class TestPlugin : public Plugins::iPlugin
+{
+ Q_OBJECT
+
+public:
+
+ TestPlugin();
+
+ virtual ~TestPlugin();
+
+ virtual bool init(QString const & args);
+
+ virtual void done();
+
+ virtual bool isReady() const { return mReady; }
+
+
+private: // Members
+
+ bool mReady;
+
+};
+
+} // namespace eVaf::Test::Internal
+} // namespace eVaf::Test
+} // namespace eVaf
+
+#endif // test.h
--- /dev/null
+/**
+ * @file plugins/Test/version.h
+ * @brief Version information for eVaf modules
+ * @author Enar Vaikene
+ *
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#ifndef __TEST_VERSION_H
+#define __TEST_VERSION_H
+
+#include <version_rc.h>
+
+/**
+ * Module/library version number in the form major,minor,release,build
+ */
+#define VER_FILE_VERSION 0,1,1,1
+
+/**
+ * Module/library version number in the string format (shall end with \0)
+ */
+#define VER_FILE_VERSION_STR "0.1.1.1\0"
+
+/**
+ * Module/library name (shall end with \0)
+ */
+#define VER_MODULE_NAME_STR "Test\0"
+
+/**
+ * Module type (see version_rc.h for all the types)
+ */
+#define VER_MODULE_TYPE MT_GENERIC
+
+/**
+ * Module type in the string format (see version_rc for all the types)
+ */
+#define VER_MODULE_TYPE_STR MT_GENERIC
+
+/**
+ * Original file name for windows (shall end with \0)
+ */
+#define VER_ORIGINAL_FILE_NAME_STR "Test.dll\0"
+
+/**
+ * Description of the module/library (shall end with \0)
+ */
+#define VER_FILE_DESCRIPTION_STR "Module for testing eVaf application framework.\0"
+
+#endif // version.h
--- /dev/null
+/**
+ * @file plugins/Test/version.rc
+ * @brief Windows resource file with module/library version information.
+ * @author Enar Vaikene
+ *
+ * Copyright (c) 2011 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#include "version.h"
+#include <version_rc.h>
+#include <winver.h>
+
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VER_FILE_VERSION
+ PRODUCTVERSION VER_PRODUCT_VERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+ BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", VER_COMPANY_NAME_STR
+ VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
+ VALUE "FileVersion", VER_FILE_VERSION_STR
+ VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT_STR
+ VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
+ VALUE "ProductName", VER_PRODUCT_NAME_STR
+ VALUE "ProductVersion", VER_PRODUCT_VERSION_STR
+ VALUE "Build Date", VER_PRODUCT_DATE_STR
+ VALUE "Module Name", VER_MODULE_NAME_STR
+ VALUE "Module Type", VER_MODULE_TYPE_STR
+ END
+ END
+ END