Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
content_label.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 * @brief A file Containing the ContentLabel class.
29 *
30 * @file content_label.h
31 */
32
33#ifndef API_MIP_UPE_CONTENT_LABEL_H_
34#define API_MIP_UPE_CONTENT_LABEL_H_
35
36#include <chrono>
37
38#include "mip/common_types.h"
39#include "mip/mip_namespace.h"
40#include "mip/upe/label.h"
42
43MIP_NAMESPACE_BEGIN
44
45/**
46 * @brief Abstraction for a Microsoft Information Protection label that is applied to a piece of content, typically a
47 * document.
48 * @note It also holds properties for a specific applied label instance.
49 */
51public:
52 /**
53 * @brief Get the creation time of the label
54 *
55 * @return Creation time.
56 */
57 virtual std::chrono::time_point<std::chrono::system_clock> GetCreationTime() const = 0;
58 /**
59 * @brief Get the assignment method of the label.
60 *
61 * @return AssignmentMethod STANDARD | PRIVILEGED | AUTO.
62 * @see mip::AssignmentMethod
63 */
65 /**
66 * @brief Gets extended properties.
67 *
68 * @return Extended properties.
69 */
70 virtual const std::vector<MetadataEntry>& GetExtendedProperties() const = 0;
71 /**
72 * @brief Gets if protection was applied by the label or not.
73 *
74 * @return true if there is template protection and it was by this label, else false.
75 */
76 virtual bool IsProtectionAppliedFromLabel() const = 0;
77 /**
78 * @brief Get the actual label object applied on the content.
79 *
80 * @return the label object applied on the content.
81 * @see mip::Label
82 */
83 virtual std::shared_ptr<Label> GetLabel() const = 0;
84 /** @cond DOXYGEN_HIDE */
85 virtual ~ContentLabel() { }
86protected:
87 ContentLabel() { }
88 /** @endcond */
89};
90
91MIP_NAMESPACE_END
92
93#endif // API_MIP_UPE_CONTENT_LABEL_H_
Abstraction for a Microsoft Information Protection label that is applied to a piece of content,...
virtual bool IsProtectionAppliedFromLabel() const =0
Gets if protection was applied by the label or not.
virtual AssignmentMethod GetAssignmentMethod() const =0
Get the assignment method of the label.
virtual std::chrono::time_point< std::chrono::system_clock > GetCreationTime() const =0
Get the creation time of the label.
virtual const std::vector< MetadataEntry > & GetExtendedProperties() const =0
Gets extended properties.
virtual std::shared_ptr< Label > GetLabel() const =0
Get the actual label object applied on the content.
A file Containing the common types used by the upe, file and protection modules.
AssignmentMethod
The assignment method of the label on the document.
This file contains the Label class.
This file contains the MetadataEntry class.
MIP namespace macros.