Microsoft Information Protection SDK - MipContext object concepts
MipContext is the highest level object in the SDK. It's responsible for managing state across all profiles that may be created as part of an application or service. Additionally, it handles releasing MIP SDK resources once the MipContext object has been destroyed.
Only a single
MipContext per process is permitted. Creating more than one may result in unexpected behavior.
MipContext should be created at app start, and the same MipContext used for the lifetime of the application.
Once an object of
mip::MipContext has been created, the
MipContext object can be used to create
mip::MipConfiguration class allows the application to set various application-wide configuration settings for MIP SDK. These settings include:
- Application Info: Name, Application ID, Version
- Storage directory for logs and cache
- Logging level
- Offline mode
- Feature flighting settings
- Delegates, including logging, storage, HTTP, JSON parsing, and XML parsing.
- Diagnostic configuration
std::shared_ptr<mip::MipConfiguration> mipConfiguration = std::make_shared<mip::MipConfiguration>(mAppInfo, "mip_data", mip::LogLevel::Trace, false);
MipConfiguration mipConfiguration = new MipConfiguration(appInfo, "mip_data", LogLevel.Trace, false);
MipConfiguration is initialized, it can be used to create the
MipContext::Create() function is used, taking the provided
MipConfiguration object, to create the
std::shared_ptr<mip::MipContext> mMipContext = mip::MipContext::Create(mipConfiguration);
MipContext = mipContext = MIP.CreateMipContext(mipConfiguration);
MipContext object is created, it can be used to create
ProtectionProfile objects, depending on which SDK your application is using.
Properly destroying all MIP SDK objects requires shutting down MIPContext. This can be achieved by calling the Shutdown function. The
MipContext destructor will also call
MipContext.Shutdown() when the
MipContext object is destroyed.
This API is deprecated in MIP SDK 1.10 and on. Please update to using
Creates a new MipContext instance to be used when initializing profiles, with custom feature settings enabled.
- A path for the MIP storage cache.
- Next, learn more about Authentication concepts and Observers. MIP provides an extensible authentication model, while observers are used to provide event notifications for asynchronous events. Both are fundamental, and apply to all MIP API sets.
- Then work through the profile and engine concepts for the File, Policy, and Protection SDKs