aboutsummaryrefslogtreecommitdiffstats
path: root/tbl_qcmd.h
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-03-16 23:12:46 +0000
committerFreeArtMan <dos21h@gmail.com>2017-03-16 23:12:46 +0000
commitb04419c4c7e485f164d6481470b2e6b0087dcac1 (patch)
tree94e07b978e28c46d4df0bb791ba9c24f5f09d5ca /tbl_qcmd.h
parentfbba9957124bde600e89e3720377f9c3ab78e3a0 (diff)
downloadagni-b04419c4c7e485f164d6481470b2e6b0087dcac1.tar.gz
agni-b04419c4c7e485f164d6481470b2e6b0087dcac1.zip
Add token to qcmd. Added needed functions to manage that
Diffstat (limited to 'tbl_qcmd.h')
-rw-r--r--tbl_qcmd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tbl_qcmd.h b/tbl_qcmd.h
index a872a72..d28644e 100644
--- a/tbl_qcmd.h
+++ b/tbl_qcmd.h
@@ -9,6 +9,8 @@
#include "debug.h"
#include "util.h"
+#include "irc_parse.h"
+
#define EXEC_CURRENT 0 //executes in current thread
#define EXEC_SEPERATE 1 //executes in seperate thread
@@ -67,6 +69,7 @@ typedef struct tble_qcmd
mqd_t in_q; //UNUSED
int tid; //table id
int tidx; //table unique id of executor, check if still there ;]
+ irc_token *tok; //parsed irc command, needed only by irc consumer thread
} tble_qcmd;
//list of print fields
@@ -171,6 +174,20 @@ Output:
int tbl_exec_in_s(tbl_exec *tbl, char *cmd);
/*
+add parsed token to command list
+Input:
+ tbl - executed command
+ tk - token, its going to be copies, so fill free to FREE
+Output:
+ 0 - if everything whent ok
+ -1 - if there was some kind of mistake
+*/
+int tbl_qcmd_add_tok(tble_qcmd *tbl, irc_token *tk);
+
+
+
+
+/*
if command is found then return pointer to it
if you passs pointer further then if its will be freed
or deleted from the list your programm will segfault
@@ -258,6 +275,9 @@ Output:
int tbl_qcmd_del(tbl_qcmd *tbl, int idx);
+
+
+
/*
if there is response then try to match response and return code to
executed command requester