aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libraries/SledjHamr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libraries/SledjHamr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libraries/SledjHamr.c b/src/libraries/SledjHamr.c
index abd5b1c..b44c1cb 100644
--- a/src/libraries/SledjHamr.c
+++ b/src/libraries/SledjHamr.c
@@ -103,6 +103,9 @@ void send2(Connection *conn, const char *SID, const char *message, ...)
103 buf[length] = '\0'; 103 buf[length] = '\0';
104 104
105// TODO - Should check if this is always gonna be local? Likely not. 105// TODO - Should check if this is always gonna be local? Likely not.
106// TODO - Figure out what the above line meant. Then ...
107// Check a hashtable somewhere for a command extracted from the message.
108// conn->commands[command](message ...)
106 if (checkConnection(conn, "send2", conn->type, FALSE)) 109 if (checkConnection(conn, "send2", conn->type, FALSE))
107 { 110 {
108 switch (conn->type) 111 switch (conn->type)
@@ -157,6 +160,17 @@ static Eina_Bool parseStream(void *data, int type, void *evData, int evSize, voi
157 ext = index(command, ' '); 160 ext = index(command, ' ');
158 if (ext) 161 if (ext)
159 { 162 {
163 // TODO - Currently SID.command(arguments), should change that to nameSpace.command(arguments)
164 // Not sure what to do with SID, but there maybe some common parameters we can shift around differently.
165 // - First check if the connection has a hashtable of conn->commands.
166 //* Next check if "nameSpace.command(arguments)" runs as Lua.
167 // or even the return values from returnWanted calls like -
168 // SID, "return 1"
169 // SID, "result + 5"
170 // SID, "script.SID.return(1)"
171 // Finally pass it to conn->unknownCommand()
172 // * The Lua check can live in unknownCommand().
173 // else bitch.
160 streamParser func = eina_hash_find(conn->commands, command); 174 streamParser func = eina_hash_find(conn->commands, command);
161 175
162 ext[0] = '\0'; 176 ext[0] = '\0';