Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140018
notification-handler.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
notification-handler.hpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
<libkazv-config.hpp>
#include
<lager/reader.hpp>
#include
<copy-helper.hpp>
#include
"push-rules-desc.hpp"
#include
"client-model.hpp"
namespace
Kazv
{
/**
* A class to handle a notification.
*/
class
NotificationHandler
{
public
:
NotificationHandler
(
lager
::
reader
<
ClientModel
>
client
);
KAZV_DECLARE_COPYABLE
(
NotificationHandler
);
~
NotificationHandler
();
/**
* Handle a notification and get the actions to be taken.
*
* Only push rules are taken into consideration.
* Your own event will not be ruled out if there is no
* corresponding push rule.
*
* @param e The event to process.
* @return A PushAction for the event.
*/
PushAction
handleNotification
(
const
Event
&
e
)
const
;
private
:
struct
Private
;
std
::
unique_ptr
<
Private
>
m_d
;
KAZV_DECLARE_THREAD_ID
();
KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER
(
0
);
};
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Jan 19, 10:13 AM (2 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55097
Default Alt Text
notification-handler.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment