Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
|
Interface for all file handling functions. More...
#include <src/api/mip/file/file_handler.h>
Classes | |
class | Observer |
Observer interface for clients to get notifications events related to file handler. More... | |
Public Member Functions | |
virtual void | ClassifyAsync (const std::shared_ptr< void > &context)=0 |
Executes the rules in the handler and returns the list of actions to be executed. | |
virtual void | CommitAsync (const std::shared_ptr< Stream > &outputStream, const std::shared_ptr< void > &context)=0 |
Writes the changes to the stream specified by the |outputStream| parameter. | |
virtual void | CommitAsync (const std::string &outputFilePath, const std::shared_ptr< void > &context)=0 |
Writes the changes to the file specified by the |outputFilePath| parameter. | |
virtual void | DeleteLabel (const LabelingOptions &labelingOptions)=0 |
Deletes the sensitivity label from the file. | |
virtual void | GetDecryptedTemporaryFileAsync (const std::shared_ptr< void > &context)=0 |
Returns a path to a temporary file (that will be deleted if possible) - representing the decrypted content. | |
virtual void | GetDecryptedTemporaryStreamAsync (const std::shared_ptr< void > &context)=0 |
Returns a stream - representing the decrypted content. | |
virtual std::shared_ptr< ContentLabel > | GetLabel ()=0 |
Starts retrieving the sensitivity label from the file. | |
virtual std::string | GetOutputFileName ()=0 |
Calculates the output file name and extension based on the original file name and the accumulated changes. | |
virtual std::vector< std::pair< std::string, std::string > > | GetProperties (uint32_t version)=0 |
Retrieves the file properties according to version. | |
virtual std::shared_ptr< ProtectionHandler > | GetProtection ()=0 |
Starts retrieving the protection policy from the file. | |
virtual void | InspectAsync (const std::shared_ptr< void > &context)=0 |
Create a file inspector object, used to retrieve file contents from compatible file formats. | |
virtual bool | IsModified ()=0 |
Checks if there are changes to commit to the file. | |
virtual void | NotifyCommitSuccessful (const std::string &actualFilePath)=0 |
To be called when the changes have been committed to disk. | |
virtual void | RegisterContentForTrackingAndRevocationAsync (bool isOwnerNotificationEnabled, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context)=0 |
Register the content for tracking and revocation. | |
virtual void | RemoveProtection ()=0 |
Removes protection from the file. | |
virtual void | RevokeContentAsync (const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context)=0 |
Perform revocation for the content. | |
virtual void | SetLabel (const std::shared_ptr< Label > &label, const LabelingOptions &labelingOptions, const ProtectionSettings &protectionSettings)=0 |
Sets the sensitivity label to the file. | |
virtual void | SetProtection (const std::shared_ptr< ProtectionDescriptor > &protectionDescriptor, const ProtectionSettings &protectionSettings)=0 |
Sets either custom or template-based permissions (according to protectionDescriptor->GetProtectionType) to the file. | |
virtual void | SetProtection (const std::shared_ptr< ProtectionHandler > &protectionHandler)=0 |
Sets protection on a document using an existing protection handler. | |
Static Public Member Functions | |
static FILE_API std::shared_ptr< FileStatus > __CDECL | GetFileStatus (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext=nullptr) |
Checks whether a file is labeled, protected, or contains protected objects. | |
static FILE_API std::shared_ptr< FileStatus > __CDECL | GetFileStatus (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext=nullptr) |
Checks whether a file is labeled, protected, or contains protected objects. | |
static FILE_API std::vector< uint8_t > __CDECL | GetSerializedPublishingLicense (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Get publishing license from the file. | |
static FILE_API std::vector< uint8_t > __CDECL | GetSerializedPublishingLicense (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Get publishing license from the file. | |
static FILE_API std::vector< uint8_t > __CDECL | GetSerializedPublishingLicense (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Get publishing license from the file. | |
static FILE_API std::vector< uint8_t > __CDECL | GetSerializedPublishingLicense (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Get publishing license from the file. | |
static FILE_API bool __CDECL | IsLabeledOrProtected (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Checks whether a file is labeled/protected or not. | |
static FILE_API bool __CDECL | IsLabeledOrProtected (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Checks whether a file is labeled/protected or not. | |
static FILE_API bool __CDECL | IsLabeledOrProtected (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Checks whether a file is labeled/protected or not. | |
static FILE_API bool __CDECL | IsLabeledOrProtected (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Checks whether a file is labeled/protected or not. | |
static FILE_API bool __CDECL | IsProtected (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Checks whether a file is protected or not. | |
static FILE_API bool __CDECL | IsProtected (const std::shared_ptr< Stream > &stream, const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Checks whether a file is protected or not. | |
static FILE_API bool __CDECL | IsProtected (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext) |
Checks whether a file is protected or not. | |
static FILE_API bool __CDECL | IsProtected (const std::string &filePath, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
Checks whether a file is protected or not. | |
Interface for all file handling functions.
Definition at line 52 of file file_handler.h.
|
pure virtual |
Executes the rules in the handler and returns the list of actions to be executed.
NotSupportedError | when a protection only engine is in use and no policy handler is found. |
|
pure virtual |
Writes the changes to the stream specified by the |outputStream| parameter.
|
pure virtual |
Writes the changes to the file specified by the |outputFilePath| parameter.
|
pure virtual |
Deletes the sensitivity label from the file.
NotSupportedError | when a protection only engine is in use and no policy handler is found. |
|
pure virtual |
Returns a path to a temporary file (that will be deleted if possible) - representing the decrypted content.
|
pure virtual |
Returns a stream - representing the decrypted content.
|
static |
Checks whether a file is labeled, protected, or contains protected objects.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
static |
Checks whether a file is labeled, protected, or contains protected objects.
filePath | Path of file to check, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
pure virtual |
Starts retrieving the sensitivity label from the file.
NotSupportedError | when a protection only engine is in use and no policy handler is found. |
|
pure virtual |
Calculates the output file name and extension based on the original file name and the accumulated changes.
|
pure virtual |
Retrieves the file properties according to version.
|
pure virtual |
Starts retrieving the protection policy from the file.
|
static |
Get publishing license from the file.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
|
static |
Get publishing license from the file.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
static |
Get publishing license from the file.
filePath | Path of file to open, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
|
static |
Get publishing license from the file.
filePath | Path of file to open, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
pure virtual |
Create a file inspector object, used to retrieve file contents from compatible file formats.
|
static |
Checks whether a file is labeled/protected or not.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
|
static |
Checks whether a file is labeled/protected or not.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
static |
Checks whether a file is labeled/protected or not.
filePath | Path of file to check, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
|
static |
Checks whether a file is labeled/protected or not.
filePath | Path of file to check, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
pure virtual |
Checks if there are changes to commit to the file.
|
static |
Checks whether a file is protected or not.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
|
static |
Checks whether a file is protected or not.
stream | Stream containing file data to check |
filePath | File path associated with data in 'stream', which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. Passing in the wrong file extension will cause unexpected behavior. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
static |
Checks whether a file is protected or not.
filePath | Path of file to check, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
|
static |
Checks whether a file is protected or not.
filePath | Path of file to check, which must include the file name and, if one exists, the file extension. The file extension is used to determine the file format. |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
|
pure virtual |
To be called when the changes have been committed to disk.
actualFilePath | The actual file path for the output file |
NotSupportedError | when a protection only engine is in use and no policy handler is found. |
|
pure virtual |
Register the content for tracking and revocation.
isOwnerNotificationEnabled | Set to true to notify the owner via email whenever the document is decrypted, or false to not send the notification. |
observer | A class implementing the ProtectionHandler::Observer interface |
context | Client context that will be opaquely forwarded to observers and optional HttpDelegate |
|
pure virtual |
Removes protection from the file.
If the original file format does not support labeling, the label will be lost when protection is removed. When the native format supports labeling, the label metadata is maintained.
|
pure virtual |
Perform revocation for the content.
observer | A class implementing the ProtectionHandler::Observer interface |
context | Client context that will be opaquely forwarded to observers and optional HttpDelegate |
|
pure virtual |
Sets the sensitivity label to the file.
NotSupportedError | when a protection only engine is in use and no policy handler is found. |
|
pure virtual |
Sets either custom or template-based permissions (according to protectionDescriptor->GetProtectionType) to the file.
|
pure virtual |
Sets protection on a document using an existing protection handler.