Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
PolicyProfile Class Referenceabstract

PolicyProfile class is the root class for using the Microsoft Information Protection operations. More...

#include <src/api/mip/upe/policy_profile.h>

Classes

class  Observer
 Observer interface for clients to get notifications for profile related events. More...
 
class  Settings
 Settings used by PolicyProfile during its creation and throughout its lifetime. More...
 

Public Member Functions

virtual void AcquireAuthToken (Cloud cloud, const std::shared_ptr< AuthDelegate > &authDelegate) const =0
 Trigger an authentication callback.
 
virtual std::shared_ptr< PolicyEngineAddEngine (const PolicyEngine::Settings &settings, const std::shared_ptr< void > &context)=0
 Add a new policy engine to the profile.
 
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 void DeleteEngine (const std::string &engineId)=0
 Delete the policy engine with the given ID.
 
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.
 
virtual const SettingsGetSettings () const =0
 Get the settings set on the profile.
 
virtual std::vector< std::string > ListEngines ()=0
 List of engines.
 
virtual std::shared_ptr< AsyncControlListEnginesAsync (const std::shared_ptr< void > &context)=0
 Starts list engines operation.
 
virtual void UnloadEngine (const std::string &id)=0
 Starts unloading the policy engine with the given ID.
 
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.
 

Static Public Member Functions

static MIP_API const char *__CDECL GetVersion ()
 Get the library version.
 
static MIP_API std::shared_ptr< PolicyProfile > __CDECL Load (const Settings &settings)
 Loading a profile based on the provided settings.
 
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.
 

Detailed Description

PolicyProfile class is the root class for using the Microsoft Information Protection operations.

A typical application will only need one PolicyProfile but it can create multiple profiles if needed.

Definition at line 57 of file policy_profile.h.

Member Function Documentation

◆ AcquireAuthToken()

virtual void PolicyProfile::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.

◆ AddEngine()

virtual std::shared_ptr< PolicyEngine > PolicyProfile::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 > PolicyProfile::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 PolicyProfile::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 > PolicyProfile::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 & PolicyProfile::GetSettings ( ) const
pure virtual

Get the settings set on the profile.

Returns
settings set on the profile.

◆ GetVersion()

static MIP_API const char *__CDECL PolicyProfile::GetVersion ( )
static

Get the library version.

Returns
a version string,

◆ ListEngines()

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

List of engines.

Returns
Cached engine IDs

◆ ListEnginesAsync()

virtual std::shared_ptr< AsyncControl > PolicyProfile::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 PolicyProfile::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 PolicyProfile::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 PolicyProfile::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 > PolicyProfile::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.

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