Annotation of parser3/src/lib/punycode/pa_idna.h, revision 1.1

1.1     ! moko        1: /** @file
        !             2:    Parser: IDNA support, modified Libidn Version 1.28.
        !             3:    Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
        !             4: */
        !             5: 
        !             6: /* idna.h --- Prototypes for Internationalized Domain Name library.
        !             7:    Copyright (C) 2002-2013 Simon Josefsson
        !             8: 
        !             9:    This file is part of GNU Libidn.
        !            10: 
        !            11:    GNU Libidn is free software: you can redistribute it and/or
        !            12:    modify it under the terms of either:
        !            13: 
        !            14:      * the GNU Lesser General Public License as published by the Free
        !            15:        Software Foundation; either version 3 of the License, or (at
        !            16:        your option) any later version.
        !            17: 
        !            18:    or
        !            19: 
        !            20:      * the GNU General Public License as published by the Free
        !            21:        Software Foundation; either version 2 of the License, or (at
        !            22:        your option) any later version.
        !            23: 
        !            24:    or both in parallel, as here.
        !            25: 
        !            26:    GNU Libidn is distributed in the hope that it will be useful,
        !            27:    but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            28:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        !            29:    General Public License for more details.
        !            30: 
        !            31:    You should have received copies of the GNU General Public License and
        !            32:    the GNU Lesser General Public License along with this program.  If
        !            33:    not, see <http://www.gnu.org/licenses/>. */
        !            34: 
        !            35: #ifndef PA_IDNA_H
        !            36: #define PA_IDNA_H
        !            37: 
        !            38: #include "pa_config_includes.h"
        !            39: 
        !            40: # ifdef __cplusplus
        !            41: extern "C"
        !            42: {
        !            43: # endif
        !            44: 
        !            45:   /* Error codes. */
        !            46:   typedef enum
        !            47:   {
        !            48:     IDNA_SUCCESS = 0,
        !            49:     IDNA_CONTAINS_NON_LDH = 4,
        !            50:     IDNA_CONTAINS_MINUS = 5,
        !            51:     IDNA_NO_ACE_PREFIX = 6,
        !            52:     IDNA_ROUNDTRIP_VERIFY_ERROR = 7,
        !            53:     IDNA_CONTAINS_ACE_PREFIX = 8
        !            54:   } Idna_rc;
        !            55: 
        !            56:   /* IDNA flags */
        !            57:   typedef enum
        !            58:   {
        !            59:     IDNA_ALLOW_UNASSIGNED = 0x0001,
        !            60:     IDNA_USE_STD3_ASCII_RULES = 0x0002
        !            61:   } Idna_flags;
        !            62: 
        !            63: #ifndef IDNA_ACE_PREFIX
        !            64: #define IDNA_ACE_PREFIX "xn--"
        !            65: #endif
        !            66: 
        !            67:   extern const char *pa_idna_strerror (int rc);
        !            68: 
        !            69:   extern int pa_idna_to_ascii_4z (const uint32_t *in, char *out, size_t out_len, int flags);
        !            70:   extern int pa_idna_to_unicode_4z (const char *in, uint32_t *out, size_t out_len, int flags);
        !            71: 
        !            72: # ifdef __cplusplus
        !            73: }
        !            74: # endif
        !            75: 
        !            76: #endif /* PA_IDNA_H */

E-mail: