summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/generic/pop3driver.c
authorzautrix <zautrix>2004-09-01 10:23:29 (UTC)
committer zautrix <zautrix>2004-09-01 10:23:29 (UTC)
commit6cefbdc9c8f3f3001373f10715361e2740c45395 (patch) (side-by-side diff)
treecb2c36f57620e698913c27ca4ebe59e4a7c9d46e /kmicromail/libetpan/generic/pop3driver.c
parentb9257cb225cd29bab5d96fcdaf557926603ee587 (diff)
downloadkdepimpi-6cefbdc9c8f3f3001373f10715361e2740c45395.zip
kdepimpi-6cefbdc9c8f3f3001373f10715361e2740c45395.tar.gz
kdepimpi-6cefbdc9c8f3f3001373f10715361e2740c45395.tar.bz2
Mail fixes and libetpan updated
Diffstat (limited to 'kmicromail/libetpan/generic/pop3driver.c') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libetpan/generic/pop3driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/libetpan/generic/pop3driver.c b/kmicromail/libetpan/generic/pop3driver.c
index 20b0fc2..375879e 100644
--- a/kmicromail/libetpan/generic/pop3driver.c
+++ b/kmicromail/libetpan/generic/pop3driver.c
@@ -48,128 +48,129 @@ static int pop3driver_initialize(mailsession * session);
static void pop3driver_uninitialize(mailsession * session);
static int pop3driver_parameters(mailsession * session,
int id, void * value);
static int pop3driver_connect_stream(mailsession * session, mailstream * s);
static int pop3driver_starttls(mailsession * session);
static int pop3driver_login(mailsession * session,
char * userid, char * password);
static int pop3driver_logout(mailsession * session);
static int pop3driver_noop(mailsession * session);
static int pop3driver_status_folder(mailsession * session, char * mb,
uint32_t * result_messages, uint32_t * result_recent,
uint32_t * result_unseen);
static int pop3driver_messages_number(mailsession * session, char * mb,
uint32_t * result);
static int pop3driver_remove_message(mailsession * session, uint32_t num);
static int pop3driver_get_messages_list(mailsession * session,
struct mailmessage_list ** result);
static int pop3driver_get_message(mailsession * session,
uint32_t num, mailmessage ** result);
static mailsession_driver local_pop3_session_driver = {
.sess_name = "pop3",
.sess_initialize = pop3driver_initialize,
.sess_uninitialize = pop3driver_uninitialize,
.sess_parameters = pop3driver_parameters,
.sess_connect_stream = pop3driver_connect_stream,
.sess_connect_path = NULL,
.sess_starttls = pop3driver_starttls,
.sess_login = pop3driver_login,
.sess_logout = pop3driver_logout,
.sess_noop = pop3driver_noop,
.sess_build_folder_name = NULL,
.sess_create_folder = NULL,
.sess_delete_folder = NULL,
.sess_rename_folder = NULL,
.sess_check_folder = NULL,
.sess_examine_folder = NULL,
.sess_select_folder = NULL,
.sess_expunge_folder = NULL,
.sess_status_folder = pop3driver_status_folder,
.sess_messages_number = pop3driver_messages_number,
.sess_recent_number = pop3driver_messages_number,
.sess_unseen_number = pop3driver_messages_number,
.sess_list_folders = NULL,
.sess_lsub_folders = NULL,
.sess_subscribe_folder = NULL,
.sess_unsubscribe_folder = NULL,
.sess_append_message = NULL,
+ .sess_append_message_flags = NULL,
.sess_copy_message = NULL,
.sess_move_message = NULL,
.sess_get_messages_list = pop3driver_get_messages_list,
.sess_get_envelopes_list = maildriver_generic_get_envelopes_list,
.sess_remove_message = pop3driver_remove_message,
#if 0
.sess_search_messages = maildriver_generic_search_messages,
#endif
.sess_get_message = pop3driver_get_message,
.sess_get_message_by_uid = NULL,
};
mailsession_driver * pop3_session_driver = &local_pop3_session_driver;
static inline struct pop3_session_state_data *
get_data(mailsession * session)
{
return session->sess_data;
}
static mailpop3 * get_pop3_session(mailsession * session)
{
return get_data(session)->pop3_session;
}
static int pop3driver_initialize(mailsession * session)
{
struct pop3_session_state_data * data;
mailpop3 * pop3;
pop3 = mailpop3_new(0, NULL);
if (session == NULL)
goto err;
data = malloc(sizeof(* data));
if (data == NULL)
goto free;
data->pop3_session = pop3;
data->pop3_auth_type = POP3DRIVER_AUTH_TYPE_PLAIN;
session->sess_data = data;
return MAIL_NO_ERROR;
free:
mailpop3_free(pop3);
err:
return MAIL_ERROR_MEMORY;
}
static void pop3driver_uninitialize(mailsession * session)
{
struct pop3_session_state_data * data;
data = get_data(session);
mailpop3_free(data->pop3_session);
free(data);
session->sess_data = data;
}