X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fpazpar2.h;h=9d42c372c528e5257ef55bff7a0bdd2ab482036f;hb=9b4b753a6833eda435f995060f5d3f515381ce11;hp=d111196bb4c37c1dc99f175245b0c8a5a1aa7a7c;hpb=5df65a405a33891391adbc7cca0c270949b4f0ef;p=pazpar2-moved-to-github.git diff --git a/src/pazpar2.h b/src/pazpar2.h index d111196..9d42c37 100644 --- a/src/pazpar2.h +++ b/src/pazpar2.h @@ -1,4 +1,4 @@ -/* $Id: pazpar2.h,v 1.28 2007-04-20 04:32:33 quinn Exp $ +/* $Id: pazpar2.h,v 1.33 2007-04-22 16:41:42 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -22,7 +22,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef PAZPAR2_H #define PAZPAR2_H -struct record; #include @@ -40,39 +39,9 @@ struct record; #include "eventl.h" #include "config.h" +struct record; struct client; -union data_types { - char *text; - struct { - int min; - int max; - } number; -}; - -struct record_metadata { - union data_types data; - struct record_metadata *next; // next item of this name -}; - -struct record { - struct client *client; - struct record_metadata **metadata; // Array mirrors list of metadata fields in config - union data_types **sortkeys; // Array mirrors list of sortkey fields in config - struct record *next; // Next in cluster of merged records -}; - -struct record_cluster -{ - struct record_metadata **metadata; // Array mirrors list of metadata fields in config - union data_types **sortkeys; - char *merge_key; - int relevance; - int *term_frequency_vec; - int recid; // Set-specific ID for this record - struct record *records; -}; - struct connection; // Represents a host (irrespective of databases) @@ -92,15 +61,6 @@ struct database { struct zr_explain *explain; struct setting **settings; struct database *next; - yaz_marc_t yaz_marc; - struct database_retrievalmap *map; -}; - -// Normalization filter. Turns incoming record into internal representation -// Simple sequence of stylesheets run in series. -struct database_retrievalmap { - xsltStylesheet *stylesheet; - struct database_retrievalmap *next; }; struct database_criterion_value { @@ -123,6 +83,7 @@ struct connection { char *ibuf; int ibufsize; enum { + Conn_Resolving, Conn_Connecting, Conn_Open, Conn_Waiting, @@ -157,6 +118,24 @@ struct client { struct client *next; }; +// Normalization filter. Turns incoming record into internal representation +// Simple sequence of stylesheets run in series. +struct database_retrievalmap { + xsltStylesheet *stylesheet; + struct database_retrievalmap *next; +}; + +// Represents a database as viewed from one session, possibly with settings overriden +// for that session +struct session_database +{ + struct database *database; + struct setting **settings; + yaz_marc_t yaz_marc; + struct database_retrievalmap *map; + struct session_database *next; +}; + #define SESSION_WATCH_RECORDS 0 #define SESSION_WATCH_MAX 0 @@ -170,15 +149,6 @@ struct named_termlist struct termlist *termlist; }; -// Represents a database as viewed from one session, possibly with settings overriden -// for that session (to support authorization/authentication) -struct session_database -{ - struct database *database; - struct setting **settings; - struct session_database *next; -}; - // End-user session struct session { struct session_database *databases; // All databases, settings overriden @@ -267,6 +237,10 @@ void start_zproxy(void); extern struct parameters global_parameters; void pazpar2_add_channel(IOCHAN c); void pazpar2_event_loop(void); + +int host_getaddrinfo(struct host *host); +void connect_resolver_host(struct host *host); + #endif /*