- leak detective is usable, but does not show static function names
[strongswan.git] / Source / lib / asn1 / der_encoder.h
1 /**
2 * @file der_encoder.h
3 *
4 * @brief Interface of der_encoder_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2006 Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #ifndef DER_ENCODER_H_
24 #define DER_ENCODER_H_
25
26 #include <types.h>
27
28 typedef struct der_encoder_t der_encoder_t;
29
30 /**
31 * @brief Decode der_encoded bytes to usable structures.
32 *
33 * @b Constructors:
34 * - der_encoder_create()
35 *
36 * @ingroup asn1
37 */
38 struct der_encoder_t {
39
40 status_t encode(der_encoder_t *this, void *input, chunk_t output);
41
42 /**
43 * @brief Destroys a der_encoder object.
44 *
45 * @param der_encoder calling object
46 */
47 void (*destroy) (der_encoder_t *this);
48 };
49
50
51 /**
52 * @brief Create a der_encoder instance.
53 *
54 * @return der_encoder_t object
55 *
56 * @ingroup ans1
57 */
58 der_encoder_t * der_encoder_create(asn1_rule_t *rules);
59
60 #endif /* DER_ENCODER_H_ */