cutelyst  4.5.1
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 
10 namespace Cutelyst {
11 
12 class SessionStoreFilePrivate;
28 class CUTELYST_PLUGIN_SESSION_EXPORT SessionStoreFile : public SessionStore
29 {
30  Q_OBJECT
31 public:
35  explicit SessionStoreFile(QObject *parent = nullptr);
36 
41 
45  virtual QVariant getSessionData(Context *c,
46  const QByteArray &sid,
47  const QString &key,
48  const QVariant &defaultValue) final;
49 
53  virtual bool storeSessionData(Context *c,
54  const QByteArray &sid,
55  const QString &key,
56  const QVariant &value) final;
57 
61  virtual bool deleteSessionData(Context *c, const QByteArray &sid, const QString &key) final;
62 
66  virtual bool deleteExpiredSessions(Context *c, quint64 expires) final;
67 };
68 
69 } // namespace Cutelyst
70 
71 #endif // SESSIONSTOREFILE_H
The Cutelyst Context.
Definition: context.h:42
A session store that stores user sessions in the file system.
Abstract class to create a session store.
Definition: session.h:36
The Cutelyst namespace holds all public Cutelyst API.