~ubuntu-branches/ubuntu/raring/freerdp/raring-proposed

« back to all changes in this revision

Viewing changes to asn1/ber_decoder.h

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Jeremy Bicha, Jean-Louis Dupond, Martin Pitt
  • Date: 2012-01-31 10:02:14 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120131100214-jaok3uwvni7sqxth
Tags: 1.0.0-0git1
Upload current Debian packaging git to get this rolling for precise.

[ Jeremy Bicha ]
* New upstream release. Closes: #647498.
* Updated symbols and bumped soname
* debian/control:
  - Added new build dependencies
  - Bump Standards-Version to 3.9.2
* debian/source/format: Set to 3.0 (quilt)
* debian/rules: Turn on strict symbols checking
* debian/watch: Watch github

[ Jean-Louis Dupond ]
* debian/control: Updated homepage
* debian/copyright: Reflect upstream switch to the Apache license

[ Martin Pitt ]
* debian/libfreerdp0.symbols: Fix version number, should
  be 1.0~beta5, not 1.0-beta5.
* debian/control: Add libavcodec-dev build dependency, upstream build system
  checks for that. Thanks Jean-Louis Dupond!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*-
2
 
 * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3
 
 * Redistribution and modifications are permitted subject to BSD license.
4
 
 */
5
 
#ifndef _BER_DECODER_H_
6
 
#define _BER_DECODER_H_
7
 
 
8
 
#include <asn_application.h>
9
 
 
10
 
#ifdef __cplusplus
11
 
extern "C" {
12
 
#endif
13
 
 
14
 
struct asn_TYPE_descriptor_s;   /* Forward declaration */
15
 
struct asn_codec_ctx_s;         /* Forward declaration */
16
 
 
17
 
/*
18
 
 * The BER decoder of any type.
19
 
 * This function may be invoked directly from the application.
20
 
 * The der_encode() function (der_encoder.h) is an opposite to ber_decode().
21
 
 */
22
 
asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx,
23
 
        struct asn_TYPE_descriptor_s *type_descriptor,
24
 
        void **struct_ptr,      /* Pointer to a target structure's pointer */
25
 
        const void *buffer,     /* Data to be decoded */
26
 
        size_t size             /* Size of that buffer */
27
 
        );
28
 
 
29
 
/*
30
 
 * Type of generic function which decodes the byte stream into the structure.
31
 
 */
32
 
typedef asn_dec_rval_t (ber_type_decoder_f)(
33
 
                struct asn_codec_ctx_s *opt_codec_ctx,
34
 
                struct asn_TYPE_descriptor_s *type_descriptor,
35
 
                void **struct_ptr, const void *buf_ptr, size_t size,
36
 
                int tag_mode);
37
 
 
38
 
/*******************************
39
 
 * INTERNALLY USEFUL FUNCTIONS *
40
 
 *******************************/
41
 
 
42
 
/*
43
 
 * Check that all tags correspond to the type definition (as given in head).
44
 
 * On return, last_length would contain either a non-negative length of the
45
 
 * value part of the last TLV, or the negative number of expected
46
 
 * "end of content" sequences. The number may only be negative if the
47
 
 * head->last_tag_form is non-zero.
48
 
 */
49
 
asn_dec_rval_t ber_check_tags(
50
 
                struct asn_codec_ctx_s *opt_codec_ctx,  /* codec options */
51
 
                struct asn_TYPE_descriptor_s *type_descriptor,
52
 
                asn_struct_ctx_t *opt_ctx,      /* saved decoding context */
53
 
                const void *ptr, size_t size,
54
 
                int tag_mode,           /* {-1,0,1}: IMPLICIT, no, EXPLICIT */
55
 
                int last_tag_form,      /* {-1,0:1}: any, primitive, constr */
56
 
                ber_tlv_len_t *last_length,
57
 
                int *opt_tlv_form       /* optional tag form */
58
 
        );
59
 
 
60
 
#ifdef __cplusplus
61
 
}
62
 
#endif
63
 
 
64
 
#endif  /* _BER_DECODER_H_ */