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

This class provides an interface for all engine functions. More...

#include <src/api/mip/file/file_engine.h>

Classes

class  Settings
 

Public Member Functions

virtual std::shared_ptr< AsyncControlCreateFileHandlerAsync (const std::shared_ptr< Stream > &inputStream, const std::string &actualFilePath, bool isAuditDiscoveryEnabled, const std::shared_ptr< FileHandler::Observer > &fileHandlerObserver, const std::shared_ptr< void > &context, const std::shared_ptr< FileExecutionState > &fileExecutionState=nullptr, bool isGetSensitivityLabelAuditDiscoveryEnabled=true)=0
 Starts creating a file handler for given file stream.
 
virtual std::shared_ptr< AsyncControlCreateFileHandlerAsync (const std::string &inputFilePath, const std::string &filePathForAuditReporting, bool isAuditDiscoveryEnabled, const std::shared_ptr< FileHandler::Observer > &fileHandlerObserver, const std::shared_ptr< void > &context, const std::shared_ptr< FileExecutionState > &fileExecutionState=nullptr, bool isGetSensitivityLabelAuditDiscoveryEnabled=true)=0
 Starts creating a file handler for given file path.
 
virtual const std::vector< std::pair< std::string, std::string > > & GetCustomSettings () const =0
 Gets a list of custom settings.
 
virtual const std::shared_ptr< LabelGetDefaultSensitivityLabel () const =0
 Get the default sensitivity label.
 
virtual std::shared_ptr< LabelGetLabelById (const std::string &id) const =0
 Gets the label according to the provided id.
 
virtual std::chrono::time_point< std::chrono::system_clock > GetLastPolicyFetchTime () const =0
 Gets the time when the policy was last fetched.
 
virtual const std::string & GetMoreInfoUrl () const =0
 Provide a url for looking up more information about the policy/labels.
 
virtual const std::string & GetPolicyDataXml () const =0
 Gets policy data XML which describes the settings, labels, and rules associated with this policy.
 
virtual const std::string & GetPolicyFileId () const =0
 Gets the policy file ID.
 
virtual const std::string & GetSensitivityFileId () const =0
 Gets the sensitivity file ID.
 
virtual const SettingsGetSettings () const =0
 Returns the engine settings.
 
virtual bool HasClassificationRules () const =0
 Gets if the policy has automatic or recommendation rules.
 
virtual bool HasWorkloadConsent (Workload workload) const =0
 Checks if user has consented to specific workload,.
 
virtual bool IsLabelingRequired () const =0
 Checks if the policy dictates that a document must be labeled.
 
virtual const std::vector< std::shared_ptr< Label > > ListSensitivityLabels ()=0
 Returns a list of sensitivity labels.
 
virtual const std::vector< std::shared_ptr< SensitivityTypesRulePackage > > & ListSensitivityTypes () const =0
 list the sensitivity types associated with the policy engine.
 
virtual void SendApplicationAuditEvent (const std::string &level, const std::string &eventType, const std::string &eventData)=0
 Logs an application specific event to the audit pipeline.
 

Detailed Description

This class provides an interface for all engine functions.

Definition at line 50 of file file_engine.h.

Member Function Documentation

◆ CreateFileHandlerAsync() [1/2]

virtual std::shared_ptr< AsyncControl > FileEngine::CreateFileHandlerAsync ( const std::shared_ptr< Stream > & inputStream,
const std::string & actualFilePath,
bool isAuditDiscoveryEnabled,
const std::shared_ptr< FileHandler::Observer > & fileHandlerObserver,
const std::shared_ptr< void > & context,
const std::shared_ptr< FileExecutionState > & fileExecutionState = nullptr,
bool isGetSensitivityLabelAuditDiscoveryEnabled = true )
pure virtual

Starts creating a file handler for given file stream.

Parameters
inputStreamA stream containing the file data.
actualFilePathThe path to the file. The path must include the file name and, if one exists, the file extension. The file extension will be used to determine the file format. Passing in the wrong file extension will cause unexpected behavior and possibly file corruption. The path will also use to identify the file in audit.
isAuditDiscoveryEnabledrepresenting whether audit discovery is enabled or not.
fileHandlerObserverA class implementing the FileHandler::Observer interface.
contextClient context that will be opaquely passed back to the observer.
isGetSensitivityLabelAuditDiscoveryEnabledrepresenting whether audit discovery is triggered for getSensitivityLabel or not.
Returns
Async control object.

◆ CreateFileHandlerAsync() [2/2]

virtual std::shared_ptr< AsyncControl > FileEngine::CreateFileHandlerAsync ( const std::string & inputFilePath,
const std::string & filePathForAuditReporting,
bool isAuditDiscoveryEnabled,
const std::shared_ptr< FileHandler::Observer > & fileHandlerObserver,
const std::shared_ptr< void > & context,
const std::shared_ptr< FileExecutionState > & fileExecutionState = nullptr,
bool isGetSensitivityLabelAuditDiscoveryEnabled = true )
pure virtual

Starts creating a file handler for given file path.

Parameters
inputFilePathThe file to open. The path must include the file name and, if one exists, the file extension. The file extension is used to determine the file format.
filePathForAuditReportingThe actual (not temporary) file path, will be used for audit.
isAuditDiscoveryEnabledrepresenting whether audit discovery is enabled or not.
fileHandlerObserverA class implementing the FileHandler::Observer interface.
contextClient context that will be opaquely passed back to the observer.
isGetSensitivityLabelAuditDiscoveryEnabledrepresenting whether audit discovery is triggered for getSensitivityLabel or not.
Returns
Async control object.

◆ GetCustomSettings()

virtual const std::vector< std::pair< std::string, std::string > > & FileEngine::GetCustomSettings ( ) const
pure virtual

Gets a list of custom settings.

Returns
a vector of custom settings

◆ GetDefaultSensitivityLabel()

virtual const std::shared_ptr< Label > FileEngine::GetDefaultSensitivityLabel ( ) const
pure virtual

Get the default sensitivity label.

Returns
default sensitivity label if exists, nullptr if there is no default label set.

◆ GetLabelById()

virtual std::shared_ptr< Label > FileEngine::GetLabelById ( const std::string & id) const
pure virtual

Gets the label according to the provided id.

◆ GetLastPolicyFetchTime()

virtual std::chrono::time_point< std::chrono::system_clock > FileEngine::GetLastPolicyFetchTime ( ) const
pure virtual

Gets the time when the policy was last fetched.

Returns
the time when the policy was last fetched

◆ GetMoreInfoUrl()

virtual const std::string & FileEngine::GetMoreInfoUrl ( ) const
pure virtual

Provide a url for looking up more information about the policy/labels.

Returns
a url in string format.

◆ GetPolicyDataXml()

virtual const std::string & FileEngine::GetPolicyDataXml ( ) const
pure virtual

Gets policy data XML which describes the settings, labels, and rules associated with this policy.

Returns
Policy data XML.

◆ GetPolicyFileId()

virtual const std::string & FileEngine::GetPolicyFileId ( ) const
pure virtual

Gets the policy file ID.

Returns
a string that represent the policy file ID

◆ GetSensitivityFileId()

virtual const std::string & FileEngine::GetSensitivityFileId ( ) const
pure virtual

Gets the sensitivity file ID.

Returns
a string that represent the policy file ID

◆ GetSettings()

virtual const Settings & FileEngine::GetSettings ( ) const
pure virtual

Returns the engine settings.

◆ HasClassificationRules()

virtual bool FileEngine::HasClassificationRules ( ) const
pure virtual

Gets if the policy has automatic or recommendation rules.

Returns
a bool that will tell if there any automatic or recommendation rules in the policy

◆ HasWorkloadConsent()

virtual bool FileEngine::HasWorkloadConsent ( Workload workload) const
pure virtual

Checks if user has consented to specific workload,.

Returns
bool indicating consent.

◆ IsLabelingRequired()

virtual bool FileEngine::IsLabelingRequired ( ) const
pure virtual

Checks if the policy dictates that a document must be labeled.

Returns
true if labeling is mandatory, else false.

◆ ListSensitivityLabels()

virtual const std::vector< std::shared_ptr< Label > > FileEngine::ListSensitivityLabels ( )
pure virtual

Returns a list of sensitivity labels.

◆ ListSensitivityTypes()

virtual const std::vector< std::shared_ptr< SensitivityTypesRulePackage > > & FileEngine::ListSensitivityTypes ( ) const
pure virtual

list the sensitivity types associated with the policy engine.

Returns
a list of sensitivity labels. empty if LoadSensitivityTypesEnabled was false (
See also
FileEngine::Settings).

◆ SendApplicationAuditEvent()

virtual void FileEngine::SendApplicationAuditEvent ( const std::string & level,
const std::string & eventType,
const std::string & eventData )
pure virtual

Logs an application specific event to the audit pipeline.

Parameters
levela description of the log level : Info/Error/Warning
eventTypea description of the type of event
eventDatathe data associated with the event

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