Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
policy_profile.h File Reference

This file contains the PolicyProfile class which includes the PolicyProfile::Observer and the PolicyProfile::Settings classes. More...

#include <memory>
#include <string>
#include <vector>
#include "mip/common_types.h"
#include "mip/error.h"
#include "mip/http_delegate.h"
#include "mip/logger_delegate.h"
#include "mip/mip_context.h"
#include "mip/mip_export.h"
#include "mip/mip_namespace.h"
#include "mip/task_dispatcher_delegate.h"
#include "mip/upe/policy_engine.h"

Go to the source code of this file.

Functions

static MIP_API std::shared_ptr< AsyncControl > __CDECL LoadAsync (const Settings &settings, const std::shared_ptr< void > &context)
 Starts loading a profile based on the provided settings.
 
static MIP_API std::shared_ptr< PolicyProfile > __CDECL Load (const Settings &settings)
 Loading a profile based on the provided settings.
 
static MIP_API const char *__CDECL GetVersion ()
 Get the library version.
 
virtual const Settings & GetSettings () const =0
 Get the settings set on the profile.
 
virtual std::shared_ptr< AsyncControlListEnginesAsync (const std::shared_ptr< void > &context)=0
 Starts list engines operation.
 
virtual std::vector< std::string > ListEngines ()=0
 List of engines.
 
virtual std::shared_ptr< AsyncControlUnloadEngineAsync (const std::string &id, const std::shared_ptr< void > &context)=0
 Starts unloading the policy engine with the given ID.
 
virtual void UnloadEngine (const std::string &id)=0
 Starts unloading the policy engine with the given ID.
 
virtual std::shared_ptr< AsyncControlAddEngineAsync (const PolicyEngine::Settings &settings, const std::shared_ptr< void > &context)=0
 Starts adding a new policy engine to the profile.
 
virtual std::shared_ptr< PolicyEngine > AddEngine (const PolicyEngine::Settings &settings, const std::shared_ptr< void > &context)=0
 Add a new policy engine to the profile.
 
virtual std::shared_ptr< AsyncControlDeleteEngineAsync (const std::string &id, const std::shared_ptr< void > &context)=0
 Starts deleting the policy engine with the given ID. All data for the given profile will be deleted.
 
virtual void DeleteEngine (const std::string &engineId)=0
 Delete the policy engine with the given ID. All data for the given engine will be deleted.
 
virtual void AcquireAuthToken (Cloud cloud, const std::shared_ptr< AuthDelegate > &authDelegate) const =0
 Trigger an authentication callback.
 
virtual void AcquireAuthToken (const std::string &domainInfo, const std::shared_ptr< AuthDelegate > &authDelegate) const =0
 Trigger an authentication callback.
 

Detailed Description

This file contains the PolicyProfile class which includes the PolicyProfile::Observer and the PolicyProfile::Settings classes.

Function Documentation

◆ AcquireAuthToken() [1/2]

virtual void AcquireAuthToken ( Cloud cloud,
const std::shared_ptr< AuthDelegate > & authDelegate ) const
pure virtual

Trigger an authentication callback.

Parameters
cloudAzure cloud
authDelegateAuthentication callback that will be invoked
Note
MIP will not cache or do anything else with the value returned by the auth delegate. This function is recommended for applications that aren't "logged in" until after MIP requests an auth token. It allows an application to fetch a token before MIP actually requires one.

◆ AcquireAuthToken() [2/2]

virtual void AcquireAuthToken ( const std::string & domainInfo,
const std::shared_ptr< AuthDelegate > & authDelegate ) const
pure virtual

Trigger an authentication callback.

Parameters
stringDomain info which can be a domain name or a domain GUID
authDelegateAuthentication callback that will be invoked
Note
MIP will not cache or do anything else with the value returned by the auth delegate. This function is recommended for applications that aren't "logged in" until after MIP requests an auth token. It allows an application to fetch a token before MIP actually requires one.

◆ AddEngine()

virtual std::shared_ptr< PolicyEngine > AddEngine ( const PolicyEngine::Settings & settings,
const std::shared_ptr< void > & context )
pure virtual

Add a new policy engine to the profile.

Parameters
settingsthe mip::PolicyEngine::Settings object that specifies the engine's settings.
contexta parameter that will be forwarded opaquely to the optional HttpDelegate
Returns
Newly created PolicyEngine

◆ AddEngineAsync()

virtual std::shared_ptr< AsyncControl > AddEngineAsync ( const PolicyEngine::Settings & settings,
const std::shared_ptr< void > & context )
pure virtual

Starts adding a new policy engine to the profile.

Parameters
settingsthe mip::PolicyEngine::Settings object that specifies the engine's settings.
contexta parameter that will be forwarded opaquely to the observer functions and optional HttpDelegate.
Note
PolicyProfile::Observer will be called upon success or failure.

◆ DeleteEngine()

virtual void DeleteEngine ( const std::string & engineId)
pure virtual

Delete the policy engine with the given ID. All data for the given engine will be deleted.

Parameters
idthe unique engine ID.

◆ DeleteEngineAsync()

virtual std::shared_ptr< AsyncControl > DeleteEngineAsync ( const std::string & id,
const std::shared_ptr< void > & context )
pure virtual

Starts deleting the policy engine with the given ID. All data for the given profile will be deleted.

Parameters
idthe unique engine ID.
contexta parameter that will be passed into the observer functions.
Note
PolicyProfile::Observer will be called upon success or failure.

◆ GetSettings()

virtual const Settings & GetSettings ( ) const
pure virtual

Get the settings set on the profile.

Returns
settings set on the profile.

◆ GetVersion()

static MIP_API const char *__CDECL GetVersion ( )
static

Get the library version.

Returns
a version string,

◆ ListEngines()

virtual std::vector< std::string > ListEngines ( )
pure virtual

List of engines.

Returns
Cached engine IDs

◆ ListEnginesAsync()

virtual std::shared_ptr< AsyncControl > ListEnginesAsync ( const std::shared_ptr< void > & context)
pure virtual

Starts list engines operation.

Parameters
contexta parameter that will be passed into the observer functions.
Note
PolicyProfile::Observer will be called upon success or failure.

◆ Load()

static MIP_API std::shared_ptr< PolicyProfile > __CDECL Load ( const Settings & settings)
static

Loading a profile based on the provided settings.

Parameters
settingsSettings used by PolicyProfile during its initialization and throughout its lifetime
Returns
Newly created profile

◆ LoadAsync()

static MIP_API std::shared_ptr< AsyncControl > __CDECL LoadAsync ( const Settings & settings,
const std::shared_ptr< void > & context )
static

Starts loading a profile based on the provided settings.

Parameters
settingsthe profile settings used to load the profile object.
contexta context parameter that will be passed into the observer functions.
Note
PolicyProfile::Observer will be called upon success or failure.

◆ UnloadEngine()

virtual void UnloadEngine ( const std::string & id)
pure virtual

Starts unloading the policy engine with the given ID.

Parameters
idthe unique engine ID.

◆ UnloadEngineAsync()

virtual std::shared_ptr< AsyncControl > UnloadEngineAsync ( const std::string & id,
const std::shared_ptr< void > & context )
pure virtual

Starts unloading the policy engine with the given ID.

Parameters
idthe unique engine ID.
contexta parameter that will be forwarded opaquely to the observer functions.
Note
PolicyProfile::Observer will be called upon success or failure.