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

« back to all changes in this revision

Viewing changes to asn1/per_encoder.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) 2006, 2007 Lev Walkin <vlm@lionet.info>. All rights reserved.
3
 
 * Redistribution and modifications are permitted subject to BSD license.
4
 
 */
5
 
#ifndef _PER_ENCODER_H_
6
 
#define _PER_ENCODER_H_
7
 
 
8
 
#include <asn_application.h>
9
 
#include <per_support.h>
10
 
 
11
 
#ifdef __cplusplus
12
 
extern "C" {
13
 
#endif
14
 
 
15
 
struct asn_TYPE_descriptor_s;   /* Forward declaration */
16
 
 
17
 
/*
18
 
 * Unaligned PER encoder of any ASN.1 type. May be invoked by the application.
19
 
 * WARNING: This function returns the number of encoded bits in the .encoded
20
 
 * field of the return value. Use the following formula to convert to bytes:
21
 
 *      bytes = ((.encoded + 7) / 8)
22
 
 */
23
 
asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor,
24
 
        void *struct_ptr,       /* Structure to be encoded */
25
 
        asn_app_consume_bytes_f *consume_bytes_cb,      /* Data collector */
26
 
        void *app_key           /* Arbitrary callback argument */
27
 
);
28
 
 
29
 
/*
30
 
 * A variant of uper_encode() which encodes data into the existing buffer
31
 
 * WARNING: This function returns the number of encoded bits in the .encoded
32
 
 * field of the return value.
33
 
 */
34
 
asn_enc_rval_t uper_encode_to_buffer(
35
 
        struct asn_TYPE_descriptor_s *type_descriptor,
36
 
        void *struct_ptr,       /* Structure to be encoded */
37
 
        void *buffer,           /* Pre-allocated buffer */
38
 
        size_t buffer_size      /* Initial buffer size (max) */
39
 
);
40
 
 
41
 
/*
42
 
 * A variant of uper_encode_to_buffer() which allocates buffer itself.
43
 
 * Returns the number of bytes in the buffer or -1 in case of failure.
44
 
 * WARNING: This function produces a "Production of the complete encoding",
45
 
 * with length of at least one octet. Contrast this to precise bit-packing
46
 
 * encoding of uper_encode() and uper_encode_to_buffer().
47
 
 */
48
 
ssize_t uper_encode_to_new_buffer(
49
 
        struct asn_TYPE_descriptor_s *type_descriptor,
50
 
        asn_per_constraints_t *constraints,
51
 
        void *struct_ptr,       /* Structure to be encoded */
52
 
        void **buffer_r         /* Buffer allocated and returned */
53
 
);
54
 
 
55
 
/*
56
 
 * Type of the generic PER encoder function.
57
 
 */
58
 
typedef asn_enc_rval_t (per_type_encoder_f)(
59
 
        struct asn_TYPE_descriptor_s *type_descriptor,
60
 
        asn_per_constraints_t *constraints,
61
 
        void *struct_ptr,
62
 
        asn_per_outp_t *per_output
63
 
);
64
 
 
65
 
#ifdef __cplusplus
66
 
}
67
 
#endif
68
 
 
69
 
#endif  /* _PER_ENCODER_H_ */