reverting to exit call, as it might be dangerous to have a dictionary which is not...
[pazpar2-moved-to-github.git] / src / pazpar2.h
index 1e098f3..9d42c37 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pazpar2.h,v 1.27 2007-04-20 04:08:14 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 <netdb.h>
 
@@ -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,16 +61,6 @@ struct database {
     struct zr_explain *explain;
     struct setting **settings;
     struct database *next;
-    CCL_bibset ccl_map;
-    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 {
@@ -124,6 +83,7 @@ struct connection {
     char *ibuf;
     int ibufsize;
     enum {
+        Conn_Resolving,
         Conn_Connecting,
         Conn_Open,
         Conn_Waiting,
@@ -158,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
 
@@ -171,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
@@ -268,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
 
 /*