diff --git a/libsound/src/qtgstreamerbackend/qtgstreamerbackend.cpp b/libsound/src/qtgstreamerbackend/qtgstreamerbackend.cpp index 7a75dda..fcd6805 100644 --- a/libsound/src/qtgstreamerbackend/qtgstreamerbackend.cpp +++ b/libsound/src/qtgstreamerbackend/qtgstreamerbackend.cpp @@ -1,64 +1,63 @@ /* * Copyright 2016 Andreas Cord-Landwehr * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #include "qtgstreamerbackend.h" #include "qtgstreamercapturebackend.h" #include "qtgstreameroutputbackend.h" -#include "libsound_export.h" #include K_PLUGIN_FACTORY_WITH_JSON( BackendFactory, "qtgstreamerbackend.json", registerPlugin();) QtGStreamerBackend::QtGStreamerBackend(QObject *parent, const QList< QVariant >&) : BackendInterface("qtgstreamer", parent) , m_captureBackend(nullptr) , m_outputBackend(nullptr) { } QtGStreamerBackend::~QtGStreamerBackend() { if (m_captureBackend) { m_captureBackend->deleteLater(); m_captureBackend = nullptr; } if (m_outputBackend) { m_outputBackend->deleteLater(); m_outputBackend = nullptr; } } CaptureBackendInterface * QtGStreamerBackend::captureBackend() const { if (!m_captureBackend) { m_captureBackend = new QtGStreamerCaptureBackend(); } return m_captureBackend; } OutputBackendInterface * QtGStreamerBackend::outputBackend() const { if (!m_outputBackend) { m_outputBackend = new QtGStreamerOutputBackend(); } return m_outputBackend; } #include "qtgstreamerbackend.moc" diff --git a/libsound/src/qtgstreamerbackend/qtgstreamerbackend.h b/libsound/src/qtgstreamerbackend/qtgstreamerbackend.h index a8a9249..3f81ab1 100644 --- a/libsound/src/qtgstreamerbackend/qtgstreamerbackend.h +++ b/libsound/src/qtgstreamerbackend/qtgstreamerbackend.h @@ -1,47 +1,46 @@ /* * Copyright 2016 Andreas Cord-Landwehr * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef GSTREAMERBACKEND_H #define GSTREAMERBACKEND_H #include "../backendinterface.h" -#include "libsound_export.h" class CaptureBackendInterface; class OutputBackendInterface; class QtGStreamerCaptureBackend; class QtGStreamerOutputBackend; -class LIBSOUND_EXPORT QtGStreamerBackend : public BackendInterface +class QtGStreamerBackend : public BackendInterface { Q_OBJECT public: explicit QtGStreamerBackend(QObject *parent, const QList< QVariant >&); virtual ~QtGStreamerBackend(); CaptureBackendInterface * captureBackend() const; OutputBackendInterface * outputBackend() const; private: mutable QtGStreamerCaptureBackend *m_captureBackend; mutable QtGStreamerOutputBackend *m_outputBackend; }; #endif diff --git a/libsound/src/qtmultimediabackend/qtmultimediabackend.cpp b/libsound/src/qtmultimediabackend/qtmultimediabackend.cpp index f17e19e..81baece 100644 --- a/libsound/src/qtmultimediabackend/qtmultimediabackend.cpp +++ b/libsound/src/qtmultimediabackend/qtmultimediabackend.cpp @@ -1,50 +1,49 @@ /* * Copyright 2016 Andreas Cord-Landwehr * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #include "qtmultimediabackend.h" #include "qtmultimediacapturebackend.h" #include "qtmultimediaoutputbackend.h" -#include "libsound_export.h" #include K_PLUGIN_FACTORY_WITH_JSON( BackendFactory, "qtmultimediabackend.json", registerPlugin();) QtMultimediaBackend::QtMultimediaBackend(QObject *parent, const QList< QVariant >&) : BackendInterface("qtmultimedia", parent) , m_captureBackend(new QtMultimediaCaptureBackend(this)) , m_outputBackend(new QtMultimediaOutputBackend(this)) { } QtMultimediaBackend::~QtMultimediaBackend() { } CaptureBackendInterface * QtMultimediaBackend::captureBackend() const { return m_captureBackend; } OutputBackendInterface * QtMultimediaBackend::outputBackend() const { return m_outputBackend; } #include "qtmultimediabackend.moc" diff --git a/libsound/src/qtmultimediabackend/qtmultimediabackend.h b/libsound/src/qtmultimediabackend/qtmultimediabackend.h index 2226238..f410b48 100644 --- a/libsound/src/qtmultimediabackend/qtmultimediabackend.h +++ b/libsound/src/qtmultimediabackend/qtmultimediabackend.h @@ -1,47 +1,46 @@ /* * Copyright 2016 Andreas Cord-Landwehr * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef QTMULTIMEDIABACKEND_H #define QTMULTIMEDIABACKEND_H #include "../backendinterface.h" -#include "libsound_export.h" class CaptureBackendInterface; class OutputBackendInterface; class QtMultimediaCaptureBackend; class QtMultimediaOutputBackend; -class LIBSOUND_EXPORT QtMultimediaBackend : public BackendInterface +class QtMultimediaBackend : public BackendInterface { Q_OBJECT public: explicit QtMultimediaBackend(QObject *parent, const QList< QVariant >&); virtual ~QtMultimediaBackend(); CaptureBackendInterface * captureBackend() const Q_DECL_OVERRIDE; OutputBackendInterface * outputBackend() const Q_DECL_OVERRIDE; private: QtMultimediaCaptureBackend *m_captureBackend; QtMultimediaOutputBackend *m_outputBackend; }; #endif diff --git a/src/core/resources/resourceinterface.h b/src/core/resources/resourceinterface.h index e52c443..90c5b22 100644 --- a/src/core/resources/resourceinterface.h +++ b/src/core/resources/resourceinterface.h @@ -1,132 +1,133 @@ /* * Copyright 2013 Andreas Cord-Landwehr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef RESOURCEINTERFACE_H #define RESOURCEINTERFACE_H +#include "artikulatecore_export.h" #include class ResourceManager; class QUrl; class QXmlSchema; class QDomDocument; -class ResourceInterface : public QObject +class ARTIKULATECORE_EXPORT ResourceInterface : public QObject { Q_OBJECT public: enum Type { LanguageResourceType, CourseResourceType, SkeletonResourceType }; explicit ResourceInterface(ResourceManager *resourceManager); virtual ~ResourceInterface(); /** * \return unique identifier */ virtual QString identifier() = 0; /** * \return human readable localized title */ virtual QString title() = 0; /** * \return human readable title in English */ virtual QString i18nTitle() = 0; /** * Set resource to be read-only. */ virtual void setContributorResource(bool contributorResource=true); /** * \returns true if resource is readonly, otherwise false */ virtual bool isContributorResource() const; /** * \return type of resource */ virtual Type type() const = 0; /** * \return true if resource is loaded, otherwise false */ virtual bool isOpen() const = 0; /** * close resource without writing changes back to file */ virtual void close() = 0; /** * \return path to resource file */ virtual QUrl path() const = 0; /** * Write changes to resource back to file. * This operation does _not_ close the file. */ virtual void sync(); /** * Reload resource from file. */ virtual void reload(); /** * \return reference to the loaded resource * if resource is not open yet, it will be loaded */ virtual QObject * resource() = 0; /** * Load XSD file given by its file name (without ".xsd" suffix). The method searches exclusively * the standard install dir for XSD files in subdirectory "schemes/". * * \param schemeName name of the Xml schema without suffix * \return loaded XML Schema */ QXmlSchema loadXmlSchema(const QString &schemeName) const; /** * Load XML file given by \p file that confirms with XML schema \p scheme. * * \param path is the path to the XML file to be loaded * \param scheme is the XML schema describing the DOM * \return the loaded DOM document */ QDomDocument loadDomDocument(const QUrl &path, const QXmlSchema &schema) const; private: bool m_contributorResource; //!< identifies this resource as an editable resource }; #endif