Microsoft Information Protection SDK - C++ 1.18
API Reference Documentation for C++
Loading...
Searching...
No Matches
MipConfiguration Class Reference

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

#include <mip_configuration.h>

Public Member Functions

 DEPRECATED_FOR_STORAGE_CACHE_TYPE ("MipConfiguration(...) is deprecated, use MipConfiguration(const ApplicationInfo&, const std::string&, LogLevel, bool, CacheStorageType)") MipConfiguration(const ApplicationInfo &appInfo
 
const std::string LogLevel bool mPath (path)
 
const std::string LogLevel bool mThresholdLogLevel (thresholdLogLevel)
 
const std::string LogLevel bool mIsOfflineOnly (isOfflineOnly)
 
const std::string LogLevel bool mfeatureSettings ()
 
const std::string LogLevel bool mApiLogCacheMaxMessages (1024)
 
 MipConfiguration (const ApplicationInfo &appInfo, const std::string &path, LogLevel thresholdLogLevel, bool isOfflineOnly, CacheStorageType cacheStorageType)
 
const ApplicationInfoGetApplicationInfo () const
 Get the Description of host application.
 
const std::string & GetPath () const
 Get the File path for logs, caches, etc.
 
const LogLevelGetThresholdLogLevel () const
 Get the Minimum log level for .miplog.
 
bool isOfflineOnly () const
 whether Network operations is enabled or disabled(not all actions supported when offline)
 
std::shared_ptr< DiagnosticConfigurationGetDiagnosticConfiguration () const
 Get the Diagnostic (if any) provided by the application.
 
void SetDiagnosticConfiguration (const std::shared_ptr< DiagnosticConfiguration > &diagnosticConfiguration)
 Override default configuration of diagnostic.
 
std::shared_ptr< LoggerDelegateGetLoggerDelegate () const
 Get the LoggerDelegate (if any) override implementation.
 
void SetLoggerDelegate (const std::shared_ptr< LoggerDelegate > &loggerDelegate)
 Set the LoggerDelegate (if any) override implementation.
 
std::shared_ptr< LoggerConfigurationGetLoggerConfiguration () const
 Get the override configuration (if any) for the default logger implementation.
 
void SetLoggerConfiguration (const std::shared_ptr< LoggerConfiguration > &loggerConfiguration)
 Override the default logger configuration.
 
std::shared_ptr< StorageDelegateGetStorageDelegate () const
 Get the StorageDelegate (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.
 
std::shared_ptr< CacheStorageTypeGetCacheStorageType () const
 Get whether caches are stored in memory or on disk.
 
std::shared_ptr< HttpDelegateGetHttpDelegate () const
 Get the HttpDelegate (if any) override implementation.
 
void SetHttpDelegate (const std::shared_ptr< HttpDelegate > &httpDelegate)
 Set the HttpDelegate (if any) override implementation. It's a required delegate for MIP Core Context.
 
std::shared_ptr< CloudDiscoveryDelegateGetCloudDiscoveryDelegate () const
 Get the CloudDiscoveryDelegate (if any) override implementation.
 
void SetCloudDiscoveryDelegate (const std::shared_ptr< CloudDiscoveryDelegate > &cloudDiscoveryDelegate)
 Set the CloudDiscoveryDelegate (if any) override implementation.
 
std::shared_ptr< JsonDelegateGetJsonDelegate () const
 Get the JsonDelegate (if any) override implementation.
 
std::shared_ptr< xml::XmlDelegateGetXmlDelegate () 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.
 
std::map< FlightingFeature, bool > GetFeatureSettings () const
 Get the Flighting features which should be set to non-default values.
 
void SetFeatureSettings (const std::map< FlightingFeature, bool > &featureSettings)
 Set the Flighting features which should be set to non-default values.
 
size_t GetApiLogCacheMaxMessages () const
 Get the max messages per Api call that will be logged in the api log cache.
 
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.
 
 ~MipConfiguration ()
 

Public Attributes

const std::string & path
 
const std::string LogLevel thresholdLogLevel
 
const std::string LogLevel bool isOfflineOnly: mAppInfo(appInfo)
 

Protected Attributes

std::shared_ptr< JsonDelegatemJsonDelegate
 
std::shared_ptr< xml::XmlDelegatemXmlDelegate
 

Private Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

◆ MipConfiguration()

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

◆ ~MipConfiguration()

MipConfiguration::~MipConfiguration ( )
inline

Member Function Documentation

◆ DEPRECATED_FOR_STORAGE_CACHE_TYPE()

MipConfiguration::DEPRECATED_FOR_STORAGE_CACHE_TYPE ( "MipConfiguration(...) is deprecated,
use MipConfiguration(const ApplicationInfo &, const std::string &, LogLevel, bool, CacheStorageType)"  ) const &

◆ 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

◆ GetApplicationInfo()

const ApplicationInfo & MipConfiguration::GetApplicationInfo ( ) const
inline

Get the Description of host application.

Returns
Description of host application

◆ GetCacheStorageType()

std::shared_ptr< CacheStorageType > MipConfiguration::GetCacheStorageType ( ) const
inline

Get whether caches are stored in memory or on disk.

Returns
storage type used CacheStorageType

◆ GetCloudDiscoveryDelegate()

std::shared_ptr< CloudDiscoveryDelegate > MipConfiguration::GetCloudDiscoveryDelegate ( ) const
inline

Get the CloudDiscoveryDelegate (if any) override implementation.

Returns
CloudDiscoveryDelegate (if any) override implementation.

◆ 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.

◆ 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

◆ GetHttpDelegate()

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

Get the HttpDelegate (if any) override implementation.

Returns
HttpDelegate (if any) override implementation.

◆ GetJsonDelegate()

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

Get the JsonDelegate (if any) override implementation.

Returns
JsonDelegate (if any) override implementation.

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

◆ GetLoggerDelegate()

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

Get the LoggerDelegate (if any) override implementation.

Returns
LoggerDelegate (if any) override implementation.

◆ GetPath()

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

Get the File path for logs, caches, etc.

Returns
File path for logs, caches, etc.

◆ GetStorageDelegate()

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

Get the StorageDelegate (if any) override implementation.

Returns
StorageDelegate (if any) override implementation.

◆ GetThresholdLogLevel()

const LogLevel & MipConfiguration::GetThresholdLogLevel ( ) const
inline

Get the Minimum log level for .miplog.

Returns
Minimum log level for .miplog.

◆ 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.

◆ isOfflineOnly()

bool MipConfiguration::isOfflineOnly ( ) const
inline

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

Returns
Network operations state

◆ mApiLogCacheMaxMessages()

const std::string LogLevel bool MipConfiguration::mApiLogCacheMaxMessages ( 1024 )
inline

◆ mfeatureSettings()

const std::string LogLevel bool MipConfiguration::mfeatureSettings ( )

◆ mIsOfflineOnly()

const std::string LogLevel bool MipConfiguration::mIsOfflineOnly ( isOfflineOnly )

◆ mPath()

const std::string LogLevel bool MipConfiguration::mPath ( path )

◆ mThresholdLogLevel()

const std::string LogLevel bool MipConfiguration::mThresholdLogLevel ( thresholdLogLevel )

◆ 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

◆ SetCloudDiscoveryDelegate()

void MipConfiguration::SetCloudDiscoveryDelegate ( const std::shared_ptr< CloudDiscoveryDelegate > & cloudDiscoveryDelegate)
inline

Set the CloudDiscoveryDelegate (if any) override implementation.

Parameters
cloudDiscoveryDelegateCloudDiscoveryDelegate override implementation

◆ 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.

◆ 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.

◆ 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

◆ SetLoggerConfiguration()

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

Override the default logger configuration.

Parameters
loggerConfigurationLoggerConfiguration override

◆ SetLoggerDelegate()

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

Set the LoggerDelegate (if any) override implementation.

Parameters
loggerDelegateLoggerDelegate override implementation

◆ 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

Member Data Documentation

◆ isOfflineOnly

const std::string LogLevel bool MipConfiguration::isOfflineOnly

◆ mApiLogCacheMaxMessages

size_t MipConfiguration::mApiLogCacheMaxMessages
private

◆ mAppInfo

ApplicationInfo MipConfiguration::mAppInfo
private

◆ mCacheStorageType

std::shared_ptr<CacheStorageType> MipConfiguration::mCacheStorageType
private

◆ mCloudDiscoveryDelegate

std::shared_ptr<CloudDiscoveryDelegate> MipConfiguration::mCloudDiscoveryDelegate
private

◆ mDiagnosticConfiguration

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

◆ mfeatureSettings

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

◆ mHttpDelegate

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

◆ mIsOfflineOnly

bool MipConfiguration::mIsOfflineOnly
private

◆ mJsonDelegate

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

◆ mLoggerConfiguration

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

◆ mLoggerDelegate

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

◆ mPath

std::string MipConfiguration::mPath
private

◆ mStorageDelegate

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

◆ mThresholdLogLevel

LogLevel MipConfiguration::mThresholdLogLevel
private

◆ mXmlDelegate

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

◆ path

const std::string& MipConfiguration::path

◆ thresholdLogLevel

const std::string LogLevel MipConfiguration::thresholdLogLevel

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