metaproxy  1.3.55
Classes | Namespaces | Functions | Variables
filter_zoom.cpp File Reference
#include "config.hpp"
#include <stdlib.h>
#include <sys/types.h>
#include "filter_zoom.hpp"
#include <metaproxy/package.hpp>
#include <metaproxy/util.hpp>
#include <metaproxy/xmlutil.hpp>
#include <yaz/comstack.h>
#include <yaz/poll.h>
#include "torus.hpp"
#include <libxslt/xsltutils.h>
#include <libxslt/transform.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <yaz/yaz-version.h>
#include <yaz/tpath.h>
#include <yaz/srw.h>
#include <yaz/ccl_xml.h>
#include <yaz/ccl.h>
#include <yaz/rpn2cql.h>
#include <yaz/rpn2solr.h>
#include <yaz/pquery.h>
#include <yaz/cql.h>
#include <yaz/oid_db.h>
#include <yaz/diagbib1.h>
#include <yaz/log.h>
#include <yaz/zgdu.h>
#include <yaz/querytowrbuf.h>
#include <yaz/sortspec.h>
#include <yaz/tokenizer.h>
#include <yaz/zoom.h>
Include dependency graph for filter_zoom.cpp:

Go to the source code of this file.

Classes

class  metaproxy_1::filter::Zoom::Searchable
class  metaproxy_1::filter::Zoom::Backend
class  metaproxy_1::filter::Zoom::Frontend
class  metaproxy_1::filter::Zoom::Impl

Namespaces

namespace  metaproxy_1
namespace  metaproxy_1::filter

Functions

static xmlNode * xml_node_search (xmlNode *ptr, int *num, int m)
static bool wait_conn (COMSTACK cs, int secs)
std::string escape_cql_term (std::string inp)
static mp::filter::Base * filter_creator ()

Variables

struct metaproxy_1_filter_struct metaproxy_1_filter_zoom

Function Documentation

std::string escape_cql_term ( std::string  inp)

Definition at line 2504 of file filter_zoom.cpp.

{
std::string res;
size_t l = inp.length();
size_t i;
for (i = 0; i < l; i++)
{
if (strchr("*?^\"", inp[i]))
res += "\\";
res += inp[i];
}
return res;
}
static mp::filter::Base* filter_creator ( )
static

Definition at line 2690 of file filter_zoom.cpp.

{
return new mp::filter::Zoom;
}
static bool wait_conn ( COMSTACK  cs,
int  secs 
)
static

Definition at line 2002 of file filter_zoom.cpp.

{
struct yaz_poll_fd pfd;
yaz_poll_add(pfd.input_mask, yaz_poll_except);
if (cs->io_pending && CS_WANT_WRITE)
yaz_poll_add(pfd.input_mask, yaz_poll_write);
if (cs->io_pending & CS_WANT_READ)
yaz_poll_add(pfd.input_mask, yaz_poll_read);
pfd.fd = cs_fileno(cs);
pfd.client_data = 0;
int ret = yaz_poll(&pfd, 1, secs, 0);
return ret > 0;
}
static xmlNode* xml_node_search ( xmlNode *  ptr,
int *  num,
int  m 
)
static

Definition at line 243 of file filter_zoom.cpp.

{
while (ptr)
{
if (ptr->type == XML_ELEMENT_NODE &&
!strcmp((const char *) ptr->name, "recordData"))
{
(*num)++;
if (m == *num)
return ptr;
}
else // else: we don't want to find nested nodes
{
xmlNode *ret_node = xml_node_search(ptr->children, num, m);
if (ret_node)
return ret_node;
}
ptr = ptr->next;
}
return 0;
}

Variable Documentation

struct metaproxy_1_filter_struct metaproxy_1_filter_zoom
Initial value:
{
0,
"zoom",
}

Definition at line 2696 of file filter_zoom.cpp.

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