Microsoft Information Protection SDK - C 1.18
API Reference Documentation for C
Loading...
Searching...
No Matches
protection_descriptor_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 */
33#ifndef API_MIP_PROTECTION_DESCRIPTOR_CC_H_
34#define API_MIP_PROTECTION_DESCRIPTOR_CC_H_
35
36#include <time.h>
37
40#include "mip_cc/error_cc.h"
41#include "mip_cc/result_cc.h"
44
48
57
61typedef struct {
62 const char** users;
63 int64_t usersCount;
64 const char** rights;
65 int64_t rightsCount;
67
71typedef struct {
72 const char** users;
73 int64_t usersCount;
74 const char** roles;
75 int64_t rolesCount;
77
88MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromTemplate(
89 const char* templateId,
93
110MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromUserRights(
112 const int64_t userRightsCount,
113 const char* name,
114 const char* description,
115 const char* referrer,
116 const time_t* contentValidUntil,
122
139MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromUserRoles(
141 const int64_t userRolesCount,
142 const char* name,
143 const char* description,
144 const char* referrer,
145 const time_t* contentValidUntil,
146 const bool allowOfflineAccess,
151
161MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetProtectionType(
165
175MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetOwnerSize(
177 int64_t* ownerSize,
179
194MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetOwner(
197 const int64_t ownerBufferSize,
200
210MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetNameSize(
212 int64_t* nameSize,
214
229MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetName(
232 const int64_t nameBufferSize,
235
245MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDescriptionSize(
249
264MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDescription(
270
280MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetTemplateId(
284
294MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetLabelId(
298
311MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetContentId(
315
325MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_DoesContentExpire(
329
339MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetContentValidUntil(
341 int64_t* contentValidUntil,
343
353MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_DoesAllowOfflineAccess(
357
367MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_DoesLicenseExpire(
371
383MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetLicenseValidUntil(
387
397MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetReferrerSize(
399 int64_t* referrerSize,
401
416MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetReferrer(
419 const int64_t referrerBufferSize,
422
433MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSignedAppData(
437
448MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetEncryptedAppData(
452
462MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDoubleKeyUrlSize(
464 int64_t* urlSize,
466
481MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDoubleKeyUrl(
484 const int64_t urlBufferSize,
487
502MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetUserRights(
505 int64_t* userRightsCount,
507
519MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetUserRoles(
522 int64_t* userRolesCount,
524
537MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDynamicWatermark(
541
552MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSupplementalInfoSize(
557
573MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSupplementalInfo(
575 const char* supplementalInfoKey,
580
586MIP_CC_API(void) MIP_CC_ReleaseProtectionDescriptor(mip_cc_protection_descriptor protectionDescriptor);
587
588#endif // API_MIP_PROTECTION_DESCRIPTOR_CC_H_
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.
const int64_t const char const char const char const time_t const bool const mip_cc_dictionary encryptedAppData
Definition protection_descriptor_cc.h:118
time_t * licenseValidUntil
Definition protection_descriptor_cc.h:385
char * descriptionBuffer
Definition protection_descriptor_cc.h:266
int64_t * nameSize
Definition protection_descriptor_cc.h:212
mip_cc_handle * mip_cc_user_rights_result
Definition protection_descriptor_cc.h:46
mip_cc_dynamic_watermark * dynamicWatermark
Definition protection_descriptor_cc.h:539
char const int64_t int64_t * actualUrlSize
Definition protection_descriptor_cc.h:485
const mip_cc_dictionary mip_cc_protection_descriptor * protectionDescriptor
Definition protection_descriptor_cc.h:91
mip_cc_guid * contentId
Definition protection_descriptor_cc.h:313
const char char * supplementalInfoBuffer
Definition protection_descriptor_cc.h:576
mip_cc_handle * mip_cc_user_roles_result
Definition protection_descriptor_cc.h:47
char * referrerBuffer
Definition protection_descriptor_cc.h:418
char const int64_t int64_t * actualOwnerSize
Definition protection_descriptor_cc.h:198
mip_cc_protection_type
A description of how protection is defined.
Definition protection_descriptor_cc.h:52
@ MIP_PROTECTION_TYPE_CUSTOM
Definition protection_descriptor_cc.h:54
@ MIP_PROTECTION_TYPE_TEMPLATE_BASED
Definition protection_descriptor_cc.h:53
@ MIP_PROTECTION_TYPE_DYNAMIC
Definition protection_descriptor_cc.h:55
char const int64_t int64_t * actualReferrerSize
Definition protection_descriptor_cc.h:420
const mip_cc_dictionary signedAppData
Definition protection_descriptor_cc.h:90
char const int64_t referrerBufferSize
Definition protection_descriptor_cc.h:419
const int64_t const char const char const char const time_t const bool allowOfflineAccess
Definition protection_descriptor_cc.h:117
mip_cc_user_rights_result * userRights
Definition protection_descriptor_cc.h:504
char const int64_t int64_t * actualNameSize
Definition protection_descriptor_cc.h:233
int64_t * descriptionSize
Definition protection_descriptor_cc.h:247
mip_cc_guid * labelId
Definition protection_descriptor_cc.h:296
bool * doesAllowOfflineAccess
Definition protection_descriptor_cc.h:355
const char char const int64_t supplementalInfoBufferSize
Definition protection_descriptor_cc.h:577
const int64_t const char const char const char * referrer
Definition protection_descriptor_cc.h:115
const char int64_t * supplementalInfoSize
Definition protection_descriptor_cc.h:555
bool * doesContentExpire
Definition protection_descriptor_cc.h:327
char const int64_t urlBufferSize
Definition protection_descriptor_cc.h:484
char * urlBuffer
Definition protection_descriptor_cc.h:483
const char char const int64_t int64_t * actualsupplementalInfoSize
Definition protection_descriptor_cc.h:578
const char * supplementalInfoKey
Definition protection_descriptor_cc.h:554
const int64_t userRightsCount
Definition protection_descriptor_cc.h:112
int64_t * urlSize
Definition protection_descriptor_cc.h:464
int64_t * ownerSize
Definition protection_descriptor_cc.h:177
char * ownerBuffer
Definition protection_descriptor_cc.h:196
char const int64_t nameBufferSize
Definition protection_descriptor_cc.h:232
int64_t * referrerSize
Definition protection_descriptor_cc.h:399
mip_cc_handle * mip_cc_protection_descriptor
Definition protection_descriptor_cc.h:45
char const int64_t int64_t * actualDescriptionSize
Definition protection_descriptor_cc.h:268
const int64_t const char const char const char const time_t * contentValidUntil
Definition protection_descriptor_cc.h:116
mip_cc_guid * templateId
Definition protection_descriptor_cc.h:282
char const int64_t descriptionBufferSize
Definition protection_descriptor_cc.h:267
const int64_t const char const char * description
Definition protection_descriptor_cc.h:114
const mip_cc_dictionary mip_cc_protection_descriptor mip_cc_error * errorInfo
Definition protection_descriptor_cc.h:92
char * nameBuffer
Definition protection_descriptor_cc.h:231
mip_cc_user_roles_result * userRoles
Definition protection_descriptor_cc.h:521
MIP_CC_API(void) MIP_CC_ReleaseProtectionDescriptor(mip_cc_protection_descriptor protectionDescriptor)
Release resources associated with a protection descriptor.
char const int64_t ownerBufferSize
Definition protection_descriptor_cc.h:197
mip_cc_protection_type * protectionType
Definition protection_descriptor_cc.h:163
bool * doesLicenseExpire
Definition protection_descriptor_cc.h:369
const int64_t userRolesCount
Definition protection_descriptor_cc.h:141
const int64_t const char * name
Definition protection_descriptor_cc.h:113
mip_cc_protection_descriptor * descriptor
Definition protection_handler_cc.h:359
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Contains C API definitions for common string list.
Error information.
Definition error_cc.h:93
GUID.
Definition common_types_cc.h:52
Opaque handle to MIP object.
Definition common_types_cc.h:44
A group of users and the rights associated with them.
Definition protection_descriptor_cc.h:61
const char ** users
Definition protection_descriptor_cc.h:62
int64_t rightsCount
Definition protection_descriptor_cc.h:65
int64_t usersCount
Definition protection_descriptor_cc.h:63
const char ** rights
Definition protection_descriptor_cc.h:64
A group of users and the roles associated with them.
Definition protection_descriptor_cc.h:71
int64_t rolesCount
Definition protection_descriptor_cc.h:75
const char ** users
Definition protection_descriptor_cc.h:72
const char ** roles
Definition protection_descriptor_cc.h:74
int64_t usersCount
Definition protection_descriptor_cc.h:73