12DNOTIFICATIONS_BEGIN_NAMESPACE
15class DNotificationManagerPrivate;
25 DExpected<QList<DNotificationData>> allRecords()
const;
26 DExpected<QList<DNotificationData>> getRecordsFromId(
int rowCount,
const QString &offsetId);
35 DExpected<uint>
notify(
const QString &appName, uint replacesId,
36 const QString &appIcon,
const QString &summary,
37 const QString &body = QString(),
const QStringList &actions = QStringList(),
38 const QVariantMap hints = QVariantMap(),
int expireTimeout = 5000);
43 DNotificationAppConfigPtr notificationAppConfig(
const QString &
id)
const;
44 DNotificationDNDModeConfigPtr notificationDNDModeConfig()
const;
45 QList<DAbstractNotificationModeConfigPtr> notificationModeConfigs()
const;
47 DExpected<void> toggleNotificationCenter();
48 DExpected<void> showNotificationCenter();
49 DExpected<void> hideNotificationCenter();
52 void actionInvoked(uint
id,
const QString &actionId);
53 void notificationClosed(uint
id,
ClosedReason closedReason);
54 void recordAdded(
const QString &);
57 void appAdded(
const QString &
id);
58 void appRemoved(
const QString &
id);
61 QScopedPointer<DNotificationManagerPrivate> d_ptr;
65DNOTIFICATIONS_END_NAMESPACE
DNotificationManager类
Definition: dnotificationmanager.h:17
DExpected< QStringList > capbilities()
获取服务端的能力
DExpected< void > closeNotification(uint id)
关闭id的通知
DExpected< ServerInformation > serverInformation()
获取服务端的信息
DNotificationManager(QObject *parent=nullptr)
构造manager对象,并且进行信号的连接
DExpected< int > recordCount()
获取消息记录的数量
DExpected< void > clearRecords()
清空消息记录
DExpected< DNotificationData > getRecordById(const QString &id)
获取id为offsetId的消息记录
DExpected< uint > notify(const QString &appName, uint replacesId, const QString &appIcon, const QString &summary, const QString &body=QString(), const QStringList &actions=QStringList(), const QVariantMap hints=QVariantMap(), int expireTimeout=5000)
判断密码是否合法
QList< QString > recordIds() const
获取所有消息记录的id
DExpected< QStringList > appList()
获取通知应用列表
DExpected< void > removeRecord(const QString &id)
移除消息记录id
AppNotificationConfigItem
应用通知配置信息
Definition: dnotificationtypes.h:65
ClosedReason
通知关闭原因
Definition: dnotificationtypes.h:58
DNDModeNotificaitonConfigItem
应用通知配置信息
Definition: dnotificationtypes.h:75