Added dynamic server functionality.
[yaz-moved-to-github.git] / server / session.h
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: session.h,v $
7  * Revision 1.2  1995-03-27 08:34:29  quinn
8  * Added dynamic server functionality.
9  * Released bindings to session.c (is now redundant)
10  *
11  * Revision 1.1  1995/03/14  10:28:02  quinn
12  * More work on demo server.
13  *
14  *
15  */
16
17 #ifndef SESSION_H
18 #define SESSION_H
19
20 #include <comstack.h>
21 #include <odr.h>
22 #include <oid.h>
23
24 typedef struct association
25 {
26     /* comms-related handles */
27     IOCHAN client_chan;
28     COMSTACK client_link;
29     ODR decode;
30     ODR encode;
31     char *encode_buffer;
32     int encoded_len;
33     char *input_buffer;
34     int input_buffer_len;
35     int input_apdu_len;
36     int state;
37     oid_proto proto;
38 #define ASSOC_UNINIT       0
39 #define ASSOC_IDLE         1
40
41     /* session parameters */
42     int preferredMessageSize;
43     int maximumRecordSize;
44 } association;
45
46 association *create_association(IOCHAN channel, COMSTACK link);
47 void destroy_association(association *h);
48 void ir_session(IOCHAN h, int event);
49
50 #endif