增加了一个转发应用未读消息数量消息的接口
This commit is contained in:
parent
37c02a90a1
commit
82ba790de2
|
@ -11,5 +11,13 @@
|
|||
<arg name="id" type="u" direction="in"/>
|
||||
<arg name="action_key" type="s" direction="in"/>
|
||||
</method>
|
||||
<method name="UpdateUnreadMessagesNumber">
|
||||
<arg name="desktop_entry" type="s" direction="in"/>
|
||||
<arg name="number" type="u" direction="in"/>
|
||||
</method>
|
||||
<signal name="UnreadMessageNumberUpdated">
|
||||
<arg name="desktop_entry" type="s" direction="out"/>
|
||||
<arg name="number" type="u" direction="out"/>
|
||||
</signal>
|
||||
</interface>
|
||||
</node>
|
|
@ -52,10 +52,12 @@ public:
|
|||
*/
|
||||
void CloseNotification(uint id, uint);
|
||||
void InvokeAction(uint id, const QString &action_key);
|
||||
void UpdateUnreadMessagesNumber(const QString &desktopEntry, uint number);
|
||||
Q_SIGNALS:
|
||||
void NotificationClosed(uint id, uint reason);
|
||||
void ActionInvoked(uint id, const QString &actionKey);
|
||||
void ActivationToken(uint id, const QString &ActivationToken);
|
||||
void UnreadMessageNumberUpdated(const QString &desktopEntry, uint number);
|
||||
public:
|
||||
explicit ServerPrivate(QObject *parent = nullptr);
|
||||
~ServerPrivate() override;
|
||||
|
|
|
@ -174,6 +174,11 @@ void ServerPrivate::sendCache()
|
|||
}
|
||||
}
|
||||
|
||||
void ServerPrivate::UpdateUnreadMessagesNumber(const QString &desktopEntry, uint number)
|
||||
{
|
||||
Q_EMIT UnreadMessageNumberUpdated(desktopEntry, number);
|
||||
}
|
||||
|
||||
Server::Server(QObject *parent): QObject(parent), d(new ServerPrivate(this))
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue