11cb0ef41Sopenharmony_ci/* Copyright (c) 2011, 2018 Ben Noordhuis <info@bnoordhuis.nl> 21cb0ef41Sopenharmony_ci * 31cb0ef41Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 41cb0ef41Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 51cb0ef41Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 61cb0ef41Sopenharmony_ci * 71cb0ef41Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 81cb0ef41Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 91cb0ef41Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 101cb0ef41Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 111cb0ef41Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 121cb0ef41Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 131cb0ef41Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 141cb0ef41Sopenharmony_ci */ 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ci#ifndef UV_SRC_IDNA_H_ 171cb0ef41Sopenharmony_ci#define UV_SRC_IDNA_H_ 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci/* Decode a single codepoint. Returns the codepoint or UINT32_MAX on error. 201cb0ef41Sopenharmony_ci * |p| is updated on success _and_ error, i.e., bad multi-byte sequences are 211cb0ef41Sopenharmony_ci * skipped in their entirety, not just the first bad byte. 221cb0ef41Sopenharmony_ci */ 231cb0ef41Sopenharmony_ciunsigned uv__utf8_decode1(const char** p, const char* pe); 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ci/* Convert a UTF-8 domain name to IDNA 2008 / Punycode. A return value >= 0 261cb0ef41Sopenharmony_ci * is the number of bytes written to |d|, including the trailing nul byte. 271cb0ef41Sopenharmony_ci * A return value < 0 is a libuv error code. |s| and |d| can not overlap. 281cb0ef41Sopenharmony_ci */ 291cb0ef41Sopenharmony_cilong uv__idna_toascii(const char* s, const char* se, char* d, char* de); 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci#endif /* UV_SRC_IDNA_H_ */ 32