Albert
Loading...
Searching...
No Matches
networkutil.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Manuel Schneider
2
3#pragma once
4#include <albert/export.h>
5#include <memory>
6class QByteArray;
7class QNetworkAccessManager;
8class QNetworkReply;
9class QNetworkRequest;
10class QString;
11class QUrlQuery;
12
13namespace albert::util
14{
15
19ALBERT_EXPORT QNetworkAccessManager &network();
20
24ALBERT_EXPORT QNetworkReply *await(QNetworkReply *reply);
25
26}
27
28namespace albert::detail {
29
31class ALBERT_EXPORT RateLimiter
32{
33public:
34 RateLimiter(unsigned int ms);
36
39 const bool &debounce(const bool &valid);
40
41private:
42
43 class Private;
44 std::unique_ptr<Private> d;
45
46};
47
48}
Blocks execution.
Definition networkutil.h:32
RateLimiter(unsigned int ms)
const bool & debounce(const bool &valid)
Blocks until the next request is allowed.
Albert private namespace.
Definition albert.h:17
Albert utility namespace.
Definition albert.h:14
QNetworkAccessManager & network()
Returns a global, threadlocal QNetworkAccessManager.
QNetworkReply * await(QNetworkReply *reply)
Blocks until reply is finished.