btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / mail / DefaultNotifier.h
blob5c2ada5d907646a594bdcdb2bc6b8bd3d7252aa8
1 /*
2 * Copyright 2011-2012, Haiku, Inc. All rights reserved.
3 * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef DEFAULT_NOTIFIER_H
7 #define DEFAULT_NOTIFIER_H
10 #include <Notification.h>
11 #include <String.h>
13 #include "MailProtocol.h"
15 #include "ErrorLogWindow.h"
16 #include "StatusWindow.h"
19 class DefaultNotifier : public BMailNotifier {
20 public:
21 DefaultNotifier(const char* accountName,
22 bool inbound, ErrorLogWindow* errorWindow,
23 uint32 showMode);
24 ~DefaultNotifier();
26 BMailNotifier* Clone();
28 void ShowError(const char* error);
29 void ShowMessage(const char* message);
31 void SetTotalItems(uint32 items);
32 void SetTotalItemsSize(uint64 size);
33 void ReportProgress(uint32 messages, uint64 bytes,
34 const char* message = NULL);
35 void ResetProgress(const char* message = NULL);
37 private:
38 void _NotifyIfAllowed(int timeout = 0);
40 private:
41 BString fAccountName;
42 bool fIsInbound;
43 ErrorLogWindow* fErrorWindow;
44 BNotification fNotification;
45 uint32& fShowMode;
47 uint32 fTotalItems;
48 uint32 fItemsDone;
49 uint64 fTotalSize;
50 uint64 fSizeDone;
54 #endif // DEFAULT_NOTIFIER_H