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

MipContext represents state that is shared across all profiles, engines, handlers. More...

#include <src/api/mip/mip_context.h>

Public Member Functions

virtual const ApplicationInfoGetApplicationInfo () const =0
 Get application description.
 
virtual const std::map< FlightingFeature, bool > & GetFlightingFeatures () const =0
 Get flighting feature set.
 
virtual std::shared_ptr< HttpDelegateGetHttpDelegate () const =0
 Get Http implementation.
 
virtual const LoggerConfigurationGetLoggerConfiguration () const =0
 Gets the logger configuration that will be used by the default logger.
 
virtual std::shared_ptr< LoggerDelegateGetLoggerDelegate () const =0
 Get logger implementation.
 
virtual const std::shared_ptr< const MipConfiguration > & GetMipConfiguration () const =0
 Gets the mip configuration that was used to create the MipContext.
 
virtual const std::string & GetMipPath () const =0
 Get file path for logs, caches, etc.
 
virtual LoggerDelegateGetRawLoggerDelegate () const =0
 Get raw logger implementation.
 
virtual std::shared_ptr< StorageDelegateGetStorageDelegate () const =0
 Get Storage Delegate implementation if provided.
 
virtual LogLevel GetThresholdLogLevel () const =0
 Get threshold log level.
 
virtual bool IsFeatureEnabled (FlightingFeature feature) const =0
 Gets whether or not a feature is enabled.
 
virtual bool IsOfflineOnly () const =0
 Get offline-only setting.
 
virtual void ShutDown ()=0
 Terminate MIP.
 

Static Public Member Functions

static MIP_API std::shared_ptr< MipContext > __CDECL Create (const ApplicationInfo &appInfo, const std::string &path, LogLevel thresholdLogLevel, bool isOfflineOnly, const std::shared_ptr< LoggerDelegate > &loggerDelegateOverride, const std::shared_ptr< DiagnosticConfiguration > &diagnosticOverride)
 Create a new MipContext instance to be used when initializing profiles.
 
static MIP_API std::shared_ptr< MipContext > __CDECL Create (const std::shared_ptr< const MipConfiguration > &configuration)
 Create a new MipContext instance with mip configuration.
 
static MIP_API std::shared_ptr< MipContext > __CDECL CreateWithCustomFeatureSettings (const ApplicationInfo &appInfo, const std::string &path, LogLevel thresholdLogLevel, bool isOfflineOnly, const std::shared_ptr< LoggerDelegate > &loggerDelegateOverride, const std::shared_ptr< DiagnosticConfiguration > &diagnosticOverride, const std::map< FlightingFeature, bool > &featureSettingsOverride)
 Create a new MipContext instance with custom feature settings.
 

Detailed Description

MipContext represents state that is shared across all profiles, engines, handlers.

Definition at line 71 of file mip_context.h.

Member Function Documentation

◆ Create() [1/2]

static MIP_API std::shared_ptr< MipContext > __CDECL MipContext::Create ( const ApplicationInfo & appInfo,
const std::string & path,
LogLevel thresholdLogLevel,
bool isOfflineOnly,
const std::shared_ptr< LoggerDelegate > & loggerDelegateOverride,
const std::shared_ptr< DiagnosticConfiguration > & diagnosticOverride )
static

Create a new MipContext instance to be used when initializing profiles.

Parameters
appInfoDescription of host application
pathFile path for logs, caches, etc.
thresholdLogLevelMinimum log level for .miplog
isOfflineOnlyEnable/disable network operations (not all actions supported when offline)
loggerDelegateOverride(Optional) LoggerDelegate override implementation
diagnosticOverride(Optional) DiagnosticConfiguration override for audit/telemetry
Returns
MipContext instance

◆ Create() [2/2]

static MIP_API std::shared_ptr< MipContext > __CDECL MipContext::Create ( const std::shared_ptr< const MipConfiguration > & configuration)
static

Create a new MipContext instance with mip configuration.

Parameters
mipConfigurationmipConfiguration to be used across MIP
Returns
MipContext instance

◆ CreateWithCustomFeatureSettings()

static MIP_API std::shared_ptr< MipContext > __CDECL MipContext::CreateWithCustomFeatureSettings ( const ApplicationInfo & appInfo,
const std::string & path,
LogLevel thresholdLogLevel,
bool isOfflineOnly,
const std::shared_ptr< LoggerDelegate > & loggerDelegateOverride,
const std::shared_ptr< DiagnosticConfiguration > & diagnosticOverride,
const std::map< FlightingFeature, bool > & featureSettingsOverride )
static

Create a new MipContext instance with custom feature settings.

Parameters
appInfoDescription of host application
pathFile path for logs, caches, etc.
thresholdLogLevelMinimum log level for .miplog
isOfflineOnlyEnable/disable network operations (not all actions supported when offline)
loggerDelegateOverride(Optional) LoggerDelegate override implementation
diagnosticOverride(Optional) DiagnosticConfiguration override for audit/telemetry
featureSettingsOverrideFlighting features which should be set to non-default values
Returns
MipContext instance

◆ GetApplicationInfo()

virtual const ApplicationInfo & MipContext::GetApplicationInfo ( ) const
pure virtual

Get application description.

Returns
Application description

◆ GetFlightingFeatures()

virtual const std::map< FlightingFeature, bool > & MipContext::GetFlightingFeatures ( ) const
pure virtual

Get flighting feature set.

Returns
Flighting feature map

◆ GetHttpDelegate()

virtual std::shared_ptr< HttpDelegate > MipContext::GetHttpDelegate ( ) const
pure virtual

Get Http implementation.

Returns
HttpDelegate

◆ GetLoggerConfiguration()

virtual const LoggerConfiguration & MipContext::GetLoggerConfiguration ( ) const
pure virtual

Gets the logger configuration that will be used by the default logger.

Returns
Logger configuration

◆ GetLoggerDelegate()

virtual std::shared_ptr< LoggerDelegate > MipContext::GetLoggerDelegate ( ) const
pure virtual

Get logger implementation.

Returns
Logger

◆ GetMipConfiguration()

virtual const std::shared_ptr< const MipConfiguration > & MipContext::GetMipConfiguration ( ) const
pure virtual

Gets the mip configuration that was used to create the MipContext.

Returns
The mip configuration

◆ GetMipPath()

virtual const std::string & MipContext::GetMipPath ( ) const
pure virtual

Get file path for logs, caches, etc.

Returns
File path (with "mip" leaf directory)

◆ GetRawLoggerDelegate()

virtual LoggerDelegate * MipContext::GetRawLoggerDelegate ( ) const
pure virtual

Get raw logger implementation.

Returns
Logger

◆ GetStorageDelegate()

virtual std::shared_ptr< StorageDelegate > MipContext::GetStorageDelegate ( ) const
pure virtual

Get Storage Delegate implementation if provided.

Returns
StorageDelegate

◆ GetThresholdLogLevel()

virtual LogLevel MipContext::GetThresholdLogLevel ( ) const
pure virtual

Get threshold log level.

Returns
threshold log level

◆ IsFeatureEnabled()

virtual bool MipContext::IsFeatureEnabled ( FlightingFeature feature) const
pure virtual

Gets whether or not a feature is enabled.

Parameters
featureFeature to enable/disable
Returns
Whether or not a feature is enabled
Note
If a FeatureFlightingDelegate has not been provided by an application, this will always return true

◆ IsOfflineOnly()

virtual bool MipContext::IsOfflineOnly ( ) const
pure virtual

Get offline-only setting.

Returns
Whether or not application is running in offline-only mode

◆ ShutDown()

virtual void MipContext::ShutDown ( )
pure virtual

Terminate MIP.

Note
This method must be called prior to process/DLL shutdown

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