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

Settings to use when obtaining templates. More...

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

+ Inheritance diagram for GetTemplatesSettings:
+ Collaboration diagram for GetTemplatesSettings:

Public Member Functions

virtual void EnableCaching (bool cachingAllowed)=0
 Can disable caching of template response.
 
virtual void ForceRefresh (bool enabled)=0
 Can enable force refresh of templates, ignoring former cached response.
 
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.
 
virtual const std::string & GetDelegatedUserEmail () const =0
 Gets the delegated user.
 
bool GetIsOfflineOnly () const
 Gets whether or not ProtectionEngine operation allows for online HTTP operations.
 
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 SetDelegatedUserEmail (const std::string &delegatedUserEmail)=0
 Sets the delegated user.
 
virtual void SetIsOfflineOnly (bool isOfflineOnly)
 Sets whether or not ProtectionEngine operation allows for online HTTP operations.
 
virtual bool ShouldCacheResponse () const =0
 Can cache templates or not.
 
virtual bool ShouldRefreshTemplates () const =0
 Can enable force refresh of templates, ignoring former cached response.
 

Static Public Member Functions

static MIP_API std::shared_ptr< GetTemplatesSettings > __CDECL CreateGetTemplatesSettings ()
 Creates a GetTemplatesSettings object.
 

Detailed Description

Settings to use when obtaining templates.

Definition at line 48 of file get_template_settings.h.

Member Function Documentation

◆ CreateGetTemplatesSettings()

static MIP_API std::shared_ptr< GetTemplatesSettings > __CDECL GetTemplatesSettings::CreateGetTemplatesSettings ( )
static

Creates a GetTemplatesSettings object.

Returns
A GetTemplatesSettings object

◆ EnableCaching()

virtual void GetTemplatesSettings::EnableCaching ( bool cachingAllowed)
pure virtual

Can disable caching of template response.

Will cache by default.

Parameters
cachingAllowedFalse to disallow template caching.

◆ ForceRefresh()

virtual void GetTemplatesSettings::ForceRefresh ( bool enabled)
pure virtual

Can enable force refresh of templates, ignoring former cached response.

Parameters
enabledTrue to force the refresh. False to use the cached templates if available.

◆ GetApplicationScenarioId()

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

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
inlineinherited

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 }

◆ GetDelegatedUserEmail()

virtual const std::string & GetTemplatesSettings::GetDelegatedUserEmail ( ) const
pure virtual

Gets the delegated user.

Returns
Delegated user
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user

◆ GetIsOfflineOnly()

bool ProtectionCommonSettings::GetIsOfflineOnly ( ) const
inlineinherited

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)
inlineinherited

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)
inlineinherited

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 }

◆ SetDelegatedUserEmail()

virtual void GetTemplatesSettings::SetDelegatedUserEmail ( const std::string & delegatedUserEmail)
pure virtual

Sets the delegated user.

Parameters
delegatedUserEmailthe delegation email.
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user

◆ SetIsOfflineOnly()

virtual void ProtectionCommonSettings::SetIsOfflineOnly ( bool isOfflineOnly)
inlinevirtualinherited

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; }

◆ ShouldCacheResponse()

virtual bool GetTemplatesSettings::ShouldCacheResponse ( ) const
pure virtual

Can cache templates or not.

Returns
True to cache templates. False to not.

◆ ShouldRefreshTemplates()

virtual bool GetTemplatesSettings::ShouldRefreshTemplates ( ) const
pure virtual

Can enable force refresh of templates, ignoring former cached response.

Returns
True to ignore cached templates. False to use if available.

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