33#ifndef API_MIP_PROTECTION_LICENSE_RIGHTS_DATA_H_
34#define API_MIP_PROTECTION_LICENSE_RIGHTS_DATA_H_
69 const DirectoryObjectType type,
const std::string& email,
const std::string& objectId,
const std::string& puid)
70 : mType(type), mEmail(email), mObjectId(objectId), mPuid(puid){};
84 const std::string&
GetEmail()
const {
return mEmail; };
98 const std::string&
GetPuid()
const {
return mPuid; };
103 std::string mObjectId;
119 : mDirectoryObject(directoryObject), mRights(
rights){};
133 const std::vector<std::string>&
GetRights()
const {
return mRights; };
137 std::vector<std::string> mRights;
153 const std::vector<DirectoryObjectRights>& directoryObjectsRights,
154 const std::chrono::time_point<std::chrono::system_clock>& contentValidUntil)
155 : mType(type), mDirectoryObjectsRights(directoryObjectsRights), mContentValidUntil(contentValidUntil){};
183 const std::chrono::time_point<std::chrono::system_clock>
GetContentValidUntil()
const {
return mContentValidUntil; };
187 std::vector<DirectoryObjectRights> mDirectoryObjectsRights;
188 std::chrono::time_point<std::chrono::system_clock> mContentValidUntil;
The directory object and rights associated with it.
const std::vector< std::string > & GetRights() const
Gets rights associated with the directory object.
const DirectoryObject & GetDirectoryObject() const
Gets directory object.
DirectoryObjectRights(const DirectoryObject &directoryObject, const std::vector< std::string > &rights)
DirectoryObjectRights constructor.
The directory object information which includes- type, email, objectId and PUID.
const std::string & GetPuid() const
Gets GUID of directory object.
DirectoryObjectType GetDirectoryObjectType() const
Gets type of directory object.
DirectoryObjectType
Describes the type of directory object.
@ INTERNAL
Internal user - ANYONE.
DirectoryObject(const DirectoryObjectType type, const std::string &email, const std::string &objectId, const std::string &puid)
DirectoryObject constructor.
const std::string & GetObjectId() const
Gets object ID of directory object.
const std::string & GetEmail() const
Gets email address of directory object.
The rights related information of the publishing license.
LicenseRightsData(const ProtectionType type, const std::vector< DirectoryObjectRights > &directoryObjectsRights, const std::chrono::time_point< std::chrono::system_clock > &contentValidUntil)
LicenseRightsData constructor.
ProtectionType GetProtectionType() const
Gets type of protection, whether it originated from protection SDK template or not.
bool DoesContentExpire()
Checks if content has an expiration time or not.
const std::chrono::time_point< std::chrono::system_clock > GetContentValidUntil() const
Gets protection expiration time.
const std::vector< DirectoryObjectRights > & GetDirectoryObjectsRights() const
Gets the set of directory objects and the rights associated with them.
Defines ProtectionDescriptor interface.
ProtectionType
Describes whether protection is based off a template or ad-hoc (custom)