ImagingTools Core SDK
CLoginEvent.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// ACF includes
6#include <ilog/CMessage.h>
7
8
9namespace imtlog
10{
11
12
13class CLoginEvent: virtual public ilog::CMessage
14{
15public:
16 typedef ilog::CMessage BaseClass;
17
18 enum MessageId
19 {
20 MI_LOGIN_EVENT = 100000000
21 };
22
23 enum Action
24 {
25 ACT_LOGIN = 0,
26 ACT_LOGOUT
27 };
28
29 struct LoginEventInfo
30 {
31 int action;
32 QString userName;
33 };
34
35 CLoginEvent();
36 CLoginEvent(
37 const LoginEventInfo& loginEventInfo,
38 istd::IInformationProvider::InformationCategory category,
39 const QString& text = QString(),
40 const QString& source = QString(),
41 int flags = 0,
42 const QDateTime* timeStampPtr = nullptr);
43
44 const LoginEventInfo& GetLoginEventInfo() const;
45
46 // reimplemented (iser::ISerializable)
47 virtual bool Serialize(iser::IArchive& archive) override;
48
49 // reimplemented (iser::IObject)
50 virtual QByteArray GetFactoryId() const override;
51
52 // reimplemented (istd::IChangeable)
53 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
54 virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
55
56public:
57 static QByteArray GetTypeId();
58
59private:
60 LoginEventInfo m_loginEventInfo;
61};
62
63
64} // namespace imtlog
65
66