]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Start to add devsql module
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 4 May 2025 23:14:33 +0000 (19:14 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 4 May 2025 23:14:33 +0000 (19:14 -0400)
lib/devsql.c [new file with mode: 0644]
lib/devsql.h [new file with mode: 0644]
lib/lvleml.h

diff --git a/lib/devsql.c b/lib/devsql.c
new file mode 100644 (file)
index 0000000..17b4680
--- /dev/null
@@ -0,0 +1,16 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/********************************************************/
+/*                                                     */
+/*     Low level subroutine implementation             */
+/*     to handle SQL request                           */
+/*                                                     */
+/********************************************************/
+#include       "devsql.h"
+
+/*
+\f
+*/
+/********************************************************/
+/*                                                      */
+/*                                                      */
+/********************************************************/
diff --git a/lib/devsql.h b/lib/devsql.h
new file mode 100644 (file)
index 0000000..2c69c11
--- /dev/null
@@ -0,0 +1,20 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+/********************************************************/
+/*                                                     */
+/*     Low level subroutine declaration                */
+/*     to handle SQL resquest.                         */
+/*                                                     */
+/********************************************************/
+#ifndef        DEVSQL
+#define DEVSQL
+
+//reference to a SQL pointer reference
+typedef void SQLPTR;
+
+//to connect a remote SQL server
+extern SQLPTR *soql_opensql();
+
+//procedure to close an previously opened SQL channel
+extern SQLPTR *soc_closesql(SOCPTR *socptr);
+
+#endif
index 28e9158b3a89e43e312b25f92ce29fa4ba867cc0..3c354a0781f8f5a458f100794a02e76c3f4ab8dd 100644 (file)
@@ -8,11 +8,13 @@
 #ifndef        LVLEML
 #define LVLEML
 
+#include        "devsoc.h"
+#include        "devsql.h"
 #include        "gestcp.h"
 
 typedef struct  {
-        SOCPTR *socptr; //established contact context
-        //_Bool tlsok;    //link is in crypted mode
+        SOCPTR *socptr; //established contact socket context
+        SQLPTR *sqlptr; //established contact database access
         char *fqdn;     //fully qualified domain from peer
         char *locname;  //socket local hostname
         char *locserv;  //local service port