1# IAllInOneExecutor 2 3 4## 概述 5 6定义全功能执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 7 8**起始版本:** 5.0 9 10**相关模块:**[HdfPinAuth](_hdf_pin_auth_v20.md) 11 12 13## 汇总 14 15 16### Public 成员函数 17 18| 名称 | 描述 | 19| -------- | -------- | 20| [GetExecutorInfo](#getexecutorinfo) ([out] struct [ExecutorInfo](_executor_info_v20.md) executorInfo) | 获取执行器信息。 | 21| [OnRegisterFinish](#onregisterfinish) ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo) | 完成执行器注册,对口令模版信息进行对账,用于删除无效的口令模板及相关信息。 | 22| [Cancel](#cancel) ([in] unsigned long scheduleId) | 取消操作请求。 | 23| [SendMessage](#sendmessage) ([in] unsigned long scheduleId, [in] int srcRole, [in] unsigned char[] msg) | 发送消息。 | 24| [SetData](#setdata) ([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data, [in] int resultCode) | 设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 | 25| [Enroll](#enroll) ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_v20.md) callbackObj) | 注册口令。 | 26| [Authenticate](#authenticate) ([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_v20.md) callbackObj) | 认证口令。 | 27| [Delete](#delete) ([in] unsigned long templateId) | 删除口令。 | 28| [GetProperty](#getproperty) ([in] unsigned long[] templateIdList, [in] int[] propertyTypes, [out] struct [Property](_property_v20.md) property) | 获取属性。 | 29 30 31## 成员函数说明 32 33 34### Authenticate() 35 36``` 37IAllInOneExecutor::Authenticate ([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) 38``` 39 40**描述** 41 42认证口令。 43 44**起始版本:** 5.0 45 46**参数:** 47 48| 名称 | 描述 | 49| -------- | -------- | 50| scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | 51| templateIdList | 指定要认证的模版ID列表。 | 52| extraInfo | 其他相关信息,用于支持信息扩展。 | 53| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_v20.md)。 | 54 55**返回:** 56 570 表示操作成功。 58 59非0 表示操作失败。 60 61 62### Cancel() 63 64``` 65IAllInOneExecutor::Cancel ([in] unsigned long scheduleId) 66``` 67 68**描述** 69 70取消操作请求。 71 72**起始版本:** 5.0 73 74**参数:** 75 76| 名称 | 描述 | 77| -------- | -------- | 78| scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | 79 80**返回:** 81 820 表示操作成功。 83 84非0 表示操作失败。 85 86 87### Delete() 88 89``` 90IAllInOneExecutor::Delete ([in] unsigned long templateId) 91``` 92 93**描述** 94 95删除口令。 96 97**起始版本:** 5.0 98 99**参数:** 100 101| 名称 | 描述 | 102| -------- | -------- | 103| templateId | 模版ID。 | 104 105**返回:** 106 1070 表示操作成功。 108 109非0 表示操作失败。 110 111 112### Enroll() 113 114``` 115IAllInOneExecutor::Enroll ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) 116``` 117 118**描述** 119 120注册口令。 121 122**起始版本:** 5.0 123 124**参数:** 125 126| 名称 | 描述 | 127| -------- | -------- | 128| scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | 129| extraInfo | 其他相关信息,用于支持信息扩展。 | 130| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_v20.md)。 | 131 132**返回:** 133 1340 表示操作成功。 135 136非0 表示操作失败。 137 138 139### GetExecutorInfo() 140 141``` 142IAllInOneExecutor::GetExecutorInfo ([out] struct ExecutorInfo executorInfo) 143``` 144 145**描述** 146 147获取执行器信息。 148 149**起始版本:** 5.0 150 151**参数:** 152 153| 名称 | 描述 | 154| -------- | -------- | 155| executorInfo | 标识执行器信息[ExecutorInfo](_executor_info_v20.md)。 | 156 157**返回:** 158 1590 表示操作成功。 160 161非0 表示操作失败。 162 163 164### GetProperty() 165 166``` 167IAllInOneExecutor::GetProperty ([in] unsigned long[] templateIdList, [in] int[] propertyTypes, [out] struct Property property ) 168``` 169 170**描述** 171 172获取属性。 173 174**起始版本:** 5.0 175 176**参数:** 177 178| 名称 | 描述 | 179| -------- | -------- | 180| templateIdList | 标识需要处理的模板。 | 181| propertyTypes | 标识需要获取的属性类型[GetPropertyType](_hdf_pin_auth_v20.md#getpropertytype)。 | 182| property | 标识获取的属性[Property](_property_v20.md)。 | 183 184**返回:** 185 1860 表示操作成功。 187 188非0 表示操作失败。 189 190 191### OnRegisterFinish() 192 193``` 194IAllInOneExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo ) 195``` 196 197**描述** 198 199完成执行器注册,对口令模版信息进行对账,用于删除无效的口令模板及相关信息。 200 201**起始版本:** 5.0 202 203**参数:** 204 205| 名称 | 描述 | 206| -------- | -------- | 207| templateIdList | 用户认证框架内由该执行器注册的口令凭据模版ID列表。 | 208| frameworkPublicKey | 用户认证框架的公钥,用于校验用户认证框架私钥签名的信息。 | 209| extraInfo | 其他相关信息,用于支持信息扩展。 | 210 211**返回:** 212 2130 表示操作成功。 214 215非0 表示操作失败。 216 217 218### SendMessage() 219 220``` 221IAllInOneExecutor::SendMessage ([in] unsigned long scheduleId, [in] int srcRole, [in] unsigned char[] msg ) 222``` 223 224**描述** 225 226发送消息。 227 228**起始版本:** 5.0 229 230**参数:** 231 232| 名称 | 描述 | 233| -------- | -------- | 234| scheduleId | 标识消息的调度ID。 | 235| srcRole | 源执行器角色[ExecutorRole](_hdf_pin_auth_v20.md#executorrole)。 | 236| msg | 消息。 | 237 238**返回:** 239 2400 表示操作成功。 241 242非0 表示操作失败。 243 244 245### SetData() 246 247``` 248IAllInOneExecutor::SetData ([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data, [in] int resultCode ) 249``` 250 251**描述** 252 253设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 254 255**起始版本:** 5.0 256 257**参数:** 258 259| 名称 | 描述 | 260| -------- | -------- | 261| scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | 262| authSubType | 口令子类型,如六位数字PIN码等[PinAuthTypes](_pin_auth_types_8idl_v20.md)。 | 263| data | 口令数据。 | 264| resultCode | 返回结果状态码。 | 265 266**返回:** 267 2680 表示操作成功。 269 270非0 表示操作失败。 271