Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
protection_profile_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 Defines C-Style ProtectionProfile functions
30 *
31 * @file protection_profile_cc.h
32 */
33
34#ifndef API_MIP_PROTECTION_PROTECTION_PROFILE_CC_H_
35#define API_MIP_PROTECTION_PROTECTION_PROFILE_CC_H_
36
37#include <stdint.h>
38
43#include "mip_cc/error_cc.h"
48#include "mip_cc/result_cc.h"
50
53
54/**
55 * @brief Add a new protection engine to the profile.
56 *
57 * @param profile Parent profile under which an engine will be added
58 * @param settings Protection engine settings
59 * @param engine [Output] Newly-created protection engine instance
60 * @param errorInfo [Output] (Optional) Failure info if operation result is error
61 *
62 * @return Result code indicating success or failure
63 */
64MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfile_AddEngine(
69
70/**
71 * @brief Load a profile
72 *
73 * @param settings Profile settings
74 * @param profile [Output] Newly-created protection profile instance
75 * @param errorInfo [Output] (Optional) Failure info if operation result is error
76 *
77 * @return Result code indicating success or failure
78 */
79MIP_CC_API(mip_cc_result) MIP_CC_LoadProtectionProfile(
83
84/**
85 * @brief Release resources associated with a protection profile
86 *
87 * @param profile Protection profile to be released
88 */
89MIP_CC_API(void) MIP_CC_ReleaseProtectionProfile(mip_cc_protection_profile profile);
90
91/**
92 * @brief Create a settings object used to create a protection profile
93 *
94 * @param mipContext Global context shared across all profiles
95 * @param cacheStorageType Storage cache configuration
96 * @param reserved Reserved for backwards compatibility - set to nullptr
97 * @param consentCallback Callback object to be used for consent, implemented by client application
98 * @param settings [Output] Newly-created settings instance
99 * @param errorInfo [Output] (Optional) Failure info if operation result is error
100 *
101 * @return Result code indicating success or failure
102 */
103MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionProfileSettings(
106 const void* reserved,
107 const mip_cc_consent_callback consentCallback,
110
111/**
112 * @brief Sets the session ID that can be used to correlate logs and telemetry
113 *
114 * @param settings Profile settings
115 * @param sessionId Session ID that represents the lifetime of a protection profile
116 * @param errorInfo [Output] (Optional) Failure info if operation result is error
117 *
118 * @return Result code indicating success or failure
119 */
120MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfileSettings_SetSessionId(
122 const char* sessionId,
124
125/**
126 * @brief Configures whether or not end user licenses (EULs) will be cached locally
127 *
128 * @param settings Profile settings
129 * @param canCacheLicenses Whether or not engine should cache a license when opening protected content
130 * @param errorInfo [Output] (Optional) Failure info if operation result is error
131 *
132 * @return Result code indicating success or failure
133 */
134MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfileSettings_SetCanCacheLicenses(
138
139/**
140 * @brief Override default HTTP stack with client's own
141 *
142 * @param settings Profile settings to which HTTP delegate will be assigned
143 * @param httpDelegate HTTP callback instance implemented by client application
144 * @param errorInfo [Output] (Optional) Failure info if operation result is error
145 *
146 * @return Result code indicating success or failure
147 */
148MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfileSettings_SetHttpDelegate(
152
153/**
154 * @brief Override default async task dispatcher with client's own
155 *
156 * @param settings Profile settings to which task dispatcher delegate will be assigned
157 * @param taskDispatcherDelegate Task dispatcher callback instance implemented by client application
158 * @param errorInfo [Output] (Optional) Failure info if operation result is error
159 *
160 * @return Result code indicating success or failure
161 */
162MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfileSettings_SetTaskDispatcherDelegate(
166
167/**
168 * @brief Configures custom settings, used for feature gating and testing.
169 *
170 * @param settings Profile settings
171 * @param customSettings Key/value pairs of custom settings
172 * @param errorInfo [Output] (Optional) Failure info if operation result is error
173 *
174 * @return Result code indicating success or failure
175 */
176MIP_CC_API(mip_cc_result) MIP_CC_ProtectionProfileSettings_SetCustomSettings(
180
181/**
182 * @brief Release resources associated with a protection profile settings
183 *
184 * @param settings Protection profile settings to be released
185 */
186MIP_CC_API(void) MIP_CC_ReleaseProtectionProfileSettings(mip_cc_protection_profile_settings profilsettingseSettings);
187
188#endif // API_MIP_PROTECTION_PROTECTION_PROFILE_H_
ApplicationInfo definition.
A file Containing the common types used by the upe, file and protection modules.
mip_cc_cache_storage_type
Storage type for caches.
Defines consent callback functions.
Contains C API definitions for common string dictionary.
Error definition and functions.
Defines HTTP callback functions.
Defines C-Style MipContext functions.
const char const mip_cc_log_level const bool const mip_cc_logger_delegate const mip_cc_telemetry_configuration mip_cc_mip_context * mipContext
Export/import and other macros for C API.
Defines C-Style ProtectionEngine functions.
mip_cc_handle * mip_cc_protection_profile
MIP_CC_API(void) MIP_CC_ReleaseProtectionProfile(mip_cc_protection_profile profile)
Release resources associated with a protection profile.
const mip_cc_protection_engine_settings mip_cc_protection_engine * engine
const mip_cc_protection_engine_settings mip_cc_protection_engine mip_cc_error * errorInfo
const char * sessionId
mip_cc_protection_profile * profile
const mip_cc_protection_engine_settings settings
const mip_cc_dictionary customSettings
const mip_cc_cache_storage_type const void const mip_cc_consent_callback consentCallback
const bool canCacheLicenses
const mip_cc_cache_storage_type const void * reserved
const mip_cc_http_delegate httpDelegate
const mip_cc_cache_storage_type cacheStorageType
const mip_cc_task_dispatcher_delegate taskDispatcherDelegate
mip_cc_handle * mip_cc_protection_profile_settings
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Error information.
Definition error_cc.h:79
Opaque handle to MIP object.
Defines task dispatcher callback functions.