diff --git a/po/POTFILES.in b/po/POTFILES.in index b0beec37..e04b93c6 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -293,7 +293,6 @@ src/engine/imap/message/imap-tag.vala src/engine/imap/message/imap-uid.vala src/engine/imap/message/imap-uid-validity.vala src/engine/imap/parameter/imap-atom-parameter.vala -src/engine/imap/parameter/imap-continuation-parameter.vala src/engine/imap/parameter/imap-list-parameter.vala src/engine/imap/parameter/imap-literal-parameter.vala src/engine/imap/parameter/imap-nil-parameter.vala diff --git a/src/engine/imap/parameter/imap-continuation-parameter.vala b/src/engine/imap/parameter/imap-continuation-parameter.vala deleted file mode 100644 index 341237a4..00000000 --- a/src/engine/imap/parameter/imap-continuation-parameter.vala +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2018 Michael Gratton - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -/** - * Represents a response to an IMAP continuation request. - * - * Do not use this if you need to send literal data as part of a - * command, add it as a {@link LiteralParameter} to the command - * instead. - * - * See [[http://tools.ietf.org/html/rfc3501#section-7.5]] - */ - -public class Geary.Imap.ContinuationParameter : Geary.Imap.Parameter { - - - private uint8[] data; - - - /** - * Response to the continuation request. - * - * The given data will be sent to the server as-is. It should not - * contain a trailing EOL. - */ - public ContinuationParameter(uint8[] data) { - this.data = data; - } - - public void serialize_continuation(Serializer ser, GLib.Cancellable cancellable) - throws GLib.Error { - ser.push_unquoted_string( - new Memory.ByteBuffer.take(this.data, this.data.length).to_string(), - cancellable - ); - ser.push_eol(cancellable); - } - - /** {@inheritDoc} */ - public override void serialize(Serializer ser, GLib.Cancellable cancellable) - throws GLib.Error { - serialize_continuation(ser, cancellable); - } - - /** {@inheritDoc} */ - public override string to_string() { - return new Memory.ByteBuffer.take(this.data, this.data.length).to_string(); - } - -} diff --git a/src/engine/imap/transport/imap-client-session.vala b/src/engine/imap/transport/imap-client-session.vala index 8f9e9775..239c48c7 100644 --- a/src/engine/imap/transport/imap-client-session.vala +++ b/src/engine/imap/transport/imap-client-session.vala @@ -202,7 +202,6 @@ public class Geary.Imap.ClientSession : BaseObject { DISCONNECTED, RECV_STATUS, RECV_COMPLETION, - RECV_CONTINUATION, // I/O errors RECV_ERROR, @@ -390,7 +389,6 @@ public class Geary.Imap.ClientSession : BaseObject { new Geary.State.Mapping(State.AUTHORIZING, Event.DISCONNECT, on_disconnect), new Geary.State.Mapping(State.AUTHORIZING, Event.RECV_STATUS, on_recv_status), new Geary.State.Mapping(State.AUTHORIZING, Event.RECV_COMPLETION, on_login_recv_completion), - new Geary.State.Mapping(State.AUTHORIZING, Event.RECV_CONTINUATION, on_login_recv_continuation), new Geary.State.Mapping(State.AUTHORIZING, Event.SEND_ERROR, on_send_error), new Geary.State.Mapping(State.AUTHORIZING, Event.RECV_ERROR, on_recv_error), @@ -1076,35 +1074,6 @@ public class Geary.Imap.ClientSession : BaseObject { } } - private uint on_login_recv_continuation(uint state, - uint event, - void *user, - Object? object) { - ContinuationResponse response = (ContinuationResponse) object; - AuthenticateCommand auth = this.state_change_cmd as AuthenticateCommand; - if (auth != null) { - ContinuationParameter? reply = null; - try { - reply = auth.continuation_requested(response); - } catch (ImapError err) { - debug("[%s] Error handling login continuation request: %s", - to_string(), err.message); - } - - if (reply != null) { - // We have to handle the continuation request anyway, - // so just send an empty one. - reply = new ContinuationParameter(new uint8[0]); - } - - // XXX Not calling yield here is a nasty hack? Need to get - // a cancellable to this somehow, too. - this.cx.send_continuation_reply.begin(reply, null); - } - - return State.AUTHORIZING; - } - // // keepalives (nop idling to keep the session alive and to periodically receive notifications // of changes) @@ -1866,8 +1835,6 @@ public class Geary.Imap.ClientSession : BaseObject { // reschedule keepalive (traffic seen on channel) schedule_keepalive(); - - fsm.issue(Event.RECV_CONTINUATION, null, response, null); } private void on_received_bytes(size_t bytes) { @@ -1904,4 +1871,3 @@ public class Geary.Imap.ClientSession : BaseObject { } } } - diff --git a/src/engine/meson.build b/src/engine/meson.build index 3ae53367..3d99bcb8 100644 --- a/src/engine/meson.build +++ b/src/engine/meson.build @@ -136,7 +136,6 @@ geary_engine_vala_sources = files( 'imap/message/imap-uid.vala', 'imap/message/imap-uid-validity.vala', 'imap/parameter/imap-atom-parameter.vala', - 'imap/parameter/imap-continuation-parameter.vala', 'imap/parameter/imap-list-parameter.vala', 'imap/parameter/imap-literal-parameter.vala', 'imap/parameter/imap-nil-parameter.vala',