diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b6c08b7..9524e703 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -602,6 +602,8 @@ elseif (WIN32) EXPECTED_HASH SHA256=b4481023c5782733795838be22bf1a75f45d87458cd4d9a5a75f664a146eea11) set(SRC_FILES ${SRC_FILES} src/notifications/ManagerWin.cpp src/wintoastlib.cpp) +elseif(ANDROID) + #set(SRC_FILES ${SRC_FILES} src/notifications/ManagerAndroid.cpp) # does nothing ATM else () set(SRC_FILES ${SRC_FILES} src/notifications/ManagerLinux.cpp) endif () @@ -620,6 +622,8 @@ endif() if(WIN32) add_executable (nheko WIN32 ${OS_BUNDLE} ${NHEKO_DEPS}) target_compile_definitions(nheko PRIVATE _WIN32_WINNT=0x0601) +elseif(ANDROID) + add_library (nheko SHARED ${NHEKO_DEPS}) else() add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS}) @@ -636,6 +640,8 @@ elseif(WIN32) if(MSVC) target_compile_options(nheko PUBLIC "/Zc:__cplusplus") endif() +elseif(ANDROID) + # link with nothing at all else() target_link_libraries (nheko PRIVATE Qt5::DBus) endif() diff --git a/src/notifications/Manager.h b/src/notifications/Manager.h index 416530e0..8fcc3019 100644 --- a/src/notifications/Manager.h +++ b/src/notifications/Manager.h @@ -15,6 +15,10 @@ #define NHEKO_DBUS_SYS #endif +#ifdef Q_OS_ANDROID +#undef NHEKO_DBUS_SYS +#endif + #if defined(NHEKO_DBUS_SYS) #include #include diff --git a/src/notifications/ManagerAndroid.cpp b/src/notifications/ManagerAndroid.cpp new file mode 100644 index 00000000..cc942a12 --- /dev/null +++ b/src/notifications/ManagerAndroid.cpp @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: 2012 Roland Hieber +// SPDX-FileCopyrightText: 2021 Nheko Contributors +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "notifications/Manager.h" + +#include +#include + +#include + +#include "Cache.h" +#include "EventAccessors.h" +#include "MxcImageProvider.h" +#include "Utils.h" + +NotificationsManager::NotificationsManager(QObject *parent) + : QObject(parent) +{ +} + +void +NotificationsManager::postNotification(const mtx::responses::Notification ¬ification, + const QImage &icon) +{ +} + +void +NotificationsManager::removeNotification(const QString &roomId, const QString &eventId) +{ +} + +void +NotificationsManager::actionInvoked(uint id, QString action) +{ +} + +void +NotificationsManager::notificationReplied(uint id, QString reply) +{ +} + +void +NotificationsManager::notificationClosed(uint id, uint reason) +{ +} +