Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru_policy_c.h File Reference

Go to the source code of this file.

Functions

DLL_PUBLIC VPolicyPtr VPolicyCreate ()
 
DLL_PUBLIC void VPolicyDestroy (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VSetOwner (VPolicyPtr vPolicyPtr, const char *owner)
 
DLL_PUBLIC VSTATUS VGetOwner (VPolicyPtr vPolicyPtr, char **owner)
 
DLL_PUBLIC VSTATUS VShareWithUsers (VPolicyPtr vPolicyPtr, const char **users, unsigned int usersCount)
 
DLL_PUBLIC VSTATUS VRemoveUsers (VPolicyPtr vPolicyPtr, const char **users, unsigned int usersCount)
 
DLL_PUBLIC VSTATUS VGetSharedUsers (VPolicyPtr vPolicyPtr, char ***users, unsigned int *usersCount)
 
DLL_PUBLIC VSTATUS VEnableReshare (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisableReshare (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsReshareEnabled (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VEnableWatermarking (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisableWatermarking (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsWatermarkingEnabled (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VEnablePrint (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisablePrint (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsPrintEnabled (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VEnableCopy (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisableCopy (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsCopyEnabled (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VEnablePersistentProtection (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisablePersistentProtection (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsPersistentProtection (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VEnablePreventDownload (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VDisablePreventDownload (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VIsPreventDownloadEnabled (VPolicyPtr vPolicyPtr, bool *flag)
 
DLL_PUBLIC VSTATUS VExpireInMins (VPolicyPtr vPolicyPtr, unsigned int mins)
 
DLL_PUBLIC VSTATUS VExpireInDays (VPolicyPtr vPolicyPtr, unsigned int days)
 
DLL_PUBLIC VSTATUS VAddExpiration (VPolicyPtr vPolicyPtr, const char *expirationDate)
 
DLL_PUBLIC VSTATUS VRemoveExpiration (VPolicyPtr vPolicyPtr)
 
DLL_PUBLIC VSTATUS VGetExpiration (VPolicyPtr vPolicyPtr, char **expirationTimeStamp)
 

Function Documentation

DLL_PUBLIC VSTATUS VAddExpiration ( VPolicyPtr  vPolicyPtr,
const char *  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
vPolicyPtr- The pointer to policy opaque object.
expirationDate- Expiration date when the TDF will expire, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisableCopy ( VPolicyPtr  vPolicyPtr)

Turns off copy policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisablePersistentProtection ( VPolicyPtr  vPolicyPtr)

Turns off persistent protection policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisablePreventDownload ( VPolicyPtr  vPolicyPtr)

Turns off prevent download policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisablePrint ( VPolicyPtr  vPolicyPtr)

Turns off print policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisableReshare ( VPolicyPtr  vPolicyPtr)

Turns off reshare policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VDisableWatermarking ( VPolicyPtr  vPolicyPtr)

Turns off watermarking policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnableCopy ( VPolicyPtr  vPolicyPtr)

Turns on copy policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnablePersistentProtection ( VPolicyPtr  vPolicyPtr)

Turns on persistent protection policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnablePreventDownload ( VPolicyPtr  vPolicyPtr)

Turns on prevent download policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnablePrint ( VPolicyPtr  vPolicyPtr)

Turns on print policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnableReshare ( VPolicyPtr  vPolicyPtr)

Turns on reshare policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VEnableWatermarking ( VPolicyPtr  vPolicyPtr)

Turns on watermarking policy control flag

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VExpireInDays ( VPolicyPtr  vPolicyPtr,
unsigned int  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
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VExpireInMins ( VPolicyPtr  vPolicyPtr,
unsigned int  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
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VGetExpiration ( VPolicyPtr  vPolicyPtr,
char **  expirationTimeStamp 
)

Return the expiration time(in ISO-8601 format) of the TDF.

Parameters
vPolicyPtr- The pointer to policy opaque object.
expirationTimeStamp- The expiration time(in ISO-8601 format) of the TDF.
Returns
VSTATUS - VSTATUS_SUCCESS on success NOTE: The caller is responsible for freeing the expirationTimeStamp.
DLL_PUBLIC VSTATUS VGetOwner ( VPolicyPtr  vPolicyPtr,
char **  owner 
)

Get the owner of the policy

Parameters
vPolicyPtr- The pointer to policy opaque object.
owner- The owner's email address, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success NOTE: The caller is responsible for freeing the owner.
DLL_PUBLIC VSTATUS VGetSharedUsers ( VPolicyPtr  vPolicyPtr,
char ***  users,
unsigned int *  usersCount 
)

Return all the user who have access to the TDF.

Parameters
vPolicyPtr- The pointer to policy opaque object.
users- Holds the users who have access to the TDF.
usersCount- Total shared user count.
Returns
VSTATUS - VSTATUS_SUCCESS on success NOTE: The caller is responsible for freeing users array.
DLL_PUBLIC VSTATUS VIsCopyEnabled ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'Copy' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'Copy' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VIsPersistentProtection ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'PersistenProtection' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'PersistentProtection' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VIsPreventDownloadEnabled ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'PreventDownload' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'PreventDownload' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VIsPrintEnabled ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'Print' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'Print' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VIsReshareEnabled ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'Reshare' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'Reshare' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VIsWatermarkingEnabled ( VPolicyPtr  vPolicyPtr,
bool *  flag 
)

Return the status of 'Watermarking' control flag.

Parameters
vPolicyPtr- The pointer to policy opaque object.
flag- True, if 'Watermarking' control flag is set.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VPolicyPtr VPolicyCreate ( )

Create a new policy opaque object.

Returns
VPolicyPtr opaque object. NOTE: On failure returns NULL ptr.
DLL_PUBLIC void VPolicyDestroy ( VPolicyPtr  vPolicyPtr)

Destruct the policy instance.

Parameters
vPolicyPtr- The pointer to policy opaque object.
DLL_PUBLIC VSTATUS VRemoveExpiration ( VPolicyPtr  vPolicyPtr)

Remove the expiration

Parameters
vPolicyPtr- The pointer to policy opaque object.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VRemoveUsers ( VPolicyPtr  vPolicyPtr,
const char **  users,
unsigned int  usersCount 
)

Remove access to the TDF file/data for the users in the array

Parameters
vPolicyPtr- The pointer to policy opaque object.
users- Share the TDF with the users in the users array
usersCount- Total user count in the array.
Returns
VSTATUS - VSTATUS_SUCCESS on success
DLL_PUBLIC VSTATUS VSetOwner ( VPolicyPtr  vPolicyPtr,
const char *  owner 
)

Set the owner of the policy

Parameters
vPolicyPtr- The pointer to policy opaque object.
owner- The owner's email address, null terminated string.
Returns
VSTATUS - VSTATUS_SUCCESS on success 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.
DLL_PUBLIC VSTATUS VShareWithUsers ( VPolicyPtr  vPolicyPtr,
const char **  users,
unsigned int  usersCount 
)

Add access to the TDF file/data for the users in the array

Parameters
vPolicyPtr- The pointer to policy opaque object.
users- Share the TDF with the users in the users array
usersCount- Total user count in the array.
Returns
VSTATUS - VSTATUS_SUCCESS on success