函数
mip_cc_auth_callback
用于获取 OAuth2 令牌的回调函数定义
参数
参数 | 说明 |
---|---|
标识 | 将为其获取令牌的电子邮件地址 |
challenge | OAuth2 质询 |
上下文 | 传递给导致此身份验证回调的 MIP API 的不透明应用程序上下文 |
tokenBuffer | [输出] 令牌将复制到的缓冲区。 如果为空,将填充“actualTokenSize”,但是 |
tokenBufferSize | 输出缓冲区的大小(以字节为单位) |
actualTokenSize | [输出] 令牌的实际大小(以字节为单位) |
返回:如果检索到令牌,则返回 true,否则返回 false
MIP_CC_CALLBACK(mip_cc_auth_callback,
bool,
const mip_cc_identity*,
const mip_cc_oauth2_challenge*,
const void*,
uint8_t*,
const int64_t,
int64_t*);
mip_cc_consent_callback
用于让用户同意访问外部服务终结点的回调函数定义
参数
参数 | 描述 |
---|---|
url | SDK 需要用户同意的 URL |
返回:用户同意响应
MIP_CC_CALLBACK(mip_cc_consent_callback,
mip_cc_consent,
const char*);
MIP_CC_CreateDictionary
创建字符串键/值的字典
参数
参数 | 说明 |
---|---|
entries | 键/值对数组 |
count | 键/值对数目 |
dictionary | [输出] 新创建的字典 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 释放 mip_cc_dictionary
mip_cc_result MIP_CC_CreateDictionary(
const mip_cc_kv_pair* entries,
const int64_t count,
mip_cc_dictionary* dictionary,
mip_cc_error* errorInfo);
MIP_CC_Dictionary_GetEntries
获取构成字典的键/值对
参数
参数 | 说明 |
---|---|
dictionary | 源字典 |
entries | [输出] 键/值对数组,内存归 mip_cc_dictionary 对象所有 |
count | [输出] 键/值对的数目 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:“entries”的内存归 mip_cc_dictionary 对象所有,因此不应独立释放
mip_cc_result MIP_CC_Dictionary_GetEntries(
const mip_cc_dictionary dictionary,
mip_cc_kv_pair** entries,
int64_t* count,
mip_cc_error* errorInfo);
MIP_CC_ReleaseDictionary
释放与字典关联的资源
参数
参数 | 说明 |
---|---|
dictionary | 要释放的字典 |
void MIP_CC_ReleaseDictionary(mip_cc_dictionary dictionary);
mip_cc_http_send_callback_fn
用于发出 HTTP 请求的回调函数定义
参数
参数 | 说明 |
---|---|
request | 要由应用程序执行的 HTTP 请求 |
上下文 | 传递给导致了此 HTTP 请求的 MIP API 调用的相同不透明上下文 |
MIP_CC_CALLBACK(mip_cc_http_send_callback_fn,
void,
const mip_cc_http_request*,
const void*);
mip_cc_http_cancel_callback_fn
用于取消 HTTP 请求的回调函数定义
参数
参数 | 说明 |
---|---|
requestId | 要取消的 HTTP 请求的 ID |
MIP_CC_CALLBACK(mip_cc_http_cancel_callback_fn,
void,
const char*);
MIP_CC_CreateHttpDelegate
创建可用于替代 MIP 的默认 HTTP 堆栈的 HTTP 委托
参数
参数 | 说明 |
---|---|
sendCallback | 用于发出 HTTP 请求的函数指针 |
cancelCallback | 用于取消 HTTP 请求的函数指针 |
httpDelegate | [输出] HTTP 委托对象的句柄 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateHttpDelegate(
const mip_cc_http_send_callback_fn sendCallback,
const mip_cc_http_cancel_callback_fn cancelCallback,
mip_cc_http_delegate* httpDelegate,
mip_cc_error* errorInfo);
MIP_CC_NotifyHttpDelegateResponse
通知 HTTP 委托 HTTP 响应已就绪
参数
参数 | 说明 |
---|---|
httpDelegate | HTTP 委托对象的句柄 |
requestId | 与此操作关联的 HTTP 请求的 ID |
result | 操作的成功/失败状态 |
响应 | 如果操作成功,则为 HTTP 响应,否则为 nullptr |
注意:此函数必须在 HTTP 操作完成时由应用程序调用。 HTTP 响应的 ID 必须与 HTTP 请求的 ID 匹配,以允许 MIP 将响应与其请求关联起来
void MIP_CC_NotifyHttpDelegateResponse(
const mip_cc_http_delegate httpDelegate,
const char* requestId,
const mip_cc_http_result result,
const mip_cc_http_response* response);
MIP_CC_ReleaseHttpDelegate
释放与 HTTP 委托句柄关联的资源
参数
参数 | 说明 |
---|---|
httpDelegate | 要释放的 HTTP 委托 |
void MIP_CC_ReleaseHttpDelegate(mip_cc_http_delegate httpDelegate);
mip_cc_logger_init_callback_fn
用于初始化记录器的回调函数定义
参数
参数 | 说明 |
---|---|
storagePath | 可存储日志的文件路径 |
MIP_CC_CALLBACK(mip_cc_logger_init_callback_fn,
void,
const char*);
mip_cc_logger_write_callback_fn
用于编写日志语句的回调函数定义
参数
参数 | 说明 |
---|---|
级别 | 日志语句的日志级别。 |
message | 日志语句的消息。 |
function | 日志语句的函数名称。 |
file | 生成日志语句的文件名称。 |
line | 生成日志语句的行名称。 |
MIP_CC_CALLBACK(mip_cc_logger_write_callback_fn,
void,
const mip_cc_log_level,
const char*,
const char*,
const char*,
const int32_t);
MIP_CC_CreateLoggerDelegate
创建可用于替代 MIP 的默认记录器的记录器委托
参数
参数 | 说明 |
---|---|
initCallback | 用于初始化的函数指针 |
flushCallback | 用于刷新日志的函数指针 |
writeCallback | 用于编写日志语句的函数指针 |
loggerDelegate | [输出] 记录器委托对象的句柄 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateLoggerDelegate(
const mip_cc_logger_init_callback_fn initCallback,
const mip_cc_logger_flush_callback_fn flushCallback,
const mip_cc_logger_write_callback_fn writeCallback,
mip_cc_logger_delegate* loggerDelegate,
mip_cc_error* errorInfo);
MIP_CC_ReleaseLoggerDelegate
释放与记录器委托句柄关联的资源
参数
参数 | 说明 |
---|---|
loggerDelegate | 要释放的记录器委托 |
void MIP_CC_ReleaseLoggerDelegate(mip_cc_logger_delegate loggerDelegate);
MIP_CC_CreateMipContext
创建 MIP 上下文以管理跨所有配置文件实例共享的状态
参数
参数 | 说明 |
---|---|
applicationInfo | 正在使用保护 SDK 的应用程序的相关信息 |
path | 存储日志记录、遥测和其他保护辅助材料的文件路径 |
logLevel | .miplog 的最低日志级别 |
isOfflineOnly | 启用/禁用网络操作(离线时不支持所有操作) |
loggerDelegateOverride | (可选)记录器替代实现 |
telemetryOverride | (可选)已替代的遥测设置。 如果为 NULL,则使用默认设置 |
mipContext | [输出] 新创建的 MIP 上下文实例 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateMipContext(
const mip_cc_application_info* applicationInfo,
const char* path,
const mip_cc_log_level logLevel,
const bool isOfflineOnly,
const mip_cc_logger_delegate loggerDelegateOverride,
const mip_cc_telemetry_configuration telemetryOverride,
mip_cc_mip_context* mipContext,
mip_cc_error* errorInfo);
MIP_CC_CreateMipContextWithCustomFeatureSettings
创建 MIP 上下文以管理跨所有配置文件实例共享的状态
参数
参数 | 说明 |
---|---|
applicationInfo | 正在使用保护 SDK 的应用程序的相关信息 |
path | 存储日志记录、遥测和其他保护辅助材料的文件路径 |
logLevel | .miplog 的最低日志级别 |
isOfflineOnly | 启用/禁用网络操作(离线时不支持所有操作) |
loggerDelegateOverride | (可选)记录器替代实现 |
telemetryOverride | (可选)已替代的遥测设置。 如果为 NULL,则使用默认设置 |
featureSettings | (可选)自定义功能替代的数组 |
featureSettingsSize | 自定义功能替代的大小(以替代数量为单位) |
mipContext | [输出] 新创建的 MIP 上下文实例 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateMipContextWithCustomFeatureSettings(
const mip_cc_application_info* applicationInfo,
const char* path,
const mip_cc_log_level logLevel,
const bool isOfflineOnly,
const mip_cc_logger_delegate loggerDelegateOverride,
const mip_cc_telemetry_configuration telemetryOverride,
const mip_cc_feature_override* featureSettings,
const int64_t featureSettingsSize,
mip_cc_mip_context* mipContext,
mip_cc_error* errorInfo);
MIP_CC_ReleaseMipContext
释放与 MIP 上下文关联的资源
参数
参数 | 说明 |
---|---|
mipContext | 要释放的 MIP 上下文 |
void MIP_CC_ReleaseMipContext(mip_cc_mip_context mipContext);
MIP_CC_ProtectionDescriptor_GetProtectionType
获取保护类型,无论它是否由 RMS 模板定义
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
protectionType | [输出] 保护类型 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetProtectionType(
const mip_cc_protection_descriptor protectionDescriptor,
mip_cc_protection_type* protectionType,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetOwnerSize
获取存储所有者所需的缓冲区大小
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
ownerSize | [输出] 用于保留使用者的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetOwnerSize(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* ownerSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetOwner
获取保护所有者
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
ownerBuffer | [输出] 所有者将复制到的缓冲区。 |
ownerBufferSize | ownerBuffer 的大小(以字符数为单位)。 |
actualOwnerSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 ownerBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualOwnerSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectionDescriptor_GetOwner(
const mip_cc_protection_descriptor protectionDescriptor,
char* ownerBuffer,
const int64_t ownerBufferSize,
int64_t* actualOwnerSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetNameSize
获取存储名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
nameSize | [输出] 用于保留名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetNameSize(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetName
获取保护名称
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
nameBuffer | [输出] 名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectionDescriptor_GetName(
const mip_cc_protection_descriptor protectionDescriptor,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetDescriptionSize
获取存储描述所需的缓冲区大小
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
descriptionSize | [输出] 用于保留描述的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetDescriptionSize(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* descriptionSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetDescription
获取保护描述
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
descriptionBuffer | [输出] 描述将复制到的缓冲区。 |
descriptionBufferSize | descriptionBuffer 的大小(以字符数为单位)。 |
actualDescriptionSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 descriptionBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualDescriptionSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectionDescriptor_GetDescription(
const mip_cc_protection_descriptor protectionDescriptor,
char* descriptionBuffer,
const int64_t descriptionBufferSize,
int64_t* actualDescriptionSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetTemplateId
获取模板 ID
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
templateId | [输出] 与保护关联的模板 ID |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetTemplateId(
const mip_cc_protection_descriptor protectionDescriptor,
mip_cc_guid* templateId,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetLabelId
获取标签 ID
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
labelId | [输出] 与保护关联的标签 ID |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetLabelId(
const mip_cc_protection_descriptor protectionDescriptor,
mip_cc_guid* labelId,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetContentId
获取内容 ID
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
contentId | [输出] 与保护关联的内容 ID |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetContentId(
const mip_cc_protection_descriptor protectionDescriptor,
mip_cc_guid* contentId,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_DoesContentExpire
获取内容是否具有过期时间
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
doesContentExpire | [输出] 内容是否会过期 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_DoesContentExpire(
const mip_cc_protection_descriptor protectionDescriptor,
bool* doesContentExpire,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetContentValidUntil
获取保护过期时间(自纪元以来的秒数)
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
contentValidUntil | [输出] 内容过期时间(自纪元以来的秒数) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetContentValidUntil(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* contentValidUntil,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_DoesAllowOfflineAccess
获取是否允许离线访问
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
doesAllowOfflineAccess | [输出] 获取是否允许离线访问 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_DoesAllowOfflineAccess(
const mip_cc_protection_descriptor protectionDescriptor,
bool* doesAllowOfflineAccess,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetReferrerSize
获取存储引荐者所需的缓冲区大小
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
referrerSize | [输出] 用于保留引荐者的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetReferrerSize(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* referrerSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetReferrer
获取保护引荐者
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
referrerBuffer | [输出] 引荐者将复制到的缓冲区。 |
referrerBufferSize | referrerBuffer 的大小(以字符数为单位)。 |
actualReferrerSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 referrerBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualReferrerSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectionDescriptor_GetReferrer(
const mip_cc_protection_descriptor protectionDescriptor,
char* referrerBuffer,
const int64_t referrerBufferSize,
int64_t* actualReferrerSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetDoubleKeyUrlSize
获取存储双密钥 URL 所需的缓冲区大小
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
url | [输出] 用于保留双密钥 URL 的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectionDescriptor_GetDoubleKeyUrlSize(
const mip_cc_protection_descriptor protectionDescriptor,
int64_t* urlSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectionDescriptor_GetDoubleKeyUrl
获取双密钥 URL
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
urlBuffer | [输出] URL 将复制到的缓冲区。 |
urlBufferSize | urlBuffer 的大小(以字符数为单位)。 |
actualUrlSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 urlBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualUrlSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectionDescriptor_GetDoubleKeyUrl(
const mip_cc_protection_descriptor protectionDescriptor,
char* urlBuffer,
const int64_t urlBufferSize,
int64_t* actualUrlSize,
mip_cc_error* errorInfo);
MIP_CC_ReleaseProtectionDescriptor
释放与保护描述符关联的资源
参数
参数 | 说明 |
---|---|
protectionDescriptor | 要释放的保护描述符 |
void MIP_CC_ReleaseProtectionDescriptor(mip_cc_protection_descriptor protectionDescriptor);
MIP_CC_CreateStringList
创建字符串列表
参数
参数 | 说明 |
---|---|
字符串 | 字符串数组 |
count | 字符串数量 |
stringList | [输出] 新创建的字符串列表 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseStringList 释放 mip_cc_string_list
mip_cc_result MIP_CC_CreateStringList(
const char** strings,
const int64_t count,
mip_cc_string_list* stringList,
mip_cc_error* errorInfo);
MIP_CC_StringList_GetStrings
获取构成字符串列表的字符串
参数
参数 | 说明 |
---|---|
stringList | 源字符串列表 |
字符串 | [输出] 字符串数组,内存归 mip_cc_string_list 对象所有 |
count | [输出] 字符串数量 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:“strings”的内存归 mip_cc_string_list 对象所有,因此不应独立释放
mip_cc_result MIP_CC_StringList_GetStrings(
const mip_cc_string_list stringList,
const char*** strings,
int64_t* count,
mip_cc_error* errorInfo);
MIP_CC_ReleaseStringList
释放与字符串列表关联的资源
参数
参数 | 说明 |
---|---|
stringList | 要释放的字符串列表 |
void MIP_CC_ReleaseStringList(mip_cc_string_list stringList);
mip_cc_dispatch_task_callback_fn
用于调度异步任务的回调函数定义
参数
参数 | 说明 |
---|---|
taskId | 唯一任务标识符 |
MIP_CC_CALLBACK(mip_cc_dispatch_task_callback_fn,
void,
const mip_cc_async_task*);
mip_cc_cancel_task_callback_fn
用于取消后台任务的回调函数
参数
参数 | 说明 |
---|---|
taskId | 唯一任务标识符 |
返回:如果任务成功取消,则返回 true,否则返回 false
MIP_CC_CALLBACK(mip_cc_cancel_task_callback_fn,
bool,
const char*);
MIP_CC_CreateTaskDispatcherDelegate
创建可用于替代 MIP 的默认异步任务处理的任务调度程序委托
参数
参数 | 说明 |
---|---|
dispatchTaskCallback | 用于调度异步任务的函数指针 |
cancelTaskCallback | 用于取消后台任务的函数指针 |
cancelAllTasksCallback | 用于取消所有后台任务的函数指针 |
taskDispatcher | [输出] 任务调度程序委托对象的句柄 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateTaskDispatcherDelegate(
const mip_cc_dispatch_task_callback_fn dispatchTaskCallback,
const mip_cc_cancel_task_callback_fn cancelTaskCallback,
const mip_cc_cancel_all_tasks_callback_fn cancelAllTasksCallback,
mip_cc_task_dispatcher_delegate* taskDispatcher,
mip_cc_error* errorInfo);
MIP_CC_ExecuteDispatchedTask
通知 TaskDispatcher 委托,安排任务以便立即在当前线程上执行
参数
参数 | 说明 |
---|---|
taskDispatcher | 任务调度程序委托对象的句柄 |
taskId | 与此操作关联的异步任务的 ID |
注意:此函数必须在安排任务以执行时由应用程序调用。 这将导致在当前线程上立即执行任务。 该 ID 应与之前已调度且未取消的任务的 ID 匹配。
void MIP_CC_ExecuteDispatchedTask(const mip_cc_task_dispatcher_delegate taskDispatcher, const char* taskId);
MIP_CC_ReleaseTaskDispatcherDelegate
释放与任务调度程序委托句柄关联的资源
参数
参数 | 说明 |
---|---|
taskDispatcher | 要释放的任务调度程序委托 |
void MIP_CC_ReleaseTaskDispatcherDelegate(mip_cc_task_dispatcher_delegate taskDispatcher);
MIP_CC_CreateTelemetryConfiguration
创建用于创建保护配置文件的设置对象
参数
参数 | 说明 |
---|---|
telemetryConfig | [输出] 包含默认设置的新创建的遥测配置实例 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CreateTelemetryConfiguration(
mip_cc_telemetry_configuration* telemetryConfig,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetHostName
设置将替代内部遥测设置的遥测主机名
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
hostName | 主机名 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:当客户端应用程序使用相同的 Aria/1DS 遥测组件并希望使用其内部遥测设置(缓存、日志记录、优先级等)而不是 MIP 的默认设置时,会设置此属性
mip_cc_result MIP_CC_TelemetryConfiguration_SetHostName(
const mip_cc_telemetry_configuration telemetryConfig,
const char* hostName,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetLibraryName
设置遥测共享库替代
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
libraryName | 实现 Aria/1DS SDK 的 C API 的 DLL 的名称 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:当客户端有一个实现应使用的 Aria/1DS SDK 的 C API 的现有遥测 DLL 而不是 mip_ClientTelemetry.dll 时,将设置此属性
mip_cc_result MIP_CC_TelemetryConfiguration_SetLibraryName(
const mip_cc_telemetry_configuration telemetryConfig,
const char* libraryName,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetHttpDelegate
使用客户端自己的遥测 HTTP 堆栈替代默认遥测 HTTP 堆栈
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
httpDelegate | 客户端应用程序实现的 HTTP 回调实例 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果未设置此属性,遥测组件将使用 MIP 的默认 HTTP 堆栈
mip_cc_result MIP_CC_TelemetryConfiguration_SetHttpDelegate(
const mip_cc_telemetry_configuration telemetryConfig,
const mip_cc_http_delegate httpDelegate,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetTaskDispatcherDelegate
使用客户端自己的异步任务调度程序替代默认异步任务调度程序
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
taskDispatcherDelegate | 客户端应用程序实现的任务调度程序回调实例 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TelemetryConfiguration_SetTaskDispatcherDelegate(
const mip_cc_telemetry_configuration telemetryConfig,
const mip_cc_task_dispatcher_delegate taskDispatcherDelegate,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetIsNetworkDetectionEnabled
设置是否允许遥测组件在后台线程上 ping 网络状态
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
isCachingEnabled | 是否允许遥测组件在后台线程上 ping 网络状态 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:默认值为“true”
mip_cc_result MIP_CC_TelemetryConfiguration_SetIsNetworkDetectionEnabled(
const mip_cc_telemetry_configuration telemetryConfig,
const bool isNetworkDetectionEnabled,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetIsLocalCachingEnabled
设置是否允许遥测组件将缓存写入磁盘
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
isCachingEnabled | 是否允许遥测组件将缓存写入磁盘 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:默认值为“true”
mip_cc_result MIP_CC_TelemetryConfiguration_SetIsLocalCachingEnabled(
const mip_cc_telemetry_configuration telemetryConfig,
const bool isCachingEnabled,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetIsTraceLoggingEnabled
设置是否允许遥测组件将日志写入磁盘
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
isTraceLoggingEnabled | 是否允许遥测组件将日志写入磁盘 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:默认值为“true”
mip_cc_result MIP_CC_TelemetryConfiguration_SetIsTraceLoggingEnabled(
const mip_cc_telemetry_configuration telemetryConfig,
const bool isTraceLoggingEnabled,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetIsTelemetryOptedOut
设置应用程序/用户是否选择退出可选遥测
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
isTelemetryOptedOut | 应用程序/用户是否选择退出可选遥测 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:默认值为“false”
mip_cc_result MIP_CC_TelemetryConfiguration_SetIsTelemetryOptedOut(
const mip_cc_telemetry_configuration telemetryConfig,
const bool isTelemetryOptedOut,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_SetCustomSettings
设置自定义遥测设置
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
customSettings | 自定义遥测设置 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TelemetryConfiguration_SetCustomSettings(
const mip_cc_telemetry_configuration telemetryConfig,
const mip_cc_dictionary customSettings,
mip_cc_error* errorInfo);
MIP_CC_TelemetryConfiguration_AddMaskedProperty
将遥测属性设置为掩码
参数
参数 | 说明 |
---|---|
telemetryConfig | 遥测配置 |
eventName | 事件名称 |
propertyName | 属性名称 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TelemetryConfiguration_AddMaskedProperty(
const mip_cc_telemetry_configuration telemetryConfig,
const char* eventName,
const char* propertyName,
mip_cc_error* errorInfo);
MIP_CC_ReleaseTelemetryConfiguration
释放与保护配置文件设置关联的资源
参数
参数 | 说明 |
---|---|
profileSettings | 要释放的保护配置文件设置 |
void MIP_CC_ReleaseTelemetryConfiguration(mip_cc_telemetry_configuration telemetryConfig);
MIP_CC_TemplateDescriptor_GetId
获取模板 ID
参数
参数 | 说明 |
---|---|
protectionDescriptor | 与受保护内容关联的描述符 |
templateId | [输出] 与保护关联的模板 ID |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TemplateDescriptor_GetId(
const mip_cc_template_descriptor protectionDescriptor,
mip_cc_guid* templateId,
mip_cc_error* errorInfo);
MIP_CC_TemplateDescriptor_GetNameSize
获取存储名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
templateDescriptor | 与模板关联的描述符 |
nameSize | [输出] 用于保留名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TemplateDescriptor_GetNameSize(
const mip_cc_template_descriptor templateDescriptor,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_TemplateDescriptor_GetName
获取模板名称
参数
参数 | 说明 |
---|---|
templateDescriptor | 与模板关联的描述符 |
nameBuffer | [输出] 名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 NameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_TemplateDescriptor_GetName(
const mip_cc_template_descriptor templateDescriptor,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_TemplateDescriptor_GetDescriptionSize
获取存储描述所需的缓冲区大小
参数
参数 | 说明 |
---|---|
templateDescriptor | 与模板关联的描述符 |
descriptionSize | [输出] 用于保留描述的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_TemplateDescriptor_GetDescriptionSize(
const mip_cc_template_descriptor templateDescriptor,
int64_t* descriptionSize,
mip_cc_error* errorInfo);
MIP_CC_TemplateDescriptor_GetDescription
获取模板描述
参数
参数 | 说明 |
---|---|
templateDescriptor | 与模板关联的描述符 |
descriptionBuffer | [输出] 描述将复制到的缓冲区。 |
descriptionBufferSize | descriptionBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 descriptionBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualDescriptionSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_TemplateDescriptor_GetDescription(
const mip_cc_template_descriptor templateDescriptor,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_ReleaseTemplateDescriptor
释放与模板描述符关联的资源
参数
参数 | 说明 |
---|---|
templateDescriptor | 要释放的模板描述符 |
void MIP_CC_ReleaseTemplateDescriptor(mip_cc_template_descriptor templateDescriptor);
MIP_CC_ActionResult_GetActions
获取构成操作结果的操作
参数
参数 | 说明 |
---|---|
actionResult | 源操作结果 |
actions | [输出] 操作数组,内存归 mip_cc_action_result 对象所有 |
count | [输出] 键/值对的数目 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:“actions”的内存归 mip_cc_action_result 对象所有,因此不应独立释放
mip_cc_result MIP_CC_ActionResult_GetActions(
const mip_cc_action_result actionResult,
mip_cc_action** actions,
int64_t* count,
mip_cc_error* errorInfo);
MIP_CC_ReleaseActionResult
释放与操作结果关联的资源
参数
参数 | 说明 |
---|---|
actionResult | 要释放的操作结果 |
void MIP_CC_ReleaseActionResult(mip_cc_action_result actionResult);
MIP_CC_AddContentFooterAction_GetUIElementNameSize
获取存储“添加内容页脚”操作的 UI 元素名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
nameSize | [输出] 用于保留 UI 元素名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetUIElementNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetUIElementName
获取“添加内容页脚”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
nameBuffer | [输出] UI 元素名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentFooterAction_GetUIElementName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetTextSize
获取存储“添加内容页脚”操作的文本所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
nameSize | [输出] 用于保留文本的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetTextSize(
const mip_cc_action action,
int64_t* textSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetText
获取“添加内容页脚”操作的文本
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
textBuffer | [输出] 文本将复制到的缓冲区。 |
textBufferSize | textBuffer 的大小(以字符数为单位)。 |
actualTextSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 textBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualTextSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentFooterAction_GetText(
const mip_cc_action action,
char* textBuffer,
const int64_t textBufferSize,
int64_t* actualTextSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetFontNameSize
获取存储“添加内容页脚”操作的字体名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
nameSize | [输出] 用于保留字体名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetFontNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetFontName
获取“添加内容页脚”操作的字体名称
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
nameBuffer | [输出] 字体名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentFooterAction_GetFontName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetFontSize
获取整数字号
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
fontSize | [输出] 字号 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetFontSize(
const mip_cc_action action,
int32_t* fontSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetFontColorSize
获取存储“添加内容页脚”操作的字体颜色所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
colorSize | [输出] 用于保留字体颜色的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetFontColorSize(
const mip_cc_action action,
int64_t* colorSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetFontColor
获取“添加内容页脚”操作的字体颜色(例如,“#000000”)
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
colorBuffer | [输出] 字体颜色将复制到的缓冲区。 |
colorBufferSize | colorBuffer 的大小(以字符数为单位)。 |
actualColorSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 colorBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualColorSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentFooterAction_GetFontColor(
const mip_cc_action action,
char* colorBuffer,
const int64_t colorBufferSize,
int64_t* actualColorSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetAlignment
获取对齐方式
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
对齐 (alignment) | [输出] 对齐 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetAlignment(
const mip_cc_action action,
mip_cc_content_mark_alignment* alignment,
mip_cc_error* errorInfo);
MIP_CC_AddContentFooterAction_GetMargin
获取边距大小
参数
参数 | 说明 |
---|---|
action | “添加内容页脚”操作 |
marginSize | [输出] 边距大小(以毫米为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentFooterAction_GetMargin(
const mip_cc_action action,
int32_t* marginSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetUIElementNameSize
获取存储“添加内容标题”操作的 UI 元素名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
nameSize | [输出] 用于保留 UI 元素名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetUIElementNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetUIElementName
获取“添加内容标题”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
nameBuffer | [输出] UI 元素名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentHeaderAction_GetUIElementName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetTextSize
获取存储“添加内容标题”操作的文本所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
nameSize | [输出] 用于保留文本的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetTextSize(
const mip_cc_action action,
int64_t* textSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetText
获取“添加内容标题”操作的文本
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
textBuffer | [输出] 文本将复制到的缓冲区。 |
textBufferSize | textBuffer 的大小(以字符数为单位)。 |
actualTextSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 textBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualTextSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentHeaderAction_GetText(
const mip_cc_action action,
char* textBuffer,
const int64_t textBufferSize,
int64_t* actualTextSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetFontNameSize
获取存储“添加内容标题”操作的字体名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
nameSize | [输出] 用于保留字体名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetFontNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetFontName
获取“添加内容标题”操作的字体名称
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
nameBuffer | [输出] 字体名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentHeaderAction_GetFontName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetFontSize
获取整数字号
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
fontSize | [输出] 字号 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetFontSize(
const mip_cc_action action,
int32_t* fontSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetFontColorSize
获取存储“添加内容标题”操作的字体颜色所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
colorSize | [输出] 用于保留字体颜色的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetFontColorSize(
const mip_cc_action action,
int64_t* colorSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetFontColor
获取“添加内容标题”操作的字体颜色(例如,“#000000”)
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
colorBuffer | [输出] 字体颜色将复制到的缓冲区。 |
colorBufferSize | colorBuffer 的大小(以字符数为单位)。 |
actualColorSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 colorBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualColorSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddContentHeaderAction_GetFontColor(
const mip_cc_action action,
char* colorBuffer,
const int64_t colorBufferSize,
int64_t* actualColorSize,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetAlignment
获取对齐方式
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
对齐 (alignment) | [输出] 对齐 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetAlignment(
const mip_cc_action action,
mip_cc_content_mark_alignment* alignment,
mip_cc_error* errorInfo);
MIP_CC_AddContentHeaderAction_GetMargin
获取边距大小
参数
参数 | 说明 |
---|---|
action | “添加内容标题”操作 |
marginSize | [输出] 边距大小(以毫米为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddContentHeaderAction_GetMargin(
const mip_cc_action action,
int32_t* marginSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetUIElementNameSize
获取存储“添加水印”操作的 UI 元素名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
nameSize | [输出] 用于保留 UI 元素名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetUIElementNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetUIElementName
获取“添加水印”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
nameBuffer | [输出] UI 元素名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddWatermarkAction_GetUIElementName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetLayout
获取水印布局
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
布局 | [输出] 水印布局 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetLayout(
const mip_cc_action action,
mip_cc_watermark_layout* layout,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetTextSize
获取存储“添加水印”操作的文本所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
textSize | [输出] 用于保留文本的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetTextSize(
const mip_cc_action action,
int64_t* textSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetText
获取“添加水印”操作的文本
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
textBuffer | [输出] 文本将复制到的缓冲区。 |
textBufferSize | textBuffer 的大小(以字符数为单位)。 |
actualTextSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 textBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualTextSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddWatermarkAction_GetText(
const mip_cc_action action,
char* textBuffer,
const int64_t textBufferSize,
int64_t* actualTextSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetFontNameSize
获取存储“添加水印”操作的字体名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
nameSize | [输出] 用于保留字体名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetFontNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetFontName
获取“添加水印”操作的字体名称
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
nameBuffer | [输出] 字体名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddWatermarkAction_GetFontName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetFontSize
获取整数字号
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
fontSize | [输出] 字号 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetFontSize(
const mip_cc_action action,
int32_t* fontSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetFontColorSize
获取存储“添加水印”操作的字体颜色所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
colorSize | [输出] 用于保留字体颜色的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_AddWatermarkAction_GetFontColorSize(
const mip_cc_action action,
int64_t* colorSize,
mip_cc_error* errorInfo);
MIP_CC_AddWatermarkAction_GetFontColor
获取“添加水印”操作的字体颜色(例如,“#000000”)
参数
参数 | 说明 |
---|---|
action | “添加水印”操作 |
colorBuffer | [输出] 字体颜色将复制到的缓冲区。 |
colorBufferSize | colorBuffer 的大小(以字符数为单位)。 |
actualColorSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 colorBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualColorSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_AddWatermarkAction_GetFontColor(
const mip_cc_action action,
char* colorBuffer,
const int64_t colorBufferSize,
int64_t* actualColorSize,
mip_cc_error* errorInfo);
MIP_CC_ReleaseContentLabel
释放与内容标签关联的资源
参数
参数 | 说明 |
---|---|
contentLabel | 要释放的标签 |
void MIP_CC_ReleaseContentLabel(mip_cc_content_label contentLabel);
MIP_CC_ContentLabel_GetCreationTime
获取应用标签的时间
参数
参数 | 说明 |
---|---|
contentLabel | Label |
creationTime | [输出] 将标签应用于文档的时间(自纪元以来的秒数) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ContentLabel_GetCreationTime(
const mip_cc_content_label contentLabel,
int64_t* creationTime,
mip_cc_error* errorInfo);
MIP_CC_ContentLabel_GetAssignmentMethod
获取标签分配方法
参数
参数 | 说明 |
---|---|
contentLabel | Label |
assignmentMethod | [输出] 分配方法(例如“standard”或“privileged”) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ContentLabel_GetAssignmentMethod(
const mip_cc_content_label contentLabel,
mip_cc_label_assignment_method* assignmentMethod,
mip_cc_error* errorInfo);
MIP_CC_ContentLabel_GetExtendedProperties
获取扩展属性
参数
参数 | 说明 |
---|---|
contentLabel | Label |
properties | [输出] 扩展属性字典,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 释放“properties”变量
mip_cc_result MIP_CC_ContentLabel_GetExtendedProperties(
const mip_cc_content_label contentLabel,
mip_cc_metadata_dictionary* properties,
mip_cc_error* errorInfo);
MIP_CC_ContentLabel_IsProtectionAppliedFromLabel
获取标签是否应用了保护。
参数
参数 | 说明 |
---|---|
contentLabel | Label |
isProtectionAppliedByLabel | [输出] 如果文件受到保护,且此标签显示应用了保护。 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ContentLabel_IsProtectionAppliedFromLabel(
const mip_cc_content_label contentLabel,
bool* isProtectionAppliedByLabel,
mip_cc_error* errorInfo);
MIP_CC_ContentLabel_GetLabel
从内容标签实例获取通用标签属性
参数
参数 | 说明 |
---|---|
contentLabel | 标签 |
标签 | [输出] 通用标签,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseLabel 释放“label”变量
mip_cc_result MIP_CC_ContentLabel_GetLabel(
const mip_cc_content_label contentLabel,
mip_cc_label* label,
mip_cc_error* errorInfo);
MIP_CC_CustomAction_GetNameSize
获取存储“自定义”操作的名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
action | “自定义”操作 |
nameSize | [输出] 用于保留名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_CustomAction_GetNameSize(
const mip_cc_action action,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_CustomAction_GetName
获取“自定义”操作的名称
参数
参数 | 说明 |
---|---|
action | “自定义”操作 |
nameBuffer | [输出] 名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_CustomAction_GetName(
const mip_cc_action action,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_CustomAction_GetProperties
获取“自定义”操作的属性
参数
参数 | 说明 |
---|---|
action | “自定义”操作 |
properties | [输出] 属性字典,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 释放“properties”变量
mip_cc_result MIP_CC_CustomAction_GetProperties(
const mip_cc_action action,
mip_cc_dictionary* properties,
mip_cc_error* errorInfo);
MIP_CC_ReleaseLabel
释放与标签关联的资源
参数
参数 | 说明 |
---|---|
label | 要释放的标签 |
void MIP_CC_ReleaseLabel(mip_cc_label label);
MIP_CC_Label_GetId
获取标签 ID
参数
参数 | 说明 |
---|---|
label | Label |
labelId | [输出] 标签 ID |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetId(
const mip_cc_label label,
mip_cc_guid* labelId,
mip_cc_error* errorInfo);
MIP_CC_Label_GetNameSize
获取存储名称所需的缓冲区大小
参数
参数 | 说明 |
---|---|
label | Label |
nameSize | [输出] 用于保留名称的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetNameSize(
const mip_cc_label label,
int64_t* nameSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetName
获取标签名称
参数
参数 | 说明 |
---|---|
label | Label |
nameBuffer | [输出] 名称将复制到的缓冲区。 |
nameBufferSize | nameBuffer 的大小(以字符数为单位)。 |
actualNameSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 nameBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualNameSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_Label_GetName(
const mip_cc_label label,
char* nameBuffer,
const int64_t nameBufferSize,
int64_t* actualNameSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetDescriptionSize
获取存储描述所需的缓冲区大小
参数
参数 | 说明 |
---|---|
label | Label |
descriptionSize | [输出] 用于保留描述的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetDescriptionSize(
const mip_cc_label label,
int64_t* descriptionSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetDescription
获取标签描述
参数
参数 | 说明 |
---|---|
label | Label |
descriptionBuffer | [输出] 描述将复制到的缓冲区。 |
descriptionBufferSize | descriptionBuffer 的大小(以字符数为单位)。 |
actualDescriptionSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 descriptionBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualDescriptionSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_Label_GetDescription(
const mip_cc_label label,
char* descriptionBuffer,
const int64_t descriptionBufferSize,
int64_t* actualDescriptionSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetColorSize
获取存储颜色所需的缓冲区大小
参数
参数 | 说明 |
---|---|
label | Label |
colorSize | [输出] 用于保留颜色的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetColorSize(
const mip_cc_label label,
int64_t* colorSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetColor
获取标签颜色
参数
参数 | 说明 |
---|---|
label | Label |
colorBuffer | [输出] 颜色将复制到的缓冲区(采用 #RRGGBB 格式)。 |
colorBufferSize | colorBuffer 的大小(以字符数为单位)。 |
actualColorSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 colorBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualColorSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_Label_GetColor(
const mip_cc_label label,
char* colorBuffer,
const int64_t colorBufferSize,
int64_t* actualColorSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetSensitivity
获取标签的敏感级别。 值越高意味着越敏感。
参数
参数 | 说明 |
---|---|
label | Label |
sensitivity | [输出] 敏感级别 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetSensitivity(
const mip_cc_label label,
int32_t* sensitivity,
mip_cc_error* errorInfo);
MIP_CC_Label_GetTooltipSize
获取存储工具提示所需的缓冲区大小
参数
参数 | 说明 |
---|---|
label | Label |
tooltipSize | [输出] 用于保留工具提示的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetTooltipSize(
const mip_cc_label label,
int64_t* tooltipSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetTooltip
获取标签工具提示
参数
参数 | 说明 |
---|---|
label | Label |
tooltipBuffer | [输出] 工具提示将复制到的缓冲区。 |
tooltipBufferSize | tooltipBuffer 的大小(以字符数为单位)。 |
actualTooltipSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 tooltipBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualTooltipSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_Label_GetTooltip(
const mip_cc_label label,
char* tooltipBuffer,
const int64_t tooltipBufferSize,
int64_t* actualTooltipSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetAutoTooltipSize
获取存储自动分类工具提示所需的缓冲区大小
参数
参数 | 说明 |
---|---|
label | Label |
tooltipSize | [输出] 用于保留工具提示的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetAutoTooltipSize(
const mip_cc_label label,
int64_t* tooltipSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetAutoTooltip
获取标签自动分类工具提示
参数
参数 | 说明 |
---|---|
label | Label |
tooltipBuffer | [输出] 工具提示将复制到的缓冲区。 |
tooltipBufferSize | tooltipBuffer 的大小(以字符数为单位)。 |
actualTooltipSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 tooltipBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualTooltipSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_Label_GetAutoTooltip(
const mip_cc_label label,
char* tooltipBuffer,
const int64_t tooltipBufferSize,
int64_t* actualTooltipSize,
mip_cc_error* errorInfo);
MIP_CC_Label_IsActive
获取标签是否处于活动状态
参数
参数 | 说明 |
---|---|
label | Label |
isActive | [输出] 标签是否视为处于活动状态。 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:仅应用处于活动状态的标签。 不活动的标签无法应用,仅用于显示目的。
mip_cc_result MIP_CC_Label_IsActive(
const mip_cc_label label,
bool* isActive,
mip_cc_error* errorInfo);
MIP_CC_Label_GetParent
获取父标签(如果有)
参数
参数 | 说明 |
---|---|
label | Label |
父级 (parent) | [输出] 如果有,则为父标签,否则为 null |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetParent(
const mip_cc_label label,
mip_cc_label* parent,
mip_cc_error* errorInfo);
MIP_CC_Label_GetChildrenSize
获取子标签的数量
参数
参数 | 说明 |
---|---|
label | Label |
childrenSize | [输出] 子项数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_Label_GetChildrenSize(
const mip_cc_label label,
int64_t* childrenSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetChildren
获取子标签
参数
参数 | 说明 |
---|---|
label | Label |
childrenBuffer | [输出] 子标签将复制到的缓冲区。 子标签 |
childrenBufferSize | childrenBuffer 的大小(以标签数为单位)。 |
actualChildrenSize | [输出] 写入缓冲区的子标签数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 childrenBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualChildrenSize 将设置为所需的最小缓冲区大小
mip_cc_result MIP_CC_Label_GetChildren(
const mip_cc_label label,
mip_cc_label* childrenBuffer,
const int64_t childrenBufferSize,
int64_t* actualChildrenSize,
mip_cc_error* errorInfo);
MIP_CC_Label_GetCustomSettings
获取标签的策略定义的自定义设置
参数
参数 | 说明 |
---|---|
label | Label |
设置 | [输出] 设置字典,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 释放“settings”变量
mip_cc_result MIP_CC_Label_GetCustomSettings(
const mip_cc_label label,
mip_cc_dictionary* settings,
mip_cc_error* errorInfo);
MIP_CC_MetadataAction_GetMetadataToRemove
获取要移除的“元数据”操作的元数据
参数
参数 | 说明 |
---|---|
action | “元数据”操作 |
metadataNames | [输出] 要移除的元数据的键名,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseStringList 由调用方释放“metadataNames”变量 @note 在添加元数据之前应移除元数据
mip_cc_result MIP_CC_MetadataAction_GetMetadataToRemove(
const mip_cc_action action,
mip_cc_string_list* metadataNames,
mip_cc_error* errorInfo);
MIP_CC_MetadataAction_GetMetadataToAdd
获取要添加的“元数据”操作的元数据
参数
参数 | 说明 |
---|---|
action | “元数据”操作 |
metadata | [输出] 要添加的元数据条目的列表,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 由调用方释放“metadata”变量 @note 在添加元数据之前应移除元数据
mip_cc_result MIP_CC_MetadataAction_GetMetadataToAdd(
const mip_cc_action action,
mip_cc_metadata_dictionary* metadata,
mip_cc_error* errorInfo);
MIP_CC_CreateMetadataDictionary
创建字符串键/值的字典
参数
参数 | 说明 |
---|---|
entries | 元数据条目数组 |
count | 元数据条目数 |
dictionary | [输出] 新创建的字典 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseDictionary 释放 mip_cc_dictionary
mip_cc_result MIP_CC_CreateMetadataDictionary(
const mip_cc_metadata_entry* entries,
const int64_t count,
mip_cc_metadata_dictionary* dictionary,
mip_cc_error* errorInfo);
MIP_CC_MetadataDictionary_GetEntries
获取构成字典的元数据条目
参数
参数 | 说明 |
---|---|
dictionary | 源字典 |
entries | [输出] 元数据条目数组,内存归 mip_cc_dictionary 对象所有 |
count | [输出] 元数据条目数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:“entries”的内存归 mip_cc_dictionary 对象所有,因此不应独立释放
mip_cc_result MIP_CC_MetadataDictionary_GetEntries(
const mip_cc_metadata_dictionary dictionary,
mip_cc_metadata_entry** entries,
int64_t* count,
mip_cc_error* errorInfo);
MIP_CC_ReleaseMetadataDictionary
释放与字典关联的资源
参数
参数 | 说明 |
---|---|
dictionary | 要释放的字典 |
void MIP_CC_ReleaseMetadataDictionary(mip_cc_metadata_dictionary dictionary);
MIP_CC_ReleasePolicyHandler
释放与策略处理程序关联的资源
参数
参数 | 说明 |
---|---|
处理程序 (handler) | 要释放的策略处理程序 |
void MIP_CC_ReleasePolicyHandler(mip_cc_policy_handler handler);
MIP_CC_PolicyHandler_GetSensitivityLabel
获取文档的当前标签
参数
参数 | 说明 |
---|---|
处理程序 (handler) | 策略处理程序 |
documentState | 文档状态 |
上下文 | 以不透明方式转发到任何回调的应用程序上下文 |
contentLabel | 当前应用到文档的标签 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_PolicyHandler_GetSensitivityLabel(
const mip_cc_policy_handler handler,
const mip_cc_document_state* documentState,
const void* context,
mip_cc_content_label* contentLabel,
mip_cc_error* errorInfo);
MIP_CC_PolicyHandler_ComputeActions
根据提供的状态执行策略规则并确定相应的操作
参数
参数 | 说明 |
---|---|
处理程序 (handler) | 策略处理程序 |
documentState | 文档状态 |
applicationState | 应用程序操作状态 |
上下文 | 以不透明方式转发到任何回调的应用程序上下文 |
actionResult | [输出] 应由应用程序采取的操作,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseActionResult 释放“actionResult”变量
mip_cc_result MIP_CC_PolicyHandler_ComputeActions(
const mip_cc_policy_handler handler,
const mip_cc_document_state* documentState,
const mip_cc_application_action_state* applicationState,
const void* context,
mip_cc_action_result* actionResult,
mip_cc_error* errorInfo);
MIP_CC_PolicyHandler_NotifyCommittedActions
在应用计算操作并将数据提交到磁盘后由应用程序调用
参数
参数 | 说明 |
---|---|
处理程序 (handler) | 策略处理程序 |
documentState | 文档状态 |
applicationState | 应用程序操作状态 |
上下文 | 以不透明方式转发到任何回调的应用程序上下文 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:需要调用此函数才能传输完整的标签审核数据。
mip_cc_result MIP_CC_PolicyHandler_NotifyCommittedActions(
const mip_cc_policy_handler handler,
const mip_cc_document_state* documentState,
const mip_cc_application_action_state* applicationState,
const void* context,
mip_cc_error* errorInfo);
MIP_CC_ProtectAdhocDkAction_GetDoubleKeyEncryptionUrlSize
获取存储双密钥加密 URL 所需的缓冲区大小。
参数
参数 | 说明 |
---|---|
action | “通过具有双密钥的临时策略进行保护”操作 |
urlSize | [输出] 用于保留 URL 的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectAdhocDkAction_GetDoubleKeyEncryptionUrlSize(
const mip_cc_action action,
int64_t* urlSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectAdhocDkAction_GetDoubleKeyEncryptionUrl
获取双密钥加密 URL
参数
参数 | 说明 |
---|---|
action | “通过具有双密钥的临时策略进行保护”操作 |
urlBuffer | [输出] URL 将复制到的缓冲区。 |
urlBufferSize | urlBuffer 的大小(以字符数为单位)。 |
actualUrlSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 urlBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualUrlSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectAdhocDkAction_GetDoubleKeyEncryptionUrl(
const mip_cc_action action,
char* urlBuffer,
const int64_t urlBufferSize,
int64_t* actualUrlSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectDoNotForwardDkAction_GetDoubleKeyEncryptionUrlSize
获取存储双密钥加密 URL 所需的缓冲区大小。
参数
参数 | 说明 |
---|---|
action | “通过具有双密钥的不转发策略进行保护”操作 |
urlSize | [输出] 用于保留 URL 的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_ProtectDoNotForwardDkAction_GetDoubleKeyEncryptionUrlSize(
const mip_cc_action action,
int64_t* urlSize,
mip_cc_error* errorInfo);
MIP_CC_ProtectDoNotForwardDkAction_GetDoubleKeyEncryptionUrl
获取双密钥加密 URL
参数
参数 | 说明 |
---|---|
action | “通过具有双密钥的不转发策略进行保护”操作 |
urlBuffer | [输出] URL 将复制到的缓冲区。 |
urlBufferSize | urlBuffer 的大小(以字符数为单位)。 |
actualUrlSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 urlBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualUrlSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_ProtectDoNotForwardDkAction_GetDoubleKeyEncryptionUrl(
const mip_cc_action action,
char* urlBuffer,
const int64_t urlBufferSize,
int64_t* actualUrlSize,
mip_cc_error* errorInfo);
MIP_CC_RemoveContentFooterAction_GetUIElementNames
获取要移除的“移除内容页脚”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “移除内容页脚”操作 |
姓名 | [输出] 要移除的 UI 元素,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseStringList 释放“names”变量
mip_cc_result MIP_CC_RemoveContentFooterAction_GetUIElementNames(
const mip_cc_action action,
mip_cc_string_list* names,
mip_cc_error* errorInfo);
MIP_CC_RemoveContentHeaderAction_GetUIElementNames
获取要移除的“移除内容标题”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “移除内容标题”操作 |
姓名 | [输出] 要移除的 UI 元素,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseStringList 释放“names”变量
mip_cc_result MIP_CC_RemoveContentHeaderAction_GetUIElementNames(
const mip_cc_action action,
mip_cc_string_list* names,
mip_cc_error* errorInfo);
MIP_CC_RemoveWatermarkAction_GetUIElementNames
获取要移除的“移除水印”操作的 UI 元素名称
参数
参数 | 说明 |
---|---|
action | “移除水印页脚”操作 |
姓名 | [输出] 要移除的 UI 元素,内存归调用方所有 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:必须通过调用 MIP_CC_ReleaseStringList 释放“names”变量
mip_cc_result MIP_CC_RemoveWatermarkAction_GetUIElementNames(
const mip_cc_action action,
mip_cc_string_list* names,
mip_cc_error* errorInfo);
MIP_CC_ReleaseSensitivityType
释放与敏感类型关联的资源
参数
参数 | 说明 |
---|---|
sensitivityType | 要释放的敏感类型 |
void MIP_CC_ReleaseSensitivityType(mip_cc_sensitivity_type sensitivityType);
MIP_CC_SensitivityType_GetRulePackageIdSize
获取存储敏感类型的规则包 ID 所需的缓冲区大小
参数
参数 | 说明 |
---|---|
sensitivityType | 敏感类型 |
idSize | [输出] 用于保留规则包 ID 的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_SensitivityType_GetRulePackageIdSize(
const mip_cc_sensitivity_type sensitivityType,
int64_t* idSize,
mip_cc_error* errorInfo);
MIP_CC_SensitivityType_GetRulePackageId
获取敏感类型的规则包 ID
参数
参数 | 说明 |
---|---|
sensitivityType | 敏感类型 |
idBuffer | [输出] ID 将复制到的缓冲区。 |
idBufferSize | idBuffer 的大小(以字符数为单位)。 |
actualIdSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 idBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualIdSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_SensitivityType_GetRulePackageId(
const mip_cc_sensitivity_type sensitivityType,
char* idBuffer,
const int64_t idBufferSize,
int64_t* actualIdSize,
mip_cc_error* errorInfo);
MIP_CC_SensitivityType_GetRulePackageSize
获取存储敏感类型的规则包所需的缓冲区大小
参数
参数 | 说明 |
---|---|
sensitivityType | 敏感类型 |
rulePackageSize | [输出] 用于保留规则包的缓冲区大小(以字符数为单位) |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
mip_cc_result MIP_CC_SensitivityType_GetRulePackageSize(
const mip_cc_sensitivity_type sensitivityType,
int64_t* rulePackageSize,
mip_cc_error* errorInfo);
MIP_CC_SensitivityType_GetRulePackage
获取敏感类型的规则包
参数
参数 | 说明 |
---|---|
sensitivityType | 敏感类型 |
rulePackageBuffer | [输出] 规则包将复制到的缓冲区。 |
rulePackageBufferSize | rulePackageBuffer 的大小(以字符数为单位)。 |
actualRulePackageSize | [输出] 写入缓冲区的字符数 |
errorInfo | [输出](可选)如果操作结果为错误,则输出为失败信息 |
返回:表示成功或失败的结果代码
注意:如果 rulePackageBuffer 为 null 或不足,将返回 MIP_RESULT_ERROR_INSUFFICIENT_BUFFER,并且 actualRulePackageSize 将设置为所需的最小缓冲区大小。
mip_cc_result MIP_CC_SensitivityType_GetRulePackage(
const mip_cc_sensitivity_type sensitivityType,
char* rulePackageBuffer,
const int64_t rulePackageBufferSize,
int64_t* actualRulePackageSize,
mip_cc_error* errorInfo);
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈