2012-12-28 06:03:09 -05:00
|
|
|
#ifndef HEADER_CURL_IMAP_H
|
|
|
|
#define HEADER_CURL_IMAP_H
|
2009-12-12 16:54:01 -05:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2013-01-06 14:13:58 -05:00
|
|
|
* Copyright (C) 2009 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2009-12-12 16:54:01 -05:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
|
|
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
|
|
|
|
2013-01-03 20:50:28 -05:00
|
|
|
#include "pingpong.h"
|
2009-12-12 16:54:01 -05:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* IMAP unique setup
|
|
|
|
***************************************************************************/
|
|
|
|
typedef enum {
|
2012-12-28 14:59:14 -05:00
|
|
|
IMAP_STOP, /* do nothing state, stops the state machine */
|
|
|
|
IMAP_SERVERGREET, /* waiting for the initial greeting immediately after
|
|
|
|
a connect */
|
2009-12-12 16:54:01 -05:00
|
|
|
IMAP_STARTTLS,
|
2012-12-28 14:59:14 -05:00
|
|
|
IMAP_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS
|
|
|
|
(multi mode only) */
|
2013-01-06 14:13:58 -05:00
|
|
|
IMAP_CAPABILITY,
|
2012-12-30 07:44:09 -05:00
|
|
|
IMAP_LOGIN,
|
2009-12-12 16:54:01 -05:00
|
|
|
IMAP_SELECT,
|
|
|
|
IMAP_FETCH,
|
|
|
|
IMAP_LOGOUT,
|
2012-12-28 14:59:14 -05:00
|
|
|
IMAP_LAST /* never used */
|
2009-12-12 16:54:01 -05:00
|
|
|
} imapstate;
|
|
|
|
|
|
|
|
/* imap_conn is used for struct connection-oriented data in the connectdata
|
|
|
|
struct */
|
|
|
|
struct imap_conn {
|
|
|
|
struct pingpong pp;
|
2013-01-06 14:13:58 -05:00
|
|
|
char *mailbox; /* Message ID to fetch */
|
|
|
|
unsigned int authmechs; /* Accepted authentication mechanisms */
|
|
|
|
imapstate state; /* Always use imap.c:state() to change state! */
|
|
|
|
int cmdid; /* Next command ID */
|
|
|
|
const char *idstr; /* String based response ID to wait for */
|
|
|
|
bool ssldone; /* Is connect() over SSL done? Only relevant in
|
|
|
|
multi mode */
|
2009-12-12 16:54:01 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct Curl_handler Curl_handler_imap;
|
|
|
|
extern const struct Curl_handler Curl_handler_imaps;
|
|
|
|
|
2012-12-28 06:03:09 -05:00
|
|
|
#endif /* HEADER_CURL_IMAP_H */
|