Fixed Mail build.

* The former kMsgBodyFetched (now B_MAIL_BODY_FETCHED, following the other
  message constant names in AppDefs.h) must be public.
This commit is contained in:
Axel Dörfler 2012-10-31 00:21:55 +01:00
parent e1e78d4deb
commit bcf60bbb83
4 changed files with 12 additions and 7 deletions

View File

@ -10,6 +10,11 @@
#include <Messenger.h>
enum {
B_MAIL_BODY_FETCHED = '_Mbf'
};
class BMailDaemon {
public:
BMailDaemon();

View File

@ -26,7 +26,6 @@ const uint32 kMsgSetStatusWindowMode = 'shst';
const uint32 kMsgCountNewMessages = 'mnum';
const uint32 kMsgMarkMessageAsRead = 'mmar';
const uint32 kMsgFetchBody = 'mfeb';
const uint32 kMsgBodyFetched = 'mbfe';
const uint32 kMsgSyncMessages = '&SyM';

View File

@ -832,7 +832,7 @@ TMailWindow::MarkMessageRead(entry_ref* message, read_flags flag)
// preserve the read position in the node attribute
PreserveReadingPos(true);
BMailDaemon::MarkAsRead(account, *message, flag);
BMailDaemon().MarkAsRead(account, *message, flag);
}
@ -957,7 +957,7 @@ TMailWindow::MessageReceived(BMessage *msg)
{
bool wasReadMsg = false;
switch (msg->what) {
case kMsgBodyFetched:
case B_MAIL_BODY_FETCHED:
{
status_t status = msg->FindInt32("status");
if (status != B_OK) {
@ -2474,9 +2474,10 @@ TMailWindow::Send(bool now)
int32 start = alert->Go();
if (start == 0) {
result = be_roster->Launch("application/x-vnd.Be-POST");
BMailDaemon daemon;
result = daemon.Launch();
if (result == B_OK) {
BMailDaemon::SendQueuedMail();
daemon.SendQueuedMail();
} else {
errorMessage
<< B_TRANSLATE("The mail_daemon could not be "
@ -2837,7 +2838,7 @@ TMailWindow::OpenMessage(const entry_ref *ref, uint32 characterSetForDecoding)
if (strcmp(mimeType, B_PARTIAL_MAIL_TYPE) == 0) {
BMessenger listener(this);
BMailDaemon::FetchBody(*ref, &listener);
BMailDaemon().FetchBody(*ref, &listener);
fileInfo.GetType(mimeType);
_SetDownloading(true);
} else

View File

@ -377,7 +377,7 @@ BInboundMailProtocol::MessageReceived(BMessage* message)
if (message->FindMessenger("target", &target) != B_OK)
break;
BMessage message(kMsgBodyFetched);
BMessage message(B_MAIL_BODY_FETCHED);
message.AddInt32("status", status);
message.AddRef("ref", &ref);
target.SendMessage(&message);