diff -r 000000000000 -r 2e31b584f8d9 scansion/objects/client.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scansion/objects/client.lua Sat Sep 05 14:42:23 2015 +0100 @@ -0,0 +1,24 @@ +local verse = require "verse"; +local parse_xml = require "scansion.xml".parse; +return { + _validate = function (client) + assert(client.jid, "No JID specified"); + client.stream = verse.new(); + end; + + connects = function (client) + client.stream:connect(client.jid, client.password); + end; + + sends = function (client, data) + print(("%q"):format(table.concat(data))) + print(parse_xml(table.concat(data))); + print(stanza) + end; + + receives = function (client, data) + end; + + disconnects = function (client) + end; +}