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 }
Definition: event.hpp:21
A class to handle a notification.
Definition: notification-handler.hpp:22
NotificationHandler(lager::reader< ClientModel > client)
Definition: notification-handler.cpp:34
PushAction handleNotification(const Event &e) const
Handle a notification and get the actions to be taken.
Definition: notification-handler.cpp:43
KAZV_DECLARE_COPYABLE(NotificationHandler)
Definition: location.hpp:10
Definition: notification-handler.cpp:16
Describe what actions are to be taken for a specific event.
Definition: push-rules-desc.hpp:26
#define KAZV_DECLARE_THREAD_ID()
Definition: thread-safety-helper.hpp:73
#define KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(_initializer)
Definition: thread-safety-helper.hpp:75