2004-09-21 02:31:50 +04:00
|
|
|
/* ProtocolConfigView - the standard config view for all protocols
|
|
|
|
**
|
|
|
|
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
|
|
|
|
*/
|
2011-02-09 04:49:01 +03:00
|
|
|
#ifndef ZOIDBERG_PROTOCOL_CONFIG_VIEW_H
|
|
|
|
#define ZOIDBERG_PROTOCOL_CONFIG_VIEW_H
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
|
|
|
|
#include <CheckBox.h>
|
|
|
|
#include <StringView.h>
|
|
|
|
#include <TextControl.h>
|
2004-09-21 02:31:50 +04:00
|
|
|
#include <View.h>
|
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
#include "MailSettings.h"
|
|
|
|
|
|
|
|
|
|
|
|
class BodyDownloadConfig : public BView {
|
|
|
|
public:
|
|
|
|
BodyDownloadConfig();
|
|
|
|
|
|
|
|
void SetTo(MailAddonSettings& settings);
|
|
|
|
|
|
|
|
void MessageReceived(BMessage *msg);
|
|
|
|
void AttachedToWindow();
|
|
|
|
void GetPreferredSize(float *width, float *height);
|
|
|
|
status_t Archive(BMessage *into, bool) const;
|
|
|
|
private:
|
|
|
|
BTextControl* fSizeBox;
|
|
|
|
BCheckBox* fPartialBox;
|
|
|
|
BStringView* fBytesLabel;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-09-21 02:31:50 +04:00
|
|
|
typedef enum {
|
|
|
|
B_MAIL_PROTOCOL_HAS_AUTH_METHODS = 1,
|
|
|
|
B_MAIL_PROTOCOL_HAS_FLAVORS = 2,
|
|
|
|
B_MAIL_PROTOCOL_HAS_USERNAME = 4,
|
|
|
|
B_MAIL_PROTOCOL_HAS_PASSWORD = 8,
|
|
|
|
B_MAIL_PROTOCOL_HAS_HOSTNAME = 16,
|
2011-02-09 04:49:01 +03:00
|
|
|
B_MAIL_PROTOCOL_CAN_LEAVE_MAIL_ON_SERVER = 32,
|
|
|
|
B_MAIL_PROTOCOL_PARTIAL_DOWNLOAD = 64
|
2004-09-21 02:31:50 +04:00
|
|
|
} b_mail_protocol_config_options;
|
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
|
2004-09-21 02:31:50 +04:00
|
|
|
class BMailProtocolConfigView : public BView {
|
2011-02-09 04:49:01 +03:00
|
|
|
public:
|
|
|
|
BMailProtocolConfigView(uint32 options_mask
|
|
|
|
= B_MAIL_PROTOCOL_HAS_FLAVORS
|
|
|
|
| B_MAIL_PROTOCOL_HAS_USERNAME
|
|
|
|
| B_MAIL_PROTOCOL_HAS_PASSWORD
|
|
|
|
| B_MAIL_PROTOCOL_HAS_HOSTNAME);
|
|
|
|
virtual ~BMailProtocolConfigView();
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
void SetTo(MailAddonSettings& archive);
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
void AddFlavor(const char *label);
|
|
|
|
void AddAuthMethod(const char *label,
|
|
|
|
bool needUserPassword = true);
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
virtual status_t Archive(BMessage *into, bool deep = true) const;
|
|
|
|
virtual void GetPreferredSize(float *width, float *height);
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void MessageReceived(BMessage *msg);
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2011-02-09 04:49:01 +03:00
|
|
|
private:
|
|
|
|
BodyDownloadConfig* fBodyDownloadConfig;
|
2004-09-21 02:31:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ZOIDBERG_PROTOCOL_CONFIG_VIEW_H */
|