[submodule "taurus"]
path = taurus
url = ../taurus
+[submodule "hidapi"]
+ path = hidapi
+ url = https://github.com/signal11/hidapi.git
--- /dev/null
+Subproject commit 1a42177fa5f3beddb8805cb676d50acbc5e8ed01
--- /dev/null
+//
+// C++ Implementation: Barcode Plugin Basics
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2013
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+#include "bcs-plugin.h"
+
+MHidBarcodePlugin::~MHidBarcodePlugin()
+{
+
+}
+
+
+void MHidBarcodePlugin::configure(MBarcodeConfiguration* )
+{
+
+}
+
+QStringList MHidBarcodePlugin::findScanners()
+{
+ return QStringList();
+}
--- /dev/null
+//
+// C++ Interface: plugin base for barcode scanners
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2013
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+#ifndef MAGICSMOKE_BARCODE_PLUGIN_HID_H
+#define MAGICSMOKE_BARCODE_PLUGIN_HID_H
+
+#include "barcode-plugin.h"
+
+class MHidBarcodePlugin:public QObject,public MBarcodePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID MBarcodePlugin_IID)
+ Q_INTERFACES(MBarcodePlugin)
+ public:
+ virtual ~MHidBarcodePlugin();
+ virtual QStringList findScanners() override;
+ virtual void configure(MBarcodeConfiguration*)override;
+
+};
+
+#endif
--- /dev/null
+TEMPLATE = lib
+TARGET = msp-bcscanner
+CONFIG += plugin
+
+include (../../basics.pri)
+include (../../src/smoke.pri)
+include (hidapi.pri)
+
+SOURCES += bcs-plugin.cpp
+HEADERS += bcs-plugin.h
--- /dev/null
+#HIDAPI settings
+
+HIDAPIDIR = $$PWD/../../hidapi
+
+INCLUDEPATH += $$HIDAPIDIR/hidapi
+
+linux {
+ SOURCES += $$HIDAPIDIR/libusb/hid.c
+ CONFIG += link_pkgconfig
+ PKGCONFIG += libusb-1.0
+}
+win32 {
+ SOURCES += $$HIDAPIDIR/windows/hid.c
+ LIBS += -lsetupapi
+}
+mac {
+ SOURCES += $$HIDAPIDIR/mac
+ #from mac/Makefile-manual, not sure how to use this:
+ #LIBS += -framework IOKit -framework CoreFoundation
+}
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS = bcscanner
\ No newline at end of file
--- /dev/null
+//
+// C++ Implementation: Barcode Plugin Basics
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2013
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+#include "barcode-plugin.h"
+
+MBarcodeConfiguration::MBarcodeConfiguration(QWidget* parent): QDialog(parent)
+{
+
+}
+
+void MBarcodeConfiguration::addTab(QWidget* , QString )
+{
+
+}
--- /dev/null
+//
+// C++ Interface: plugin base for barcode scanners
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2013
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+#ifndef MAGICSMOKE_BARCODE_PLUGIN_H
+#define MAGICSMOKE_BARCODE_PLUGIN_H
+
+#ifdef MAGICSMOKE_LIB_BUILD
+#define MAGICSMOKE_EXPORT Q_DECL_EXPORT
+#else
+#define MAGICSMOKE_EXPORT Q_DECL_IMPORT
+#endif
+
+#include <QtPlugin>
+#include <QStringList>
+#include <QDialog>
+
+class QTabWidget;
+
+class MAGICSMOKE_EXPORT MBarcodeConfiguration:public QDialog
+{
+ Q_OBJECT
+ public:
+ MBarcodeConfiguration(QWidget*parent);
+
+ public slots:
+ void addTab(QWidget*,QString);
+ private:
+ QTabWidget*mtab;
+};
+
+class MAGICSMOKE_EXPORT MBarcodePlugin
+{
+ public:
+ virtual ~MBarcodePlugin(){}
+
+ virtual QStringList findScanners()=0;
+ virtual void configure(MBarcodeConfiguration*)=0;
+};
+
+#define MBarcodePlugin_IID "de.silmor.MagicSmoke.BarcodePlugin/1.0"
+
+Q_DECLARE_INTERFACE(MBarcodePlugin, MBarcodePlugin_IID);
+
+
+#endif
--- /dev/null
+#include project file to use libmagicsmoke
+
+
+include (../iface/iface.pri)
+include (libs.pri)
+
+LIBS += -lmagicsmoke
+INCLUDEPATH += \
+ $$PWD \
+ $$PWD/crypto \
+ $$PWD/dialogs \
+ $$PWD/misc \
+ $$PWD/mwin \
+ $$PWD/script \
+ $$PWD/templates \
+ $$PWD/widgets
+