加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
asn_application.h 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
eomer 提交于 2019-11-12 10:34 . init repo
/*-
* Copyright (c) 2004, 2006 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
* Application-level ASN.1 callbacks.
*/
#ifndef ASN_APPLICATION_H
#define ASN_APPLICATION_H
#include "asn_system.h" /* for platform-dependent types */
#include "asn_codecs.h" /* for ASN.1 codecs specifics */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Generic type of an application-defined callback to return various
* types of data to the application.
* EXPECTED RETURN VALUES:
* -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored.
*/
typedef int (asn_app_consume_bytes_f)(const void *buffer, size_t size,
void *application_specific_key);
/*
* A callback of this type is called whenever constraint validation fails
* on some ASN.1 type. See "constraints.h" for more details on constraint
* validation.
* This callback specifies a descriptor of the ASN.1 type which failed
* the constraint check, as well as human readable message on what
* particular constraint has failed.
*/
typedef void (asn_app_constraint_failed_f)(void *application_specific_key,
struct asn_TYPE_descriptor_s *type_descriptor_which_failed,
const void *structure_which_failed_ptr,
const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5);
#ifdef __cplusplus
}
#endif
#include "constr_TYPE.h" /* for asn_TYPE_descriptor_t */
#endif /* ASN_APPLICATION_H */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化