1226031Sstas/* 2226031Sstas * Copyright (c) 2004 Kungliga Tekniska H��gskolan 3226031Sstas * (Royal Institute of Technology, Stockholm, Sweden). 4226031Sstas * All rights reserved. 5226031Sstas * 6226031Sstas * Redistribution and use in source and binary forms, with or without 7226031Sstas * modification, are permitted provided that the following conditions 8226031Sstas * are met: 9226031Sstas * 10226031Sstas * 1. Redistributions of source code must retain the above copyright 11226031Sstas * notice, this list of conditions and the following disclaimer. 12226031Sstas * 13226031Sstas * 2. Redistributions in binary form must reproduce the above copyright 14226031Sstas * notice, this list of conditions and the following disclaimer in the 15226031Sstas * documentation and/or other materials provided with the distribution. 16226031Sstas * 17226031Sstas * 3. Neither the name of the Institute nor the names of its contributors 18226031Sstas * may be used to endorse or promote products derived from this software 19226031Sstas * without specific prior written permission. 20226031Sstas * 21226031Sstas * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22226031Sstas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23226031Sstas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24226031Sstas * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25226031Sstas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26226031Sstas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27226031Sstas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28226031Sstas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29226031Sstas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30226031Sstas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31226031Sstas * SUCH DAMAGE. 32226031Sstas */ 33226031Sstas 34226031Sstas/* $Id$ */ 35226031Sstas 36226031Sstas#ifndef _WIND_H_ 37226031Sstas#define _WIND_H_ 38226031Sstas 39226031Sstas#include <stddef.h> 40226031Sstas#include <krb5-types.h> 41226031Sstas 42226031Sstas#include <wind_err.h> 43226031Sstas 44226031Sstastypedef unsigned int wind_profile_flags; 45226031Sstas 46226031Sstas#define WIND_PROFILE_NAME 0x00000001 47226031Sstas#define WIND_PROFILE_SASL 0x00000002 48226031Sstas#define WIND_PROFILE_LDAP 0x00000004 49226031Sstas#define WIND_PROFILE_LDAP_CASE 0x00000008 50226031Sstas 51226031Sstas#define WIND_PROFILE_LDAP_CASE_EXACT_ATTRIBUTE 0x00010000 52226031Sstas#define WIND_PROFILE_LDAP_CASE_EXACT_ASSERTION 0x00020000 53226031Sstas#define WIND_PROFILE_LDAP_NUMERIC 0x00040000 54226031Sstas#define WIND_PROFILE_LDAP_TELEPHONE 0x00080000 55226031Sstas 56226031Sstas 57226031Sstas/* flags to wind_ucs2read/wind_ucs2write */ 58226031Sstas#define WIND_RW_LE 1 59226031Sstas#define WIND_RW_BE 2 60226031Sstas#define WIND_RW_BOM 4 61226031Sstas 62226031Sstasint wind_stringprep(const uint32_t *, size_t, 63226031Sstas uint32_t *, size_t *, 64226031Sstas wind_profile_flags); 65226031Sstasint wind_profile(const char *, wind_profile_flags *); 66226031Sstas 67226031Sstasint wind_punycode_label_toascii(const uint32_t *, size_t, 68226031Sstas char *, size_t *); 69226031Sstas 70226031Sstasint wind_utf8ucs4(const char *, uint32_t *, size_t *); 71226031Sstasint wind_utf8ucs4_length(const char *, size_t *); 72226031Sstas 73226031Sstasint wind_ucs4utf8(const uint32_t *, size_t, char *, size_t *); 74226031Sstasint wind_ucs4utf8_length(const uint32_t *, size_t, size_t *); 75226031Sstas 76226031Sstasint wind_utf8ucs2(const char *, uint16_t *, size_t *); 77226031Sstasint wind_utf8ucs2_length(const char *, size_t *); 78226031Sstas 79226031Sstasint wind_ucs2utf8(const uint16_t *, size_t, char *, size_t *); 80226031Sstasint wind_ucs2utf8_length(const uint16_t *, size_t, size_t *); 81226031Sstas 82226031Sstas 83226031Sstasint wind_ucs2read(const void *, size_t, unsigned int *, uint16_t *, size_t *); 84226031Sstasint wind_ucs2write(const uint16_t *, size_t, unsigned int *, void *, size_t *); 85226031Sstas 86226031Sstas#endif /* _WIND_H_ */ 87