ImagingTools Core SDK
CSessionInfo.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QDateTime>
7
8// ImtCore includes
9#include <imtauth/ISession.h>
10
11
12namespace imtauth
13{
14
15
16class CSessionInfo: virtual public ISession
17{
18public:
19 // reimplemented (iser::ISession)
20 virtual QByteArray GetToken() const override;
21 virtual void SetToken(const QByteArray &token) override;
22 virtual QByteArray GetUserId() const override;
23 virtual void SetUserId(const QByteArray &userId) override;
24 virtual QDateTime GetCreationDate() const override;
25 virtual void SetCreationDate(const QDateTime& creationDate) override;
26 virtual QDateTime GetExpirationDate() const override;
27 virtual void SetExpirationDate(const QDateTime& expirationDate) override;
28
29 // reimplemented (iser::ISerializable)
30 virtual bool Serialize(iser::IArchive &archive) override;
31
32 // reimplemented (iser::IChangeable)
33 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
34 virtual bool IsEqual(const IChangeable& object) const override;
35 virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
36 virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS) override;
37
38private:
39 QByteArray m_token;
40 QByteArray m_userId;
41
42 QDateTime m_creationDate;
43 QDateTime m_expirationDate;
44};
45
46
47} // namespace imtauth
48
49