metaproxy  1.13.0
Classes | Namespaces | Functions | Variables
filter_z3950_client.cpp File Reference
#include "config.hpp"
#include "filter_z3950_client.hpp"
#include <metaproxy/package.hpp>
#include <metaproxy/util.hpp>
#include <map>
#include <stdexcept>
#include <list>
#include <iostream>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/xtime.hpp>
#include <yaz/zgdu.h>
#include <yaz/log.h>
#include <yaz/otherinfo.h>
#include <yaz/diagbib1.h>
#include <yaz/oid_db.h>
#include <yaz/charneg.h>
#include <yazpp/socket-manager.h>
#include <yazpp/pdu-assoc.h>
#include <yazpp/z-assoc.h>
Include dependency graph for filter_z3950_client.cpp:

Go to the source code of this file.

Classes

class  metaproxy_1::filter::Z3950Client::Assoc
 
class  metaproxy_1::filter::Z3950Client::Rep
 

Namespaces

 metaproxy_1
 
 metaproxy_1::filter
 

Functions

static void set_charset_proposal (ODR odr, Z_InitRequest *req, const char *charset)
 
static mp::filter::Base * filter_creator ()
 

Variables

struct metaproxy_1_filter_struct metaproxy_1_filter_z3950_client
 

Function Documentation

static mp::filter::Base* filter_creator ( )
static

Definition at line 724 of file filter_z3950_client.cpp.

725 {
726  return new mp::filter::Z3950Client;
727 }
static void set_charset_proposal ( ODR  odr,
Z_InitRequest *  req,
const char *  charset 
)
static

Definition at line 490 of file filter_z3950_client.cpp.

References metaproxy_1::filter::Z3950Client::Rep::m_bind_host, metaproxy_1::filter::Z3950Client::Rep::m_charset, metaproxy_1::filter::Z3950Client::Rep::m_client_ip, metaproxy_1::filter::Z3950Client::Rep::m_clients, metaproxy_1::filter::Z3950Client::Rep::m_cond_session_ready, metaproxy_1::filter::Z3950Client::Rep::m_force_close, metaproxy_1::filter::Z3950Client::Rep::m_mutex, and metaproxy_1::filter::Z3950Client::m_p.

491 {
492  Z_OtherInformation **p = &req->otherInfo;
493  Z_OtherInformationUnit *oi;
494 
495  if (*p)
496  {
497  int i;
498  for (i = 0; i < (*p)->num_elements; i++)
499  {
500  Z_External *ext = (*p)->list[i]->information.externallyDefinedInfo;
501  if ((*p)->list[i]->which == Z_OtherInfo_externallyDefinedInfo
502  && ext &&
503  ext->which == Z_External_charSetandLanguageNegotiation)
504  return;
505  }
506  }
507  if ((oi = yaz_oi_update(p, odr, 0, 0, 0)))
508  {
509  ODR_MASK_SET(req->options, Z_Options_negotiationModel);
510  oi->which = Z_OtherInfo_externallyDefinedInfo;
511  oi->information.externallyDefinedInfo =
512  yaz_set_proposal_charneg_list(odr, ",",
513  charset,
514  0 /* lang */,
515  1 /* records included */);
516  }
517 }

Variable Documentation

struct metaproxy_1_filter_struct metaproxy_1_filter_z3950_client
Initial value:
= {
0,
"z3950_client",
}
static mp::filter::Base * filter_creator()

Definition at line 730 of file filter_z3950_client.cpp.

Referenced by metaproxy_1::FactoryStatic::FactoryStatic().