diff options
author | Marvin W <git@larma.de> | 2018-01-12 21:03:09 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-01-28 00:38:47 +0100 |
commit | 782ae4c049e2b6fab13d7453cbb0e74610e7d200 (patch) | |
tree | 1b4cd0a1689cee0c2e2cac2ae9a5fb8ebbe63621 /plugins/http-files/src | |
parent | d46d071e57e599e8cfb1780597cbecb36881c4d8 (diff) | |
download | dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.tar.gz dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.zip |
Move Jid class to xmpp-vala, partially refactor namespace
Diffstat (limited to 'plugins/http-files/src')
-rw-r--r-- | plugins/http-files/src/file_provider.vala | 1 | ||||
-rw-r--r-- | plugins/http-files/src/manager.vala | 6 | ||||
-rw-r--r-- | plugins/http-files/src/upload_stream_module.vala | 10 |
3 files changed, 9 insertions, 8 deletions
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<UploadStreamModule> IDENTITY = new Core.ModuleIdentity<UploadStreamModule>(NS_URI, "0363_http_file_upload"); + public static Xmpp.ModuleIdentity<UploadStreamModule> IDENTITY = new Xmpp.ModuleIdentity<UploadStreamModule>(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<Flag> IDENTITY = new FlagIdentity<Flag>(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; } |