X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz-z-assoc.h;h=88f167b14526dc89b6fe1493b8bba0be291bc16f;hb=b35b70078e2c4fb3af710cfc5b9319bfcc7073dd;hp=59b0b9f76ac4b18b9c46953fe53bd430f6005581;hpb=3109185a2036377894be1dd303d899a305b44281;p=yazpp-moved-to-github.git diff --git a/include/yaz-z-assoc.h b/include/yaz-z-assoc.h index 59b0b9f..88f167b 100644 --- a/include/yaz-z-assoc.h +++ b/include/yaz-z-assoc.h @@ -1,13 +1,15 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-z-assoc.h,v 1.2 1999-04-20 10:30:05 adam Exp $ + * $Id: yaz-z-assoc.h,v 1.9 2000-09-08 12:50:24 heikki Exp $ */ -#include -#include +#ifndef YAZ_Z_ASSOC_INCLUDED +#define YAZ_Z_ASSOC_INCLUDED + +#include +#include #include /** Z39.50 Assocation. @@ -23,11 +25,13 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { /// Receive PDU void recv_PDU(const char *buf, int len); /// Connect notification - void connectNotify(); + virtual void connectNotify() = 0; /// Failure notification - void failNotify(); + virtual void failNotify() = 0; /// Timeout notification - void timeoutNotify(); + virtual void timeoutNotify() = 0; + /// Timeout specify + void timeout(int timeout); /// Begin Z39.50 client role void client(const char *addr); /// Begin Z39.50 server role @@ -48,10 +52,32 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { ODR odr_encode (); ODR odr_decode (); ODR odr_print (); + + void set_APDU_log(const char *fname); + const char *get_APDU_log(); + /// OtherInformation + void get_otherInfoAPDU(Z_APDU *apdu, Z_OtherInformation ***oip); Z_OtherInformationUnit *update_otherInformation ( Z_OtherInformation **otherInformationP, int createFlag, - int *oid, int categoryValue); + int *oid, int categoryValue, int deleteFlag); + void set_otherInformationString ( + Z_OtherInformation **otherInformationP, + int *oid, int categoryValue, + const char *str); + void set_otherInformationString ( + Z_OtherInformation **otherInformation, + int oidval, int categoryValue, + const char *str); + void set_otherInformationString ( + Z_APDU *apdu, + int oidval, int categoryValue, + const char *str); + + Z_ReferenceId* getRefID(char* str); + + const char *get_hostname(); + private: static int yaz_init_flag; static int yaz_init_func(); @@ -59,4 +85,10 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { ODR m_odr_in; ODR m_odr_out; ODR m_odr_print; + int m_log; + FILE *m_APDU_file; + char *m_APDU_fname; + char *m_hostname; }; + +#endif \ No newline at end of file