33#ifndef API_MIP_MIP_CONTEXT_H_
34#define API_MIP_MIP_CONTEXT_H_
54class ProtectionCloudManager;
55class PolicyCloudManager;
56class TelemetryManager;
57struct DiagnosticClientHandle {
58 DiagnosticClientHandle() {}
59 DiagnosticClientHandle(
const char *diagnosticType, int64_t diagnosticHandle)
60 : type(diagnosticType),
61 handle(diagnosticHandle) {}
63 const char *type = {};
74#ifndef MIP_CORE_PACKAGE
87#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
88 [[deprecated(
"MipContext::Create(...) is deprecated, use MipContext::Create(const std::shared_ptr<const MipConfiguration>&)")]]
90 MIP_API
static std::shared_ptr<MipContext> __CDECL
Create(
92 const std::string& path,
95 const std::shared_ptr<LoggerDelegate>& loggerDelegateOverride,
96 const std::shared_ptr<DiagnosticConfiguration>& diagnosticOverride);
111#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
112 [[deprecated(
"MipContext::CreateWithCustomFeatureSettings is deprecated, use MipContext::Create(const std::shared_ptr<const MipConfiguration>&)")]]
116 const std::string& path,
119 const std::shared_ptr<LoggerDelegate>& loggerDelegateOverride,
120 const std::shared_ptr<DiagnosticConfiguration>& diagnosticOverride,
121 const std::map<FlightingFeature, bool>& featureSettingsOverride);
131 MIP_API
static std::shared_ptr<MipContext> __CDECL
Create(
132 const std::shared_ptr<const MipConfiguration>& configuration);
230 virtual const ProtectionCloudManager& GetProtectionCloudManager()
const = 0;
231 virtual const PolicyCloudManager& GetPolicyCloudManager()
const = 0;
232 virtual std::shared_ptr<TelemetryManager> GetTelemetryManager()
const = 0;
233 virtual std::shared_ptr<AuditManager> GetAuditManager()
const = 0;
234 virtual TelemetryManager* GetRawTelemetryManager()
const = 0;
235 virtual std::shared_ptr<JsonDelegate> GetJsonDelegate()
const = 0;
236 virtual DiagnosticClientHandle AddDiagnosticClient(
Cloud cloud,
DataBoundary dataBoundary)
const = 0;
237 virtual const std::shared_ptr<EventContext> GetDefaultEventContext()
const = 0;
247 virtual std::shared_ptr<xml::XmlDelegate> GetXmlDelegate()
const = 0;
A class that defines the interface to the MIP SDK logger.
MipContext represents state that is shared across all profiles, engines, handlers.
virtual const std::string & GetMipPath() const =0
Get file path for logs, caches, etc.
virtual std::shared_ptr< HttpDelegate > GetHttpDelegate() const =0
Get Http implementation.
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 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.
virtual const ApplicationInfo & GetApplicationInfo() const =0
Get application description.
virtual std::shared_ptr< LoggerDelegate > GetLoggerDelegate() const =0
Get logger implementation.
virtual std::shared_ptr< StorageDelegate > GetStorageDelegate() const =0
Get Storage Delegate implementation if provided.
virtual LogLevel GetThresholdLogLevel() const =0
Get threshold log level.
virtual const std::shared_ptr< const MipConfiguration > & GetMipConfiguration() const =0
Gets the mip configuration that was used to create the MipContext.
virtual bool IsFeatureEnabled(FlightingFeature feature) const =0
Gets whether or not a feature is enabled.
virtual void ShutDown()=0
Terminate MIP.
virtual LoggerDelegate * GetRawLoggerDelegate() const =0
Get raw logger implementation.
virtual bool IsOfflineOnly() const =0
Get offline-only setting.
virtual const std::map< FlightingFeature, bool > & GetFlightingFeatures() const =0
Get flighting feature set.
static MIP_API std::shared_ptr< MipContext > __CDECL Create(const std::shared_ptr< const MipConfiguration > &configuration)
Create a new MipContext instance with mip configuration.
virtual const LoggerConfiguration & GetLoggerConfiguration() const =0
Gets the logger configuration that will be used by the default logger.
A file Containing the common types used by the upe, file and protection modules.
Cloud
Azure cloud identifier.
DataBoundary
Diagnostic region identifier.
Defines custom telemetry or audit configurations.
A file containing the FlightingFeature definition.
FlightingFeature
Defines new features by name.
Contains the JsonDelegate interface used to parse and produce JSON data.
LogLevel
Different log levels used across the MIP SDK.
A file containing the LoggerDelegate class to be used to override MIP logger.
Defines configuration for all external mip delegates.
A file export/import macros.
A struct that includes application specific information.
Configuration to use when default logging is enabled.
A file containing the TelemetryDelegate class to be used to override MIP telemetry.
Contains XmlDelegate interface definition used to parse xml recieved by mip.