This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/nymea-app/pushnotifications.cpp
2018-09-19 00:30:34 +02:00

29 lines
664 B
C++

#include "pushnotifications.h"
PushNotifications::PushNotifications(QObject *parent) : QObject(parent)
{
}
QObject *PushNotifications::pushNotificationsProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
return instance();
}
PushNotifications *PushNotifications::instance()
{
static PushNotifications* pushNotifications = new PushNotifications();
return pushNotifications;
}
QString PushNotifications::apnsRegistrationToken() const
{
return m_apnsToken;
}
void PushNotifications::setAPNSRegistrationToken(const QString &apnsRegistrationToken)
{
m_apnsToken = apnsRegistrationToken;
apnsRegistrationTokenChanged(); //emit signal
}