Happy new year
[pazpar2-moved-to-github.git] / src / session.h
index facad24..a74c7cc 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2011 Index Data
+   Copyright (C) 2006-2012 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
@@ -48,6 +48,7 @@ enum pazpar2_error_code {
     PAZPAR2_RECORD_FAIL,
     PAZPAR2_NOT_IMPLEMENTED,
     PAZPAR2_NO_SERVICE,
+    PAZPAR2_ALREADY_BLOCKED,
 
     PAZPAR2_LAST_ERROR
 };
@@ -75,7 +76,9 @@ struct session_database
 #define SESSION_WATCH_SHOW      0
 #define SESSION_WATCH_RECORD    1
 #define SESSION_WATCH_SHOW_PREF 2
-#define SESSION_WATCH_MAX       2
+#define SESSION_WATCH_TERMLIST  3
+#define SESSION_WATCH_BYTARGET  4
+#define SESSION_WATCH_MAX       4
 
 #define SESSION_MAX_TERMLISTS 10
 
@@ -136,6 +139,7 @@ struct hitsbytarget {
     const char *name;
     Odr_int hits;
     int diagnostic;
+    const char *addinfo;
     int records;
     const char *state;
     int connected;
@@ -180,6 +184,7 @@ int ingest_record(struct client *cl, const char *rec, int record_no, NMEM nmem);
 void session_alert_watch(struct session *s, int what);
 void add_facet(struct session *s, const char *type, const char *value, int count);
 
+
 void perform_termlist(struct http_channel *c, struct session *se,
                       const char *name, int num);
 void session_log(struct session *s, int level, const char *fmt, ...)
@@ -189,6 +194,12 @@ void session_log(struct session *s, int level, const char *fmt, ...)
     ;
 #endif
 
+struct session_sorted_results {
+    const char *field;
+    int increasing;
+    struct session_sorted_results *next;
+};
+
 /*
  * Local variables:
  * c-basic-offset: 4