DG_InitConfigOpts
初始化DataGuard配置类函数组。
int DG_InitConfigOpts (
DG_BusinessType type,
DG_ConfigOpts **opts
)
参数
参数名 |
描述 |
取值范围 |
输入/输出 |
|---|---|---|---|
type |
DataGuard组件类型DG_BusinessType |
密态计算枚举为MPC |
输入 |
opts |
DataGuard配置函数集信息请参见表2。 |
一级指针为空,二级指针不能为空 |
输出 |
名称 |
类型 |
说明 |
|---|---|---|
init |
函数指针 |
int (*init)(DG_Cfg *config); 初始化config对象 |
release |
函数指针 |
int (*release)(DG_Cfg *config); 释放config对象 |
setIntValue |
函数指针 |
int (*setIntValue)(DG_Cfg config, const char* key, int value); 以key和value的形式设置int参数值 |
setVoidValue |
函数指针 |
int (*setVoidValue)(DG_Cfg config, const char* key, const DG_Void* value); 以key和value的形式设置Void参数值 |
返回值
- 成功:返回0。
- 失败:返回错误码。
错误码
错误码 |
错误码值 |
描述 |
特殊说明 |
|---|---|---|---|
DG_ERR_CONFIG_PARAM |
62 |
入参校验失败 |
- |
DG_ERR_CONFIG_DG_BUSINESS_TYPE |
61 |
type类型错误 |
密态计算枚举为MPC |
依赖
#include "data_guard_config.h":该接口声明所在的头文件。
示例
#include "data_guard_config.h"
DG_ConfigOpts *opts = NULL;
int rv = DG_InitConfigOpts(DG_BusinessType::MPC, &opts);
if (rv != 0) {
return rv;
}
父主题: DataGuard操作集设置类接口