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

Configuration used by MIP sdk during its creation and throughout its lifetime. More...

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

Collaboration diagram for MipConfiguration:

Public Member Functions

size_t GetApiLogCacheMaxMessages () const
 Get the max messages per Api call that will be logged in the api log cache.
 
const ApplicationInfoGetApplicationInfo () const
 Get the Description of host application.
 
std::shared_ptr< DiagnosticConfigurationGetDiagnosticConfiguration () const
 Get the Diagnostic (if any) provided by the application.
 
std::map< FlightingFeature, bool > GetFeatureSettings () const
 Get the Flighting features which should be set to non-default values.
 
std::shared_ptr< HttpDelegateGetHttpDelegate () const
 Get the HttpDelegate (if any) override implementation.
 
std::shared_ptr< JsonDelegateGetJsonDelegate () const
 Get the JsonDelegate (if any) override implementation.
 
std::shared_ptr< LoggerConfigurationGetLoggerConfiguration () const
 Get the override configuration (if any) for the default logger implementation.
 
std::shared_ptr< LoggerDelegateGetLoggerDelegate () const
 Get the LoggerDelegate (if any) override implementation.
 
const std::string & GetPath () const
 Get the File path for logs, caches, etc.
 
std::shared_ptr< StorageDelegateGetStorageDelegate () const
 Get the StorageDelegate (if any) override implementation.
 
const LogLevelGetThresholdLogLevel () const
 Get the Minimum log level for .miplog.
 
std::shared_ptr< xml::XmlDelegate > GetXmlDelegate () const
 Get the XmlDelegate (if any) override implementation. MipConfiguration needs to be derived from to override the internal xmlDelegate with an alternative. This delegate is only configurable when using the MIP Core Context and only for the protection and upe sdk.
 
const bool isOfflineOnly () const
 whether Network operations is enabled or disabled(not all actions supported when offline)
 
 MipConfiguration (const ApplicationInfo &appInfo, const std::string &path, LogLevel thresholdLogLevel, bool isOfflineOnly)
 
void SetApiLogCacheMaxMessages (size_t maxMessages)
 Set the max messages per Api call that will be logged in the api log cache. Setting this to 0 will disable api log caching.
 
void SetDiagnosticConfiguration (const std::shared_ptr< DiagnosticConfiguration > &diagnosticConfiguration)
 Override default configuration of diagnostic.
 
void SetFeatureSettings (const std::map< FlightingFeature, bool > &featureSettings)
 Set the Flighting features which should be set to non-default values.
 
void SetHttpDelegate (const std::shared_ptr< HttpDelegate > &httpDelegate)
 Set the HttpDelegate (if any) override implementation. It's a required delegate for MIP Core Context.
 
void SetLoggerConfiguration (const std::shared_ptr< LoggerConfiguration > &loggerConfiguration)
 Override the default logger configuration.
 
void SetLoggerDelegate (const std::shared_ptr< LoggerDelegate > &loggerDelegate)
 Set the LoggerDelegate (if any) override implementation.
 
void SetStorageDelegate (const std::shared_ptr< StorageDelegate > &storageDelegate)
 Set the StorageDelegate (if any) override implementation. It's a required delegate for MIP Core Context.
 
 ~MipConfiguration ()
 

Protected Attributes

std::shared_ptr< JsonDelegatemJsonDelegate
 
std::shared_ptr< xml::XmlDelegate > mXmlDelegate
 

Private Attributes

size_t mApiLogCacheMaxMessages
 
ApplicationInfo mAppInfo
 
std::shared_ptr< DiagnosticConfigurationmDiagnosticConfiguration
 
std::map< FlightingFeature, bool > mfeatureSettings
 
std::shared_ptr< HttpDelegatemHttpDelegate
 
bool mIsOfflineOnly
 
std::shared_ptr< LoggerConfigurationmLoggerConfiguration
 
std::shared_ptr< LoggerDelegatemLoggerDelegate
 
std::string mPath
 
std::shared_ptr< StorageDelegatemStorageDelegate
 
LogLevel mThresholdLogLevel
 

Detailed Description

Configuration used by MIP sdk during its creation and throughout its lifetime.

Definition at line 53 of file mip_configuration.h.

Constructor & Destructor Documentation

◆ MipConfiguration()

MipConfiguration::MipConfiguration ( const ApplicationInfo & appInfo,
const std::string & path,
LogLevel thresholdLogLevel,
bool isOfflineOnly )
inline

Definition at line 55 of file mip_configuration.h.

60 : mAppInfo(appInfo),
61 mPath(path),
62 mThresholdLogLevel(thresholdLogLevel),
ApplicationInfo mAppInfo
const bool isOfflineOnly() const
whether Network operations is enabled or disabled(not all actions supported when offline)
std::map< FlightingFeature, bool > mfeatureSettings

◆ ~MipConfiguration()

MipConfiguration::~MipConfiguration ( )
inline

Definition at line 210 of file mip_configuration.h.

210{ }

Member Function Documentation

◆ GetApiLogCacheMaxMessages()

size_t MipConfiguration::GetApiLogCacheMaxMessages ( ) const
inline

Get the max messages per Api call that will be logged in the api log cache.

Returns
The max messages

Definition at line 201 of file mip_configuration.h.

201{ return mApiLogCacheMaxMessages; }

References mApiLogCacheMaxMessages.

◆ GetApplicationInfo()

const ApplicationInfo & MipConfiguration::GetApplicationInfo ( ) const
inline

Get the Description of host application.

Returns
Description of host application

Definition at line 72 of file mip_configuration.h.

72{ return mAppInfo; }

References mAppInfo.

◆ GetDiagnosticConfiguration()

std::shared_ptr< DiagnosticConfiguration > MipConfiguration::GetDiagnosticConfiguration ( ) const
inline

Get the Diagnostic (if any) provided by the application.

Returns
Diagnostic Configuration to be used for configuring telemetry/audit.

Definition at line 99 of file mip_configuration.h.

std::shared_ptr< DiagnosticConfiguration > mDiagnosticConfiguration

References mDiagnosticConfiguration.

◆ GetFeatureSettings()

std::map< FlightingFeature, bool > MipConfiguration::GetFeatureSettings ( ) const
inline

Get the Flighting features which should be set to non-default values.

Returns
Flighting features which should be set to non-default values

Definition at line 187 of file mip_configuration.h.

187{ return mfeatureSettings; }

References mfeatureSettings.

◆ GetHttpDelegate()

std::shared_ptr< HttpDelegate > MipConfiguration::GetHttpDelegate ( ) const
inline

Get the HttpDelegate (if any) override implementation.

Returns
HttpDelegate (if any) override implementation.

Definition at line 155 of file mip_configuration.h.

155{ return mHttpDelegate; }
std::shared_ptr< HttpDelegate > mHttpDelegate

References mHttpDelegate.

◆ GetJsonDelegate()

std::shared_ptr< JsonDelegate > MipConfiguration::GetJsonDelegate ( ) const
inline

Get the JsonDelegate (if any) override implementation.

Returns
JsonDelegate (if any) override implementation.

Definition at line 169 of file mip_configuration.h.

169 {
170 return mJsonDelegate;
171 }
std::shared_ptr< JsonDelegate > mJsonDelegate

References mJsonDelegate.

◆ GetLoggerConfiguration()

std::shared_ptr< LoggerConfiguration > MipConfiguration::GetLoggerConfiguration ( ) const
inline

Get the override configuration (if any) for the default logger implementation.

Returns
LoggerConfiguration override (if any)

Definition at line 127 of file mip_configuration.h.

127{ return mLoggerConfiguration; }
std::shared_ptr< LoggerConfiguration > mLoggerConfiguration

References mLoggerConfiguration.

◆ GetLoggerDelegate()

std::shared_ptr< LoggerDelegate > MipConfiguration::GetLoggerDelegate ( ) const
inline

Get the LoggerDelegate (if any) override implementation.

Returns
LoggerDelegate (if any) override implementation.

Definition at line 113 of file mip_configuration.h.

113{ return mLoggerDelegate; }
std::shared_ptr< LoggerDelegate > mLoggerDelegate

References mLoggerDelegate.

◆ GetPath()

const std::string & MipConfiguration::GetPath ( ) const
inline

Get the File path for logs, caches, etc.

Returns
File path for logs, caches, etc.

Definition at line 79 of file mip_configuration.h.

79{ return mPath; }

References mPath.

◆ GetStorageDelegate()

std::shared_ptr< StorageDelegate > MipConfiguration::GetStorageDelegate ( ) const
inline

Get the StorageDelegate (if any) override implementation.

Returns
StorageDelegate (if any) override implementation.

Definition at line 141 of file mip_configuration.h.

141{ return mStorageDelegate; }
std::shared_ptr< StorageDelegate > mStorageDelegate

References mStorageDelegate.

◆ GetThresholdLogLevel()

const LogLevel & MipConfiguration::GetThresholdLogLevel ( ) const
inline

Get the Minimum log level for .miplog.

Returns
Minimum log level for .miplog.

Definition at line 86 of file mip_configuration.h.

86{ return mThresholdLogLevel; }

References mThresholdLogLevel.

◆ GetXmlDelegate()

std::shared_ptr< xml::XmlDelegate > MipConfiguration::GetXmlDelegate ( ) const
inline

Get the XmlDelegate (if any) override implementation. MipConfiguration needs to be derived from to override the internal xmlDelegate with an alternative. This delegate is only configurable when using the MIP Core Context and only for the protection and upe sdk.

Returns
XmlDelegate (if any) override implementation. nullptr by default.

Definition at line 180 of file mip_configuration.h.

180{ return mXmlDelegate; }
std::shared_ptr< xml::XmlDelegate > mXmlDelegate

References mXmlDelegate.

◆ isOfflineOnly()

const bool MipConfiguration::isOfflineOnly ( ) const
inline

whether Network operations is enabled or disabled(not all actions supported when offline)

Returns
Network operations state

Definition at line 93 of file mip_configuration.h.

93{ return mIsOfflineOnly; }

References mIsOfflineOnly.

◆ SetApiLogCacheMaxMessages()

void MipConfiguration::SetApiLogCacheMaxMessages ( size_t maxMessages)
inline

Set the max messages per Api call that will be logged in the api log cache. Setting this to 0 will disable api log caching.

Parameters
maxMessages

Definition at line 208 of file mip_configuration.h.

208{ mApiLogCacheMaxMessages = maxMessages; }

References mApiLogCacheMaxMessages.

◆ SetDiagnosticConfiguration()

void MipConfiguration::SetDiagnosticConfiguration ( const std::shared_ptr< DiagnosticConfiguration > & diagnosticConfiguration)
inline

Override default configuration of diagnostic.

Parameters
diagnosticConfigurationdiagnostic configuration to be used for configuring telemetry/audit.

Definition at line 106 of file mip_configuration.h.

106{ mDiagnosticConfiguration = diagnosticConfiguration; }

References mDiagnosticConfiguration.

◆ SetFeatureSettings()

void MipConfiguration::SetFeatureSettings ( const std::map< FlightingFeature, bool > & featureSettings)
inline

Set the Flighting features which should be set to non-default values.

Parameters
featureSettingsFlighting features to be used.

Definition at line 194 of file mip_configuration.h.

194{ mfeatureSettings = featureSettings; }

References mfeatureSettings.

◆ SetHttpDelegate()

void MipConfiguration::SetHttpDelegate ( const std::shared_ptr< HttpDelegate > & httpDelegate)
inline

Set the HttpDelegate (if any) override implementation. It's a required delegate for MIP Core Context.

Parameters
httpDelegateHttpDelegate override implementation

Definition at line 162 of file mip_configuration.h.

162{ mHttpDelegate = httpDelegate; }

References mHttpDelegate.

◆ SetLoggerConfiguration()

void MipConfiguration::SetLoggerConfiguration ( const std::shared_ptr< LoggerConfiguration > & loggerConfiguration)
inline

Override the default logger configuration.

Parameters
loggerConfigurationLoggerConfiguration override

Definition at line 134 of file mip_configuration.h.

134{ mLoggerConfiguration = loggerConfiguration; }

References mLoggerConfiguration.

◆ SetLoggerDelegate()

void MipConfiguration::SetLoggerDelegate ( const std::shared_ptr< LoggerDelegate > & loggerDelegate)
inline

Set the LoggerDelegate (if any) override implementation.

Parameters
loggerDelegateLoggerDelegate override implementation

Definition at line 120 of file mip_configuration.h.

120{ mLoggerDelegate = loggerDelegate; }

References mLoggerDelegate.

◆ SetStorageDelegate()

void MipConfiguration::SetStorageDelegate ( const std::shared_ptr< StorageDelegate > & storageDelegate)
inline

Set the StorageDelegate (if any) override implementation. It's a required delegate for MIP Core Context.

Parameters
storageDelegateStorageDelegate override implementation

Definition at line 148 of file mip_configuration.h.

148{ mStorageDelegate = storageDelegate; }

References mStorageDelegate.

Member Data Documentation

◆ mApiLogCacheMaxMessages

size_t MipConfiguration::mApiLogCacheMaxMessages
private

Definition at line 225 of file mip_configuration.h.

Referenced by GetApiLogCacheMaxMessages(), and SetApiLogCacheMaxMessages().

◆ mAppInfo

ApplicationInfo MipConfiguration::mAppInfo
private

Definition at line 217 of file mip_configuration.h.

Referenced by GetApplicationInfo().

◆ mDiagnosticConfiguration

std::shared_ptr<DiagnosticConfiguration> MipConfiguration::mDiagnosticConfiguration
private

Definition at line 222 of file mip_configuration.h.

Referenced by GetDiagnosticConfiguration(), and SetDiagnosticConfiguration().

◆ mfeatureSettings

std::map<FlightingFeature, bool> MipConfiguration::mfeatureSettings
private

Definition at line 224 of file mip_configuration.h.

Referenced by GetFeatureSettings(), and SetFeatureSettings().

◆ mHttpDelegate

std::shared_ptr<HttpDelegate> MipConfiguration::mHttpDelegate
private

Definition at line 226 of file mip_configuration.h.

Referenced by GetHttpDelegate(), and SetHttpDelegate().

◆ mIsOfflineOnly

bool MipConfiguration::mIsOfflineOnly
private

Definition at line 220 of file mip_configuration.h.

Referenced by isOfflineOnly().

◆ mJsonDelegate

std::shared_ptr<JsonDelegate> MipConfiguration::mJsonDelegate
protected

Definition at line 213 of file mip_configuration.h.

Referenced by GetJsonDelegate().

◆ mLoggerConfiguration

std::shared_ptr<LoggerConfiguration> MipConfiguration::mLoggerConfiguration
private

Definition at line 227 of file mip_configuration.h.

Referenced by GetLoggerConfiguration(), and SetLoggerConfiguration().

◆ mLoggerDelegate

std::shared_ptr<LoggerDelegate> MipConfiguration::mLoggerDelegate
private

Definition at line 221 of file mip_configuration.h.

Referenced by GetLoggerDelegate(), and SetLoggerDelegate().

◆ mPath

std::string MipConfiguration::mPath
private

Definition at line 218 of file mip_configuration.h.

Referenced by GetPath().

◆ mStorageDelegate

std::shared_ptr<StorageDelegate> MipConfiguration::mStorageDelegate
private

Definition at line 223 of file mip_configuration.h.

Referenced by GetStorageDelegate(), and SetStorageDelegate().

◆ mThresholdLogLevel

LogLevel MipConfiguration::mThresholdLogLevel
private

Definition at line 219 of file mip_configuration.h.

Referenced by GetThresholdLogLevel().

◆ mXmlDelegate

std::shared_ptr<xml::XmlDelegate> MipConfiguration::mXmlDelegate
protected

Definition at line 214 of file mip_configuration.h.

Referenced by GetXmlDelegate().


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