00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PR29_H
00024 # define PR29_H
00025
00026 # ifndef IDNAPI
00027 # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
00028 # define IDNAPI __attribute__((__visibility__("default")))
00029 # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC
00030 # define IDNAPI __declspec(dllexport)
00031 # elif defined _MSC_VER && ! defined LIBIDN_STATIC
00032 # define IDNAPI __declspec(dllimport)
00033 # else
00034 # define IDNAPI
00035 # endif
00036 # endif
00037
00038 # ifdef __cplusplus
00039 extern "C"
00040 {
00041 # endif
00042
00043
00044 # include <stdlib.h>
00045
00046
00047 # include <idn-int.h>
00048
00049
00050 typedef enum
00051 {
00052 PR29_SUCCESS = 0,
00053 PR29_PROBLEM = 1,
00054 PR29_STRINGPREP_ERROR = 2
00055 } Pr29_rc;
00056
00057 extern IDNAPI const char *pr29_strerror (Pr29_rc rc);
00058
00059 extern IDNAPI int pr29_4 (const uint32_t * in, size_t len);
00060 extern IDNAPI int pr29_4z (const uint32_t * in);
00061 extern IDNAPI int pr29_8z (const char *in);
00062
00063 # ifdef __cplusplus
00064 }
00065 # endif
00066 #endif