Autogenerate plugin.json files, change plugin names to match enum names
This commit is contained in:
parent
6e29a9ae18
commit
f6d46b868a
|
@ -1,20 +1,45 @@
|
||||||
|
|
||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
|
|
||||||
function(add_snore_plugin name)
|
function(_test_type TYPE)
|
||||||
|
set(PLUGINS "(Backend|SecondaryBackend|Frontend)" )
|
||||||
|
string(REGEX MATCH ${PLUGINS} RESULT ${TYPE})
|
||||||
|
if(NOT RESULT)
|
||||||
|
message(FATAL_ERROR "Plugin type ${TYPE} is not ins ${PLUGINS}")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(_test_name UPPER LOWER)
|
||||||
|
string(COMPARE EQUAL "${UPPER}" "${LOWER}" RESULT)
|
||||||
|
if(RESULT)
|
||||||
|
message(FATAL_ERROR "Plugin name ${UPPER} is not camel case")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(add_snore_plugin SNORE_NAME)
|
||||||
set(options)
|
set(options)
|
||||||
set(oneValueArgs TYPE)
|
set(oneValueArgs TYPE)
|
||||||
set(multiValueArgs SETTINGS_SOURCES SETTINGS_LIBS SOURCES LIBS)
|
set(multiValueArgs SETTINGS_SOURCES SETTINGS_LIBS SOURCES LIBS)
|
||||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(SNORE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
add_library(libsnore_${ARG_TYPE}_${name} MODULE ${ARG_SOURCES})
|
string( TOLOWER "${SNORE_NAME}" SNORE_NAME_LOWERCASE)
|
||||||
target_link_libraries(libsnore_${ARG_TYPE}_${name} Snore::Libsnore ${ARG_LIBS})
|
_test_name(${SNORE_NAME} ${SNORE_NAME_LOWERCASE})
|
||||||
install(TARGETS libsnore_${ARG_TYPE}_${name} ${SNORE_PLUGIN_INSTALL_PATH})
|
string(REGEX REPLACE "[ \t\r\n]" "" SNORE_NAME_LOWERCASE ${SNORE_NAME_LOWERCASE})
|
||||||
|
|
||||||
if(ARG_SETTINGS_SOURCES AND Qt5Widgets_FOUND)
|
_test_type(${SNORE_TYPE})
|
||||||
add_library(libsnore_settings_${ARG_TYPE}_${name} MODULE ${ARG_SETTINGS_SOURCES} )
|
string( TOLOWER "${SNORE_TYPE}" SNORE_TYPE_LOWERCASE)
|
||||||
target_link_libraries(libsnore_settings_${ARG_TYPE}_${name} Snore::Libsnore Snore::LibsnoreSettings ${ARG_SETTINGS_LIBS})
|
|
||||||
install(TARGETS libsnore_settings_${ARG_TYPE}_${name} ${SNORE_PLUGIN_INSTALL_PATH})
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/snore_plugin.json "{ \"name\" : \"${SNORE_NAME}\" }")
|
||||||
|
message(STATUS libsnore_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} )
|
||||||
|
add_library(libsnore_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} MODULE ${SNORE_SOURCES})
|
||||||
|
target_link_libraries(libsnore_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} Snore::Libsnore ${SNORE_LIBS})
|
||||||
|
install(TARGETS libsnore_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} ${SNORE_PLUGIN_INSTALL_PATH})
|
||||||
|
|
||||||
|
if(SNORE_SETTINGS_SOURCES AND Qt5Widgets_FOUND)
|
||||||
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/snore_settings_plugin.json "{ \"name\" : \"${SNORE_NAME}${SNORE_TYPE}\" }")
|
||||||
|
add_library(libsnore_settings_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} MODULE ${SNORE_SETTINGS_SOURCES} )
|
||||||
|
target_link_libraries(libsnore_settings_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} Snore::Libsnore Snore::LibsnoreSettings ${SNORE_SETTINGS_LIBS})
|
||||||
|
install(TARGETS libsnore_settings_${SNORE_TYPE_LOWERCASE}_${SNORE_NAME_LOWERCASE} ${SNORE_PLUGIN_INSTALL_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
|
@ -78,9 +78,6 @@ private:
|
||||||
{
|
{
|
||||||
QStringList out;
|
QStringList out;
|
||||||
QString typeName = SnorePlugin::typeToString(type).toLower();
|
QString typeName = SnorePlugin::typeToString(type).toLower();
|
||||||
if (type == Snore::SnorePlugin::SecondaryBackend) {
|
|
||||||
typeName = QStringLiteral("secondary_backend");
|
|
||||||
}
|
|
||||||
for (const QString &extention : pluginExtentions()) {
|
for (const QString &extention : pluginExtentions()) {
|
||||||
out << QLatin1String("libsnore_") + typeName + QLatin1String("_*.") + extention;
|
out << QLatin1String("libsnore_") + typeName + QLatin1String("_*.") + extention;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ Q_DECLARE_INTERFACE(Snore::SettingsPlugin,
|
||||||
class NAMESettings : public Snore::SettingsPlugin{\
|
class NAMESettings : public Snore::SettingsPlugin{\
|
||||||
Q_OBJECT\
|
Q_OBJECT\
|
||||||
Q_INTERFACES(Snore::SettingsPlugin)\
|
Q_INTERFACES(Snore::SettingsPlugin)\
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.SettingsPlugin/1.0" FILE "plugin.json")\
|
Q_PLUGIN_METADATA(IID "org.Snore.SettingsPlugin/1.0" FILE "snore_settings_plugin.json")\
|
||||||
public:\
|
public:\
|
||||||
Snore::PluginSettingsWidget *settingsWidget(Snore::SnorePlugin *parent) override{\
|
Snore::PluginSettingsWidget *settingsWidget(Snore::SnorePlugin *parent) override{\
|
||||||
return new NAME(parent);\
|
return new NAME(parent);\
|
||||||
|
|
|
@ -32,7 +32,7 @@ QList<PluginSettingsWidget *> Settings::settingWidgets(SnorePlugin::PluginTypes
|
||||||
//TODO: mem leak?
|
//TODO: mem leak?
|
||||||
|
|
||||||
SnorePlugin *plugin = core->m_plugins[qMakePair(type, name)];
|
SnorePlugin *plugin = core->m_plugins[qMakePair(type, name)];
|
||||||
SettingsPlugin *settingsPlugin = qobject_cast< Snore::SettingsPlugin * >(core->m_plugins[qMakePair(Snore::SnorePlugin::Settings, name)]);
|
SettingsPlugin *settingsPlugin = qobject_cast< Snore::SettingsPlugin * >(core->m_plugins[qMakePair(Snore::SnorePlugin::Settings, name + SnorePlugin::typeToString(type))]);
|
||||||
if (settingsPlugin) {
|
if (settingsPlugin) {
|
||||||
PluginSettingsWidget *widget = settingsPlugin->settingsWidget(plugin);
|
PluginSettingsWidget *widget = settingsPlugin->settingsWidget(plugin);
|
||||||
if (widget) {
|
if (widget) {
|
||||||
|
|
|
@ -11,10 +11,7 @@ if(Qt5DBus_FOUND)
|
||||||
|
|
||||||
qt5_add_dbus_interface( FREEDESKTOP_NOTIFICATION_SRC ../../frontends/freedesktop_frontend/org.freedesktop.Notifications.xml notificationinterface )
|
qt5_add_dbus_interface( FREEDESKTOP_NOTIFICATION_SRC ../../frontends/freedesktop_frontend/org.freedesktop.Notifications.xml notificationinterface )
|
||||||
|
|
||||||
|
add_snore_plugin(Freedesktop SOURCES ${FREEDESKTOP_NOTIFICATION_SRC} TYPE Backend LIBS Qt5::DBus)
|
||||||
|
|
||||||
add_library(libsnore_backend_freedesktop MODULE ${FREEDESKTOP_NOTIFICATION_SRC} )
|
|
||||||
target_link_libraries(libsnore_backend_freedesktop Snore::Libsnore Qt5::DBus )
|
|
||||||
|
|
||||||
install(TARGETS libsnore_backend_freedesktop ${SNORE_PLUGIN_INSTALL_PATH})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ class FreedesktopBackend: public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
FreedesktopBackend();
|
FreedesktopBackend();
|
||||||
~FreedesktopBackend() = default;
|
~FreedesktopBackend() = default;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "Freedesktop" }
|
|
|
@ -6,5 +6,5 @@ set_package_properties(SnoreGrowl++ PROPERTIES
|
||||||
TYPE RECOMMENDED)
|
TYPE RECOMMENDED)
|
||||||
|
|
||||||
if(SnoreGrowl++_FOUND)
|
if(SnoreGrowl++_FOUND)
|
||||||
add_snore_plugin(growl SOURCES growlbackend.cpp SETTINGS_SOURCES growlsettings.cpp TYPE backend LIBS Snore::SnoreGrowl++)
|
add_snore_plugin(Growl SOURCES growlbackend.cpp SETTINGS_SOURCES growlsettings.cpp TYPE Backend LIBS Snore::SnoreGrowl++)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -27,7 +27,7 @@ class GrowlBackend: public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GrowlBackend();
|
GrowlBackend();
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "Growl" }
|
|
|
@ -1,3 +1,3 @@
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_snore_plugin(osxnotificationcenter SOURCES osxnotificationcenter.mm TYPE backend LIBS /System/Library/Frameworks/Foundation.framework)
|
add_snore_plugin("OSX Notification Center" SOURCES osxnotificationcenter.mm TYPE Backend LIBS /System/Library/Frameworks/Foundation.framework)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
|
@ -25,7 +25,7 @@ class OSXNotificationCenter : public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OSXNotificationCenter();
|
OSXNotificationCenter();
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "OSX Notification Center" }
|
|
|
@ -1,5 +1,5 @@
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_snore_plugin(snarl SOURCES snarl.cpp SnarlInterface.cpp SETTINGS_SOURCES snarlsettings.cpp TYPE backend LIBS Qt5::Widgets)
|
add_snore_plugin(Snarl SOURCES snarl.cpp SnarlInterface.cpp SETTINGS_SOURCES snarlsettings.cpp TYPE Backend LIBS Qt5::Widgets)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set_target_properties(libsnore_backend_snarl PROPERTIES COMPILE_FLAGS "-Wno-conversion-null -Wno-unused")
|
set_target_properties(libsnore_backend_snarl PROPERTIES COMPILE_FLAGS "-Wno-conversion-null -Wno-unused")
|
||||||
endif(MINGW)
|
endif(MINGW)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "Snarl" }
|
|
|
@ -25,7 +25,7 @@ class SnarlBackend: public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
SnarlBackend();
|
SnarlBackend();
|
||||||
~SnarlBackend();
|
~SnarlBackend();
|
||||||
|
|
|
@ -7,8 +7,8 @@ set_package_properties(Qt5Quick PROPERTIES
|
||||||
if(Qt5Quick_FOUND)
|
if(Qt5Quick_FOUND)
|
||||||
QT5_ADD_RESOURCES(SNORENOTIFIER_RCS ${CMAKE_CURRENT_SOURCE_DIR}/snore_notification.qrc)
|
QT5_ADD_RESOURCES(SNORENOTIFIER_RCS ${CMAKE_CURRENT_SOURCE_DIR}/snore_notification.qrc)
|
||||||
|
|
||||||
add_snore_plugin(snore SOURCES snorenotifier.cpp
|
add_snore_plugin(Snore SOURCES snorenotifier.cpp
|
||||||
notifywidget.cpp
|
notifywidget.cpp
|
||||||
${SNORENOTIFIER_RCS}
|
${SNORENOTIFIER_RCS}
|
||||||
TYPE backend SETTINGS_SOURCES snorenotifiersettings.cpp LIBS Qt5::Quick)
|
TYPE Backend SETTINGS_SOURCES snorenotifiersettings.cpp LIBS Qt5::Quick)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "Snore" }
|
|
|
@ -27,7 +27,7 @@ class SnoreNotifier : public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
SnoreNotifier();
|
SnoreNotifier();
|
||||||
~SnoreNotifier();
|
~SnoreNotifier();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_snore_plugin(snoretoast SOURCES snoretoast.cpp TYPE backend)
|
add_snore_plugin("Windows Toast" SOURCES snoretoast.cpp TYPE Backend)
|
||||||
install(FILES SnoreToast.exe DESTINATION bin)
|
install(FILES SnoreToast.exe DESTINATION bin)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "Windows Toast" }
|
|
|
@ -8,7 +8,7 @@ class SnoreToast : public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
SnoreToast() = default;
|
SnoreToast() = default;
|
||||||
~SnoreToast() = default;
|
~SnoreToast() = default;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
if(Qt5Widgets_FOUND)
|
if(Qt5Widgets_FOUND)
|
||||||
add_snore_plugin(trayicon SOURCES trayiconnotifer.cpp TYPE backend LIBS Qt5::Widgets)
|
add_snore_plugin(Trayicon SOURCES trayiconnotifer.cpp TYPE Backend LIBS Qt5::Widgets)
|
||||||
endif()
|
endif()
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "backend", "name" : "System Tray" }
|
|
|
@ -13,7 +13,7 @@ class TrayIconNotifer: public Snore::SnoreBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreBackend)
|
Q_INTERFACES(Snore::SnoreBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
TrayIconNotifer();
|
TrayIconNotifer();
|
||||||
~TrayIconNotifer() = default;
|
~TrayIconNotifer() = default;
|
||||||
|
|
|
@ -14,7 +14,7 @@ if(Qt5DBus_FOUND)
|
||||||
|
|
||||||
qt5_add_dbus_adaptor( FREEDESKTOP_NOTIFICATION_FRONTEND_SRC org.freedesktop.Notifications.xml freedesktopnotificationfrontend.h FreedesktopFrontend)
|
qt5_add_dbus_adaptor( FREEDESKTOP_NOTIFICATION_FRONTEND_SRC org.freedesktop.Notifications.xml freedesktopnotificationfrontend.h FreedesktopFrontend)
|
||||||
|
|
||||||
add_snore_plugin(freedesktop SOURCES ${FREEDESKTOP_NOTIFICATION_FRONTEND_SRC} TYPE frontend LIBS Qt5::DBus)
|
add_snore_plugin(Freedesktop SOURCES ${FREEDESKTOP_NOTIFICATION_FRONTEND_SRC} TYPE Frontend LIBS Qt5::DBus)
|
||||||
|
|
||||||
|
|
||||||
#install the dbus interface
|
#install the dbus interface
|
||||||
|
|
|
@ -27,7 +27,7 @@ class FreedesktopFrontend : public Snore::SnoreFrontend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreFrontend)
|
Q_INTERFACES(Snore::SnoreFrontend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
FreedesktopFrontend();
|
FreedesktopFrontend();
|
||||||
~FreedesktopFrontend() = default;
|
~FreedesktopFrontend() = default;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "frontend", "name" : "Freedesktop" }
|
|
|
@ -5,5 +5,5 @@ set_package_properties(Qt5WebSockets PROPERTIES
|
||||||
TYPE OPTIONAL)
|
TYPE OPTIONAL)
|
||||||
|
|
||||||
if(Qt5WebSockets_FOUND)
|
if(Qt5WebSockets_FOUND)
|
||||||
add_snore_plugin(pushover SOURCES pushover_frontend.cpp SETTINGS_SOURCES pushoversettings.cpp TYPE frontend LIBS Qt5::WebSockets)
|
add_snore_plugin(Pushover SOURCES pushover_frontend.cpp SETTINGS_SOURCES pushoversettings.cpp TYPE Frontend LIBS Qt5::WebSockets)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "frontend", "name" : "Pushover" }
|
|
|
@ -30,7 +30,7 @@ class PushoverFrontend : public Snore::SnoreFrontend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreFrontend)
|
Q_INTERFACES(Snore::SnoreFrontend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
PushoverFrontend();
|
PushoverFrontend();
|
||||||
~PushoverFrontend() = default;
|
~PushoverFrontend() = default;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
add_snore_plugin(snarlnetwork SOURCES snarlnetwork.cpp parser.cpp TYPE frontend)
|
add_snore_plugin(SnarlNetwork SOURCES snarlnetwork.cpp parser.cpp TYPE Frontend)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "frontend", "name" : "SnarlNetwork" }
|
|
|
@ -28,7 +28,7 @@ class SnarlNetworkFrontend : public Snore::SnoreFrontend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreFrontend)
|
Q_INTERFACES(Snore::SnoreFrontend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.NotificationFrontend/1.0" FILE "snore_plugin.json")
|
||||||
friend class Parser;
|
friend class Parser;
|
||||||
public:
|
public:
|
||||||
static const int port = 9887;
|
static const int port = 9887;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
add_snore_plugin(nma SOURCES nma.cpp SETTINGS_SOURCES nmasettings.cpp TYPE secondary_backend)
|
add_snore_plugin(NMA SOURCES nma.cpp SETTINGS_SOURCES nmasettings.cpp TYPE SecondaryBackend)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class NotifyMyAndroid : public Snore::SnoreSecondaryBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
NotifyMyAndroid() = default;
|
NotifyMyAndroid() = default;
|
||||||
~NotifyMyAndroid() = default;
|
~NotifyMyAndroid() = default;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "secondary_backend", "name" : "NotifyMyAndroid" }
|
|
|
@ -1,2 +1,2 @@
|
||||||
add_snore_plugin(puhover SOURCES pushover.cpp SETTINGS_SOURCES pushoversettings.cpp TYPE secondary_backend)
|
add_snore_plugin(Puhover SOURCES pushover.cpp SETTINGS_SOURCES pushoversettings.cpp TYPE SecondaryBackend)
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "secondary_backend", "name" : "Pushover" }
|
|
|
@ -26,7 +26,7 @@ class Pushover : public Snore::SnoreSecondaryBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
Pushover() = default;
|
Pushover() = default;
|
||||||
~Pushover() = default;
|
~Pushover() = default;
|
||||||
|
|
|
@ -3,5 +3,5 @@ set_package_properties(Qt5Multimedia PROPERTIES
|
||||||
PURPOSE "Support for sound Notifications"
|
PURPOSE "Support for sound Notifications"
|
||||||
TYPE OPTIONAL)
|
TYPE OPTIONAL)
|
||||||
if(Qt5Multimedia_FOUND)
|
if(Qt5Multimedia_FOUND)
|
||||||
add_snore_plugin(sound SOURCES sound.cpp SETTINGS_SOURCES soundsettings.cpp TYPE secondary_backend LIBS Qt5::Multimedia)
|
add_snore_plugin(Sound SOURCES sound.cpp SETTINGS_SOURCES soundsettings.cpp TYPE SecondaryBackend LIBS Qt5::Multimedia)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "secondary_backend", "name" : "Sound" }
|
|
|
@ -26,7 +26,7 @@ class Sound : public Snore::SnoreSecondaryBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
Sound();
|
Sound();
|
||||||
~Sound() = default;
|
~Sound() = default;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
add_snore_plugin(toasty SOURCES toasty.cpp SETTINGS_SOURCES toastysettings.cpp TYPE secondary_backend)
|
add_snore_plugin(Toasty SOURCES toasty.cpp SETTINGS_SOURCES toastysettings.cpp TYPE SecondaryBackend)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "type" : "secondary_backend", "name" : "Toasty" }
|
|
|
@ -26,7 +26,7 @@ class Toasty : public Snore::SnoreSecondaryBackend
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
Q_INTERFACES(Snore::SnoreSecondaryBackend)
|
||||||
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "plugin.json")
|
Q_PLUGIN_METADATA(IID "org.Snore.SecondaryNotificationBackend/1.0" FILE "snore_plugin.json")
|
||||||
public:
|
public:
|
||||||
Toasty() = default;
|
Toasty() = default;
|
||||||
~Toasty() = default;
|
~Toasty() = default;
|
||||||
|
|
Loading…
Reference in New Issue