Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
file_execution_state.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27
28#ifndef API_MIP_FILE_FILE_EXECUTION_STATE_H_
29#define API_MIP_FILE_FILE_EXECUTION_STATE_H_
30
31#include <map>
32#include <memory>
33#include <string>
34#include <vector>
35
36#include "mip/common_types.h"
38#include "mip/mip_namespace.h"
41
42MIP_NAMESPACE_BEGIN
43
45public:
46 /**
47 * @brief Gets the state of the content while the application is interacting with it.
48 *
49 * @return State of the content data
50 */
51 virtual DataState GetDataState() const {
52 return DataState::REST;
53 }
54 /**
55 * @brief Return a map of classification results.
56 *
57 * @param fileHandler - the file handler of the used file
58 * @param classificationIds a list of classification IDs.
59 * @return a list of classification results.
60 */
61 virtual std::shared_ptr<ClassificationResults> GetClassificationResults(
62 const std::shared_ptr<FileHandler>& /*fileHandler*/,
63 const std::vector<std::shared_ptr<ClassificationRequest>>& /*classificationIds*/) const {
64 return nullptr;
65 }
66
67 /**
68 * @brief Return a map of application specific audit key-value pairs.
69 *
70 * @return a list of application specific audit metadata
71 *
72 * @note Registered Key:Value pairs
73 * Sender: Email Id for the sender
74 * Recipients: Represents a JSON array of recipients for an email
75 * LastModifiedBy: Email Id for the user who last modified the content
76 * LastModifiedDate: Date the content was last modified
77 */
78 virtual std::map<std::string, std::string> GetAuditMetadata() const {
79 return std::map<std::string, std::string>();
80 }
81
82 /**
83 * @brief Return an identifier which correlates application events with the corresponding protection service REST requests.
84 *
85 * @return An identifier (usually specified as a GUID)
86 */
87 virtual const std::string GetApplicationScenarioId() const {
88 return std::string();
89 }
90
91 /** @cond DOXYGEN_HIDE */
92 virtual ~FileExecutionState() {}
93
94protected:
96 /** @endcond */
97};
98
99MIP_NAMESPACE_END
100
101#endif // API_MIP_FILE_FILE_EXECUTION_STATE_H_
virtual DataState GetDataState() const
Gets the state of the content while the application is interacting with it.
virtual std::map< std::string, std::string > GetAuditMetadata() const
Return a map of application specific audit key-value pairs.
virtual const std::string GetApplicationScenarioId() const
Return an identifier which correlates application events with the corresponding protection service RE...
virtual std::shared_ptr< ClassificationResults > GetClassificationResults(const std::shared_ptr< FileHandler > &, const std::vector< std::shared_ptr< ClassificationRequest > > &) const
Return a map of classification results.
This file contains the ClassificationRequest class.
This file contains the ClassificationResult class.
A file Containing the common types used by the upe, file and protection modules.
DataState
Defines what state of the data is the application acting upon.
@ REST
Inactive data stored physically in databases/file/warehouses.
MIP namespace macros.