32#ifndef API_MIP_UPE_ACTION_H_
33#define API_MIP_UPE_ACTION_H_
74 return static_cast<ActionType>(
static_cast<unsigned int>(a) |
static_cast<unsigned int>(b));
80 return static_cast<ActionType>(
static_cast<unsigned int>(a) &
static_cast<unsigned int>(b));
86 return static_cast<ActionType>(
static_cast<unsigned int>(a) ^
static_cast<unsigned int>(b));
103 virtual void Link() {}
104 virtual const std::string& GetId()
const {
return mId; }
105 virtual bool operator==(
const Action& action)
const {
106 return ((GetId() == action.GetId()) && (
GetType() == action.
GetType()) && IsEqual(action));
110 virtual bool IsEqual(
const Action& action)
const = 0;
112 Action(
const std::string&
id) : mId(id) {}
constexpr ActionType operator|(ActionType a, ActionType b)
Or (|) operator for Action type enum.
constexpr ActionType operator^(ActionType a, ActionType b)
Xor (^) operator for Action type enum.
ActionType
Different action types.
@ REMOVE_CONTENT_FOOTER
Remove content footer action type.
@ APPLY_LABEL
Apply label action type.
@ ADD_DYNAMIC_WATERMARK
Add a dynamic watermark to the entire document action type.
@ ADD_WATERMARK
Add a water mark to the entire document action type.
@ REMOVE_CONTENT_HEADER
Remove content header action type.
@ JUSTIFY
A justify action type.
@ PROTECT_DO_NOT_FORWARD
A protect by do not forward action type.
@ ADD_CONTENT_FOOTER
Add a content footer to the document action type.
@ REMOVE_WATERMARK
Remove watermarking action type.
@ PROTECT_BY_ENCRYPT_ONLY
A protect by encryption only action type.
@ CUSTOM
A custom defined action type.
@ METADATA
A Meta data change action type.
@ REMOVE_DYNAMIC_WATERMARK
Remove dynamic watermark action type.
@ PROTECT_ADHOC
A protect by adhoc policy action type.
@ ADD_CONTENT_HEADER
Add a content header to the document action type.
@ PROTECT_BY_TEMPLATE
A protect by template action type.
@ REMOVE_PROTECTION
Remove protection action type.
@ PROTECT_DO_NOT_FORWARD_DK
A protect by do not forward action type with double key.
@ RECOMMEND_LABEL
Recommend label action type.
@ PROTECT_ADHOC_DK
A protect by adhoc policy action type.
constexpr ActionType operator&(ActionType a, ActionType b)
And (&) operator for Action type enum.
virtual ActionType GetType() const =0
Get the type of Action.