6#include <iser/IObject.h>
7#include <iprm/IParamsSet.h>
8#include <idoc/IDocumentMetaInfo.h>
15class IUserRecentAction :
virtual public iser::IObject
20 MIT_USER_ID = idoc::IDocumentMetaInfo::MIT_USER + 1,
29 MIT_ACTION_TYPE_DESCRIPTION
32 typedef std::function<iser::ISerializableSharedPtr(
const QByteArray& actionTypeId)> ActionDataFactoryFunction;
37 const QByteArray&
id = QByteArray(),
38 const QByteArray& typeId = QByteArray(),
39 const QString& typeName = QString(),
40 const QString& source = QString(),
41 const QString& name = QString()):
54 bool operator == (
const TargetInfo& other)
const
56 return (
id == other.id) &&
57 (typeId == other.typeId) &&
58 (typeName == other.typeName) &&
59 (source == other.source) &&
63 bool operator != (
const TargetInfo& other)
const
65 return !(*
this == other);
72 const QByteArray&
id = QByteArray(),
73 const QString& name = QString(),
74 const QString& description = QString()):
76 description(description),
83 bool operator == (
const ActionTypeInfo& other)
const
85 return (
id == other.id) &&
86 (description == other.description) &&
90 bool operator != (
const ActionTypeInfo& other)
const
92 return !(*
this == other);
98 UserInfo(
const QByteArray&
id = QByteArray(),
const QString& name = QString()): id(id), name(name){}
103 bool operator == (
const UserInfo& other)
const
105 return (
id == other.id) &&
106 (name == other.name);
109 bool operator != (
const UserInfo& other)
const
111 return !(*
this == other);
115 virtual UserInfo GetUserInfo()
const = 0;
116 virtual void SetUserInfo(UserInfo userInfo) = 0;
118 virtual ActionTypeInfo GetActionTypeInfo()
const = 0;
119 virtual void SetActionTypeInfo(ActionTypeInfo actionTypeInfo) = 0;
121 virtual TargetInfo GetTargetInfo()
const = 0;
122 virtual void SetTargetInfo(TargetInfo targetInfo) = 0;
124 virtual QDateTime GetTimestamp()
const = 0;
125 virtual void SetTimestamp(
const QDateTime& timestamp) = 0;
127 virtual iser::ISerializableSharedPtr GetActionData()
const = 0;
128 virtual void SetActionData(
const iser::ISerializableSharedPtr& actionDataPtr) = 0;
130 virtual void SetActionDataFactory(
const ActionDataFactoryFunction& factory) = 0;
134typedef istd::TUniqueInterfacePtr<IUserRecentAction> IUserActionInfoUniquePtr;
135typedef istd::TSharedInterfacePtr<IUserRecentAction> IUserActionInfoSharedPtr;