2 * Copyright (c) 2004, Index Data.
3 * See the file LICENSE for details.
5 * $Id: zlint.h,v 1.4 2005-06-25 15:53:21 adam Exp $
8 #include <yaz++/z-assoc.h>
10 using namespace yazpp_1;
21 class Zlint : public Z_Assoc {
23 Zlint(IPDU_Observable *the_PDU_Observable);
25 void add_test(Zlint_test *i);
26 void set_host(const char *cp);
27 int initResponseGetVersion(Z_InitResponse *init);
28 Z_ReferenceId *mk_refid(const char *buf, int len);
29 void msg_check_for(const char *fmt, ...);
31 void msg_check_fail(const char *fmt, ...);
32 void msg_check_info(const char *fmt, ...);
33 void msg_check_notapp();
34 void getDatabase(char ***db, int *num);
39 void recv_GDU(Z_GDU *apdu, int len);
40 IPDU_Observable *m_PDU_Observable;
41 IPDU_Observer *sessionNotify(IPDU_Observable *the_PDU_Observable, int fd);
46 void close_goto_next();
51 virtual Zlint_code init(Zlint *z) = 0;
52 virtual Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu) = 0;
53 virtual Zlint_code recv_fail(Zlint *z, int reason) = 0;
56 class Zlint_test_simple : public Zlint_test {
58 virtual Zlint_code init(Zlint *z) = 0;
59 virtual Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu) = 0;
60 virtual Zlint_code recv_fail(Zlint *z, int reason);
63 class Zlint_test_init_01 : public Zlint_test_simple {
66 virtual ~Zlint_test_init_01();
67 Zlint_code init(Zlint *z);
68 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
71 class Zlint_test_init_02 : public Zlint_test_simple {
74 virtual ~Zlint_test_init_02();
75 Zlint_code init(Zlint *z);
76 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
79 class Zlint_test_init_03 : public Zlint_test_simple {
82 virtual ~Zlint_test_init_03();
83 Zlint_code init(Zlint *z);
84 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
87 class Zlint_test_init_04 : public Zlint_test_simple {
90 virtual ~Zlint_test_init_04();
91 Zlint_code init(Zlint *z);
92 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
95 class Zlint_test_init_05 : public Zlint_test_simple {
96 int m_init_response_no;
99 virtual ~Zlint_test_init_05();
100 Zlint_code init(Zlint *z);
101 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
104 class Zlint_test_init_06 : public Zlint_test_simple {
106 Zlint_test_init_06();
107 virtual ~Zlint_test_init_06();
108 Zlint_code init(Zlint *z);
109 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
112 class Zlint_test_init_07 : public Zlint_test_simple {
114 Zlint_test_init_07();
115 virtual ~Zlint_test_init_07();
116 Zlint_code init(Zlint *z);
117 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
120 class Zlint_test_init_08 : public Zlint_test {
123 Zlint_test_init_08();
124 virtual ~Zlint_test_init_08();
125 Zlint_code init(Zlint *z);
126 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
127 Zlint_code recv_fail(Zlint *z, int reason);
130 class Zlint_test_search_01 : public Zlint_test {
132 int m_got_result_set;
133 int m_record_syntax_no;
135 Zlint_code sendTest(Zlint *z);
137 Zlint_test_search_01();
138 virtual ~Zlint_test_search_01();
139 Zlint_code init(Zlint *z);
140 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
141 Zlint_code recv_fail(Zlint *z, int reason);
144 class Zlint_test_scan_01 : public Zlint_test {
146 Zlint_code sendTest(Zlint *z);
148 Zlint_test_scan_01();
149 virtual ~Zlint_test_scan_01();
150 Zlint_code init(Zlint *z);
151 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
152 Zlint_code recv_fail(Zlint *z, int reason);
157 * indent-tabs-mode: nil
159 * vim: shiftwidth=4 tabstop=8 expandtab