Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
telemetry_configuration_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 * @brief Defines custom telemetry settings
29 *
30 * @file telemetry_configuration_cc.h
31 */
32
33#ifndef API_MIP_TELEMETRY_CONFIGURATION_CC_H_
34#define API_MIP_TELEMETRY_CONFIGURATION_CC_H_
35
36#include <memory>
37
40#include "mip_cc/error_cc.h"
43
45
46/**
47 * @brief Create a settings object used to create a protection profile
48 *
49 * @param telemetryConfig [Output] Newly-created telemetry configuration instance containing default settings
50 * @param errorInfo [Output] (Optional) Failure info if operation result is error
51 *
52 * @return Result code indicating success or failure
53 */
54MIP_CC_API(mip_cc_result) MIP_CC_CreateTelemetryConfiguration(
55 mip_cc_telemetry_configuration* telemetryConfig,
57
58/**
59 * @brief Set a telemetry host name which will override internal telemetry settings
60 *
61 * @param telemetryConfig Telemetry configuration
62 * @param hostName Host name
63 * @param errorInfo [Output] (Optional) Failure info if operation result is error
64 *
65 * @return Result code indicating success or failure
66 *
67 * @note This property is set when a client application uses the same Aria/1DS telemetry component and wishes for
68 * its internal telemetry settings (caching, logging, priority etc.) to be used instead of MIP's default settings
69 */
70MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetHostName(
71 const mip_cc_telemetry_configuration telemetryConfig,
72 const char* hostName,
74
75/**
76 * @brief Set a telemetry shared library override
77 *
78 * @param telemetryConfig Telemetry configuration
79 * @param libraryName Name of DLL that implements the Aria/1DS SDK's C API
80 * @param errorInfo [Output] (Optional) Failure info if operation result is error
81 *
82 * @return Result code indicating success or failure
83 *
84 * @note This property is set when a client has an existing telemetry DLL that implements the Aria/1DS SDK's C API that
85 * should be used instead of mip_ClientTelemetry.dll
86 */
87MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetLibraryName(
88 const mip_cc_telemetry_configuration telemetryConfig,
89 const char* libraryName,
91
92/**
93 * @brief Override default telemetry HTTP stack with client's own
94 *
95 * @param telemetryConfig Telemetry configuration
96 * @param httpDelegate HTTP callback instance implemented by client application
97 * @param errorInfo [Output] (Optional) Failure info if operation result is error
98 *
99 * @return Result code indicating success or failure
100 *
101 * @note If this property is not set, the telemetry component will use MIP's default HTTP stack
102 */
103MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetHttpDelegate(
104 const mip_cc_telemetry_configuration telemetryConfig,
107
108/**
109 * @brief Override default async task dispatcher with client's own
110 *
111 * @param telemetryConfig Telemetry configuration
112 * @param taskDispatcherDelegate Task dispatcher callback instance implemented by client application
113 * @param errorInfo [Output] (Optional) Failure info if operation result is error
114 *
115 * @return Result code indicating success or failure
116 */
117MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetTaskDispatcherDelegate(
118 const mip_cc_telemetry_configuration telemetryConfig,
121
122/**
123 * @brief Sets whether or not the telemetry component is allowed ping network status on a background thread
124 *
125 * @param telemetryConfig Telemetry configuration
126 * @param isCachingEnabled Whether or not the telemetry component is allowed ping network status on a background thread
127 * @param errorInfo [Output] (Optional) Failure info if operation result is error
128 *
129 * @return Result code indicating success or failure
130 *
131 * @note Default is 'true'
132 */
133MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetIsNetworkDetectionEnabled(
134 const mip_cc_telemetry_configuration telemetryConfig,
137
138/**
139 * @brief Sets whether or not the telemetry component is allowed to write caches to disk
140 *
141 * @param telemetryConfig Telemetry configuration
142 * @param isCachingEnabled Whether or not the telemetry component is allowed to write caches to disk
143 * @param errorInfo [Output] (Optional) Failure info if operation result is error
144 *
145 * @return Result code indicating success or failure
146 *
147 * @note Default is 'true'
148 */
149MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetIsLocalCachingEnabled(
150 const mip_cc_telemetry_configuration telemetryConfig,
153
154/**
155 * @brief Sets whether or not the telemetry component is allowed to write logs to disk
156 *
157 * @param telemetryConfig Telemetry configuration
158 * @param isTraceLoggingEnabled Whether or not the telemetry component is allowed to write logs to disk.
159 * These files can grow to be very large, and may require manual cleanup from the host application.
160 * @param errorInfo [Output] (Optional) Failure info if operation result is error
161 *
162 * @return Result code indicating success or failure
163 *
164 * @note Default is 'true'
165 */
166MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetIsTraceLoggingEnabled(
167 const mip_cc_telemetry_configuration telemetryConfig,
170
171/**
172 * @brief Sets whether or not an application/user has opted out of optional telemetry
173 *
174 * @param telemetryConfig Telemetry configuration
175 * @param isMinimalTelemetryEnabled Whether or not an application/user has opted out of optional telemetry
176 * @param errorInfo [Output] (Optional) Failure info if operation result is error
177 *
178 * @return Result code indicating success or failure
179 *
180 * @note Default is 'false'
181 */
182MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetIsTelemetryOptedOut(
183 const mip_cc_telemetry_configuration telemetryConfig,
186
187/**
188 * @brief Sets whether fast telemetry shutdown is enabled or not
189 *
190 * @param telemetryConfig Telemetry configuration
191 * @param isFastShutdownEnabled Whether or not the telemetry fast shutdown is enabled
192 * @param errorInfo [Output] (Optional) Failure info if operation result is error
193 *
194 * @return Result code indicating success or failure
195 *
196 * @note Default is 'false'
197 */
198MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetIsFastShutdownEnabled(
199 const mip_cc_telemetry_configuration telemetryConfig,
202
203/**
204 * @brief Sets custom telemetry settings
205 *
206 * @param telemetryConfig Telemetry configuration
207 * @param customSettings Custom telemetry settings
208 * @param errorInfo [Output] (Optional) Failure info if operation result is error
209 *
210 * @return Result code indicating success or failure
211 */
212MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetCustomSettings(
213 const mip_cc_telemetry_configuration telemetryConfig,
216
217/**
218 * @brief Sets a telemetry property to mask
219 *
220 * @param telemetryConfig Telemetry configuration
221 * @param eventName Event name
222 * @param propertyName Property name
223 * @param errorInfo [Output] (Optional) Failure info if operation result is error
224 *
225 * @return Result code indicating success or failure
226 */
227MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_AddMaskedProperty(
228 const mip_cc_telemetry_configuration telemetryConfig,
229 const char* eventName,
230 const char* propertyName,
232
233/**
234 * @brief Override default async task dispatcher with client's own
235 *
236 * @param telemetryConfig Telemetry configuration
237 * @param taskDispatcherDelegate Task dispatcher callback instance implemented by client application
238 * @param errorInfo [Output] (Optional) Failure info if operation result is error
239 *
240 * @return Result code indicating success or failure
241 */
242MIP_CC_API(mip_cc_result) MIP_CC_TelemetryConfiguration_SetTaskDispatcherDelegate(
243 const mip_cc_telemetry_configuration telemetryConfig,
246
247/**
248 * @brief Release resources associated with a protection profile settings
249 *
250 * @param profileSettings Protection profile settings to be released
251 */
252MIP_CC_API(void) MIP_CC_ReleaseTelemetryConfiguration(mip_cc_telemetry_configuration telemetryConfig);
253
254#endif // API_MIP_TELEMETRY_CONFIGURATION_CC_H_
255
A file Containing the common types used by the upe, file and protection modules.
Contains C API definitions for common string dictionary.
Error definition and functions.
Defines HTTP callback functions.
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.
MIP_CC_API(void) MIP_CC_ReleaseTelemetryConfiguration(mip_cc_telemetry_configuration telemetryConfig)
Release resources associated with a protection profile settings.
const char * eventName
mip_cc_error * errorInfo
const bool isMinimalTelemetryEnabled
const bool isCachingEnabled
const mip_cc_dictionary customSettings
const char * hostName
const char const char * propertyName
const mip_cc_http_delegate httpDelegate
const char * libraryName
const bool isTraceLoggingEnabled
const mip_cc_task_dispatcher_delegate taskDispatcherDelegate
const bool isFastShutdownEnabled
const bool isNetworkDetectionEnabled
mip_cc_handle * mip_cc_telemetry_configuration