Fixed Bug #1044 -- connections should no lomnger be re-used if authent tokens
[pazpar2-moved-to-github.git] / src / connection.h
1 /* $Id: connection.h,v 1.3 2007-06-02 04:32:28 quinn Exp $
2    Copyright (c) 2006-2007, Index Data.
3
4 This file is part of Pazpar2.
5
6 Pazpar2 is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
10
11 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Pazpar2; see the file LICENSE.  If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.
20  */
21
22 /** \file connection.h
23     \brief Z39.50 connection (low-level client)
24 */
25
26 #ifndef CONNECTION_H
27 #define CONNECTION_H
28
29 #include <yaz/proto.h>
30 #include "eventl.h"
31
32 struct client;
33 struct connection;
34 struct host;
35 struct session;
36
37 void connection_destroy(struct connection *co);
38 struct connection *connection_create(struct client *cl);
39 void connect_resolver_host(struct host *host);
40 int connection_send_apdu(struct connection *co, Z_APDU *a);
41 struct host *connection_get_host(struct connection *con);
42 void connection_set_authentication(struct connection *co, char *auth);
43 int connection_connect(struct connection *con);
44 struct connection *connection_get_available(struct connection *con_list,
45                                             struct session *se);
46 int connection_prep_connection(struct connection *co, struct session *se);
47 const char *connection_get_url(struct connection *co);
48 void connection_release(struct connection *co);
49
50 #endif
51
52 /*
53  * Local variables:
54  * c-basic-offset: 4
55  * indent-tabs-mode: nil
56  * End:
57  * vim: shiftwidth=4 tabstop=8 expandtab
58  */