|
MIP SDK — C++ 1.18
API Reference Documentation for C++
|
This class provides an interface for all engine functions. More...
#include <mip/file/file_engine.h>
Classes | |
| class | Settings |
Public Member Functions | |
| virtual | ~FileEngine () |
| virtual const Settings & | GetSettings () const =0 |
| Returns the engine settings. | |
| virtual const std::vector< std::shared_ptr< SensitivityTypesRulePackage > > & | ListSensitivityTypes () const =0 |
| list the sensitivity types associated with the policy engine. | |
| virtual const std::shared_ptr< Label > | GetDefaultSensitivityLabel () const =0 |
| Get the default sensitivity label. | |
| virtual std::shared_ptr< Label > | GetLabelById (const std::string &id) const =0 |
| Gets the label according to the provided id. | |
| virtual const std::vector< std::shared_ptr< Label > > | ListSensitivityLabels ()=0 |
| Returns a list of sensitivity labels. | |
| virtual const std::string & | GetMoreInfoUrl () const =0 |
| Provide a url for looking up more information about the policy/labels. | |
| 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 bool | IsLabelingRequired () const =0 |
| Checks if the policy dictates that a document must be labeled. | |
| 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 & | GetPolicyDataXml () const =0 |
| Gets policy data XML which describes the settings, labels, and rules associated with this policy. | |
| virtual std::shared_ptr< AsyncControl > | 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)=0 |
| Starts creating a file handler for given file path. | |
| virtual std::shared_ptr< AsyncControl > | 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)=0 |
| Starts creating a file handler for given file stream. | |
| 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. | |
| virtual const std::vector< std::pair< std::string, std::string > > & | GetCustomSettings () const =0 |
| Gets a list of custom 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 std::vector< std::string > | GetRightsForLabelId (const std::string &documentId, const std::string &labelId, const std::string &ownerEmail, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings()) const =0 |
| Get collection of rights available to a user for a label ID. | |
| virtual std::shared_ptr< AsyncControl > | GetRightsForLabelIdAsync (const std::string &documentId, const std::string &labelId, const std::string &ownerEmail, const std::shared_ptr< class ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings()) const =0 |
| Get collection of rights available to a user for a label ID. | |
Protected Member Functions | |
| FileEngine () | |
This class provides an interface for all engine functions.
|
inlinevirtual |
|
inlineprotected |
|
pure virtual |
Starts creating a file handler for given file stream.
| inputStream | A stream containing the file data. |
| actualFilePath | The 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. |
| isAuditDiscoveryEnabled | representing whether audit discovery is enabled or not. |
| fileHandlerObserver | A class implementing the FileHandler::Observer interface. |
| context | Client context that will be opaquely passed back to the observer. |
| isGetSensitivityLabelAuditDiscoveryEnabled | representing whether audit discovery is triggered for getSensitivityLabel or not. |
|
pure virtual |
Starts creating a file handler for given file path.
| inputFilePath | The 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. |
| filePathForAuditReporting | The actual (not temporary) file path, will be used for audit. |
| isAuditDiscoveryEnabled | representing whether audit discovery is enabled or not. |
| fileHandlerObserver | A class implementing the FileHandler::Observer interface. |
| context | Client context that will be opaquely passed back to the observer. |
| isGetSensitivityLabelAuditDiscoveryEnabled | representing whether audit discovery is triggered for getSensitivityLabel or not. |
|
pure virtual |
Gets a list of custom settings.
|
pure virtual |
Get the default sensitivity label.
|
pure virtual |
Gets the label according to the provided id.
|
pure virtual |
Gets the time when the policy was last fetched.
|
pure virtual |
Provide a url for looking up more information about the policy/labels.
|
pure virtual |
Gets policy data XML which describes the settings, labels, and rules associated with this policy.
|
pure virtual |
Gets the policy file ID.
|
pure virtual |
Get collection of rights available to a user for a label ID.
| documentId | Document ID associated with the document metadata. |
| labelId | Label ID associated with the document metadata with which the document was created. |
| ownerEmail | Owner of the document. |
| context | This same context will be forwarded to optional HttpDelegate. |
|
pure virtual |
Get collection of rights available to a user for a label ID.
| documentId | Document ID associated with the document metadata. |
| labelId | Label ID associated with the document metadata with which the document was created. |
| ownerEmail | Owner of the document. |
| observer | A class implementing the ProtectionEngine::Observer interface. |
| context | This same context will be forwarded to ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess or ProtectionEngine::Observer::OnGetRightsForLabelIdFailure. |
|
pure virtual |
Gets the sensitivity file ID.
|
pure virtual |
Returns the engine settings.
|
pure virtual |
Gets if the policy has automatic or recommendation rules.
|
pure virtual |
Checks if user has consented to specific workload,.
|
pure virtual |
Checks if the policy dictates that a document must be labeled.
|
pure virtual |
Returns a list of sensitivity labels.
|
pure virtual |
list the sensitivity types associated with the policy engine.
|
pure virtual |
Logs an application specific event to the audit pipeline.
| level | a description of the log level : Info/Error/Warning |
| eventType | a description of the type of event |
| eventData | the data associated with the event |