X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fz-assoc.h;h=d9229a06c9b2cfb2f543e9ea98db3ce908913ea0;hb=6196cb9e06a6cc83892e1ad16daa1fb921111e28;hp=49b8a68de0d48a61b393426b10d6e45e07747687;hpb=1cf760aa1600199b8a9acb4ccaded655f6903d62;p=yazpp-moved-to-github.git diff --git a/include/yaz++/z-assoc.h b/include/yaz++/z-assoc.h index 49b8a68..d9229a0 100644 --- a/include/yaz++/z-assoc.h +++ b/include/yaz++/z-assoc.h @@ -1,27 +1,29 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: z-assoc.h,v 1.5 2003-10-23 11:45:08 adam Exp $ + * $Id: z-assoc.h,v 1.9 2005-06-21 17:37:15 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. */ -class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { +class YAZ_EXPORT Z_Assoc : public IPDU_Observer { public: /// Create object using the PDU Observer specified - Yaz_Z_Assoc(IYaz_PDU_Observable *the_PDU_Observable); + Z_Assoc(IPDU_Observable *the_PDU_Observable); /// Destroy assocation and close PDU Observer - virtual ~Yaz_Z_Assoc(); + virtual ~Z_Assoc(); /// Receive PDU void recv_PDU(const char *buf, int len); /// Connect notification @@ -39,13 +41,14 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { /// 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 @@ -85,7 +88,7 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { private: static int yaz_init_flag; static int yaz_init_func(); - IYaz_PDU_Observable *m_PDU_Observable; + IPDU_Observable *m_PDU_Observable; ODR m_odr_in; ODR m_odr_out; ODR m_odr_print; @@ -95,5 +98,6 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer { char *m_hostname; int m_APDU_yazlog; }; +}; #endif