Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
protection_descriptor_cc.h File Reference

Defines C-Style ProtectionDescriptor interface. More...

#include <time.h>
#include "mip_cc/common_types_cc.h"
#include "mip_cc/dictionary_cc.h"
#include "mip_cc/error_cc.h"
#include "mip_cc/result_cc.h"
#include "mip_cc/string_list_cc.h"
#include "mip_cc/dynamic_watermark_cc.h"
+ Include dependency graph for protection_descriptor_cc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mip_cc_user_rights
 A group of users and the rights associated with them. More...
 
struct  mip_cc_user_roles
 A group of users and the roles associated with them. More...
 

Typedefs

typedef mip_cc_handlemip_cc_protection_descriptor
 
typedef mip_cc_handlemip_cc_user_rights_result
 
typedef mip_cc_handlemip_cc_user_roles_result
 

Enumerations

enum  mip_cc_protection_type {
  MIP_PROTECTION_TYPE_TEMPLATE_BASED = 0 ,
  MIP_PROTECTION_TYPE_CUSTOM = 1
}
 A description of whether protection is defined by a template or ad-hoc. More...
 

Functions

 MIP_CC_API (mip_cc_result) MIP_CC_CreateProtectionDescriptorFromTemplate(const char *templateId
 Creates a protection descriptor whose access permissions are defined by an RMS template.
 
 MIP_CC_API (void) MIP_CC_ReleaseProtectionDescriptor(mip_cc_protection_descriptor protectionDescriptor)
 Release resources associated with a protection descriptor.
 

Variables

char const int64_t int64_t * actualDescriptionSize
 
char const int64_t int64_t * actualNameSize
 
char const int64_t int64_t * actualOwnerSize
 
char const int64_t int64_t * actualReferrerSize
 
char const int64_t int64_t * actualUrlSize
 
const int64_t const char const char const char const time_t const bool allowOfflineAccess
 
mip_cc_guidcontentId
 
const int64_t const char const char const char const time_t * contentValidUntil
 
const int64_t const char const char * description
 
char * descriptionBuffer
 
char const int64_t descriptionBufferSize
 
int64_t * descriptionSize
 
bool * doesAllowOfflineAccess
 
bool * doesContentExpire
 
mip_cc_dynamic_watermarkdynamicWatermark
 
const int64_t const char const char const char const time_t const bool const mip_cc_dictionary encryptedAppData
 
const mip_cc_dictionary mip_cc_protection_descriptor mip_cc_errorerrorInfo
 
mip_cc_guidlabelId
 
const int64_t const char * name
 
char * nameBuffer
 
char const int64_t nameBufferSize
 
int64_t * nameSize
 
char * ownerBuffer
 
char const int64_t ownerBufferSize
 
int64_t * ownerSize
 
const mip_cc_dictionary mip_cc_protection_descriptorprotectionDescriptor
 
mip_cc_protection_typeprotectionType
 
const int64_t const char const char const char * referrer
 
char * referrerBuffer
 
char const int64_t referrerBufferSize
 
int64_t * referrerSize
 
const mip_cc_dictionary signedAppData
 
mip_cc_guidtemplateId
 
char * urlBuffer
 
char const int64_t urlBufferSize
 
int64_t * urlSize
 
mip_cc_user_rights_resultuserRights
 
const int64_t userRightsCount
 
mip_cc_user_roles_resultuserRoles
 
const int64_t userRolesCount
 

Detailed Description

Defines C-Style ProtectionDescriptor interface.

Definition in file protection_descriptor_cc.h.

Typedef Documentation

◆ mip_cc_protection_descriptor

◆ mip_cc_user_rights_result

◆ mip_cc_user_roles_result

Enumeration Type Documentation

◆ mip_cc_protection_type

A description of whether protection is defined by a template or ad-hoc.

Enumerator
MIP_PROTECTION_TYPE_TEMPLATE_BASED 

Based on an RMS template.

MIP_PROTECTION_TYPE_CUSTOM 

Custom, ad-hoc protection.

Definition at line 52 of file protection_descriptor_cc.h.

52 {
53 MIP_PROTECTION_TYPE_TEMPLATE_BASED = 0, /**< Based on an RMS template */
54 MIP_PROTECTION_TYPE_CUSTOM = 1, /**< Custom, ad-hoc protection */
mip_cc_protection_type
A description of whether protection is defined by a template or ad-hoc.
@ MIP_PROTECTION_TYPE_CUSTOM
Custom, ad-hoc protection.
@ MIP_PROTECTION_TYPE_TEMPLATE_BASED
Based on an RMS template.

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Creates a protection descriptor whose access permissions are defined by an RMS template.

Gets the dynamic watermark.

Gets List of users-to-roles mappings.

Gets list of users-to-rights mappings.

Gets double key URL.

Gets size of buffer required to store double key URL.

Gets encrypted application data.

Gets signed application data.

Gets protection referrer.

Gets size of buffer required to store referrer.

Gets whether or not offline access is allowed.

Gets protection expiration time (in seconds since epoch)

Gets whether or not content has an expiration time or not.

Gets content ID.

Gets label ID.

Gets template ID.

Gets protection description.

Gets size of buffer required to store description.

Gets protection name.

Gets size of buffer required to store name.

Gets protection owner.

Gets size of buffer required to store owner.

Gets type of protection, whether it is defined by an RMS template or not.

Creates a protection descriptor whose access permissions are defined by users and roles.

Creates a protection descriptor whose access permissions are defined by users and rights.

Parameters
templateIdTemplate ID
signedAppDataApp-specific data (cleartext) that is signed into the publishing license
protectionDescriptor[Output] Newly-created protection descriptor instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
userRightsGroups of users and their rights
userRightsCountNumber of user/rights groups
nameProtection name
referrerReferrer address (a URI displayable to a user that provides information on how to gain access)
contentValidUntilProtection expiration time
allowOfflineAccessDetermines whether a license to consume content can be cached locally
encryptedAppDataApp-specific data (cleartext) that is encrypted into the publishing license
signedAppDataApp-specific data (cleartext) that is signed into the publishing license
protectionDescriptor[Output] Newly-created protection descriptor instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
userRolesGroups of users and their roles
userRolesCountNumber of user/roles groups
nameProtection policy name
referrerReferrer address (a URI displayable to a user that provides information on how to gain access)
contentValidUntilProtection expiration time
allowOfflineAccessDetermines whether a license to consume content can be cached locally
encryptedAppDataApp-specific data (cleartext) that is encrypted into the publishing license
signedAppDataApp-specific data (cleartext) that is signed into the publishing license
protectionDescriptor[Output] Newly-created protection descriptor instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
protectionType[Output] Protection type
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
ownerSize[Output] Size of buffer to hold owner (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
ownerBuffer[Output] Buffer the owner will be copied into.
ownerBufferSizeSize (in number of chars) of the ownerBuffer.
actualOwnerSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If ownerBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualOwnerSize will be set to the minimum required buffer size.
Parameters
protectionDescriptorDescriptor associated with protected content
nameSize[Output] Size of buffer to hold name (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
nameBuffer[Output] Buffer the name will be copied into.
nameBufferSizeSize (in number of chars) of the nameBuffer.
actualNameSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If nameBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualNameSize will be set to the minimum required buffer size.
Parameters
protectionDescriptorDescriptor associated with protected content
descriptionSize[Output] Size of buffer to hold description (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
descriptionBuffer[Output] Buffer the description will be copied into.
descriptionBufferSizeSize (in number of chars) of the descriptionBuffer.
actualDescriptionSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If descriptionBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualDescriptionSize will be set to the minimum required buffer size.
Parameters
protectionDescriptorDescriptor associated with protected content
templateId[Output] Template ID associated with protection
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
labelId[Output] Label ID associated with protection
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
contentId[Output] Content ID associated with protection
errorInfo[Output] (Optional) Failure info if operation result is error
Note
Publishing licenses will have this identifier surrounded by curly braces "{}". Those braces are removed from the value stored in contentId
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
doesContentExpire[Output] Whether or not content expires
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
contentValidUntil[Output] Content expiration time (in seconds since epoch)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
doesAllowOfflineAccess[Output] Whether or not offline access is allowed
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
referrerSize[Output] Size of buffer to hold referrer (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
referrerBuffer[Output] Buffer the referrer will be copied into.
referrerBufferSizeSize (in number of chars) of the referrerBuffer.
actualReferrerSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If referrerBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualReferrerSize will be set to the minimum required buffer size.
Parameters
protectionDescriptorDescriptor associated with protected content
signedAppData[Output] Dictionary of key value pairs that are signed as part of publishing license. It is the caller's responsibility to release this dictionary with MIP_CC_ReleaseDictionary
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
encryptedAppData[Output] Dictionary of key value pairs that are encrypted as part of publishing license. It is the caller's responsibility to release this dictionary with MIP_CC_ReleaseDictionary
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
url[Output] Size of buffer to hold double key URL (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorDescriptor associated with protected content
urlBuffer[Output] Buffer the url will be copied into.
urlBufferSizeSize (in number of chars) of the urlBuffer.
actualUrlSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If urlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualUrlSize will be set to the minimum required buffer size.
Parameters
protectionDescriptorDescriptor associated with protected content
userRights[Output] List of users-to-rights mappings. It is the caller's responsibility to release this list with MIP_CC_ReleaseUserRightsResult
userRightsCount[Output] Number of user/rights groups
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The value of the UserRights property will be empty if the current user doesn't have access to this information (that is, if the user does not have the VIEWRIGHTSDATA right or is not the owner of the content).
Parameters
protectionDescriptorDescriptor associated with protected content
userRoles[Output] Gets List of users-to-roles mappings. It is the caller's responsibility to release this list with MIP_CC_ReleaseUserRolesResult
userRolesCount[Output] Number of user/roles groups
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
protectionDescriptorThe protection descriptor from which to retrieve the dynamic watermark
dynamicWatermark[Output] The retrieved dynamic watermark (null if not present)
errorInfo[Output] (Optional) Failure info if operation results is failure
Returns
Result code indicating success or failure
Note
The returned 'dynamicWatermark' (mip_cc_dynamic_watermark*) must be freed by calling MIP_CC_ReleaseDynamicWatermark

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with a protection descriptor.

Parameters
protectionDescriptorProtection descriptor to be released

Variable Documentation

◆ actualDescriptionSize

char const int64_t int64_t* actualDescriptionSize

Definition at line 267 of file protection_descriptor_cc.h.

◆ actualNameSize

char const int64_t int64_t* actualNameSize

Definition at line 232 of file protection_descriptor_cc.h.

◆ actualOwnerSize

char const int64_t int64_t* actualOwnerSize

Definition at line 197 of file protection_descriptor_cc.h.

◆ actualReferrerSize

char const int64_t int64_t* actualReferrerSize

Definition at line 389 of file protection_descriptor_cc.h.

◆ actualUrlSize

char const int64_t int64_t* actualUrlSize

Definition at line 454 of file protection_descriptor_cc.h.

◆ allowOfflineAccess

const int64_t const char const char const char const time_t const bool allowOfflineAccess

Definition at line 116 of file protection_descriptor_cc.h.

◆ contentId

mip_cc_guid* contentId

Definition at line 312 of file protection_descriptor_cc.h.

◆ contentValidUntil

int64_t* contentValidUntil

Definition at line 115 of file protection_descriptor_cc.h.

◆ description

const int64_t const char const char* description

Definition at line 113 of file protection_descriptor_cc.h.

◆ descriptionBuffer

char* descriptionBuffer

Definition at line 265 of file protection_descriptor_cc.h.

◆ descriptionBufferSize

char const int64_t descriptionBufferSize

Definition at line 266 of file protection_descriptor_cc.h.

◆ descriptionSize

int64_t* descriptionSize

Definition at line 246 of file protection_descriptor_cc.h.

◆ doesAllowOfflineAccess

bool* doesAllowOfflineAccess

Definition at line 354 of file protection_descriptor_cc.h.

◆ doesContentExpire

bool* doesContentExpire

Definition at line 326 of file protection_descriptor_cc.h.

◆ dynamicWatermark

mip_cc_dynamic_watermark* dynamicWatermark

Definition at line 508 of file protection_descriptor_cc.h.

◆ encryptedAppData

mip_cc_dictionary * encryptedAppData

Definition at line 117 of file protection_descriptor_cc.h.

◆ errorInfo

Definition at line 91 of file protection_descriptor_cc.h.

◆ labelId

mip_cc_guid* labelId

Definition at line 295 of file protection_descriptor_cc.h.

◆ name

const int64_t const char* name

Definition at line 112 of file protection_descriptor_cc.h.

◆ nameBuffer

char* nameBuffer

Definition at line 230 of file protection_descriptor_cc.h.

◆ nameBufferSize

char const int64_t nameBufferSize

Definition at line 231 of file protection_descriptor_cc.h.

◆ nameSize

int64_t* nameSize

Definition at line 211 of file protection_descriptor_cc.h.

◆ ownerBuffer

char* ownerBuffer

Definition at line 195 of file protection_descriptor_cc.h.

◆ ownerBufferSize

char const int64_t ownerBufferSize

Definition at line 196 of file protection_descriptor_cc.h.

◆ ownerSize

int64_t* ownerSize

Definition at line 176 of file protection_descriptor_cc.h.

◆ protectionDescriptor

const int64_t const char const char const char const time_t const bool const mip_cc_dictionary const mip_cc_dictionary mip_cc_protection_descriptor* protectionDescriptor

Definition at line 90 of file protection_descriptor_cc.h.

◆ protectionType

mip_cc_protection_type* protectionType

Definition at line 162 of file protection_descriptor_cc.h.

◆ referrer

const int64_t const char const char const char * referrer

Definition at line 114 of file protection_descriptor_cc.h.

◆ referrerBuffer

char* referrerBuffer

Definition at line 387 of file protection_descriptor_cc.h.

◆ referrerBufferSize

char const int64_t referrerBufferSize

Definition at line 388 of file protection_descriptor_cc.h.

◆ referrerSize

int64_t* referrerSize

Definition at line 368 of file protection_descriptor_cc.h.

◆ signedAppData

mip_cc_dictionary * signedAppData

Definition at line 89 of file protection_descriptor_cc.h.

◆ templateId

mip_cc_guid* templateId

Definition at line 281 of file protection_descriptor_cc.h.

◆ urlBuffer

char* urlBuffer

Definition at line 452 of file protection_descriptor_cc.h.

◆ urlBufferSize

char const int64_t urlBufferSize

Definition at line 453 of file protection_descriptor_cc.h.

◆ urlSize

int64_t* urlSize

Definition at line 433 of file protection_descriptor_cc.h.

◆ userRights

Definition at line 473 of file protection_descriptor_cc.h.

◆ userRightsCount

mip_cc_user_rights_result int64_t* userRightsCount

Definition at line 111 of file protection_descriptor_cc.h.

◆ userRoles

Definition at line 490 of file protection_descriptor_cc.h.

◆ userRolesCount

mip_cc_user_roles_result int64_t* userRolesCount

Definition at line 140 of file protection_descriptor_cc.h.