ukui-notification/notification-server/server-private.h

57 lines
1.5 KiB
C++

//
// Created by zpf on 23-1-31.
//
#ifndef UKUI_NOTIFICATION_SERVER_PRIVATE_H
#define UKUI_NOTIFICATION_SERVER_PRIVATE_H
#include <QObject>
#include <QDBusContext>
class QDBusServiceWatcher;
namespace NotificationServer {
class ServerPrivate : public QObject, protected QDBusContext
{
Q_OBJECT
public:
ServerPrivate(QObject *parent);
~ServerPrivate();
bool init();
static QString notificationServiceName();
static QString notificationServicePath();
static QString notificationServiceInterface();
QStringList GetCapabilities() const;
uint Notify(const QString &app_name,
uint replaces_id,
const QString &app_icon,
const QString &summary,
const QString &body,
const QStringList &actions,
const QVariantMap &hints,
int timeout);
void CloseNotification(uint id);
QString GetServerInformation(QString &vendor, QString &version, QString &specVersion) const;
/**
* 注册成为通知中心客户端
*/
void RegisterClient();
/**
* 注销
*/
void UnRegisterClient();
Q_SIGNALS:
void NotificationClosed(uint id, uint reason);
void ActionInvoked(uint id, const QString &actionKey);
void ActivationToken(uint id, const QString &ActivationToken);
private:
QDBusServiceWatcher *m_notificationWatchers = nullptr;
};
} // NotificationServer
#endif //UKUI_NOTIFICATION_SERVER_PRIVATE_H