X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhost.h;h=c1f2d8996dcfbdf83f5f417af5c8c52ae39b9a8d;hb=3d72c16632e288e4a6635152083b7cb930707428;hp=5409f73ba541d2fc653f6c2a1d8ddfd4335c016d;hpb=ce617dd90a2dc6632e7475ab73a887e0fb472c5c;p=pazpar2-moved-to-github.git diff --git a/src/host.h b/src/host.h index 5409f73..c1f2d89 100644 --- a/src/host.h +++ b/src/host.h @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2010 Index Data + Copyright (C) 2006-2013 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -22,16 +22,27 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include +typedef struct database_hosts *database_hosts_t; + /** \brief Represents a host (irrespective of databases) */ struct host { - char *hostport; - char *ipport; + char *url; // logical host/database?args .. + char *tproxy; // tproxy address (no Z39.50 UI) + char *proxy; // logical proxy address + char *ipport; // tproxy or proxy resolved struct connection *connections; // All connections to this struct host *next; YAZ_MUTEX mutex; YAZ_COND cond_ready; }; +database_hosts_t database_hosts_create(void); +void database_hosts_destroy(database_hosts_t *); + +struct host *find_host(database_hosts_t hosts, const char *hostport, + const char *proxy, int port, iochan_man_t iochan_man); + +int host_getaddrinfo(struct host *host, iochan_man_t iochan_man); #endif