1 /* @include ajtextread ********************************************************
2 **
3 ** AJAX text data reading functions
4 **
5 ** These functions control all aspects of AJAX text data reading
6 **
7 ** @author Copyright (C) 2010 Peter Rice
8 ** @version $Revision: 1.14 $
9 ** @modified Oct 5 pmr First version
10 ** @modified $Date: 2013/07/15 20:55:34 $ by $Author: rice $
11 ** @@
12 **
13 ** This library is free software; you can redistribute it and/or
14 ** modify it under the terms of the GNU Lesser General Public
15 ** License as published by the Free Software Foundation; either
16 ** version 2.1 of the License, or (at your option) any later version.
17 **
18 ** This library is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 ** Lesser General Public License for more details.
22 **
23 ** You should have received a copy of the GNU Lesser General Public
24 ** License along with this library; if not, write to the Free Software
25 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 ** MA  02110-1301,  USA.
27 **
28 ******************************************************************************/
29 
30 #ifndef AJTEXTREAD_H
31 #define AJTEXTREAD_H
32 
33 /* ========================================================================= */
34 /* ============================= include files ============================= */
35 /* ========================================================================= */
36 
37 #include "ajdefine.h"
38 #include "ajtextdata.h"
39 
40 AJ_BEGIN_DECLS
41 
42 
43 
44 
45 /* ========================================================================= */
46 /* =============================== constants =============================== */
47 /* ========================================================================= */
48 
49 
50 
51 
52 /* ========================================================================= */
53 /* ============================== public data ============================== */
54 /* ========================================================================= */
55 
56 extern AjPTable textDbMethods;
57 
58 
59 
60 
61 /* ========================================================================= */
62 /* =========================== public functions ============================ */
63 /* ========================================================================= */
64 
65 
66 
67 
68 /*
69 ** Prototype definitions
70 */
71 
72 AjPTextin    ajTextinNew(void);
73 AjPTextin    ajTextinNewDatatype(const AjEDataType datatype);
74 void         ajTextinDel(AjPTextin* pthis);
75 void         ajTextinDelNofile(AjPTextin* pthis);
76 void         ajTextinClear(AjPTextin thys);
77 void         ajTextinClearNewfile(AjPTextin thys);
78 void         ajTextinClearNewinput(AjPTextin thys);
79 void         ajTextinClearNofile(AjPTextin thys);
80 ajuint       ajTextinGetCount(const AjPTextin thys);
81 ajlong       ajTextinGetFpos(const AjPTextin thys);
82 const AjPStr ajTextinGetQryS(const AjPTextin thys);
83 ajuint       ajTextinGetRecords(const AjPTextin thys);
84 ajuint       ajTextinGetTotrecords(const AjPTextin thys);
85 void         ajTextinQryC(AjPTextin thys, const char* txt);
86 void         ajTextinQryS(AjPTextin thys, const AjPStr str);
87 void         ajTextinStoreClear(AjPTextin thys,
88                            ajint lines, const AjPStr rdline,
89                            AjPStr *astr);
90 AjBool       ajTextinStoreReadline(AjPTextin thys,
91                                    AjPStr* pdest, AjPStr *astr);
92 void         ajTextinStoreReset(AjPTextin thys, AjPStr *astr);
93 void         ajTextinTrace(const AjPTextin thys);
94 const char*  ajTextinTypeGetFields(void);
95 const char*  ajTextinTypeGetQlinks(void);
96 
97 AjPTable     ajTextaccessGetDb(void);
98 const char*  ajTextaccessMethodGetQlinks(const AjPStr method);
99 ajuint       ajTextaccessMethodGetScope(const AjPStr method);
100 AjBool       ajTextaccessMethodTest(const AjPStr method);
101 
102 AjBool       ajTextinAccessAsis(AjPTextin textin);
103 AjBool       ajTextinAccessFile(AjPTextin textin);
104 AjBool       ajTextinAccessFtp(AjPTextin textin);
105 AjBool       ajTextinAccessHttp(AjPTextin textin);
106 AjBool       ajTextinAccessOffset(AjPTextin textin);
107 AjBool       ajTextinformatTerm(const AjPStr term);
108 AjBool       ajTextinformatTest(const AjPStr format);
109 AjBool       ajTextinRead(AjPTextin textin, AjPText text);
110 
111 void         ajTextinprintBook(AjPFile outf);
112 void         ajTextinprintHtml(AjPFile outf);
113 void         ajTextinprintText(AjPFile outf, AjBool full);
114 void         ajTextinprintWiki(AjPFile outf);
115 
116 AjBool       ajTextallNext(AjPTextall thys, AjPText *Ptext);
117 
118 void         ajTextallClear(AjPTextall thys);
119 void         ajTextallDel(AjPTextall* pthis);
120 AjPTextall   ajTextallNew(void);
121 
122 void         ajTextinExit(void);
123 
124 /*
125 ** End of prototype definitions
126 */
127 
128 
129 
130 
131 AJ_END_DECLS
132 
133 #endif /* !AJTEXTREAD_H */
134