1 /* Copyright (C) 2006 - 2014 Jan Kundrát <jkt@flaska.net>
3 This file is part of the Trojita Qt IMAP e-mail client,
4 http://trojita.flaska.net/
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of
9 the License or (at your option) version 3 or any later version
10 accepted by the membership of KDE e.V. (or its successor approved
11 by the membership of KDE e.V.), which shall act as a proxy
12 defined in Section 14 of version 3 of the license.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef IMAP_CONNECTIONSTATE_H
23 #define IMAP_CONNECTIONSTATE_H
30 /** @short A human-readable state of the connection to the IMAP server */
32 CONN_STATE_NONE
, /**< @short Initial state */
33 CONN_STATE_HOST_LOOKUP
, /**< @short Resolving hostname */
34 CONN_STATE_CONNECTING
, /**< @short Connecting to the remote host or starting the process */
35 CONN_STATE_SSL_HANDSHAKE
, /**< @short The SSL encryption is starting */
36 CONN_STATE_SSL_VERIFYING
, /**< @short The SSL connection processing is waiting for policy decision about whether to proceed or not */
37 CONN_STATE_CONNECTED_PRETLS_PRECAPS
, /**< @short Connection has been established but there's been no CAPABILITY yet */
38 CONN_STATE_CONNECTED_PRETLS
, /**< @short Connection has been established and capabilities are known but STARTTLS remains to be issued */
39 CONN_STATE_STARTTLS_ISSUED
, /**< @short The STARTTLS command has been sent */
40 CONN_STATE_STARTTLS_HANDSHAKE
, /**< @short The socket is starting encryption */
41 CONN_STATE_STARTTLS_VERIFYING
, /** @short The STARTTLS processing is waiting for policy decision about whether to proceed or not */
42 CONN_STATE_ESTABLISHED_PRECAPS
, /**< @short Waiting for capabilities after the encryption has been set up */
43 CONN_STATE_LOGIN
, /**< @short Performing login */
44 CONN_STATE_POSTAUTH_PRECAPS
, /**< @short Authenticated, but capabilities weren't refreshed yet */
45 CONN_STATE_COMPRESS_DEFLATE
, /**< @short Activating COMPRESS DEFLATE */
46 CONN_STATE_AUTHENTICATED
, /**< @short Logged in */
47 CONN_STATE_SELECTING_WAIT_FOR_CLOSE
, /**< @short Will be selecting another mailbox -- waiting for the CLOSED response code */
48 CONN_STATE_SELECTING
, /**< @short Selecting a mailbox -- waiting for mailbox metadata */
49 CONN_STATE_SYNCING
, /**< @short Selecting a mailbox -- performing synchronization */
50 CONN_STATE_SELECTED
, /**< @short Mailbox is selected and synchronized */
51 CONN_STATE_FETCHING_PART
, /** @short Downloading an actual body part */
52 CONN_STATE_FETCHING_MSG_METADATA
, /** @short Retrieving message metadata */
53 CONN_STATE_LOGOUT
, /**< @short Logging out */
56 QString
connectionStateToString(const ConnectionState state
);
60 #endif // IMAP_CONNECTIONSTATE_H