X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=zlint%2Fzlint.h;h=73cb24887003e44a6a2bf47b40d9e2203d6ce331;hp=694e0e57818f2a9b2bec6b8744fc76c25c9f39fb;hb=d62e0baee8ee3cccced41746ef09fc3e01f401d5;hpb=40213edfa0408f88b008c3d1ee4a4f90dcdf2fb9 diff --git a/zlint/zlint.h b/zlint/zlint.h index 694e0e5..73cb248 100644 --- a/zlint/zlint.h +++ b/zlint/zlint.h @@ -1,24 +1,46 @@ -/* - * Copyright (c) 2004, Index Data. - * See the file LICENSE for details. - * - * $Id: zlint.h,v 1.1 2004-03-25 23:14:07 adam Exp $ +/* This file is part of the yazpp toolkit. + * Copyright (C) Index Data and Mike Taylor + * All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Index Data nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include + +using namespace yazpp_1; enum Zlint_code { TEST_FINISHED, TEST_CONTINUE, - TEST_REOPEN, + TEST_REOPEN }; class Zlint_test; class Zlint_t; -class Zlint : public Yaz_Z_Assoc { +class Zlint : public Z_Assoc { public: - Zlint(IYaz_PDU_Observable *the_PDU_Observable); + Zlint(IPDU_Observable *the_PDU_Observable); ~Zlint(); void add_test(Zlint_test *i); void set_host(const char *cp); @@ -35,9 +57,8 @@ private: void timeoutNotify(); void failNotify(); void recv_GDU(Z_GDU *apdu, int len); - IYaz_PDU_Observable *m_PDU_Observable; - IYaz_PDU_Observer *sessionNotify( - IYaz_PDU_Observable *the_PDU_Observable, int fd); + IPDU_Observable *m_PDU_Observable; + IPDU_Observer *sessionNotify(IPDU_Observable *the_PDU_Observable, int fd); Zlint_t *m_tests; Zlint_t *m_cur_test; char *m_host; @@ -50,6 +71,7 @@ public: virtual Zlint_code init(Zlint *z) = 0; virtual Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu) = 0; virtual Zlint_code recv_fail(Zlint *z, int reason) = 0; + virtual ~Zlint_test(); }; class Zlint_test_simple : public Zlint_test { @@ -150,3 +172,12 @@ public: Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu); Zlint_code recv_fail(Zlint *z, int reason); }; +/* + * Local variables: + * c-basic-offset: 4 + * c-file-style: "Stroustrup" + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +