mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +03:00
Begin adding Android builds
This commit is contained in:
parent
5bff9df4ae
commit
4af80be02d
3 changed files with 58 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
#define NHEKO_DBUS_SYS
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#undef NHEKO_DBUS_SYS
|
||||
#endif
|
||||
|
||||
#if defined(NHEKO_DBUS_SYS)
|
||||
#include <QtDBus/QDBusArgument>
|
||||
#include <QtDBus/QDBusInterface>
|
||||
|
|
48
src/notifications/ManagerAndroid.cpp
Normal file
48
src/notifications/ManagerAndroid.cpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
// SPDX-FileCopyrightText: 2012 Roland Hieber <rohieb@rohieb.name>
|
||||
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "notifications/Manager.h"
|
||||
|
||||
#include <functional>
|
||||
#include <variant>
|
||||
|
||||
#include <mtx/responses/notifications.hpp>
|
||||
|
||||
#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)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in a new issue