From: Sebastian Hammer Date: Mon, 15 May 1995 11:55:54 +0000 (+0000) Subject: Work on asynchronous activity. X-Git-Tag: YAZ.1.8~1050 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=fed6a7e0b9f6c90dc49f0000de429b2aec7e43cb Work on asynchronous activity. --- diff --git a/include/odr.h b/include/odr.h index 300cfa2..fa59a53 100644 --- a/include/odr.h +++ b/include/odr.h @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: odr.h,v $ - * Revision 1.2 1995-04-18 08:14:37 quinn + * Revision 1.3 1995-05-15 11:55:54 quinn + * Work on asynchronous activity. + * + * Revision 1.2 1995/04/18 08:14:37 quinn * Added dynamic memory allocation on encoding * * Revision 1.1 1995/03/30 09:39:41 quinn @@ -142,6 +145,7 @@ typedef struct odr_constack } odr_constack; struct odr_memblock; /* defined in odr_mem.c */ +typedef struct odr_memblock *ODR_MEM; #define ODR_S_SET 0 #define ODR_S_CUR 1 @@ -216,9 +220,11 @@ void odr_setprint(ODR o, FILE *file); ODR odr_createmem(int direction); void odr_reset(ODR o); void odr_destroy(ODR o); -void odr_setbuf(ODR o, char *buf, int len); -char *odr_getbuf(ODR o, int *len); +void odr_setbuf(ODR o, char *buf, int len, int can_grow); +char *odr_getbuf(ODR o, int *len, int *size); void *odr_malloc(ODR o, int size); +ODR_MEM odr_extract_mem(ODR o); +void odr_release_mem(ODR_MEM p); #define odr_implicit(o, t, p, cl, tg, opt)\ (odr_implicit_settag((o), cl, tg), t ((o), (p), opt) ) @@ -280,6 +286,9 @@ void *odr_malloc(ODR o, int size); ) \ #define odr_tell(o) ((o)->ecb.pos) +#define odr_ok(o) (!(o)->ecb.error) + +#define ODR_MAXNAME 256 #include #include diff --git a/include/proto.h b/include/proto.h index c6757ed..8d43b04 100644 --- a/include/proto.h +++ b/include/proto.h @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: proto.h,v $ - * Revision 1.5 1995-04-17 11:28:18 quinn + * Revision 1.6 1995-05-15 11:55:55 quinn + * Work on asynchronous activity. + * + * Revision 1.5 1995/04/17 11:28:18 quinn * Smallish * * Revision 1.4 1995/04/10 10:22:47 quinn @@ -622,6 +625,9 @@ typedef struct Z_APDU Z_APDU_searchResponse, Z_APDU_presentRequest, Z_APDU_presentResponse, + Z_APDU_resourceControlRequest, + Z_APDU_resourceControlResponse, + Z_APDU_triggerResourceControlRequest, Z_APDU_scanRequest, Z_APDU_scanResponse } which; @@ -633,6 +639,9 @@ typedef struct Z_APDU Z_SearchResponse *searchResponse; Z_PresentRequest *presentRequest; Z_PresentResponse *presentResponse; + Z_ResourceControlRequest *resourceControlRequest; + Z_ResourceControlResponse *resourceControlResponse; + Z_TriggerResourceControlRequest *triggerResourceControlRequest; Z_ScanRequest *scanRequest; Z_ScanResponse *scanResponse; } u; diff --git a/include/statserv.h b/include/statserv.h index f9f27ff..f2bbfaa 100644 --- a/include/statserv.h +++ b/include/statserv.h @@ -1,6 +1,23 @@ #ifndef STATSERVER_H #define STATSERVER_H +#include + +typedef struct statserv_options_block +{ + int dynamic; /* fork on incoming requests */ + int loglevel; /* desired logging-level */ + char apdufile[ODR_MAXNAME+1]; /* file for pretty-printed PDUs */ + char logfile[ODR_MAXNAME+1]; /* file for diagnostic output */ + char default_listen[1024]; /* 0 == no default listen */ + enum oid_proto default_proto; /* PROTO_SR or PROTO_Z3950 */ + int idle_timeout; /* how many minutes to wait before closing */ + int maxrecordsize; /* maximum value for negotiation */ + char configname[ODR_MAXNAME+1]; /* given to the backend in bend_init */ +} statserv_options_block; + int statserv_main(int argc, char **argv); +statserv_options_block *statserv_getcontrol(void); +void statserv_setcontrol(statserv_options_block *block); #endif