2 * Copyright (c) 2004-2005, Index Data.
3 * See the file LICENSE for details.
5 * $Id: zlint.h,v 1.6 2005-09-23 13:11:04 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;
54 virtual ~Zlint_test();
57 class Zlint_test_simple : public Zlint_test {
59 virtual Zlint_code init(Zlint *z) = 0;
60 virtual Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu) = 0;
61 virtual Zlint_code recv_fail(Zlint *z, int reason);
64 class Zlint_test_init_01 : public Zlint_test_simple {
67 virtual ~Zlint_test_init_01();
68 Zlint_code init(Zlint *z);
69 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
72 class Zlint_test_init_02 : public Zlint_test_simple {
75 virtual ~Zlint_test_init_02();
76 Zlint_code init(Zlint *z);
77 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
80 class Zlint_test_init_03 : public Zlint_test_simple {
83 virtual ~Zlint_test_init_03();
84 Zlint_code init(Zlint *z);
85 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
88 class Zlint_test_init_04 : public Zlint_test_simple {
91 virtual ~Zlint_test_init_04();
92 Zlint_code init(Zlint *z);
93 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
96 class Zlint_test_init_05 : public Zlint_test_simple {
97 int m_init_response_no;
100 virtual ~Zlint_test_init_05();
101 Zlint_code init(Zlint *z);
102 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
105 class Zlint_test_init_06 : public Zlint_test_simple {
107 Zlint_test_init_06();
108 virtual ~Zlint_test_init_06();
109 Zlint_code init(Zlint *z);
110 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
113 class Zlint_test_init_07 : public Zlint_test_simple {
115 Zlint_test_init_07();
116 virtual ~Zlint_test_init_07();
117 Zlint_code init(Zlint *z);
118 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
121 class Zlint_test_init_08 : public Zlint_test {
124 Zlint_test_init_08();
125 virtual ~Zlint_test_init_08();
126 Zlint_code init(Zlint *z);
127 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
128 Zlint_code recv_fail(Zlint *z, int reason);
131 class Zlint_test_search_01 : public Zlint_test {
133 int m_got_result_set;
134 int m_record_syntax_no;
136 Zlint_code sendTest(Zlint *z);
138 Zlint_test_search_01();
139 virtual ~Zlint_test_search_01();
140 Zlint_code init(Zlint *z);
141 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
142 Zlint_code recv_fail(Zlint *z, int reason);
145 class Zlint_test_scan_01 : public Zlint_test {
147 Zlint_code sendTest(Zlint *z);
149 Zlint_test_scan_01();
150 virtual ~Zlint_test_scan_01();
151 Zlint_code init(Zlint *z);
152 Zlint_code recv_gdu(Zlint *z, Z_GDU *gdu);
153 Zlint_code recv_fail(Zlint *z, int reason);
158 * indent-tabs-mode: nil
160 * vim: shiftwidth=4 tabstop=8 expandtab