Software /
code /
verse
Comparison
plugins/jingle_ibb.lua @ 250:a5ac643a7fd6
added local verse var to all plugins
author | mva <mva@mva.name> |
---|---|
date | Fri, 02 Dec 2011 11:02:02 +0600 |
parent | 219:ce8ed17710cb |
child | 284:c78d1780f1d2 |
comparison
equal
deleted
inserted
replaced
249:00891a675634 | 250:a5ac643a7fd6 |
---|---|
1 local verse = require "verse"; | |
2 local base64 = require "util.encodings".base64; | |
3 local uuid_generate = require "util.uuid".generate; | |
4 | |
1 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; | 5 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; |
2 local xmlns_ibb = "http://jabber.org/protocol/ibb"; | 6 local xmlns_ibb = "http://jabber.org/protocol/ibb"; |
3 local base64 = require "util.encodings".base64; | |
4 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); | 7 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); |
5 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); | 8 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); |
6 local t_concat = table.concat | 9 local t_concat = table.concat |
7 local uuid_generate = require "util.uuid".generate; | |
8 | 10 |
9 local ibb_conn = {}; | 11 local ibb_conn = {}; |
10 local ibb_conn_mt = { __index = ibb_conn }; | 12 local ibb_conn_mt = { __index = ibb_conn }; |
11 | 13 |
12 function new_ibb(stream) | 14 function new_ibb(stream) |