QWlanManager
Loading...
Searching...
No Matches
cachepolicy.h
1#ifndef QWLANMAN_CACHE_CACHEPOLICY_H
2#define QWLANMAN_CACHE_CACHEPOLICY_H
3
4#include "qwlanmanager/qwlanman_global.h"
5
6#include <QDebug>
7#include <QObject>
8
9/*****************************/
10/* Namespace instructions */
11/*****************************/
12namespace qwm
13{
14
15/*****************************/
16/* Class definitions */
17/*****************************/
18
19class CachePolicyPrivate;
20class QWLANMAN_EXPORT CachePolicy
21{
22 Q_GADGET
23
24 Q_PROPERTY(int maxScans READ getMaxScans WRITE setMaxScans)
25 Q_PROPERTY(qint64 maxDelay READ getMaxDelay WRITE setMaxDelay)
26
27public:
29 CachePolicy(int maxScans, qint64 maxDelay);
30
31 CachePolicy(const CachePolicy &other);
32 CachePolicy(CachePolicy &&other);
33
35
36public:
37 int getMaxScans() const;
38 qint64 getMaxDelay() const;
39
40public:
41 void setMaxScans(int maxScans);
42 void setMaxDelay(qint64 maxDelay);
43
44public:
45 bool operator==(const CachePolicy &other) const;
46 bool operator!=(const CachePolicy &other) const;
47
48public:
49 CachePolicy& operator=(const CachePolicy &other);
50 CachePolicy& operator=(CachePolicy &&other) noexcept;
51
52private:
53 std::unique_ptr<CachePolicyPrivate> d_ptr;
54};
55
56/*****************************/
57/* Qt specific methods */
58/*****************************/
59
60QWLANMAN_EXPORT QDebug operator<<(QDebug debug, const CachePolicy &policy);
61
62/*****************************/
63/* End namespaces */
64/*****************************/
65
66} // namespace qwm
67
68/*****************************/
69/* Qt specific meta-system */
70/*****************************/
71
72Q_DECLARE_METATYPE(qwm::CachePolicy)
73
74#endif // QWLANMAN_CACHE_CACHEPOLICY_H
Class allowing to determine the cache policy to adopt.
Definition cachepolicy.h:21
Namespace used for QWlanManager library.
Definition cachepolicy.h:13