cutelyst  4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
sessionstorefile.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2015-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef SESSIONSTOREFILE_H
6 #define SESSIONSTOREFILE_H
7 
8 #include <Cutelyst/Plugins/Session/session.h>
9 #include <Cutelyst/cutelyst_global.h>
10 
11 namespace Cutelyst {
12 
13 class SessionStoreFilePrivate;
29 class CUTELYST_PLUGIN_SESSION_EXPORT SessionStoreFile : public SessionStore
30 {
31  Q_OBJECT
32 public:
36  explicit SessionStoreFile(QObject *parent = nullptr);
37 
42 
46  virtual QVariant getSessionData(Context *c,
47  const QByteArray &sid,
48  const QString &key,
49  const QVariant &defaultValue) final;
50 
54  virtual bool storeSessionData(Context *c,
55  const QByteArray &sid,
56  const QString &key,
57  const QVariant &value) final;
58 
62  virtual bool deleteSessionData(Context *c, const QByteArray &sid, const QString &key) final;
63 
67  virtual bool deleteExpiredSessions(Context *c, quint64 expires) final;
68 };
69 
70 } // namespace Cutelyst
71 
72 #endif // SESSIONSTOREFILE_H
The Cutelyst Context.
Definition: context.h:42
The Cutelyst namespace holds all public Cutelyst API.
A session store that stores user sessions in the file system.