aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-08-26 17:30:47 +0200
committerhrxi <hrrrxi@gmail.com>2019-08-27 12:14:53 +0200
commit6028fd15a81a084b63311bc61f7b48d9f3d00746 (patch)
treedbf26f0d8f1103477f79519eda97f521d9cb4eff /xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
parent6083f446b47e258e0381c0c22755dbfa881c7df7 (diff)
downloaddino-6028fd15a81a084b63311bc61f7b48d9f3d00746.tar.gz
dino-6028fd15a81a084b63311bc61f7b48d9f3d00746.zip
Don't error on Jingle file transfer hash session-info
Diffstat (limited to 'xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala')
-rw-r--r--xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala b/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
index 43c212f5..25fe3ce4 100644
--- a/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
+++ b/xmpp-vala/src/module/xep/0234_jingle_file_transfer.vala
@@ -24,6 +24,19 @@ public class Module : Jingle.ContentType, XmppStreamModule {
public Jingle.ContentParameters parse_content_parameters(StanzaNode description) throws Jingle.IqError {
return Parameters.parse(this, description);
}
+ public void handle_content_session_info(XmppStream stream, Jingle.Session session, StanzaNode info, Iq.Stanza iq) throws Jingle.IqError {
+ switch (info.name) {
+ case "received":
+ stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.result(iq));
+ break;
+ case "checksum":
+ // TODO(hrxi): handle hash
+ stream.get_module(Iq.Module.IDENTITY).send_iq(stream, new Iq.Stanza.result(iq));
+ break;
+ default:
+ throw new Jingle.IqError.UNSUPPORTED_INFO(@"unsupported file transfer info $(info.name)");
+ }
+ }
public signal void file_incoming(XmppStream stream, FileTransfer file_transfer);