YAZ  5.23.1
Functions
charneg.c File Reference

Implements Z39.50 Charset negotiation utilities. More...

#include <stdio.h>
#include <yaz/otherinfo.h>
#include <yaz/z-charneg.h>
#include <yaz/charneg.h>
#include <yaz/yaz-util.h>
#include <yaz/oid_db.h>

Go to the source code of this file.

Functions

static Z_Externalz_ext_record2 (ODR o, const char *buf)
 
static int get_form (const char *charset)
 
static char * set_form (Odr_oid *encoding)
 
static Z_OriginProposal_0z_get_OriginProposal_0 (ODR o, const char *charset)
 
static Z_OriginProposalz_get_OriginProposal (ODR o, const char **charsets, int num_charsets, const char **langs, int num_langs, int selected)
 
static Z_CharSetandLanguageNegotiationz_get_CharSetandLanguageNegotiation (ODR o)
 
Z_Externalyaz_set_proposal_charneg (ODR o, const char **charsets, int num_charsets, const char **langs, int num_langs, int selected)
 
Z_Externalyaz_set_proposal_charneg_list (ODR o, const char *delim, const char *charset_list, const char *lang_list, int selected)
 
static Z_TargetResponsez_get_TargetResponse (ODR o, const char *charset, const char *lang, int selected)
 
Z_Externalyaz_set_response_charneg (ODR o, const char *charset, const char *lang, int selected)
 
Z_CharSetandLanguageNegotiationyaz_get_charneg_record (Z_OtherInformation *p)
 
int yaz_del_charneg_record (Z_OtherInformation **p)
 
void yaz_get_proposal_charneg (NMEM mem, Z_CharSetandLanguageNegotiation *p, char ***charsets, int *num_charsets, char ***langs, int *num_langs, int *selected)
 
void yaz_get_response_charneg (NMEM mem, Z_CharSetandLanguageNegotiation *p, char **charset, char **lang, int *selected)
 

Detailed Description

Implements Z39.50 Charset negotiation utilities.

Helper functions for Character Set and Language Negotiation - 3

Definition in file charneg.c.

Function Documentation

static int get_form ( const char *  charset)
static

Definition at line 38 of file charneg.c.

References yaz_matchstr().

Referenced by z_get_OriginProposal_0(), and z_get_TargetResponse().

static char* set_form ( Odr_oid encoding)
static

Definition at line 54 of file charneg.c.

References oid_oidlen().

Referenced by yaz_get_proposal_charneg(), and yaz_get_response_charneg().

int yaz_del_charneg_record ( Z_OtherInformation **  p)
Z_CharSetandLanguageNegotiation* yaz_get_charneg_record ( Z_OtherInformation p)
void yaz_get_proposal_charneg ( NMEM  mem,
Z_CharSetandLanguageNegotiation p,
char ***  charsets,
int *  num_charsets,
char ***  langs,
int *  num_langs,
int *  selected 
)
void yaz_get_response_charneg ( NMEM  mem,
Z_CharSetandLanguageNegotiation p,
char **  charset,
char **  lang,
int *  selected 
)
Z_External* yaz_set_proposal_charneg ( ODR  o,
const char **  charsets,
int  num_charsets,
const char **  langs,
int  num_langs,
int  selected 
)
Z_External* yaz_set_proposal_charneg_list ( ODR  o,
const char *  delim,
const char *  charset_list,
const char *  lang_list,
int  selected 
)

Definition at line 174 of file charneg.c.

References nmem_strsplit(), odr_getmem, and yaz_set_proposal_charneg().

Referenced by ZOOM_connection_Z3950_send_init().

Z_External* yaz_set_response_charneg ( ODR  o,
const char *  charset,
const char *  lang,
int  selected 
)
static Z_External* z_ext_record2 ( ODR  o,
const char *  buf 
)
static
static Z_CharSetandLanguageNegotiation* z_get_CharSetandLanguageNegotiation ( ODR  o)
static

Definition at line 140 of file charneg.c.

References odr_malloc().

Referenced by yaz_set_proposal_charneg(), and yaz_set_response_charneg().

static Z_OriginProposal* z_get_OriginProposal ( ODR  o,
const char **  charsets,
int  num_charsets,
const char **  langs,
int  num_langs,
int  selected 
)
static
static Z_OriginProposal_0* z_get_OriginProposal_0 ( ODR  o,
const char *  charset 
)
static
static Z_TargetResponse* z_get_TargetResponse ( ODR  o,
const char *  charset,
const char *  lang,
int  selected 
)
static