* Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.152 2002-05-18 09:52:37 oleg Exp $
+ * $Id: client.c,v 1.153 2002-05-19 15:39:54 oleg Exp $
*/
#include <stdio.h>
p0->which = Z_OtherInfo_externallyDefinedInfo;
p0->information.externallyDefinedInfo =
- yaz_set_charset_and_lang(out, CLASS_NEGOT, VAL_CHARNEG3,
+ yaz_set_proposal_charneg(out,
(const char**)&yazCharset, (yazCharset)?1:0,
- (const char**)&yazLang, (yazLang)?1:0);
+ (const char**)&yazLang, (yazLang)?1:0, 1);
}
}
if (ODR_MASK_GET(res->options, Z_Options_queryType104))
printf (" queryType104");
printf ("\n");
+
+ if (ODR_MASK_GET(res->options, Z_Options_negotiationModel)) {
+
+ Z_CharSetandLanguageNegotiation *p =
+ yaz_get_charneg_record(res->otherInfo);
+
+ if (p) {
+
+ char *charset, *lang;
+ int selected;
+
+ yaz_get_response_charneg(session_mem, p, &charset, &lang, &selected);
+
+ printf("Accepted character set : `%s'\n", charset);
+ printf("Accepted code language : `%s'\n", lang);
+ printf("Accepted records in ...: %d\n", selected );
+ }
+ }
fflush (stdout);
return 0;
}