2 * Copyright 2011-2013, Haiku, Inc. All rights reserved.
3 * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
4 * Distributed under the terms of the MIT License.
6 #ifndef IMAP_LISTENER_H
7 #define IMAP_LISTENER_H
10 #include <MailFilter.h>
14 class HaikuMailFormatFilter
: public BMailFilter
{
16 HaikuMailFormatFilter(BMailProtocol
& protocol
,
17 const BMailAccountSettings
& settings
);
19 virtual BString
DescriptiveName() const;
21 BMailFilterAction
HeaderFetched(entry_ref
& ref
, BFile
& file
,
22 BMessage
& attributes
);
23 void BodyFetched(const entry_ref
& ref
, BFile
& file
,
24 BMessage
& attributes
);
26 void MessageSent(const entry_ref
& ref
, BFile
& file
);
29 void _RemoveExtraWhitespace(BString
& name
);
30 void _RemoveLeadingDots(BString
& name
);
31 BString
_ExtractName(const BString
& from
);
32 status_t
_SetType(BMessage
& attributes
,
33 const char* mimeType
);
38 BString fOutboundDirectory
;
42 #endif // IMAP_LISTENER_H