KUnifiedPush

gotifypushprovider.h
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KUNIFIEDPUSH_GOTIFYPUSHPROVIDER_H
7#define KUNIFIEDPUSH_GOTIFYPUSHPROVIDER_H
8
9#include "abstractpushprovider.h"
10
11#include <QUrl>
12
13class QWebSocket;
14
15namespace KUnifiedPush {
16
17/** Push provider protocol implementation for Gotify. */
19{
21public:
22 explicit GotifyPushProvider(QObject *parent = nullptr);
23
24 bool loadSettings(const QSettings &settings) override;
25 void connectToProvider() override;
26 void disconnectFromProvider() override;
27 void registerClient(const Client &client) override;
28 void unregisterClient(const Client &client) override;
29
30 static constexpr const char Id[] = "Gotify";
31private:
32 void wsMessageReceived(const QString &msg);
33
34 QString m_clientToken;
35 QUrl m_url;
36 QWebSocket *m_socket = nullptr;
37};
38
39}
40
41#endif // KUNIFIEDPUSH_GOTIFYPUSHPROVIDER_H
Base class for push provider protocol implementations.
Information about a registered client.
Definition client.h:19
Push provider protocol implementation for Gotify.
void unregisterClient(const Client &client) override
Unregister a client from the provider.
void connectToProvider() override
Attempt to establish a connection to the push provider.
void registerClient(const Client &client) override
Register a new client with the provider.
bool loadSettings(const QSettings &settings) override
Load connection settings.
void disconnectFromProvider() override
Disconnect and existing connection to the push provider.
Client-side integration with UnifiedPush.
Definition connector.h:16
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.