Microsoft Information Protection SDK - C 1.17
API Reference Documentation for C
Loading...
Searching...
No Matches
protection_engine_cc.h File Reference

Defines C-Style ProtectionEngine functions. More...

Go to the source code of this file.

Typedefs

typedef mip_cc_handlemip_cc_protection_engine
 
typedef mip_cc_handlemip_cc_protection_engine_settings
 

Functions

 MIP_CC_API (void) MIP_CC_ReleaseProtectionEngine(mip_cc_protection_engine engine)
 Release resources associated with a protection engine.
 
 MIP_CC_API (mip_cc_result) MIP_CC_ProtectionEngine_CreateProtectionHandlerForPublishing(const mip_cc_protection_engine engine
 Creates a protection handler for publishing new content.
 
 MIP_CC_DEPRECATED_API (mip_cc_result) MIP_CC_CreateProtectionEngineSettingsWithIdentity(const mip_cc_identity *identity
 Create a settings object used to create a brand new protection engine.
 

Variables

const mip_cc_protection_handler_publishing_settings settings
 
const mip_cc_protection_handler_publishing_settings const void * context
 
const mip_cc_protection_handler_publishing_settings const void mip_cc_protection_handlerhandler
 
const mip_cc_protection_handler_publishing_settings const void mip_cc_protection_handler mip_cc_errorerrorInfo
 
int64_t * idSize
 
char * idBuffer
 
char const int64_t idBufferSize
 
char const int64_t int64_t * actualIdSize
 
const void int64_t * templatesSize
 
const void mip_cc_template_descriptortemplateDescriptors
 
const void mip_cc_template_descriptor const int64_t templateBufferSize
 
const void mip_cc_template_descriptor const int64_t int64_t * actualTemplatesSize
 
const void const char * documentId
 
const void const char const char * labelId
 
const void const char const char const char * ownerEmail
 
const void const char const char const char const char * delegatedUserEmail
 
const void const char const char const char const char mip_cc_string_listrights
 
const void const char const char const char const char mip_cc_license_infolicenseInfo
 
int64_t * clientDataSize
 
char * clientDataBuffer
 
char const int64_t clientDataBufferSize
 
char const int64_t int64_t * actualClientDataSize
 
const mip_cc_delegation_license_settings const void mip_cc_delegation_licensesdelegationLicenses
 
const char * clientData
 
const char const char * locale
 
const char const char mip_cc_protection_engine_settingsengineSettings
 
const mip_cc_identityidentity
 
const mip_cc_auth_callback authCallback
 
const mip_cc_dictionary customSettings
 
const char * sessionId
 
const mip_cc_cloud cloud
 
const char * cloudEndpointBaseUrl
 
const char * underlyingApplicationId
 
bool allowCloudServiceOnly
 
int templateRefreshIntervalHours
 
int int templateBatchingSize
 
const char * capability
 
const char bool * removed
 
mip_cc_string_listcapabilities
 

Detailed Description

Defines C-Style ProtectionEngine functions.

Typedef Documentation

◆ mip_cc_protection_engine

◆ mip_cc_protection_engine_settings

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Creates a protection handler for publishing new content.

Gets the set of supported capabilities being passed to RMS.

Remove a capability from the set of capabilities supported when calling RMS.

Add a capability to the set of capabilities supported when calling RMS.

Sets whether or not only cloud service is allowed.

Sets underlying application ID.

Sets base URL for all service requests.

Sets cloud which affects endpoint URLs for all service requests.

Sets the session ID that can be used to correlate logs and telemetry.

Configures custom settings, used for feature gating and testing.

Sets the client data that will be stored opaquely alongside this engine and persist across sessions.

Create a settings object used to load an existing protection engine by engine ID if it already exists, else create a new engine.

Create a settings object used to create a brand new protection engine.

Get the delegation and end-user licenses associated with a protection license.

Get client data associated with a protection engine.

Gets the size of client data associated with a protection engine.

Get list of rights granted to a user for a label ID.

Get collection of templates available to a user.

Gets the number of RMS templates associated with a protection engine.

Gets engine ID.

Gets size of buffer required to engine ID.

Creates a protection handler for consuming existing content.

Parameters
engineEngine under which a handler will be created
settingsProtection handler settings
contextClient context that will be opaquely passed to HttpDelegate and AuthDelegate
handler[Output] Newly-created protection handler instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineProtection engine
idSize[Output] Size of buffer to hold engine ID (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineProtection engine
idBuffer[Output] Buffer the id will be copied into.
idBufferSizeSize (in number of chars) of the idBuffer.
actualIdSize[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 idBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualIdSize will be set to the minimum required buffer size.
Parameters
engineProtection engine
contextClient context that will be opaquely passed to HttpDelegate and AuthDelegate
templatesSize[Output] Number of templates
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
This API may result in an independent HTTP operation. Consider using 'MIP_CC_ProtectionEngine_GetTemplates' directly with a pre-defined buffer to avoid unnecessary extra HTTP operations.
Parameters
engineProtection engine
contextClient context that will be opaquely passed to HttpDelegate and AuthDelegate
mip_cc_template_descriptor[Output] buffer to create template handlers.
templateBufferSizeSize (in number of items) of the templateBuffer.
actualTemplatesSize[Output] Number of template IDs written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If templateBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualTemplateSize will be set to the minimum required buffer size. Each mip_cc_template_descriptor must be released by the caller by calling MIP_CC_ReleaseTemplateDescriptor().
Parameters
engineProtection engine
contextClient context that will be opaquely passed to HttpDelegate and AuthDelegate
documentIdDocument ID assigned to the document
labelIdLabel ID applied to the document
ownerEmailOwner of the document
delagedUserEmailEmail of user if the authenticating user/application is acting on behalf of another user, empty if none
rights[Output] List of rights granted to a user, memory owned by caller
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The 'rights' variable must be released by the caller by calling MIP_CC_ReleaseStringList
Parameters
engineProtection engine
contextClient context that will be opaquely passed to the HttpDelegate and AuthDelegate
documentIdDocument ID assigned to the document
labelIdLabel ID applied to the document
ownerEmailOwner of the document
delagedUserEmailEmail of the user if the authenticating user/application is acting on behalf of another user, empty if none
licenseInfo[Output] LicenseInfo pertaining to a given label id. Memory owned by caller.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The returned 'licenseInfo' (mip_cc_license_info*) must be freed by calling MIP_CC_ReleaseLicenseInfo
Parameters
engineProtection engine
clientDataSize[Output] Size of client data (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineProtection engine
clientDataBuffer[Output] Buffer the client data will be copied into
clientDataBufferSizeSize (in number of chars) of clientDataBuffer.
actualClientDataSize[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 clientDataBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualClientDataSize will be set to the minimum required buffer size.
Parameters
engineThe mip_cc_protection_engine and associated identity to use when querying the licenses
settingsA collection of mip_cc_delegation_license_settings that determine which licenses to retrieve
context(Optional) Optional context that is passed along to any listening HttpDelegate.
delegationLicenses[Output] Returned collection of mip_cc_delegation_license objects.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
To avoid memory leaks, delegationLicenses must be released using MIP_CC_ReleaseDelegationLicenses.
Parameters
identityIdentity that will be associated with ProtectionEngine
authCallbackCallback object to be used for authentication, implemented by client application
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
engineSettings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineIdID of existing cached engine
identity(Optional) Identity that will be associated with ProtectionEngine
authCallbackCallback object to be used for authentication, implemented by client application
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
engineSettings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'identity' will only be used for new engines. If an engine with the specified engine id already exists in the local cache, the identity from the cached engine will be used instead.
Parameters
settingsEngine settings
clientDataClient data
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineSettingsEngine settings
customSettingsKey/value pairs of custom settings
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
sessionIdSession ID that represents the lifetime of a protection engine
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
cloudCloud identifier (default = Unknown)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If cloud is not specified, then it will be determined by DNS lookup of the engine's identity domain if possible, else fall back to global cloud.
Parameters
settingsEngine settings
cloudEndpointBaseUrlBase URL (e.g. 'https://api.aadrm.com')
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
This value will only be read and must be set for Cloud = MIP_CLOUD_CUSTOM
Parameters
settingsEngine settings
underlyingApplicationIdApplication ID (could be a Guid)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
allowCloudServiceOnlyA boolean value indicating whether or not only cloud service is allowed
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
templateRefreshIntervalHoursHow long, in hours, a cached template will be valid to use. A value of 0 means templates should never be cached. This is the default.
templateBatchingSizeIf doing offline publishing, how many temlates will be fetched at a single time. Max 25.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineSettingsEngine settings
capabilityThe capability to add to indicate a supported feature to RMS
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineSettingsEngine settings
capabilityThe capability to remove from the supported features in RMS
removed[Output] A boolean indiciating if the supplied capability was removed.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
engineSettingsEngine settings
capabilities[Output] Gets the list of capabilities being passed to RMS
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The returned 'capabilities' (mip_cc_string_list*) must be freed by calling MIP_CC_ReleaseStringList.

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with a protection engine.

Release resources associated with a protection engine settings.

Parameters
engineProtection engine to release
engineSettingsProtection engine settings to be released

◆ MIP_CC_DEPRECATED_API()

MIP_CC_DEPRECATED_API ( mip_cc_result ) const

Create a settings object used to create a brand new protection engine.

Sets label filter.

Create a settings object used to load an existing policy engine by engine ID if it already exists, else create a new engine.

Create a settings object used to load an existing protection engine by engine ID if it already exists, else create a new engine.

Deprecated
See the replacement MIP_CC_CreateProtectionEngineSettingsWithIdentityAndAuthCallback
Parameters
identityIdentity that will be associated with ProtectionEngine
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
engineSettings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Deprecated
See the replacement MIP_CC_CreateProtectionEngineSettingsWithEngineIdAndAuthCallback
Parameters
engineIdID of existing cached engine
identity(Optional) Identity that will be associated with ProtectionEngine
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
engineSettings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'identity' will only be used for new engines. If an engine with the specified engine id already exists in the local cache, the identity from the cached engine will be used instead.
Deprecated
See the replacement MIP_CC_CreatePolicyEngineSettingsWithEngineIdAndAuthCallback
Parameters
engineIdID of existing cached engine
identity(Optional) Identity that will be associated with PolicyEngine
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
loadSensitivityTypesWhether or not sensitivity types data (for classification) should also be loaded
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'loadSensitivityTypes' should be 'true' only if application expects to later call MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
'identity' will only be used for new engines. If an engine with the specified engine id already exists in the local cache, the identity from the cached engine will be used instead.
Deprecated
See the replacement MIP_CC_PolicyEngineSettings_ConfigureFunctionality
Parameters
settingsEngine settings
labelFilterenum representing label filter, if not set default is hyok, doublekeyencryption
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure

Variable Documentation

◆ actualClientDataSize

char const int64_t int64_t* actualClientDataSize

◆ actualIdSize

char const int64_t int64_t* actualIdSize

◆ actualTemplatesSize

const void mip_cc_template_descriptor const int64_t int64_t* actualTemplatesSize

◆ allowCloudServiceOnly

bool allowCloudServiceOnly

◆ authCallback

const mip_cc_identity const mip_cc_auth_callback authCallback

◆ capabilities

mip_cc_string_list* capabilities

◆ capability

const char * capability

◆ clientData

const char * clientData

◆ clientDataBuffer

char* clientDataBuffer

◆ clientDataBufferSize

char const int64_t clientDataBufferSize

◆ clientDataSize

int64_t* clientDataSize

◆ cloud

const mip_cc_cloud cloud

◆ cloudEndpointBaseUrl

const char* cloudEndpointBaseUrl

◆ context

const mip_cc_delegation_license_settings const void* context

◆ customSettings

const mip_cc_dictionary customSettings

◆ delegatedUserEmail

const char * delegatedUserEmail

◆ delegationLicenses

const mip_cc_delegation_license_settings const void mip_cc_delegation_licenses* delegationLicenses

◆ documentId

const void const char * documentId

◆ engineSettings

const mip_cc_identity const mip_cc_auth_callback const char const char mip_cc_protection_engine_settings * engineSettings

◆ errorInfo

◆ handler

◆ idBuffer

char* idBuffer

◆ idBufferSize

char const int64_t idBufferSize

◆ identity

const mip_cc_identity * identity

◆ idSize

int64_t* idSize

◆ labelId

const void const char const char * labelId

◆ licenseInfo

const void const char const char const char const char mip_cc_license_info* licenseInfo

◆ locale

const mip_cc_identity const mip_cc_auth_callback const char const char * locale

◆ ownerEmail

const void const char const char const char * ownerEmail

◆ removed

const char bool* removed

◆ rights

const void const char const char const char const char mip_cc_string_list* rights

◆ sessionId

const char* sessionId

◆ settings

◆ templateBatchingSize

int int templateBatchingSize

◆ templateBufferSize

const void mip_cc_template_descriptor const int64_t templateBufferSize

◆ templateDescriptors

const void mip_cc_template_descriptor* templateDescriptors

◆ templateRefreshIntervalHours

int templateRefreshIntervalHours

◆ templatesSize

const void int64_t* templatesSize

◆ underlyingApplicationId

const char* underlyingApplicationId