From 782ae4c049e2b6fab13d7453cbb0e74610e7d200 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 12 Jan 2018 21:03:09 +0100 Subject: Move Jid class to xmpp-vala, partially refactor namespace --- plugins/http-files/src/file_provider.vala | 1 + plugins/http-files/src/manager.vala | 6 +++--- plugins/http-files/src/upload_stream_module.vala | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/http-files') diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala index 9a9db072..493aaa61 100644 --- a/plugins/http-files/src/file_provider.vala +++ b/plugins/http-files/src/file_provider.vala @@ -2,6 +2,7 @@ using Gee; using Gtk; using Dino.Entities; +using Xmpp; namespace Dino.Plugins.HttpFiles { diff --git a/plugins/http-files/src/manager.vala b/plugins/http-files/src/manager.vala index 83836989..db7a3f8f 100644 --- a/plugins/http-files/src/manager.vala +++ b/plugins/http-files/src/manager.vala @@ -30,7 +30,7 @@ public class Manager : StreamInteractionModule, FileSender, Object { } public void send_file(Conversation conversation, FileTransfer file_transfer) { - Xmpp.Core.XmppStream? stream = stream_interactor.get_stream(file_transfer.account); + Xmpp.XmppStream? stream = stream_interactor.get_stream(file_transfer.account); if (stream != null) { stream_interactor.module_manager.get_module(file_transfer.account, UploadStreamModule.IDENTITY).upload(stream, file_transfer.input_stream, file_transfer.server_file_name, file_transfer.size, file_transfer.mime_type, (stream, url_down) => { @@ -60,7 +60,7 @@ public class Manager : StreamInteractionModule, FileSender, Object { } } - private void on_stream_negotiated(Account account, Core.XmppStream stream) { + private void on_stream_negotiated(Account account, XmppStream stream) { stream_interactor.module_manager.get_module(account, UploadStreamModule.IDENTITY).feature_available.connect((stream, max_file_size) => { lock (max_file_sizes) { max_file_sizes[account] = max_file_size; @@ -69,7 +69,7 @@ public class Manager : StreamInteractionModule, FileSender, Object { }); } - private void check_add_oob(Entities.Message message, Xmpp.Message.Stanza message_stanza, Conversation conversation) { + private void check_add_oob(Entities.Message message, Xmpp.MessageStanza message_stanza, Conversation conversation) { if (message_is_file(db, message)) { Xep.OutOfBandData.add_url_to_message(message_stanza, message_stanza.body); } diff --git a/plugins/http-files/src/upload_stream_module.vala b/plugins/http-files/src/upload_stream_module.vala index 08e6105f..f4a4a428 100644 --- a/plugins/http-files/src/upload_stream_module.vala +++ b/plugins/http-files/src/upload_stream_module.vala @@ -1,5 +1,5 @@ using Xmpp; -using Xmpp.Core; +using Xmpp; using Xmpp.Xep; namespace Dino.Plugins.HttpFiles { @@ -8,7 +8,7 @@ private const string NS_URI = "urn:xmpp:http:upload"; private const string NS_URI_0 = "urn:xmpp:http:upload:0"; public class UploadStreamModule : XmppStreamModule { - public static Core.ModuleIdentity IDENTITY = new Core.ModuleIdentity(NS_URI, "0363_http_file_upload"); + public static Xmpp.ModuleIdentity IDENTITY = new Xmpp.ModuleIdentity(NS_URI, "0363_http_file_upload"); public signal void feature_available(XmppStream stream, long max_file_size); @@ -116,7 +116,7 @@ public class UploadStreamModule : XmppStreamModule { }); } - private bool check_ns_in_info(XmppStream stream, string jid, Xep.ServiceDiscovery.InfoResult info_result) { + private bool check_ns_in_info(XmppStream stream, Jid jid, Xep.ServiceDiscovery.InfoResult info_result) { bool ver_available = false; bool ver_0_available = false; foreach (string feature in info_result.features) { @@ -162,11 +162,11 @@ public class UploadStreamModule : XmppStreamModule { public class Flag : XmppStreamFlag { public static FlagIdentity IDENTITY = new FlagIdentity(NS_URI, "service_discovery"); - public string file_store_jid; + public Jid file_store_jid; public string ns_ver; public int? max_file_size; - public Flag(string file_store_jid, string ns_ver) { + public Flag(Jid file_store_jid, string ns_ver) { this.file_store_jid = file_store_jid; this.ns_ver = ns_ver; } -- cgit v1.2.3-70-g09d2