Blame src/asn1c/per_decoder.h

Packit 728676
/*-
Packit 728676
 * Copyright (c) 2005, 2007 Lev Walkin <vlm@lionet.info>. All rights reserved.
Packit 728676
 * Redistribution and modifications are permitted subject to BSD license.
Packit 728676
 */
Packit 728676
#ifndef	_PER_DECODER_H_
Packit 728676
#define	_PER_DECODER_H_
Packit 728676
Packit 728676
#include <asn_application.h>
Packit 728676
#include <per_support.h>
Packit 728676
Packit 728676
#ifdef __cplusplus
Packit 728676
extern "C" {
Packit 728676
#endif
Packit 728676
Packit 728676
struct asn_TYPE_descriptor_s;	/* Forward declaration */
Packit 728676
Packit 728676
/*
Packit 728676
 * Unaligned PER decoder of a "complete encoding" as per X.691#10.1.
Packit 728676
 * On success, this call always returns (.consumed >= 1), as per X.691#10.1.3.
Packit 728676
 */
Packit 728676
asn_dec_rval_t uper_decode_complete(struct asn_codec_ctx_s *opt_codec_ctx,
Packit 728676
	struct asn_TYPE_descriptor_s *type_descriptor,	/* Type to decode */
Packit 728676
	void **struct_ptr,	/* Pointer to a target structure's pointer */
Packit 728676
	const void *buffer,	/* Data to be decoded */
Packit 728676
	size_t size		/* Size of data buffer */
Packit 728676
	);
Packit 728676
Packit 728676
/*
Packit 728676
 * Unaligned PER decoder of any ASN.1 type. May be invoked by the application.
Packit 728676
 * WARNING: This call returns the number of BITS read from the stream. Beware.
Packit 728676
 */
Packit 728676
asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx,
Packit 728676
	struct asn_TYPE_descriptor_s *type_descriptor,	/* Type to decode */
Packit 728676
	void **struct_ptr,	/* Pointer to a target structure's pointer */
Packit 728676
	const void *buffer,	/* Data to be decoded */
Packit 728676
	size_t size,		/* Size of data buffer */
Packit 728676
	int skip_bits,		/* Number of unused leading bits, 0..7 */
Packit 728676
	int unused_bits		/* Number of unused tailing bits, 0..7 */
Packit 728676
	);
Packit 728676
Packit 728676
Packit 728676
/*
Packit 728676
 * Type of the type-specific PER decoder function.
Packit 728676
 */
Packit 728676
typedef asn_dec_rval_t (per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx,
Packit 728676
		struct asn_TYPE_descriptor_s *type_descriptor,
Packit 728676
		asn_per_constraints_t *constraints,
Packit 728676
		void **struct_ptr,
Packit 728676
		asn_per_data_t *per_data
Packit 728676
	);
Packit 728676
Packit 728676
#ifdef __cplusplus
Packit 728676
}
Packit 728676
#endif
Packit 728676
Packit 728676
#endif	/* _PER_DECODER_H_ */