Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
ProtectionCommonSettings Class Reference

Settings to use for protection operations. More...

#include <src/api/mip/protection/protection_common_settings.h>

+ Inheritance diagram for ProtectionCommonSettings:

Public Member Functions

std::string GetApplicationScenarioId () const
 Gets the scenario Id provided by the application which is used to correlation with the server.
 
const std::vector< std::pair< std::string, std::string > > & GetCustomSettings () const
 Get the custom settings, used for feature gating and testing.
 
bool GetIsOfflineOnly () const
 Gets whether or not ProtectionEngine operation allows for online HTTP operations.
 
 ProtectionCommonSettings (std::string applicationScenarioId=std::string())
 
void SetApplicationScenarioId (std::string applicationScenarioId)
 Sets the scenario Id provided by the application.
 
void SetCustomSettings (const std::vector< std::pair< std::string, std::string > > &customSettings)
 Set the custom settings, used for feature gating and testing.
 
virtual void SetIsOfflineOnly (bool isOfflineOnly)
 Sets whether or not ProtectionEngine operation allows for online HTTP operations.
 

Detailed Description

Settings to use for protection operations.

Definition at line 46 of file protection_common_settings.h.

Constructor & Destructor Documentation

◆ ProtectionCommonSettings()

ProtectionCommonSettings::ProtectionCommonSettings ( std::string applicationScenarioId = std::string())
inline

Definition at line 48 of file protection_common_settings.h.

49 : mApplicationScenarioId(applicationScenarioId),
50 mIsOfflineOnly(false) {}

Member Function Documentation

◆ GetApplicationScenarioId()

std::string ProtectionCommonSettings::GetApplicationScenarioId ( ) const
inline

Gets the scenario Id provided by the application which is used to correlation with the server.

Returns
Application scenario Id

Definition at line 57 of file protection_common_settings.h.

57 {
58 return mApplicationScenarioId;
59 }

◆ GetCustomSettings()

const std::vector< std::pair< std::string, std::string > > & ProtectionCommonSettings::GetCustomSettings ( ) const
inline

Get the custom settings, used for feature gating and testing.

Returns
List of name/value pairs.

Definition at line 108 of file protection_common_settings.h.

108 {
109 return mCustomSettings;
110 }

◆ GetIsOfflineOnly()

bool ProtectionCommonSettings::GetIsOfflineOnly ( ) const
inline

Gets whether or not ProtectionEngine operation allows for online HTTP operations.

Returns
True if HTTP operations are disallowed, else false
Note
If this returns true, operation will only succeed if necessary content has already been cached. A mip::NetworkError will be thrown if needed info is not found. Consumption - content has already been previously decrypted and its unexpired license is cached. Protection - unexpired templates have been cached and user cert is loaded Others - undefined

Definition at line 79 of file protection_common_settings.h.

79{ return mIsOfflineOnly; }

◆ SetApplicationScenarioId()

void ProtectionCommonSettings::SetApplicationScenarioId ( std::string applicationScenarioId)
inline

Sets the scenario Id provided by the application.

Parameters
Theapplication scenario Id

Definition at line 66 of file protection_common_settings.h.

66{ mApplicationScenarioId = applicationScenarioId; }

◆ SetCustomSettings()

void ProtectionCommonSettings::SetCustomSettings ( const std::vector< std::pair< std::string, std::string > > & customSettings)
inline

Set the custom settings, used for feature gating and testing.

Parameters
customSettingsList of name/value pairs.

Definition at line 99 of file protection_common_settings.h.

99 {
100 mCustomSettings = customSettings;
101 }

◆ SetIsOfflineOnly()

virtual void ProtectionCommonSettings::SetIsOfflineOnly ( bool isOfflineOnly)
inlinevirtual

Sets whether or not ProtectionEngine operation allows for online HTTP operations.

Parameters
isOfflineOnlyTrue if HTTP operations are disallowed, else false
Note
If this is set to true, operation will only succeed if necessary content has already been cached. A mip::NetworkError will be thrown if needed info is not found. Consumption - content has already been previously decrypted and its unexpired license is cached. Protection - unexpired templates have been cached and user cert is loaded Others - undefined

Definition at line 92 of file protection_common_settings.h.

92{ mIsOfflineOnly = isOfflineOnly; }

The documentation for this class was generated from the following file: