2011-02-09 04:49:01 +03:00
|
|
|
#ifndef MAIL_DAEMON_H
|
|
|
|
#define MAIL_DAEMON_H
|
2004-09-21 02:34:03 +04:00
|
|
|
/* Daemon - talking to the mail daemon
|
2011-02-09 04:49:01 +03:00
|
|
|
*
|
|
|
|
* Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
|
|
|
|
* Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
|
2004-09-21 02:34:03 +04:00
|
|
|
*/
|
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
|
|
|
|
const uint32 kMsgCheckAndSend = 'mbth';
|
|
|
|
const uint32 kMsgCheckMessage = 'mnow';
|
|
|
|
const uint32 kMsgSendMessages = 'msnd';
|
|
|
|
const uint32 kMsgSettingsUpdated = 'mrrs';
|
|
|
|
const uint32 kMsgAccountsChanged = 'macc';
|
|
|
|
const uint32 kMsgSetStatusWindowMode = 'shst';
|
|
|
|
const uint32 kMsgCountNewMessages = 'mnum';
|
|
|
|
const uint32 kMsgMarkMessageAsRead = 'mmar';
|
2011-02-15 05:19:49 +03:00
|
|
|
const uint32 kMsgFetchBody = 'mfeb';
|
2011-02-09 04:49:01 +03:00
|
|
|
|
|
|
|
|
2004-09-21 02:34:03 +04:00
|
|
|
class BMailDaemon {
|
2011-02-09 04:49:01 +03:00
|
|
|
public:
|
|
|
|
//! accountID = -1 means check all accounts
|
|
|
|
static status_t CheckMail(int32 accountID = -1);
|
|
|
|
static status_t CheckAndSendQueuedMail(int32 accountID = -1);
|
|
|
|
static status_t SendQueuedMail();
|
|
|
|
static int32 CountNewMessages(
|
|
|
|
bool waitForFetchCompletion = false);
|
|
|
|
static status_t MarkAsRead(int32 account, const entry_ref& ref,
|
|
|
|
bool read = true);
|
2011-02-15 05:19:49 +03:00
|
|
|
static status_t FetchBody(const entry_ref& ref);
|
2011-02-09 04:49:01 +03:00
|
|
|
static status_t Quit();
|
2004-09-21 02:34:03 +04:00
|
|
|
};
|
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
#endif // MAIL_DAEMON_H
|