0ab672a8595a5ade49a3c3c22dd69841fd97aa57
[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.4  1995-04-10 10:23:39  quinn
8  * Some work to add scan and other things.
9  *
10  * Revision 1.3  1995/03/30  09:09:27  quinn
11  * Added state-handle and some support for asynchronous activities.
12  *
13  * Revision 1.2  1995/03/27  08:34:29  quinn
14  * Added dynamic server functionality.
15  * Released bindings to session.c (is now redundant)
16  *
17  * Revision 1.1  1995/03/14  10:28:02  quinn
18  * More work on demo server.
19  *
20  *
21  */
22
23 #ifndef SESSION_H
24 #define SESSION_H
25
26 #include <comstack.h>
27 #include <odr.h>
28 #include <oid.h>
29
30 typedef struct association
31 {
32     /* comms-related handles */
33     IOCHAN client_chan;
34     COMSTACK client_link;
35     ODR decode;
36     ODR encode;
37     ODR print;
38     char *encode_buffer;
39     int encoded_len;
40     char *input_buffer;
41     int input_buffer_len;
42     int input_apdu_len;
43     int state;
44     oid_proto proto;
45     void *backend;
46 #define ASSOC_UNINIT       0
47 #define ASSOC_IDLE         1
48
49     /* session parameters */
50     int preferredMessageSize;
51     int maximumRecordSize;
52 } association;
53
54 association *create_association(IOCHAN channel, COMSTACK link);
55 void destroy_association(association *h);
56 void ir_session(IOCHAN h, int event);
57
58 #endif