MipContext represents state that is shared across all profiles, engines, handlers.
More...
#include <src/api/mip/mip_context.h>
|
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.
|
|
MipContext represents state that is shared across all profiles, engines, handlers.
Definition at line 71 of file mip_context.h.
◆ Create() [1/2]
Create a new MipContext instance to be used when initializing profiles.
- Parameters
-
appInfo | Description of host application |
path | File path for logs, caches, etc. |
thresholdLogLevel | Minimum log level for .miplog |
isOfflineOnly | Enable/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
-
mipConfiguration | mipConfiguration to be used across MIP |
- Returns
- MipContext instance
◆ CreateWithCustomFeatureSettings()
Create a new MipContext instance with custom feature settings.
- Parameters
-
appInfo | Description of host application |
path | File path for logs, caches, etc. |
thresholdLogLevel | Minimum log level for .miplog |
isOfflineOnly | Enable/disable network operations (not all actions supported when offline) |
loggerDelegateOverride | (Optional) LoggerDelegate override implementation |
diagnosticOverride | (Optional) DiagnosticConfiguration override for audit/telemetry |
featureSettingsOverride | Flighting features which should be set to non-default values |
- Returns
- MipContext instance
◆ GetApplicationInfo()
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 |
◆ GetLoggerConfiguration()
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()
Get raw logger implementation.
- Returns
- Logger
◆ GetStorageDelegate()
virtual std::shared_ptr< StorageDelegate > MipContext::GetStorageDelegate |
( |
| ) |
const |
|
pure virtual |
◆ GetThresholdLogLevel()
virtual LogLevel MipContext::GetThresholdLogLevel |
( |
| ) |
const |
|
pure virtual |
Get threshold log level.
- Returns
- threshold log level
◆ IsFeatureEnabled()
Gets whether or not a feature is enabled.
- Parameters
-
feature | Feature 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: