#include <virtru_policy.h>
virtru::Policy::Policy |
( |
| ) |
|
virtru::Policy::~Policy |
( |
| ) |
|
virtru::Policy::Policy |
( |
const Policy & |
policy | ) |
|
virtru::Policy::Policy |
( |
Policy && |
policy | ) |
|
|
noexcept |
void virtru::Policy::addExpiration |
( |
const std::string & |
expirationDate | ) |
|
Access to the TDF data will be revoked for all users at the specified date. The owner will retain access after the expiration time is reached. The expiration date is specified in ISO-8601 format, and can include a time component. Ex: 2019-05-24T16:12:41Z
- Parameters
-
expirationDate | - Expiration date when the TDF will expire |
Apply the policy control on to policyObject.
- Parameters
-
policyObject | - The VirtruPolicyObject. |
void virtru::Policy::disableCopy |
( |
| ) |
|
Turns off copy policy control flag.
void virtru::Policy::disableOneClick |
( |
| ) |
|
|
private |
Turns off one-click flag.
void virtru::Policy::disablePersistentProtection |
( |
| ) |
|
Turns off persistent protection policy control flag.
void virtru::Policy::disablePreventDownload |
( |
| ) |
|
Turns off prevent download policy control flag.
void virtru::Policy::disablePrint |
( |
| ) |
|
Turns off print policy control flag.
void virtru::Policy::disableReshare |
( |
| ) |
|
Turns off reshare policy control flag.
void virtru::Policy::disableWatermarking |
( |
| ) |
|
Turns off watermarking policy control flag.
void virtru::Policy::enableCopy |
( |
| ) |
|
Turns on copy policy control flag.
void virtru::Policy::enableOneClick |
( |
| ) |
|
|
private |
void virtru::Policy::enablePersistentProtection |
( |
| ) |
|
Turns on persistent protection policy control flag.
void virtru::Policy::enablePreventDownload |
( |
| ) |
|
Turns on prevent download policy control flag.
void virtru::Policy::enablePrint |
( |
| ) |
|
Turns on print policy control flag.
void virtru::Policy::enableReshare |
( |
| ) |
|
Turns on reshare policy control flag.
void virtru::Policy::enableWatermarking |
( |
| ) |
|
Turns on watermarking policy control flag.
void virtru::Policy::expireInDays |
( |
unsigned |
days | ) |
|
Set the expiration in days
Access to the TDF data will be revoked for all users in the number of days specified, starting from the time this call is made. The owner will retain access after the expiration time is reached.
- Parameters
-
days | - days until expiration |
void virtru::Policy::expireInMins |
( |
unsigned |
mins | ) |
|
Set the expiration in minutes
Access to the TDF data will be revoked for all users in the number of minutes specified, starting from the time this call is made. The owner will retain access after the expiration time is reached.
- Parameters
-
mins | - minutes until expiration |
std::string virtru::Policy::getExpiration |
( |
| ) |
const |
Return the expiration time(in ISO-8601 format) of the TDF.
- Returns
- string - The expiration time(in ISO-8601 format) of the TDF. NOTE: If the expiration is not set, an empty string is return.
std::string virtru::Policy::getOwner |
( |
| ) |
const |
Return the owner of the TDF.
- Returns
- owner - The owner's email address. NOTE: If the owner is not set, an empty string is return.
std::vector<std::string> virtru::Policy::getSharedUsers |
( |
| ) |
const |
Return all the user who have access to the TDF.
- Returns
- users - All the user who have access to the TDF.
bool virtru::Policy::isCopyEnabled |
( |
| ) |
const |
Return the status of 'Copy' control flag.
- Returns
- bool - True, if 'Copy' control flag is set.
bool virtru::Policy::isPersistentProtectionEnabled |
( |
| ) |
const |
Return the status of 'PersistenProtection' control flag.
- Returns
- bool - True, if 'PersistentProtection' control flag is set.
bool virtru::Policy::isPreventDownloadEnabled |
( |
| ) |
const |
Return the status of 'PreventDownload' control flag.
- Returns
- bool - True, if 'PreventDownload' control flag is set.
bool virtru::Policy::isPrintEnabled |
( |
| ) |
const |
Return the status of 'Print' control flag.
- Returns
- bool - True, if 'Print' control flag is set.
bool virtru::Policy::isReshareEnabled |
( |
| ) |
const |
Return the status of 'Reshare' control flag.
- Returns
- bool - True, if 'Reshare' control flag is set.
bool virtru::Policy::isWatermarkingEnabled |
( |
| ) |
const |
Return the status of 'Watermarking' control flag.
- Returns
- bool - True, if 'Watermarking' control flag is set.
Move assignment operator.
void virtru::Policy::removeExpiration |
( |
| ) |
|
void virtru::Policy::removeUsers |
( |
const std::vector< std::string > & |
users | ) |
|
Remove access to the TDF file/data for the users in the list
- Parameters
-
users | - Remove access to the TDF file/data for the users in the vector |
void virtru::Policy::setOwner |
( |
const std::string & |
owner | ) |
|
Set the owner of the TDF
- Parameters
-
owner | - The owner's email address NOTE: By default, the owner is the address that was used when the client instance was created. This method will change the owner to the specified email address for the instance. |
void virtru::Policy::shareWithUsers |
( |
const std::vector< std::string > & |
users | ) |
|
Add access to the TDF file/data for the users in the list
- Parameters
-
users | - Share the TDF with the users in the vector |
std::string virtru::Policy::toJsonStringForKas |
( |
| ) |
const |
|
private |
Expresses the policy as a json string for KAS
- Returns
- - Json fomated string.
std::string virtru::Policy::toString |
( |
| ) |
const |
Return the description of all the policy controls of the instance.
- Returns
- - A formated string of all the policy controls of the instance.
friend virtru::Policy::Client |
|
private |
std::unique_ptr<Impl> virtru::Policy::m_impl |
|
private |
friend virtru::Policy::VirtruPolicyObject |
|
private |
The documentation for this class was generated from the following file: