Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
common_types_cc.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/**
29* @brief A file Containing the common types used by the upe, file and protection modules.
30*
31* @file common_types_cc.h
32*/
33
34#ifndef API_MIP_COMMON_TYPES_CC_H
35#define API_MIP_COMMON_TYPES_CC_H
36
37#include <stdint.h>
38
40
41/**
42 * @brief Opaque handle to MIP object
43 */
44typedef struct {
45 uint32_t typeId; /**< Magic number uniquely identifying s specific handle type */
46 void* data; /**< Raw handle data */
48
49/**
50 * @brief GUID
51 */
52typedef struct {
53 char guid[37];
55
56/**
57 * @brief Storage type for caches
58 */
59typedef enum {
60 MIP_CACHE_STORAGE_TYPE_IN_MEMORY = 0, /**< In-memory storage */
61 MIP_CACHE_STORAGE_TYPE_ON_DISK = 1, /**< On-disk storage */
62 MIP_CACHE_STORAGE_TYPE_ON_DISK_ENCRYPTED = 2 /**< On-disk storage with encryption (if supported by the platform) */
64
65/**
66 * @brief Content format
67 */
68typedef enum {
69 MIP_CONTENT_FORMAT_DEFAULT = 0, /**< Standard file format */
70 MIP_CONTENT_FORMAT_EMAIL = 1, /**< Email */
72
73/**
74 * @brief Describes how a new label is being applied
75 */
76typedef enum {
77 MIP_LABEL_ASSIGNMENT_METHOD_STANDARD = 0, /**< Standard label assignments will not override a previous privileged assignment. */
78 MIP_LABEL_ASSIGNMENT_METHOD_PRIVILEGED = 1, /**< A privileged label assignment will not be overridden by future standard assignments. */
79 MIP_LABEL_ASSIGNMENT_METHOD_AUTO = 2, /**< Reserved. Do not use. */
81
82/**
83 * @brief Alignment for content marks (content header or content footer)
84 */
85typedef enum {
86 MIP_CONTENT_MARK_ALIGNMENT_LEFT = 0, /**< Content marking is aligned to the left */
87 MIP_CONTENT_MARK_ALIGNMENT_RIGHT = 1, /**< Content marking is aligned to the right */
88 MIP_CONTENT_MARK_ALIGNMENT_CENTER = 2, /**< Content marking is centered */
90
91/**
92 * @brief Layout for watermarks
93 */
94typedef enum {
95 MIP_WATERMARK_LAYOUT_HORIZONTAL = 0, /**< Watermark layout is horizontal */
96 MIP_WATERMARK_LAYOUT_DIAGONAL = 1, /**< Watermark layout is diagonal */
98
99typedef enum {
100 MIP_LABEL_FILTER_NONE = 0, /**< Disable default labeling filtration */
101 MIP_LABEL_FILTER_CUSTOM_PROTECTION = 1 << 0, /**< Filter labels that may result in custom protection*/
102 MIP_LABEL_FILTER_TEMPLATE_PROTECTION = 1 << 1, /**< Filter labels that may result in template protection */
103 MIP_LABEL_FILTER_DO_NOT_FORWARD_PROTECTION = 1 << 2, /**< Filter labels that may result in do not forward*/
104 MIP_LABEL_FILTER_ADHOC_PROTECTION = 1 << 3, /**< Filter labels that may result in adhoc protection */
105 MIP_LABEL_FILTER_HYOK_PROTECTION = 1 << 4, /**< Filter labels that may result in hyok protection */
106 MIP_LABEL_FILTER_PREDEFINED_TEMPLATE_PROTECTION = 1 << 5, /**< Filter labels that may result in predefined template protection */
107 MIP_LABEL_FILTER_DOUBLE_KEY_PROTECTION = 1 << 6, /**< Filter labels that may result in protection that requires double key template*/
108 MIP_LABEL_FILTER_DOUBLE_KEY_USER_DEFINED_PROTECTION = 1 << 7, /**< Filter labels that may result in protection that requires double key adhoc and dnf*/
109 MIP_LABEL_FILTER_ENCRYPT_ONLY_PROTECTION = 1 << 8, /**< Filter labels that may result in encrypt only protection */
111
112typedef enum {
113 MIP_CLOUD_UNKNOWN = 0, /**< Cloud not specified or URL not recognized as an Azure cloud */
114 MIP_CLOUD_CUSTOM = 1, /**< Custom cloud: endpoint base URL manually specified by application */
115 MIP_CLOUD_TEST = 2, /**< Test cloud */
116 MIP_CLOUD_COMMERCIAL = 3, /**< Global commercial cloud */
117 MIP_CLOUD_GERMANY = 4, /**< Germany sovereign cloud */
118 MIP_CLOUD_US_DOD = 5, /**< US sovereign cloud (DoD) */
119 MIP_CLOUD_US_GCC = 6, /**< US sovereign cloud (GCC) */
120 MIP_CLOUD_US_GCC_HIGH = 7, /**< US sovereign cloud (GCC-High) */
121 MIP_CLOUD_US_SEC = 8, /**< US sovereign cloud (Sec) */
122 MIP_CLOUD_US_NAT = 9, /**< US sovereign cloud (Nat) */
123 MIP_CLOUD_CHINA_01 = 10, /**< China sovereign cloud */
125
126typedef enum {
127 MIP_METADATA_VERSION_FORMAT_DEFAULT = 0, /**< Metadata is ordered based upon label id */
128 MIP_METADATA_VERSION_FORMAT_ONE_LABEL_PER_TENANT = 1, /**< Metadata is ordered based upon site-id */
130
131typedef enum {
132 MIP_WORKLOAD_OFFICE = 0, /**< Disable default labeling filtration */
133 MIP_WORKLOAD_PURVIEW = 1, /**< Filter labels that may result in custom protection*/
135
136#endif // API_MIP_COMMON_TYPES_CC_H
mip_cc_workload
@ MIP_WORKLOAD_OFFICE
Disable default labeling filtration.
@ MIP_WORKLOAD_PURVIEW
Filter labels that may result in custom protection.
mip_cc_label_filter
@ MIP_LABEL_FILTER_DOUBLE_KEY_USER_DEFINED_PROTECTION
Filter labels that may result in protection that requires double key adhoc and dnf.
@ MIP_LABEL_FILTER_ADHOC_PROTECTION
Filter labels that may result in adhoc protection.
@ MIP_LABEL_FILTER_CUSTOM_PROTECTION
Filter labels that may result in custom protection.
@ MIP_LABEL_FILTER_DOUBLE_KEY_PROTECTION
Filter labels that may result in protection that requires double key template.
@ MIP_LABEL_FILTER_TEMPLATE_PROTECTION
Filter labels that may result in template protection.
@ MIP_LABEL_FILTER_NONE
Disable default labeling filtration.
@ MIP_LABEL_FILTER_PREDEFINED_TEMPLATE_PROTECTION
Filter labels that may result in predefined template protection.
@ MIP_LABEL_FILTER_HYOK_PROTECTION
Filter labels that may result in hyok protection.
@ MIP_LABEL_FILTER_ENCRYPT_ONLY_PROTECTION
Filter labels that may result in encrypt only protection.
@ MIP_LABEL_FILTER_DO_NOT_FORWARD_PROTECTION
Filter labels that may result in do not forward.
mip_cc_label_assignment_method
Describes how a new label is being applied.
@ MIP_LABEL_ASSIGNMENT_METHOD_STANDARD
Standard label assignments will not override a previous privileged assignment.
@ MIP_LABEL_ASSIGNMENT_METHOD_AUTO
Reserved.
@ MIP_LABEL_ASSIGNMENT_METHOD_PRIVILEGED
A privileged label assignment will not be overridden by future standard assignments.
mip_cc_content_mark_alignment
Alignment for content marks (content header or content footer)
@ MIP_CONTENT_MARK_ALIGNMENT_CENTER
Content marking is centered.
@ MIP_CONTENT_MARK_ALIGNMENT_LEFT
Content marking is aligned to the left.
@ MIP_CONTENT_MARK_ALIGNMENT_RIGHT
Content marking is aligned to the right.
mip_cc_content_format
Content format.
@ MIP_CONTENT_FORMAT_DEFAULT
Standard file format.
@ MIP_CONTENT_FORMAT_EMAIL
Email.
mip_cc_watermark_layout
Layout for watermarks.
@ MIP_WATERMARK_LAYOUT_HORIZONTAL
Watermark layout is horizontal.
@ MIP_WATERMARK_LAYOUT_DIAGONAL
Watermark layout is diagonal.
mip_cc_metadata_version_format
@ MIP_METADATA_VERSION_FORMAT_DEFAULT
Metadata is ordered based upon label id.
@ MIP_METADATA_VERSION_FORMAT_ONE_LABEL_PER_TENANT
Metadata is ordered based upon site-id.
mip_cc_cloud
@ MIP_CLOUD_US_SEC
US sovereign cloud (Sec)
@ MIP_CLOUD_TEST
Test cloud.
@ MIP_CLOUD_US_NAT
US sovereign cloud (Nat)
@ MIP_CLOUD_US_GCC
US sovereign cloud (GCC)
@ MIP_CLOUD_US_GCC_HIGH
US sovereign cloud (GCC-High)
@ MIP_CLOUD_UNKNOWN
Cloud not specified or URL not recognized as an Azure cloud.
@ MIP_CLOUD_CUSTOM
Custom cloud: endpoint base URL manually specified by application.
@ MIP_CLOUD_CHINA_01
China sovereign cloud.
@ MIP_CLOUD_GERMANY
Germany sovereign cloud.
@ MIP_CLOUD_US_DOD
US sovereign cloud (DoD)
@ MIP_CLOUD_COMMERCIAL
Global commercial cloud.
mip_cc_cache_storage_type
Storage type for caches.
@ MIP_CACHE_STORAGE_TYPE_ON_DISK
On-disk storage.
@ MIP_CACHE_STORAGE_TYPE_ON_DISK_ENCRYPTED
On-disk storage with encryption (if supported by the platform)
@ MIP_CACHE_STORAGE_TYPE_IN_MEMORY
In-memory storage.
Export/import and other macros for C API.
Opaque handle to MIP object.
uint32_t typeId
Magic number uniquely identifying s specific handle type.
void * data
Raw handle data.