Chatterino
RecentMessagesApi.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ForwardDecl.hpp"
4 
5 #include <QString>
6 
7 #include <functional>
8 #include <memory>
9 #include <vector>
10 
11 namespace chatterino {
12 
14 {
15 public:
16  using ResultCallback = std::function<void(const std::vector<MessagePtr> &)>;
17  using ErrorCallback = std::function<void()>;
18 
27  static void loadRecentMessages(const QString &channelName,
28  std::weak_ptr<Channel> channelPtr,
29  ResultCallback onLoaded,
30  ErrorCallback onError);
31 };
32 
33 } // namespace chatterino
Definition: Application.cpp:48
std::function< void()> ErrorCallback
Definition: RecentMessagesApi.hpp:17
static void loadRecentMessages(const QString &channelName, std::weak_ptr< Channel > channelPtr, ResultCallback onLoaded, ErrorCallback onError)
Loads recent messages for a channel using the Recent Messages API.
Definition: RecentMessagesApi.cpp:160
Definition: RecentMessagesApi.hpp:13
std::function< void(const std::vector< MessagePtr > &)> ResultCallback
Definition: RecentMessagesApi.hpp:16