X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fcharneg.h;fp=include%2Fyaz%2Fcharneg.h;h=fb91ef1d8c3724efb1376f542d4cb81a5025ba3f;hb=73453b196192a42ea0ef9c26e0a1a0cc759fd105;hp=bc5d5e7447459a425e7f9ec92c8101694ff46a8f;hpb=1cd88a77abb7c32e5ff938e2f4b9392d03d45ec5;p=yaz-moved-to-github.git diff --git a/include/yaz/charneg.h b/include/yaz/charneg.h index bc5d5e7..fb91ef1 100644 --- a/include/yaz/charneg.h +++ b/include/yaz/charneg.h @@ -1,5 +1,5 @@ /* - * $Id: charneg.h,v 1.1 2002-05-18 09:41:36 oleg Exp $ + * $Id: charneg.h,v 1.2 2002-05-19 15:39:54 oleg Exp $ */ #ifndef CHARNEG_H #define CHARNEG_H @@ -8,9 +8,44 @@ YAZ_BEGIN_CDECL -YAZ_EXPORT Z_External *yaz_set_charset_and_lang(ODR odr, int oid_class, int oid_value, - const char **charsets, int num_charsets, - const char **langs, int num_langs); +/* + * Character set and language negotiation model - 3 (*) + * + * These a set helper functions for support (*). There are + * client and server parts. At that moment the (*) is based on + * Z_PrivateCharacterSet_externallySpecified method. + * + */ + +/* + * Get (*) record from request + */ +YAZ_EXPORT Z_CharSetandLanguageNegotiation * + yaz_get_charneg_record(Z_OtherInformation *p); + +/* + * Client's part. + */ +YAZ_EXPORT Z_External *yaz_set_proposal_charneg(ODR odr, + const char **charsets, int num_charsets, const char **langs, + int num_langs, int selected); + +YAZ_EXPORT void yaz_get_response_charneg(NMEM mem, + Z_CharSetandLanguageNegotiation *p, char **charset, char **lang, + int *selected); + +/* + * Server's part + */ + +YAZ_EXPORT Z_External *yaz_set_response_charneg(ODR odr, + const char *charset, const char *lang, int selected); + + +YAZ_EXPORT void yaz_get_proposal_charneg(NMEM mem, + Z_CharSetandLanguageNegotiation *p, char **charsets, int *num_charsets, + char **langs, int *num_langs, int *selected); + YAZ_END_CDECL