~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to lib/isc/include/isc/base64.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1999-2001  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: base64.h,v 1.15.206.1 2004/03/06 08:14:38 marka Exp $ */
 
18
/* $Id: base64.h,v 1.22 2007/06/19 23:47:18 tbox Exp $ */
19
19
 
20
20
#ifndef ISC_BASE64_H
21
21
#define ISC_BASE64_H 1
22
22
 
 
23
/*! \file isc/base64.h */
 
24
 
23
25
#include <isc/lang.h>
24
26
#include <isc/types.h>
25
27
 
32
34
isc_result_t
33
35
isc_base64_totext(isc_region_t *source, int wordlength,
34
36
                  const char *wordbreak, isc_buffer_t *target);
35
 
/*
36
 
 * Convert data into base64 encoded text.
 
37
/*!<
 
38
 * \brief Convert data into base64 encoded text.
37
39
 *
38
40
 * Notes:
39
 
 *      The base64 encoded text in 'target' will be divided into
 
41
 *\li   The base64 encoded text in 'target' will be divided into
40
42
 *      words of at most 'wordlength' characters, separated by
41
43
 *      the 'wordbreak' string.  No parentheses will surround
42
44
 *      the text.
43
45
 *
44
46
 * Requires:
45
 
 *      'source' is a region containing binary data
46
 
 *      'target' is a text buffer containing available space
47
 
 *      'wordbreak' points to a null-terminated string of
 
47
 *\li   'source' is a region containing binary data
 
48
 *\li   'target' is a text buffer containing available space
 
49
 *\li   'wordbreak' points to a null-terminated string of
48
50
 *              zero or more whitespace characters
49
51
 *
50
52
 * Ensures:
51
 
 *      target will contain the base64 encoded version of the data
 
53
 *\li   target will contain the base64 encoded version of the data
52
54
 *      in source.  The 'used' pointer in target will be advanced as
53
55
 *      necessary.
54
56
 */
55
57
 
56
58
isc_result_t
57
59
isc_base64_decodestring(const char *cstr, isc_buffer_t *target);
58
 
/*
59
 
 * Decode a null-terminated base64 string.
 
60
/*!<
 
61
 * \brief Decode a null-terminated base64 string.
60
62
 *
61
63
 * Requires:
62
 
 *      'cstr' is non-null.
63
 
 *      'target' is a valid buffer.
 
64
 *\li   'cstr' is non-null.
 
65
 *\li   'target' is a valid buffer.
64
66
 *
65
67
 * Returns:
66
 
 *      ISC_R_SUCCESS   -- the entire decoded representation of 'cstring'
 
68
 *\li   #ISC_R_SUCCESS  -- the entire decoded representation of 'cstring'
67
69
 *                         fit in 'target'.
68
 
 *      ISC_R_BADBASE64 -- 'cstr' is not a valid base64 encoding.
 
70
 *\li   #ISC_R_BADBASE64 -- 'cstr' is not a valid base64 encoding.
69
71
 *
70
72
 *      Other error returns are any possible error code from:
71
 
 *              isc_lex_create(),
72
 
 *              isc_lex_openbuffer(),
73
 
 *              isc_base64_tobuffer().
 
73
 *\li           isc_lex_create(),
 
74
 *\li           isc_lex_openbuffer(),
 
75
 *\li           isc_base64_tobuffer().
74
76
 */
75
77
 
76
78
isc_result_t
77
79
isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
78
 
/*
79
 
 * Convert base64 encoded text from a lexer context into data.
 
80
/*!<
 
81
 * \brief Convert base64 encoded text from a lexer context into data.
80
82
 *
81
83
 * Requires:
82
 
 *      'lex' is a valid lexer context
83
 
 *      'target' is a buffer containing binary data
84
 
 *      'length' is an integer
 
84
 *\li   'lex' is a valid lexer context
 
85
 *\li   'target' is a buffer containing binary data
 
86
 *\li   'length' is an integer
85
87
 *
86
88
 * Ensures:
87
 
 *      target will contain the data represented by the base64 encoded
 
89
 *\li   target will contain the data represented by the base64 encoded
88
90
 *      string parsed by the lexer.  No more than length bytes will be read,
89
91
 *      if length is positive.  The 'used' pointer in target will be
90
92
 *      advanced as necessary.