X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fcharneg.h;h=2212f0f85727d504bc45b51ad28c68121d1896bb;hb=c620a713f1418315efcd4e6fab225e036775d365;hp=bc5d5e7447459a425e7f9ec92c8101694ff46a8f;hpb=379c41a9a422911c58dc6a6db5f16eae56f22a7d;p=yaz-moved-to-github.git diff --git a/include/yaz/charneg.h b/include/yaz/charneg.h index bc5d5e7..2212f0f 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.3 2002-07-25 12:50:16 adam Exp $ */ #ifndef CHARNEG_H #define CHARNEG_H @@ -8,9 +8,46 @@ 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