MCS  0.3.3-alpha7
mcs_c.h
Go to the documentation of this file.
1 
2 
3 
4 
5 // ----------------------------------------------------------------------^
6 // Copyright (C) 2004, 2005, 2006, 2007, 2008 Giorgio Calderone
7 // (mailto: <gcalderone@ifc.inaf.it>)
8 //
9 // This file is part of MCS.
10 //
11 // MCS is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation; either version 2 of the License, or
14 // (at your option) any later version.
15 //
16 // MCS is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with MCS; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 //
25 // ----------------------------------------------------------------------$
26 
27 
28 
37 #ifndef DEF_MCS_C_H
38 #define DEF_MCS_C_H
39 
40 #ifndef DOXYGEN_SKIP
41 //The following are needed to avoid redefinition's warning
42 #undef PACKAGE_BUGREPORT
43 #undef PACKAGE_NAME
44 #undef PACKAGE_STRING
45 #undef PACKAGE_TARNAME
46 #undef PACKAGE_VERSION
47 
48 //The following is needed for ENABLE_MYSQL
49 #include "mcs_config.h"
50 #endif //DOXYGEN_SKIP
51 
52 #include "mcstypes.hh"
53 
54 
55 // ----------------------------------------------------------------------^
56 // Copyright (C) 2004, 2005, 2006, 2007, 2008 Giorgio Calderone
57 // (mailto: <gcalderone@ifc.inaf.it>)
58 //
59 // This file is part of MCS.
60 //
61 // MCS is free software; you can redistribute it and/or modify
62 // it under the terms of the GNU General Public License as published by
63 // the Free Software Foundation; either version 2 of the License, or
64 // (at your option) any later version.
65 //
66 // MCS is distributed in the hope that it will be useful,
67 // but WITHOUT ANY WARRANTY; without even the implied warranty of
68 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69 // GNU General Public License for more details.
70 //
71 // You should have received a copy of the GNU General Public License
72 // along with MCS; if not, write to the Free Software
73 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
74 //
75 // ----------------------------------------------------------------------$
76 
77 
78 /*
79  IFD - C/C++ to C Interface Descriptor
80  Giorgio Calderone - gcalderone@ifc.inaf.it
81 */
82 
83 
84 
85 
86 
87 //Object pointer type
88 #define IFD_OBJP void*
89 #define IFD_ERR_LEN 200
90 
91 
92 
93 
94 struct ifd_status {
95  int error;
96  char errormsg[200];
97  void* data;
98 };
99 
100 typedef struct ifd_status IFD_STATUS;
101 
102 //IFD routines
103 
104 //IFD_C_SIMPLE_WRAP(IFD_STATUS*, ifd_new_status , , );
105 //IFD_C_WRAP_VOID( ifd_del_status ,, );
106 char* ifd_last_error ();
107 int ifd_got_error ();
108 void ifd_reset_error ();
109 void* ifd_null ();
110 //IFD_C_WRAP_VOID( ifd_set_error , , ARG(char*, msg));
111 
112 
113 #ifdef IFD_EXTRA
114 #undef IFD_EXTRA
115 #endif
116 #define IFD_EXTRA
117 
118 
119 //--------------------------------------------------------------------
120 //Wrapper for Data class
121 
123 void* new_Data (void* dummy ,Types type ,unsigned short int maxLength ,short isunsigned);
124 
125 
127 void* copy_Data (void* obj);
128 
130 void del_Data (void* obj);
131 
133 char* Data_name (void* obj );
134 
135 //IFD_WRAP(unsigned int, Data, flags , This->flags() );
136 Types Data_type (void* obj );
137 unsigned short int Data_maxLength (void* obj );
138 unsigned short int Data_length (void* obj );
139 short Data_isUnsigned (void* obj );
140 short Data_isNull (void* obj );
141 int Data_ival (void* obj );
142 unsigned int Data_uival (void* obj );
143 long long int Data_lval (void* obj );
144 unsigned long long int Data_ulval (void* obj );
145 float Data_fval (void* obj );
146 double Data_dval (void* obj );
147 char* Data_sval (void* obj );
148 unsigned int Data_tval (void* obj );
149 
150 
151 //IFD_WRAP_VOID( Data, tsval , This->tval(t), ARG(struct tm*, t));
152 
153 void Data_setNull (void* obj );
154 
155 void Data_setival (void* obj ,int val);
156 void Data_setuival (void* obj ,unsigned int val);
157 
158 void Data_setlval (void* obj ,long long int val);
159 void Data_setulval (void* obj ,unsigned long long int val);
160 
161 void Data_setdval (void* obj ,double val);
162 
163 void Data_setsval (void* obj ,char* val);
164 
165 void Data_setblob (void* obj ,void* lbuf ,unsigned int size);
166 
167 
168 //IFD_WRAP_VOID( Data, settmstrval, This->settimeval(val),
169 // ARG(struct tm*, val));
170 
171 void Data_settimeval (void* obj ,unsigned int val);
172 
173 //IFD_WRAP_VOID( Data, parseTime , This->parseTime(s, ts),
174 // ARG(char*, s) ARG(struct tm*, ts));
175 
176 char* Data_print (void* obj );
177 
178 void Data_setTag (void* obj ,short tag);
179 
180 short Data_getTag (void* obj );
181 
182 
183 
184 
185 
186 
187 //--------------------------------------------------------------------
188 //Wrapper for Record class
189 void* new_Record (void* dummy );
190 
191 void del_Record (void* obj);
192 
193 void Record_clear (void* obj );
194 unsigned int Record_count (void* obj );
195 
196 void Record_addField (void* obj ,void* d);
197 
198 
199 void* Record_pop (void* obj ,int x);
200 
201 void* Record_field (void* obj ,int x);
202 
203 int Record_posWhoseNameIs (void* obj ,char* name);
204 
205 void Record_setFieldMap (void* obj ,char* s);
206 
207 
208 
209 
210 //--------------------------------------------------------------------
211 //Wrapper for RecordSet class
212 short RecordSet_setFirst (void* obj );
213 short RecordSet_setLast (void* obj );
214 short RecordSet_setNext (void* obj );
215 short RecordSet_setPrev (void* obj );
216 short RecordSet_setWhereS (void* obj ,unsigned int field ,char* where);
217 
218 
219 short RecordSet_setWhereI (void* obj ,unsigned int field ,int where);
220 
221 
222 short RecordSet_setPos (void* obj ,unsigned int newpos);
223 
224 void RecordSet_dump (void* obj ,char* fn);
225 
226 short RecordSet_know_nRows (void* obj );
227 short RecordSet_eof (void* obj );
228 short RecordSet_alwaysSameStructure (void* obj );
229 
230 unsigned int RecordSet_nRows (void* obj );
231 unsigned int RecordSet_nFields (void* obj );
232 unsigned int RecordSet_pos (void* obj );
233 void* RecordSet_rec (void* obj );
234 void* RecordSet_metarec (void* obj );
235 
236 
237 
238 
239 
240 
241 //--------------------------------------------------------------------
242 //Wrapper for DBConn, Query, Table classes
243 
244 #if ENABLE_MYSQL
245 void* new_DBConn (void* dummy );
246 
247 void del_DBConn (void* obj);
248 
249 void DBConn_connect (void* obj ,char* user ,char* pass ,char* db ,char* host);
250 
251 
252 
253 
254 
255 void DBConn_close (void* obj );
256 short DBConn_isOpen (void* obj );
257 void* DBConn_newDBConn (void* obj );
258 
259 
260 
261 
262 
263 void* new_Query (void* dummy ,void* lconn ,short handleNewDBConn);
264 
265 
266 
267 void del_Query (void* obj);
268 
269 
270 void Query_query (void* obj ,char* query ,short StoreResult);
271 
272 
273 void Query_prepare (void* obj ,char* query);
274 
275 
276 void Query_prepare_with_parameters (void* obj ,int op ,char* fields ,char* table ,char* where);
277 
278 
279 
280 
281 
282 unsigned int Query_nAffectedRows (void* obj );
283 
284 void* Query_param (void* obj );
285 
286 void* Query_lookup (void* obj ,char* field ,char* table ,char* where);
287 
288 
289 //IFD_WRAP(short, Query, resultRows, This->resultRows());
290 
291 short Query_gotRecordSet (void* obj );
292 
293 void Query_execute (void* obj ,short StoreResult);
294 
295 
296 
297 void Query_close (void* obj );
298 
299 
300 
301 
302 
303 
304 #undef IFD_EXTRA
305 #define IFD_EXTRA DBConn* conn = (DBConn*) lconn;
306 void* new_Table (void* dummy ,void* lconn ,char* table ,char* fieldkey);
307 
308 #undef IFD_EXTRA
309 #define IFD_EXTRA
310 
311 void del_Table (void* obj);
312 
313 void Table_loadTable (void* obj );
314 
315 void* Table_newRec (void* obj );
316 
317 void Table_insert (void* obj );
318 void Table_update (void* obj );
319 #endif //ENABLE_MYSQL
320 
321 
322 
323 
324 //--------------------------------------------------------------------
325 //Wrapper for Client class
326 void* new_Client (void* dummy ,char* path ,char* server ,int port ,int ssl ,unsigned int timeout);
327 
328 
329 
330 void del_Client (void* obj);
331 
332 short Client_login (void* obj ,char* user ,char* pass ,char* db);
333 
334 
335 short Client_exec (void* obj ,char* cmd ,void* data);
336 
337 
338 
339 
340 void* Client_code (void* obj );
341 
342 void* Client_msg (void* obj );
343 
344 void* Client_out (void* obj );
345 
346 void* Client_recv (void* obj );
347 
348 void* Client_aux (void* obj );
349 
350 
351 
352 
353 
354 //--------------------------------------------------------------------
355 //Wrapper Conf class
356 void* new_Conf (void* dummy ,char* filename);
357 
358 void del_Conf (void* obj);
359 
360 char* Conf_sval (void* obj ,char* section ,char* key);
361 
362 
363 
364 int Conf_ival (void* obj ,char* section ,char* key);
365 
366 
367 
368 
369 
370 
371 #endif // DEF_MCS_C_H
char * Data_name(void *obj)
Wrapper to Data::name.
Definition: mcs_c.cc:213

mcslogo

MCS (My Customizable Server) ver. 0.3.3-alpha7
Documentation generated on Mon May 28 07:39:41 UTC 2018