X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fz-assoc.h;h=f025945e5f2296a66398f30c31a3388783b8c54b;hb=86726b00b052694e65b036c262f5fe9096554175;hp=13f57feff3a998aff9c12fb12c40995080817ed9;hpb=7fc0fddcb85cd64461c7b3dd3e68791eb88b40be;p=yazpp-moved-to-github.git diff --git a/include/yaz++/z-assoc.h b/include/yaz++/z-assoc.h index 13f57fe..f025945 100644 --- a/include/yaz++/z-assoc.h +++ b/include/yaz++/z-assoc.h @@ -2,16 +2,18 @@ * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. * - * $Id: z-assoc.h,v 1.3 2003-10-10 12:37:26 adam Exp $ + * $Id: z-assoc.h,v 1.7 2005-06-02 06:40:21 adam Exp $ */ #ifndef YAZ_Z_ASSOC_INCLUDED #define YAZ_Z_ASSOC_INCLUDED +#include #include #include #include +namespace yazpp_1 { /** Z39.50 Assocation. This object implements the client - and server role of a generic Z39.50 Association. @@ -35,17 +37,18 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { /// Begin Z39.50 client role int client(const char *addr); /// Begin Z39.50 server role - void server(const char *addr); + int server(const char *addr); /// Close connection void close(); /// Decode Z39.50 PDU. - Z_APDU *decode_Z_PDU(const char *buf, int len); + Z_GDU *decode_GDU(const char *buf, int len); /// Encode Z39.50 PDU. - int encode_Z_PDU(Z_APDU *apdu, char **buf, int *len); + int encode_GDU(Z_GDU *apdu, char **buf, int *len); /// Send Z39.50 PDU int send_Z_PDU(Z_APDU *apdu, int *len); + int send_GDU(Z_GDU *apdu, int *len); /// Receive Z39.50 PDU - virtual void recv_Z_PDU(Z_APDU *apdu, int len) = 0; + virtual void recv_GDU(Z_GDU *apdu, int len) = 0; /// Create Z39.50 PDU with reasonable defaults Z_APDU *create_Z_PDU(int type); /// Request Alloc @@ -80,6 +83,8 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { const char *get_hostname(); + int set_APDU_yazlog(int v); + private: static int yaz_init_flag; static int yaz_init_func(); @@ -91,6 +96,8 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { FILE *m_APDU_file; char *m_APDU_fname; char *m_hostname; + int m_APDU_yazlog; +}; }; #endif