Update the copyright year to 2013
[trojita.git] / src / Imap / ConnectionState.h
blob593909090a3216c9264f00fbde43a001f5650b6b
1 /* Copyright (C) 2006 - 2013 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
25 #include <QString>
27 namespace Imap
30 /** @short A human-readable state of the connection to the IMAP server */
31 typedef enum {
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, /**< @short Selecting a mailbox -- initial state */
48 CONN_STATE_SYNCING, /**< @short Selecting a mailbox -- performing synchronization */
49 CONN_STATE_SELECTED, /**< @short Mailbox is selected and synchronized */
50 CONN_STATE_FETCHING_PART, /** @short Downloading an actual body part */
51 CONN_STATE_FETCHING_MSG_METADATA, /** @short Retrieving message metadata */
52 CONN_STATE_LOGOUT, /**< @short Logging out */
53 } ConnectionState;
55 QString connectionStateToString(const ConnectionState state);
59 #endif // IMAP_CONNECTIONSTATE_H