Microsoft Information Protection SDK - C 1.17
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
56
60typedef struct {
61 const char** users;
62 int64_t usersCount;
63 const char** rights;
64 int64_t rightsCount;
66
70typedef struct {
71 const char** users;
72 int64_t usersCount;
73 const char** roles;
74 int64_t rolesCount;
76
87MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromTemplate(
88 const char* templateId,
92
109MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromUserRights(
111 const int64_t userRightsCount,
112 const char* name,
113 const char* description,
114 const char* referrer,
115 const time_t* contentValidUntil,
121
138MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionDescriptorFromUserRoles(
140 const int64_t userRolesCount,
141 const char* name,
142 const char* description,
143 const char* referrer,
144 const time_t* contentValidUntil,
145 const bool allowOfflineAccess,
150
160MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetProtectionType(
164
174MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetOwnerSize(
176 int64_t* ownerSize,
178
193MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetOwner(
196 const int64_t ownerBufferSize,
199
209MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetNameSize(
211 int64_t* nameSize,
213
228MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetName(
231 const int64_t nameBufferSize,
234
244MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDescriptionSize(
248
263MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDescription(
269
279MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetTemplateId(
283
293MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetLabelId(
297
310MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetContentId(
314
324MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_DoesContentExpire(
328
338MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetContentValidUntil(
340 int64_t* contentValidUntil,
342
352MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_DoesAllowOfflineAccess(
356
366MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetReferrerSize(
368 int64_t* referrerSize,
370
385MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetReferrer(
388 const int64_t referrerBufferSize,
391
402MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSignedAppData(
406
417MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetEncryptedAppData(
421
431MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDoubleKeyUrlSize(
433 int64_t* urlSize,
435
450MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDoubleKeyUrl(
453 const int64_t urlBufferSize,
456
471MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetUserRights(
474 int64_t* userRightsCount,
476
488MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetUserRoles(
491 int64_t* userRolesCount,
493
506MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetDynamicWatermark(
510
521MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSupplementalInfoSize(
526
542MIP_CC_API(mip_cc_result) MIP_CC_ProtectionDescriptor_GetSupplementalInfo(
544 const char* supplementalInfoKey,
549
555MIP_CC_API(void) MIP_CC_ReleaseProtectionDescriptor(mip_cc_protection_descriptor protectionDescriptor);
556
557#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:117
char * descriptionBuffer
Definition protection_descriptor_cc.h:265
int64_t * nameSize
Definition protection_descriptor_cc.h:211
mip_cc_handle * mip_cc_user_rights_result
Definition protection_descriptor_cc.h:46
mip_cc_dynamic_watermark * dynamicWatermark
Definition protection_descriptor_cc.h:508
char const int64_t int64_t * actualUrlSize
Definition protection_descriptor_cc.h:454
const mip_cc_dictionary mip_cc_protection_descriptor * protectionDescriptor
Definition protection_descriptor_cc.h:90
mip_cc_guid * contentId
Definition protection_descriptor_cc.h:312
const char char * supplementalInfoBuffer
Definition protection_descriptor_cc.h:545
mip_cc_handle * mip_cc_user_roles_result
Definition protection_descriptor_cc.h:47
char * referrerBuffer
Definition protection_descriptor_cc.h:387
char const int64_t int64_t * actualOwnerSize
Definition protection_descriptor_cc.h:197
mip_cc_protection_type
A description of whether protection is defined by a template or ad-hoc.
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
char const int64_t int64_t * actualReferrerSize
Definition protection_descriptor_cc.h:389
const mip_cc_dictionary signedAppData
Definition protection_descriptor_cc.h:89
char const int64_t referrerBufferSize
Definition protection_descriptor_cc.h:388
const int64_t const char const char const char const time_t const bool allowOfflineAccess
Definition protection_descriptor_cc.h:116
mip_cc_user_rights_result * userRights
Definition protection_descriptor_cc.h:473
char const int64_t int64_t * actualNameSize
Definition protection_descriptor_cc.h:232
int64_t * descriptionSize
Definition protection_descriptor_cc.h:246
mip_cc_guid * labelId
Definition protection_descriptor_cc.h:295
bool * doesAllowOfflineAccess
Definition protection_descriptor_cc.h:354
const char char const int64_t supplementalInfoBufferSize
Definition protection_descriptor_cc.h:546
const int64_t const char const char const char * referrer
Definition protection_descriptor_cc.h:114
const char int64_t * supplementalInfoSize
Definition protection_descriptor_cc.h:524
bool * doesContentExpire
Definition protection_descriptor_cc.h:326
char const int64_t urlBufferSize
Definition protection_descriptor_cc.h:453
char * urlBuffer
Definition protection_descriptor_cc.h:452
const char char const int64_t int64_t * actualsupplementalInfoSize
Definition protection_descriptor_cc.h:547
const char * supplementalInfoKey
Definition protection_descriptor_cc.h:523
const int64_t userRightsCount
Definition protection_descriptor_cc.h:111
int64_t * urlSize
Definition protection_descriptor_cc.h:433
int64_t * ownerSize
Definition protection_descriptor_cc.h:176
char * ownerBuffer
Definition protection_descriptor_cc.h:195
char const int64_t nameBufferSize
Definition protection_descriptor_cc.h:231
int64_t * referrerSize
Definition protection_descriptor_cc.h:368
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:267
const int64_t const char const char const char const time_t * contentValidUntil
Definition protection_descriptor_cc.h:115
mip_cc_guid * templateId
Definition protection_descriptor_cc.h:281
char const int64_t descriptionBufferSize
Definition protection_descriptor_cc.h:266
const int64_t const char const char * description
Definition protection_descriptor_cc.h:113
const mip_cc_dictionary mip_cc_protection_descriptor mip_cc_error * errorInfo
Definition protection_descriptor_cc.h:91
char * nameBuffer
Definition protection_descriptor_cc.h:230
mip_cc_user_roles_result * userRoles
Definition protection_descriptor_cc.h:490
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:196
mip_cc_protection_type * protectionType
Definition protection_descriptor_cc.h:162
const int64_t userRolesCount
Definition protection_descriptor_cc.h:140
const int64_t const char * name
Definition protection_descriptor_cc.h:112
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:79
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:60
const char ** users
Definition protection_descriptor_cc.h:61
int64_t rightsCount
Definition protection_descriptor_cc.h:64
int64_t usersCount
Definition protection_descriptor_cc.h:62
const char ** rights
Definition protection_descriptor_cc.h:63
A group of users and the roles associated with them.
Definition protection_descriptor_cc.h:70
int64_t rolesCount
Definition protection_descriptor_cc.h:74
const char ** users
Definition protection_descriptor_cc.h:71
const char ** roles
Definition protection_descriptor_cc.h:73
int64_t usersCount
Definition protection_descriptor_cc.h:72