1 #ifndef MAIL_DAEMON_H 2 #define MAIL_DAEMON_H 3 /* Daemon - talking to the mail daemon 4 * 5 * Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved. 6 * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de> 7 */ 8 9 10 #include <E-mail.h> 11 12 13 #define B_MAIL_DAEMON_SIGNATURE "application/x-vnd.Be-POST" 14 15 const uint32 kMsgCheckAndSend = 'mbth'; 16 const uint32 kMsgCheckMessage = 'mnow'; 17 const uint32 kMsgSendMessages = 'msnd'; 18 const uint32 kMsgSettingsUpdated = 'mrrs'; 19 const uint32 kMsgAccountsChanged = 'macc'; 20 const uint32 kMsgSetStatusWindowMode = 'shst'; 21 const uint32 kMsgCountNewMessages = 'mnum'; 22 const uint32 kMsgMarkMessageAsRead = 'mmar'; 23 const uint32 kMsgFetchBody = 'mfeb'; 24 const uint32 kMsgBodyFetched = 'mbfe'; 25 26 27 class BMessenger; 28 29 30 class BMailDaemon { 31 public: 32 //! accountID = -1 means check all accounts 33 static status_t CheckMail(int32 accountID = -1); 34 static status_t CheckAndSendQueuedMail(int32 accountID = -1); 35 static status_t SendQueuedMail(); 36 static int32 CountNewMessages( 37 bool waitForFetchCompletion = false); 38 static status_t MarkAsRead(int32 account, const entry_ref& ref, 39 read_flags flag = B_READ); 40 static status_t FetchBody(const entry_ref& ref, 41 BMessenger* listener = NULL); 42 static status_t Quit(); 43 }; 44 45 #endif // MAIL_DAEMON_H 46