summaryrefslogtreecommitdiff
path: root/include/qntan/Qntan.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qntan/Qntan.h')
-rw-r--r--include/qntan/Qntan.h420
1 files changed, 394 insertions, 26 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h
index d069558..db84e83 100644
--- a/include/qntan/Qntan.h
+++ b/include/qntan/Qntan.h
@@ -19,8 +19,8 @@
#endif
-#ifdef Qntan_USERCONFIG
-Qntan_USERCONFIG
+#if !defined(Qntan_USERCONFIG) || Qntan_USERCONFIG != 0
+# include "qntan_userconfig.h"
#endif
#include <stddef.h> /* size_t */
@@ -41,8 +41,15 @@ extern "C" {
/*
* "Cls" aka "Closure". The userdata type to pass around for callbacks etc. */
-#define Qntan_Cls uintptr_t
-#define QNTAN_CLS(OBJ) ((Qntan_Cls)OBJ)
+#ifndef Qntan_Cls
+# define Qntan_Cls uintptr_t
+#else
+STATIC_ASSERT(sizeof Qntan_Cls >= sizeof uintptr_t);
+#endif
+/**/
+#ifndef QNTAN_CLS
+# define QNTAN_CLS(OBJ) ((Qntan_Cls)OBJ)
+#endif
@@ -53,25 +60,27 @@ extern "C" {
-/* data fwd decls */
struct Qntan_EvLoop;
struct Qntan_Mallocator;
struct Qntan_MemArena;
struct Qntan_Executor;
struct Qntan_Scheduler;
struct Qntan_Logger;
+struct Qntan_LoggerFactory;
struct Qntan_IoMux;
struct Qntan_File;
+struct Qntan_FileSystem_Dirent;
struct Qntan_FileSystem;
struct Qntan_FourierTransform;
struct Qntan_Process;
+struct Qntan_HshIdx;
struct Qntan_HshTbl;
struct Qntan_HshTbl_Cursor;
struct Qntan_Socket;
-struct Qntan_TarEnc;
struct Qntan_TarEnc_Hdr;
-struct Qntan_TarDec;
+struct Qntan_TarEnc;
struct Qntan_TarDec_Hdr;
+struct Qntan_TarDec;
struct Qntan_Cond;
struct Qntan_Mutx;
struct Qntan_Networker;
@@ -79,23 +88,28 @@ struct Qntan_CsvDec;
struct Qntan_CsvDec_Mentor;
struct Qntan_CsvIStream;
struct Qntan_CsvIStream_Mentor;
+struct Qntan_CsvEnc;
struct Qntan_JsonEnc;
struct Qntan_JsonDec;
struct Qntan_JsonDec_Mentor;
-struct Qntan_JsonTreeDec;
struct Qntan_JsonTreeDec_JsonNode;
+struct Qntan_JsonTreeDec;
struct Qntan_XmlDec;
struct Qntan_XmlDec_Mentor;
-struct Qntan_HttpClient;
-struct Qntan_HttpClient_Exchg;
struct Qntan_HttpClient_Exchg_Opts;
+struct Qntan_HttpClient_Exchg;
+struct Qntan_HttpClient;
+struct Qntan_GfxVtx2d;
+struct Qntan_GfxVtx4d;
+struct Qntan_GfxVtx2dColor;
+struct Qntan_GfxMtx4d;
struct Qntan_GfxRenderer;
struct Qntan_JavaBytecodeParser;
struct Qntan_JavaBytecodeParser_Mentor;
struct Qntan_CamtAccount;
struct Qntan_CamtTransaction;
-struct Qntan_CamtDec;
struct Qntan_CamtDec_Mentor;
+struct Qntan_CamtDec;
@@ -305,7 +319,11 @@ struct Qntan_Scheduler {
# define Qntan_Logger_isDebugOn(A) ((A) && (*(A))->isDebugOn(A))
#endif
#ifndef Qntan_Logger_isTraceOn
-# define Qntan_Logger_isTraceOn(A) ((A) && (*(A))->isTraceOn(A))
+# if !NDEBUG
+# define Qntan_Logger_isTraceOn(A) ((A) && (*(A))->isTraceOn(A))
+# else
+# define Qntan_Logger_isTraceOn(A) 0
+# endif
#endif
struct Qntan_Logger {
@@ -353,6 +371,53 @@ struct Qntan_Logger {
+#ifndef Qntan_LoggerFactory_getLogger
+# define Qntan_LoggerFactory_getLogger(A, B) (*A)->getLogger(A, B)
+#endif
+
+struct Qntan_LoggerFactory {
+ /* TODO: Clarify resource responsibilities: For how long is the
+ * returned logger valid? What happens if called twice? How to
+ * `unref()` a logger we got? ...
+ */
+ struct Qntan_Logger**(*getLogger)( struct Qntan_LoggerFactory**, char const*name );
+ /* A ZERO-TERMINATED identifier identifying the requested logger.
+ * Usually this should be an unique, short, printable name. Eg
+ * "LibFoo/ItemProcessor", "LibBar/CustomerService" or whatever.
+ * This is solely an indicator for the implementation so it can
+ * categorize/group/manage loggers. An impl may also decide to just
+ * completely ignore the given hint.
+ */
+};
+
+
+
+
+
+
+
+
+
+
+#ifndef Qntan_IoMux_read
+# define Qntan_IoMux_read(A, B, C, D, E, F, G) (*A)->read(A, B, C, D, E, F, G)
+#endif
+#ifndef Qntan_IoMux_write
+# define Qntan_IoMux_write(A, B, C, D, E, F, G) (*A)->write(A, B, C, D, E, F, G)
+#endif
+#ifndef Qntan_IoMux_flush
+# define Qntan_IoMux_flush(A, B, C, D) (*A)->flush(A, B, C, D)
+#endif
+#ifndef Qntan_IoMux_send
+# define Qntan_IoMux_send(A, B, C, D, E, F, G) (*A)->send(A, B, C, D, E, F, G)
+#endif
+#ifndef Qntan_IoMux_recv
+# define Qntan_IoMux_recv(A, B, C, D, E, F, G) (*A)->recv(A, B, C, D, E, F, G)
+#endif
+#ifndef Qntan_IoMux_accept
+# define Qntan_IoMux_accept(A, B, C, D, E) (*A)->accept(A, B, C, D, E)
+#endif
+
struct Qntan_IoMux {
/* An IO Multiplexer.
*
@@ -480,6 +545,25 @@ struct Qntan_IoMux {
+#ifndef Qntan_File_flush
+# define Qntan_File_flush(A, B, C) (*A)->flush(A, B, C)
+#endif
+#ifndef Qntan_File_write
+# define Qntan_File_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+#ifndef Qntan_File_read
+# define Qntan_File_read(A, B, C, D, E, F) (*A)->read(A, B, C, D, E, F)
+#endif
+#ifndef Qntan_File_seek
+# define Qntan_File_seek(A, B, C, D, E) (*A)->seek(A, B, C, D, E)
+#endif
+#ifndef Qntan_File_tell
+# define Qntan_File_tell(A, B, C) (*A)->tell(A, B, C)
+#endif
+#ifndef Qntan_File_truncate
+# define Qntan_File_truncate(A, B, C, D) (*A)->truncate(A, B, C, D)
+#endif
+
struct Qntan_File {
/**/
void (*flush)(
@@ -546,6 +630,9 @@ struct Qntan_File {
#ifndef Qntan_FileSystem_mkdir
# define Qntan_FileSystem_mkdir(A, B, C, D, E) (*A)->mkdir(A, B, C, D, E)
#endif
+#ifndef Qntan_FileSystem_mkdirs
+# define Qntan_FileSystem_mkdirs(A, B, C, D, E) (*A)->mkdirs(A, B, C, D, E)
+#endif
#ifndef Qntan_FileSystem_unlink
# define Qntan_FileSystem_unlink(A, B, C, D) (*A)->unlink(A, B, C, D)
#endif
@@ -585,6 +672,10 @@ struct Qntan_FileSystem {
* "https://pubs.opengroup.org/onlinepubs/009696799/functions/mkdir.html"
* just using an async API.
*/
+ void (*mkdirs)( struct Qntan_FileSystem**, char const*path, uint32_t mode,
+ void(*onDone)(int, Qntan_Cls), Qntan_Cls );
+ /* Same idea as `mkdir` but creates all missing parent dirs too.
+ */
// void (*rmdir)( struct Qntan_FileSystem**, const char*path,
// void(*onDone)(int, Qntan_Cls), Qntan_Cls );
// /**/
@@ -657,15 +748,21 @@ struct Qntan_FileSystem {
#ifndef Qntan_FourierTransform_transform
-# define Qntan_FourierTransform_transform(A, B, C, D) (*A)->transform(A, B, C, D)
+# define Qntan_FourierTransform_transform(A, B, C, D, E, F) (*A)->transform(A, B, C, D, E, F)
#endif
struct Qntan_FourierTransform {
/**/
- int (*transform)( struct Qntan_FourierTransform**, float*samples, size_t samples_cnt, float*output );
+ void (*transform)( struct Qntan_FourierTransform**, float*samples, size_t samples_cnt, float*output,
+ void(*onDone)(int err,float*out,Qntan_Cls), Qntan_Cls );
/* WARN: There may be implementations producing odd results if
* 'samples' and 'output' overlap.
- * @return negative values on erorr. Zero on success.
+ * `samples`: Input data to process.
+ * `output`: An array, at least as large as `samples` where the result
+ * will be written to.
+ * `onDone` called when action is done.
+ * `err` negative values on erorr. Zero on success.
+ * `out` just the same reference given in `output`, for convencience reasons.
*/
};
@@ -727,6 +824,54 @@ struct Qntan_Process {
+struct Qntan_HshIdx {
+ /* An n-dimensional HashTable. Where as many properties as wanted
+ * can be used to index into the table.
+ * BUT: ONLY the 1st index is considered to be unique (for
+ * consistency reasons, only ONE index can be used to decide if an
+ * object already exists for exmaple. Allowing multiple would cause
+ * conflicts as soon indexes disagree in such a case).
+ *
+ * WARN: This API is subject to change. Especially because it does
+ * not yet handle the case that a query potentially could return
+ * SEVERAL results. Just imagine a HshIdx of contacts, where several
+ * contacts could have the same name.
+ */
+ size_t (*getCnt)( struct Qntan_HshIdx** );
+ /* Returns number of objects currently present in this collection.
+ */
+ int (*addIfNew)( struct Qntan_HshIdx**, void*elm, int idx );
+ /* Returns 0 if 'elm' got copied into the hashtable.
+ * Returns '-EEXIST' (yep, negated) if 'elm' already exists. Nothing got
+ * copied anywhere.
+ * Returns negative values to indicate errors.
+ */
+ int (*get)( struct Qntan_HshIdx**, void*srch, void*ptrToDst, int idx );
+ /* Returns 0 if there's no object matching 'srch'.
+ * Returns 1 if found object got copied to 'ptrToDst'. The element itelf
+ * will swill be present in the table.
+ *
+ * TODO: As we support multi-dimmensional indexing, there is the
+ * possibility of `get()` to return SEVERAL items for certain other
+ * indexes. no?
+ */
+ int (*swap)( struct Qntan_HshIdx**, void*elm, void*ptrToDst, int idx );
+ /* Returns 0 if 'elm' got copied into the hashtable.
+ * Returns 1 is similar to 'Return 0'. BUT: a matching element did already
+ * exist and this old element now got swapped into 'ptrToDst'.
+ * Returns negative values to indicate errors.
+ */
+};
+
+
+
+
+
+
+
+
+
+
struct Qntan_HshTbl {
/**/
int (*swap)( struct Qntan_HshTbl**, void*elm, void*ptrToDst );
@@ -840,6 +985,16 @@ struct Qntan_Socket {
+#ifndef Qntan_TarEnc_nextEntry
+# define Qntan_TarEnc_nextEntry(A, B, C, D) (*A)->nextEntry(A, B, C, D)
+#endif
+#ifndef Qntan_TarEnc_write
+# define Qntan_TarEnc_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+#ifndef Qntan_TarEnc_getLastErrorStr
+# define Qntan_TarEnc_getLastErrorStr(A) (*A)->getLastErrorStr(A)
+#endif
+
struct Qntan_TarEnc_Hdr {
char const*path; int path_len;
unsigned mode;
@@ -903,6 +1058,13 @@ struct Qntan_TarEnc {
+#ifndef Qntan_TarDec_hextHdr
+# define Qntan_TarDec_hextHdr(A, B, C) (*A)->hextHdr(A, B, C)
+#endif
+#ifndef Qntan_TarDec_readBody
+# define Qntan_TarDec_readBody(A, B, C, D, E) (*A)->readBody(A, B, C, D, E)
+#endif
+
struct Qntan_TarDec_Hdr {
char const*path; int path_len;
unsigned mode;
@@ -1004,7 +1166,7 @@ struct Qntan_Cond {
#ifndef Qntan_Mutx_unlock
# define Qntan_Mutx_unlock(A) (*(A))->unlock(A)
#endif
-/**/
+
struct Qntan_Mutx {
/* Same idea as a `pthread_mutex_t`, just using virtual funcs, to
* increase overkill and make some people sad :D
@@ -1031,6 +1193,10 @@ struct Qntan_Mutx {
+#ifndef Qntan_Networker_getaddrinfo
+# define Qntan_Networker_getaddrinfo(A, B, C, D, E, F, G, H) (*A)->getaddrinfo(A, B, C, D, E, F, G, H)
+#endif
+
struct Qntan_Networker {
/**/
void (*getaddrinfo)(
@@ -1143,22 +1309,22 @@ struct Qntan_CsvIStream {
*/
};
+#ifndef Qntan_CsvIStream_Mentor_onCsvRow
+# define Qntan_CsvIStream_Mentor_onCsvRow(A, B, C, D, E, F, G) (*A)->onCsvRow(A, B, C, D, E, F, G)
+#endif
#ifndef Qntan_CsvIStream_Mentor_onCsvDocEnd
# define Qntan_CsvIStream_Mentor_onCsvDocEnd(A, B, C) (*A)->onCsvDocEnd(A, B, C)
#endif
-#ifndef Qntan_CsvIStream_Mentor_onCsvRow
-# define Qntan_CsvIStream_Mentor_onCsvRow(A, B, C, D) (*A)->onCsvRow(A, B, C, D)
-#endif
struct Qntan_CsvIStream_Mentor {
/**/
void (*onCsvRow)( struct Qntan_CsvIStream_Mentor**,
- char const**values, int*values_len, int numCols,
+ int64_t rowNr, char const**values, int*values_len, int numCols,
void(*onDone)(int err, Qntan_Cls), Qntan_Cls );
/* Called for every CSV row.
*
* How an implementation could look like:
- * void onCsvRow( char const*values, int*values_len, int numCols, Qntan_Cls a, onDone, arg ){
+ * void onCsvRow( Ctx _, int64_t row, char const*values, int*values_len, int numCols, Qntan_Cls a, onDone, arg ){
* for( int iCol = 0 ; iCol < numCols ; ++iCol ){
* printf("col[%d]: '%.*s'\n", iCol, values_len[i], values[i]);
* }
@@ -1192,14 +1358,90 @@ struct Qntan_CsvIStream_Mentor {
+#ifndef Qntan_CsvEnc_appendCellChunk
+# define Qntan_CsvEnc_appendCellChunk(A, B, C, D, E, F) (*A)->appendCellChunk(A, B, C, D, E, F)
+#endif
+#ifndef Qntan_CsvEnc_appendRowsStrz
+# define Qntan_CsvEnc_appendRowsStrz(A, B, C, D) (*A)->appendRowsStrz(A, B, C, D)
+#endif
+
+struct Qntan_CsvEnc {
+ /* WARN: pre-alpha! Not usable yet.
+ */
+ void(*appendCellChunk)( struct Qntan_CsvEnc**, char const*buf, int buf_len, int flgs,
+ void(*onDone)(int,Qntan_Cls), Qntan_Cls );
+ /* `buf` the chars to append.
+ * `buf_len` Number of chars to use from `buf`.
+ * `flgs & 4` set means, that this is the last chunk for this cell. So
+ * later calls will append to the next cell.
+ * `flgs & 2` set means, that this row is now complete. So further calls
+ * will then continue constructing the next row.
+ * `flgs & 8` means end of document. This MUST be given at least once at
+ * the very end to ensure output is flushed correctly.
+ * `flgs & 0x10` means that this cell explicitly should be quoted, even when
+ * the contents itself would not require it.
+ * All other bits in `flgs` not mentioned here MUST be zero.
+ */
+ void(*appendRowsStrz)( struct Qntan_CsvEnc**, char***rows,
+ void(*onDone)(int err,Qntan_Cls), Qntan_Cls );
+ /* Appends a 2d array of zero terminated strings. This can be called
+ * multple times to append more rows.
+ * All of `rows`, `rows[x]` and `rows[x][y]` MUST be zero-terminated.
+ * `err` is zero on success. `err` is negative for errors.
+ * `onDone()` will be called as soon operation is done.
+ */
+};
+
+
+
+
+
+
+
+
+
+
+#ifndef Qntan_JsonEnc_reset
+# define Qntan_JsonEnc_reset(A) (*A)->reset(A)
+#endif
+#ifndef Qntan_JsonEnc_flush
+# define Qntan_JsonEnc_flush(A, B, C) (*A)->flush(A, B, C)
+#endif
+#ifndef Qntan_JsonEnc_objBeg
+# define Qntan_JsonEnc_objBeg(A) (*A)->objBeg(A)
+#endif
+#ifndef Qntan_JsonEnc_objEnd
+# define Qntan_JsonEnc_objEnd(A) (*A)->objEnd(A)
+#endif
+#ifndef Qntan_JsonEnc_arrBeg
+# define Qntan_JsonEnc_arrBeg(A) (*A)->arrBeg(A)
+#endif
+#ifndef Qntan_JsonEnc_arrEnd
+# define Qntan_JsonEnc_arrEnd(A) (*A)->arrEnd(A)
+#endif
+#ifndef Qntan_JsonEnc_key
+# define Qntan_JsonEnc_key(A, B, C, D) (*A)->key(A, B, C, D)
+#endif
+#ifndef Qntan_JsonEnc_string
+# define Qntan_JsonEnc_string(A, B, C, D) (*A)->string(A, B, C, D)
+#endif
+#ifndef Qntan_JsonEnc_number
+# define Qntan_JsonEnc_number(A, B) (*A)->number(A, B)
+#endif
+#ifndef Qntan_JsonEnc_boolean
+# define Qntan_JsonEnc_boolean(A, B) (*A)->boolean(A, B)
+#endif
+#ifndef Qntan_JsonEnc_null
+# define Qntan_JsonEnc_null(A) (*A)->null(A)
+#endif
+
struct Qntan_JsonEnc {
/**/
void (*reset)( struct Qntan_JsonEnc** );
/* throws away the current state and sets the encoder for a new run.
*/
- void (*flush)( struct Qntan_JsonEnc** );
- /* TODO: to me, looks like this should be async and take an 'onDone' cback.
- */
+ void (*flush)( struct Qntan_JsonEnc**, void(*onDone)(int,Qntan_Cls), Qntan_Cls );
+ /**/
void (*objBeg)( struct Qntan_JsonEnc** );
/**/
void (*objEnd)( struct Qntan_JsonEnc** );
@@ -1237,9 +1479,13 @@ struct Qntan_JsonEnc {
+#ifndef Qntan_JsonDec_write
+# define Qntan_JsonDec_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+
struct Qntan_JsonDec {
/**/
- void (*write)(struct Qntan_JsonDec**, void const*buf, int buf_len, int flgs,
+ void (*write)( struct Qntan_JsonDec**, void const*buf, int buf_len, int flgs,
void(*onDone)(int ret,Qntan_Cls), Qntan_Cls );
/* @param flgs
* 0x4 set means this is last chunk.
@@ -1247,6 +1493,39 @@ struct Qntan_JsonDec {
*/
};
+#ifndef Qntan_JsonDec_Mentor_onError
+# define Qntan_JsonDec_Mentor_onError(A, B) (*A)->onError(A, B)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onsonDocEnd
+# define Qntan_JsonDec_Mentor_onsonDocEnd(A, B, C) (*A)->onsonDocEnd(A, B, C)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonObjBeg
+# define Qntan_JsonDec_Mentor_onJsonObjBeg(A) (*A)->onJsonObjBeg(A)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonObjEnd
+# define Qntan_JsonDec_Mentor_onJsonObjEnd(A) (*A)->onJsonObjEnd(A)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonArrBeg
+# define Qntan_JsonDec_Mentor_onJsonArrBeg(A) (*A)->onJsonArrBeg(A)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonArrEnd
+# define Qntan_JsonDec_Mentor_onJsonArrEnd(A) (*A)->onJsonArrEnd(A)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonNull
+# define Qntan_JsonDec_Mentor_onJsonNull(A) (*A)->onJsonNull(A)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonBool
+# define Qntan_JsonDec_Mentor_onJsonBool(A, B) (*A)->onJsonBool(A, B)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonNumber
+# define Qntan_JsonDec_Mentor_onJsonNumber(A, B) (*A)->onJsonNumber(A, B)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonStringKeyChunk
+# define Qntan_JsonDec_Mentor_onJsonStringKeyChunk(A, B, C) (*A)->onJsonStringKeyChunk(A, B, C)
+#endif
+#ifndef Qntan_JsonDec_Mentor_onJsonStringChunk
+# define Qntan_JsonDec_Mentor_onJsonStringChunk(A, B, C) (*A)->onJsonStringChunk(A, B, C)
+#endif
struct Qntan_JsonDec_Mentor {
/**/
@@ -1256,7 +1535,7 @@ struct Qntan_JsonDec_Mentor {
* prepared that the error may not be exactly at the pointed location, but
* somewhere near that location.
*/
- void (*onJsonDocEnd)( Qntan_Cls cls );
+ void (*onJsonDocEnd)( Qntan_Cls cls, void(*onDone)(int,Qntan_Cls), Qntan_Cls );
/**/
void (*onJsonObjBeg)( Qntan_Cls cls );
/**/
@@ -1321,6 +1600,10 @@ struct Qntan_JsonTreeDec_JsonNode {
};
};
+#ifndef Qntan_JsonTreeDec_write
+# define Qntan_JsonTreeDec_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+
struct Qntan_JsonTreeDec {
/**/
void (*write)( struct Qntan_JsonTreeDec**, void const*buf, int buf_len, int flg,
@@ -1338,6 +1621,16 @@ struct Qntan_JsonTreeDec {
+#ifndef Qntan_XmlDec_pause
+# define Qntan_XmlDec_pause(A) (*A)->pause(A)
+#endif
+#ifndef Qntan_XmlDec_resume
+# define Qntan_XmlDec_resume(A) (*A)->resume(A)
+#endif
+#ifndef Qntan_XmlDec_write
+# define Qntan_XmlDec_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+
struct Qntan_XmlDec {
/**/
void (*pause)( struct Qntan_XmlDec** );
@@ -1353,6 +1646,21 @@ struct Qntan_XmlDec {
*/
};
+#ifndef Qntan_XmlDec_Mentor_onXmlDocEnd
+# define Qntan_XmlDec_Mentor_onXmlDocEnd(A) (*A)->onXmlDocEnd(A)
+#endif
+#ifndef Qntan_XmlDec_Mentor_onElemBeg
+# define Qntan_XmlDec_Mentor_onElemBeg(A, B, C) (*A)->onElemBeg(A, B, C)
+#endif
+#ifndef Qntan_XmlDec_Mentor_onElemEnd
+# define Qntan_XmlDec_Mentor_onElemEnd(A, B, C) (*A)->onElemEnd(A, B, C)
+#endif
+#ifndef Qntan_XmlDec_Mentor_onAttr
+# define Qntan_XmlDec_Mentor_onAttr(A, B, C) (*A)->onAttr(A, B, C)
+#endif
+#ifndef Qntan_XmlDec_Mentor_onChunk
+# define Qntan_XmlDec_Mentor_onChunk(A, B, C) (*A)->onChunk(A, B, C)
+#endif
struct Qntan_XmlDec_Mentor {
/**/
@@ -1377,6 +1685,13 @@ struct Qntan_XmlDec_Mentor {
+#ifndef Qntan_HttpClient_Exchg_Opts_onRspHdr
+# define Qntan_HttpClient_Exchg_Opts_onRspHdr(A, B, C, D, E) (*A)->onRspHdr(A, B, C, D, E)
+#endif
+#ifndef Qntan_HttpClient_Exchg_Opts_onBodyChunk
+# define Qntan_HttpClient_Exchg_Opts_onBodyChunk(A, B, C, D) (*A)->onBodyChunk(A, B, C, D)
+#endif
+
struct Qntan_HttpClient_Exchg_Opts {
/* WARN: HTTP IS EXPERMIMENTAL! DO NOT TRUST ANYTHING HERE!
*/
@@ -1422,6 +1737,16 @@ struct Qntan_HttpClient_Exchg_Opts {
*/
};
+#ifndef Qntan_HttpClient_Exchg_write
+# define Qntan_HttpClient_Exchg_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+#ifndef Qntan_HttpClient_Exchg_pause
+# define Qntan_HttpClient_Exchg_pause(A) (*A)->pause(A)
+#endif
+#ifndef Qntan_HttpClient_Exchg_resume
+# define Qntan_HttpClient_Exchg_resume(A) (*A)->resume(A)
+#endif
+
struct Qntan_HttpClient_Exchg {
/* WARN: HTTP IS EXPERMIMENTAL! DO NOT TRUST ANYTHING HERE!
*/
@@ -1441,6 +1766,10 @@ struct Qntan_HttpClient_Exchg {
*/
};
+#ifndef Qntan_HttpClient_httpReq
+# define Qntan_HttpClient_httpReq(A, B, C, D) (*A)->httpReq(A, B, C, D)
+#endif
+
struct Qntan_HttpClient {
/* WARN: HTTP IS EXPERMIMENTAL! DO NOT TRUST ANYTHING HERE!
*/
@@ -1472,6 +1801,15 @@ struct Qntan_HttpClient {
+#ifndef Qntan_GfxRenderer_drawBegin
+# define Qntan_GfxRenderer_drawBegin(A) (*A)->drawBegin(A)
+#endif
+#ifndef Qntan_GfxRenderer_drawEnd
+# define Qntan_GfxRenderer_drawEnd(A) (*A)->drawEnd(A)
+#endif
+#ifndef Qntan_GfxRenderer_getInfo
+# define Qntan_GfxRenderer_getInfo(A, B) (*A)->getInfo(A, B)
+#endif
#ifndef Qntan_GfxRenderer_setScissor
# define Qntan_GfxRenderer_setScissor(A, B, C, D, E) (*A)->setScissor(A, B, C, D, E)
#endif
@@ -1508,10 +1846,25 @@ struct Qntan_GfxMtx4d {
float m30, m31, m32, m33;
};
+struct Qntan_GfxRenderer_Info {
+ int w, h;
+ /* Canvas size.
+ */
+};
+
struct Qntan_GfxRenderer {
/* WARN: All around graphics rendering is heavily experimental! Make
* sure you're ready to handle all kind of changes here.
*/
+ void (*drawBegin)( struct Qntan_GfxRenderer** );
+ /* For now, just here because needed to make winDOOF GDI API happy.
+ */
+ void (*drawEnd)( struct Qntan_GfxRenderer** );
+ /* For now, just here because needed to make winDOOF GDI API happy.
+ */
+ void (*getInfo)( struct Qntan_GfxRenderer**, struct Qntan_GfxRenderer_Info*dst );
+ /* Contextual info gets stored into `dst`.
+ */
void (*setScissor)( struct Qntan_GfxRenderer**, int x, int y, int w, int h );
/**/
void (*triangleStrip2d)( struct Qntan_GfxRenderer**,
@@ -1542,6 +1895,10 @@ struct Qntan_GfxRenderer {
+#ifndef Qntan_JavaBytecodeParser_write
+# define Qntan_JavaBytecodeParser_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+
struct Qntan_JavaBytecodeParser {
/**/
void (*write)(
@@ -1691,6 +2048,13 @@ struct Qntan_CamtTransaction {
int qrRef_cap , qrRef_len ; char *qrRef ;
};
+#ifndef Qntan_CamtDec_Mentor_onAccount
+# define Qntan_CamtDec_Mentor_onAccount(A, B, C, D) (*A)->onAccount(A, B, C, D)
+#endif
+#ifndef Qntan_CamtDec_Mentor_onRecord
+# define Qntan_CamtDec_Mentor_onRecord(A, B, C, D) (*A)->onRecord(A, B, C, D)
+#endif
+
struct Qntan_CamtDec_Mentor {
/**/
void (*onAccount)( struct Qntan_CamtDec_Mentor**,
@@ -1701,6 +2065,10 @@ struct Qntan_CamtDec_Mentor {
/**/
};
+#ifndef Qntan_CamtDec_write
+# define Qntan_CamtDec_write(A, B, C, D, E, F) (*A)->write(A, B, C, D, E, F)
+#endif
+
struct Qntan_CamtDec {
/**/
void (*write)(