libkazv
notification-handler.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of libkazv.
3  * SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
4  * SPDX-License-Identifier: AGPL-3.0-or-later
5  */
6 
7 #pragma once
8 #include <libkazv-config.hpp>
9 
10 #include <lager/reader.hpp>
11 
12 #include <copy-helper.hpp>
13 #include "push-rules-desc.hpp"
14 #include "client-model.hpp"
15 
16 namespace Kazv
17 {
22  {
23  public:
24  NotificationHandler(lager::reader<ClientModel> client);
27 
38  PushAction handleNotification(const Event &e) const;
39 
40  private:
41  struct Private;
42  std::unique_ptr<Private> m_d;
45  };
46 }
Kazv::NotificationHandler::Private
Definition: notification-handler.cpp:15
Kazv::NotificationHandler::KAZV_DECLARE_COPYABLE
KAZV_DECLARE_COPYABLE(NotificationHandler)
copy-helper.hpp
KAZV_DECLARE_THREAD_ID
#define KAZV_DECLARE_THREAD_ID()
Definition: thread-safety-helper.hpp:73
Kazv::PushAction
Describe what actions are to be taken for a specific event.
Definition: push-rules-desc.hpp:24
Kazv
Definition: location.hpp:10
client-model.hpp
KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER
#define KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(_initializer)
Definition: thread-safety-helper.hpp:75
Kazv::NotificationHandler::NotificationHandler
NotificationHandler(lager::reader< ClientModel > client)
Definition: notification-handler.cpp:34
push-rules-desc.hpp
Kazv::Event
Definition: event.hpp:20
Kazv::NotificationHandler::handleNotification
PushAction handleNotification(const Event &e) const
Handle a notification and get the actions to be taken.
Definition: notification-handler.cpp:43
libkazv-config.hpp
Kazv::NotificationHandler
A class to handle a notification.
Definition: notification-handler.hpp:21
Kazv::NotificationHandler::~NotificationHandler
~NotificationHandler()