* Style cleanup.
* Changed quote from double to uint64. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42946 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -39,14 +39,6 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
EditableListItem::EditableListItem()
|
|
||||||
:
|
|
||||||
fListView(NULL)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class CheckBoxItem : public BStringItem, public EditableListItem {
|
class CheckBoxItem : public BStringItem, public EditableListItem {
|
||||||
public:
|
public:
|
||||||
CheckBoxItem(const char* text, bool checked);
|
CheckBoxItem(const char* text, bool checked);
|
||||||
@@ -65,6 +57,67 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class EditListView : public BListView {
|
||||||
|
public:
|
||||||
|
EditListView(const char* name,
|
||||||
|
list_view_type type
|
||||||
|
= B_SINGLE_SELECTION_LIST,
|
||||||
|
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
||||||
|
| B_NAVIGABLE);
|
||||||
|
|
||||||
|
virtual void MouseDown(BPoint where);
|
||||||
|
virtual void MouseUp(BPoint where);
|
||||||
|
virtual void FrameResized(float newWidth, float newHeight);
|
||||||
|
|
||||||
|
private:
|
||||||
|
EditableListItem* fLastMouseDown;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class StatusWindow : public BWindow {
|
||||||
|
public:
|
||||||
|
StatusWindow(const char* text)
|
||||||
|
:
|
||||||
|
BWindow(BRect(0, 0, 10, 10), B_TRANSLATE("status"), B_MODAL_WINDOW_LOOK,
|
||||||
|
B_MODAL_APP_WINDOW_FEEL, B_NO_WORKSPACE_ACTIVATION | B_NOT_ZOOMABLE
|
||||||
|
| B_AVOID_FRONT | B_NOT_RESIZABLE)
|
||||||
|
{
|
||||||
|
BView* rootView = new BView(Bounds(), "root", B_FOLLOW_ALL,
|
||||||
|
B_WILL_DRAW);
|
||||||
|
AddChild(rootView);
|
||||||
|
rootView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
float spacing = be_control_look->DefaultItemSpacing();
|
||||||
|
BALMLayout* layout = new BALMLayout(spacing);
|
||||||
|
rootView->SetLayout(layout);
|
||||||
|
layout->SetInset(spacing);
|
||||||
|
|
||||||
|
BStringView* string = new BStringView("text", text);
|
||||||
|
layout->AddView(string, layout->Left(), layout->Top(), layout->Right(),
|
||||||
|
layout->Bottom());
|
||||||
|
BSize min = layout->MinSize();
|
||||||
|
ResizeTo(min.Width(), min.Height());
|
||||||
|
CenterOnScreen();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint32 kMsgApplyButton = '&Abu';
|
||||||
|
const uint32 kMsgInit = '&Ini';
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
EditableListItem::EditableListItem()
|
||||||
|
:
|
||||||
|
fListView(NULL)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
CheckBoxItem::CheckBoxItem(const char* text, bool checked)
|
CheckBoxItem::CheckBoxItem(const char* text, bool checked)
|
||||||
:
|
:
|
||||||
@@ -134,21 +187,7 @@ CheckBoxItem::MouseUp(BPoint where)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class EditListView : public BListView {
|
// #pragma mark -
|
||||||
public:
|
|
||||||
EditListView(const char* name,
|
|
||||||
list_view_type type
|
|
||||||
= B_SINGLE_SELECTION_LIST,
|
|
||||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
|
|
||||||
| B_NAVIGABLE);
|
|
||||||
|
|
||||||
virtual void MouseDown(BPoint where);
|
|
||||||
virtual void MouseUp(BPoint where);
|
|
||||||
virtual void FrameResized(float newWidth, float newHeight);
|
|
||||||
|
|
||||||
private:
|
|
||||||
EditableListItem* fLastMouseDown;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
EditListView::EditListView(const char* name, list_view_type type, uint32 flags)
|
EditListView::EditListView(const char* name, list_view_type type, uint32 flags)
|
||||||
@@ -156,7 +195,7 @@ EditListView::EditListView(const char* name, list_view_type type, uint32 flags)
|
|||||||
BListView(name, type, flags),
|
BListView(name, type, flags),
|
||||||
fLastMouseDown(NULL)
|
fLastMouseDown(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -201,42 +240,14 @@ EditListView::FrameResized(float newWidth, float newHeight)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class StatusWindow : public BWindow {
|
// #pragma mark -
|
||||||
public:
|
|
||||||
StatusWindow(const char* text)
|
|
||||||
:
|
|
||||||
BWindow(BRect(0, 0, 10, 10), B_TRANSLATE("status"), B_MODAL_WINDOW_LOOK,
|
|
||||||
B_MODAL_APP_WINDOW_FEEL, B_NO_WORKSPACE_ACTIVATION | B_NOT_ZOOMABLE
|
|
||||||
| B_AVOID_FRONT | B_NOT_RESIZABLE)
|
|
||||||
{
|
|
||||||
BView* rootView = new BView(Bounds(), "root", B_FOLLOW_ALL,
|
|
||||||
B_WILL_DRAW);
|
|
||||||
AddChild(rootView);
|
|
||||||
rootView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
|
||||||
float spacing = be_control_look->DefaultItemSpacing();
|
|
||||||
BALMLayout* layout = new BALMLayout(spacing);
|
|
||||||
rootView->SetLayout(layout);
|
|
||||||
layout->SetInset(spacing);
|
|
||||||
|
|
||||||
BStringView* string = new BStringView("text", text);
|
|
||||||
layout->AddView(string, layout->Left(), layout->Top(), layout->Right(),
|
|
||||||
layout->Bottom());
|
|
||||||
BSize min = layout->MinSize();
|
|
||||||
ResizeTo(min.Width(), min.Height());
|
|
||||||
CenterOnScreen();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const uint32 kMsgApplyButton = '&Abu';
|
|
||||||
const uint32 kMsgInit = '&Ini';
|
|
||||||
|
|
||||||
|
|
||||||
FolderConfigWindow::FolderConfigWindow(BRect parent, const BMessage& settings)
|
FolderConfigWindow::FolderConfigWindow(BRect parent, const BMessage& settings)
|
||||||
:
|
:
|
||||||
BWindow(BRect(0, 0, 300, 300), B_TRANSLATE("IMAP Folders"),
|
BWindow(BRect(0, 0, 300, 300), B_TRANSLATE("IMAP Folders"),
|
||||||
B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL, B_NO_WORKSPACE_ACTIVATION
|
B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
|
||||||
| B_NOT_ZOOMABLE | B_AVOID_FRONT),
|
B_NO_WORKSPACE_ACTIVATION | B_NOT_ZOOMABLE | B_AVOID_FRONT),
|
||||||
fSettings(settings)
|
fSettings(settings)
|
||||||
{
|
{
|
||||||
BView* rootView = new BView(Bounds(), "root", B_FOLLOW_ALL, B_WILL_DRAW);
|
BView* rootView = new BView(Bounds(), "root", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
@@ -316,7 +327,7 @@ FolderConfigWindow::_LoadFolders()
|
|||||||
|
|
||||||
BString password;
|
BString password;
|
||||||
char* passwd = get_passwd(&fSettings, "cpasswd");
|
char* passwd = get_passwd(&fSettings, "cpasswd");
|
||||||
if (passwd) {
|
if (passwd != NULL) {
|
||||||
password = passwd;
|
password = passwd;
|
||||||
delete[] passwd;
|
delete[] passwd;
|
||||||
}
|
}
|
||||||
@@ -331,7 +342,7 @@ FolderConfigWindow::_LoadFolders()
|
|||||||
item->SetListView(fFolderListView);
|
item->SetListView(fFolderListView);
|
||||||
}
|
}
|
||||||
|
|
||||||
double used, total;
|
uint64 used, total;
|
||||||
if (fIMAPFolders.GetQuota(used, total) == B_OK) {
|
if (fIMAPFolders.GetQuota(used, total) == B_OK) {
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
BString quotaString = "Server storage: ";
|
BString quotaString = "Server storage: ";
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ private:
|
|||||||
class IMAPInboundProtocol;
|
class IMAPInboundProtocol;
|
||||||
|
|
||||||
|
|
||||||
int32 watch_mailbox(void* data);
|
|
||||||
|
|
||||||
|
|
||||||
/*! Just wait for a IDLE (watching) IMAP response in this thread. */
|
/*! Just wait for a IDLE (watching) IMAP response in this thread. */
|
||||||
class IMAPMailboxThread {
|
class IMAPMailboxThread {
|
||||||
public:
|
public:
|
||||||
@@ -57,11 +54,11 @@ public:
|
|||||||
status_t StopWatchingMailbox();
|
status_t StopWatchingMailbox();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static status_t _WatchThreadFunction(void* data);
|
||||||
void _Watch();
|
void _Watch();
|
||||||
|
|
||||||
friend int32 watch_mailbox(void* data);
|
private:
|
||||||
|
IMAPInboundProtocol& fProtocol;
|
||||||
IMAPInboundProtocol& fProtocol;
|
|
||||||
IMAPMailbox& fIMAPMailbox;
|
IMAPMailbox& fIMAPMailbox;
|
||||||
|
|
||||||
BLocker fLock;
|
BLocker fLock;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ IMAPRootInboundProtocol::IMAPRootInboundProtocol(BMailAccountSettings* settings)
|
|||||||
:
|
:
|
||||||
IMAPInboundProtocol(settings, "INBOX")
|
IMAPInboundProtocol(settings, "INBOX")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -179,6 +178,9 @@ IMAPRootInboundProtocol::_FindThreadFor(const entry_ref& ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
InboundProtocol*
|
InboundProtocol*
|
||||||
instantiate_inbound_protocol(BMailAccountSettings* settings)
|
instantiate_inbound_protocol(BMailAccountSettings* settings)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,13 +66,13 @@ IMAPConfig::IMAPConfig(MailAddonSettings& settings,
|
|||||||
|
|
||||||
SetTo(settings);
|
SetTo(settings);
|
||||||
|
|
||||||
((BControl *)(FindView("leave_mail_on_server")))->SetValue(B_CONTROL_ON);
|
((BControl*)(FindView("leave_mail_on_server")))->SetValue(B_CONTROL_ON);
|
||||||
((BControl *)(FindView("leave_mail_on_server")))->Hide();
|
((BControl*)(FindView("leave_mail_on_server")))->Hide();
|
||||||
|
|
||||||
BRect frame = FindView("delete_remote_when_local")->Frame();
|
BRect frame = FindView("delete_remote_when_local")->Frame();
|
||||||
|
|
||||||
((BControl *)(FindView("delete_remote_when_local")))->SetEnabled(true);
|
((BControl*)(FindView("delete_remote_when_local")))->SetEnabled(true);
|
||||||
((BControl *)(FindView("delete_remote_when_local")))->MoveBy(0, -25);
|
((BControl*)(FindView("delete_remote_when_local")))->MoveBy(0, -25);
|
||||||
|
|
||||||
fIMAPFolderButton = new BButton(frame, "IMAP Folders", B_TRANSLATE(
|
fIMAPFolderButton = new BButton(frame, "IMAP Folders", B_TRANSLATE(
|
||||||
"IMAP Folders"), new BMessage(kMsgOpenIMAPFolder));
|
"IMAP Folders"), new BMessage(kMsgOpenIMAPFolder));
|
||||||
@@ -83,7 +83,7 @@ IMAPConfig::IMAPConfig(MailAddonSettings& settings,
|
|||||||
BPath defaultFolder = BPrivate::default_mail_directory();
|
BPath defaultFolder = BPrivate::default_mail_directory();
|
||||||
defaultFolder.Append(accountSettings.Name());
|
defaultFolder.Append(accountSettings.Name());
|
||||||
|
|
||||||
fFileView = new BMailFileConfigView(B_TRANSLATE("Destination:"),
|
fFileView = new BMailFileConfigView(B_TRANSLATE("Destination:"),
|
||||||
"destination", false, defaultFolder.Path());
|
"destination", false, defaultFolder.Path());
|
||||||
fFileView->SetTo(&settings.Settings(), NULL);
|
fFileView->SetTo(&settings.Settings(), NULL);
|
||||||
AddChild(fFileView);
|
AddChild(fFileView);
|
||||||
@@ -95,7 +95,6 @@ IMAPConfig::IMAPConfig(MailAddonSettings& settings,
|
|||||||
|
|
||||||
IMAPConfig::~IMAPConfig()
|
IMAPConfig::~IMAPConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -119,18 +118,18 @@ void
|
|||||||
IMAPConfig::MessageReceived(BMessage* message)
|
IMAPConfig::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case kMsgOpenIMAPFolder:
|
case kMsgOpenIMAPFolder:
|
||||||
{
|
{
|
||||||
BMessage settings;
|
BMessage settings;
|
||||||
Archive(&settings);
|
Archive(&settings);
|
||||||
BWindow* window = new FolderConfigWindow(Window()->Frame(),
|
BWindow* window = new FolderConfigWindow(Window()->Frame(),
|
||||||
settings);
|
settings);
|
||||||
window->Show();
|
window->Show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BMailProtocolConfigView::MessageReceived(message);
|
BMailProtocolConfigView::MessageReceived(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +141,9 @@ IMAPConfig::AttachedToWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
BView*
|
BView*
|
||||||
instantiate_config_panel(MailAddonSettings& settings,
|
instantiate_config_panel(MailAddonSettings& settings,
|
||||||
BMailAccountSettings& accountSettings)
|
BMailAccountSettings& accountSettings)
|
||||||
|
|||||||
@@ -29,16 +29,16 @@ IMAPFolders::GetFolders(FolderList& folders)
|
|||||||
status_t status = _GetAllFolders(allFolders);
|
status_t status = _GetAllFolders(allFolders);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
StringList subscibedFolders;
|
StringList subscribedFolders;
|
||||||
status = _GetSubscribedFolders(subscibedFolders);
|
status = _GetSubscribedFolders(subscribedFolders);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < allFolders.size(); i++) {
|
for (unsigned int i = 0; i < allFolders.size(); i++) {
|
||||||
FolderInfo info;
|
FolderInfo info;
|
||||||
info.folder = allFolders[i];
|
info.folder = allFolders[i];
|
||||||
for (unsigned int a = 0; a < subscibedFolders.size(); a++) {
|
for (unsigned int a = 0; a < subscribedFolders.size(); a++) {
|
||||||
if (allFolders[i] == subscibedFolders[a]
|
if (allFolders[i] == subscribedFolders[a]
|
||||||
|| allFolders[i].ICompare("INBOX") == 0) {
|
|| allFolders[i].ICompare("INBOX") == 0) {
|
||||||
info.subscribed = true;
|
info.subscribed = true;
|
||||||
break;
|
break;
|
||||||
@@ -48,10 +48,10 @@ IMAPFolders::GetFolders(FolderList& folders)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// you could be subscribed to a folder which not exist currently, add them:
|
// you could be subscribed to a folder which not exist currently, add them:
|
||||||
for (unsigned int a = 0; a < subscibedFolders.size(); a++) {
|
for (unsigned int a = 0; a < subscribedFolders.size(); a++) {
|
||||||
bool isInlist = false;
|
bool isInlist = false;
|
||||||
for (unsigned int i = 0; i < allFolders.size(); i++) {
|
for (unsigned int i = 0; i < allFolders.size(); i++) {
|
||||||
if (subscibedFolders[a] == allFolders[i]) {
|
if (subscribedFolders[a] == allFolders[i]) {
|
||||||
isInlist = true;
|
isInlist = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ IMAPFolders::GetFolders(FolderList& folders)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
FolderInfo info;
|
FolderInfo info;
|
||||||
info.folder = subscibedFolders[a];
|
info.folder = subscribedFolders[a];
|
||||||
info.subscribed = true;
|
info.subscribed = true;
|
||||||
folders.push_back(info);
|
folders.push_back(info);
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ IMAPFolders::UnsubscribeFolder(const char* folder)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
IMAPFolders::GetQuota(double& used, double& total)
|
IMAPFolders::GetQuota(uint64& used, uint64& total)
|
||||||
{
|
{
|
||||||
if (fCapabilityHandler.Capabilities() == "")
|
if (fCapabilityHandler.Capabilities() == "")
|
||||||
ProcessCommand(fCapabilityHandler.Command());
|
ProcessCommand(fCapabilityHandler.Command());
|
||||||
@@ -100,7 +100,7 @@ IMAPFolders::GetQuota(double& used, double& total)
|
|||||||
|
|
||||||
used = quotaCommand.UsedStorage();
|
used = quotaCommand.UsedStorage();
|
||||||
total = quotaCommand.TotalStorage();
|
total = quotaCommand.TotalStorage();
|
||||||
return status;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public:
|
|||||||
status_t SubscribeFolder(const char* folder);
|
status_t SubscribeFolder(const char* folder);
|
||||||
status_t UnsubscribeFolder(const char* folder);
|
status_t UnsubscribeFolder(const char* folder);
|
||||||
|
|
||||||
status_t GetQuota(double& used, double& total);
|
status_t GetQuota(uint64& used, uint64& total);
|
||||||
private:
|
private:
|
||||||
status_t _GetAllFolders(StringList& folders);
|
status_t _GetAllFolders(StringList& folders);
|
||||||
status_t _GetSubscribedFolders(StringList& folders);
|
status_t _GetSubscribedFolders(StringList& folders);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "IMAPHandler.h"
|
#include "IMAPHandler.h"
|
||||||
|
|
||||||
#include <stdlib.h> // for atoi
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <AutoDeleter.h>
|
#include <AutoDeleter.h>
|
||||||
|
|
||||||
@@ -17,12 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#define DEBUG_IMAP_HANDLER
|
#define DEBUG_IMAP_HANDLER
|
||||||
|
|
||||||
#ifdef DEBUG_IMAP_HANDLER
|
#ifdef DEBUG_IMAP_HANDLER
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#define TRACE(x...) printf(x)
|
# define TRACE(x...) printf(x)
|
||||||
#else
|
#else
|
||||||
#define TRACE(x...) /* nothing */
|
# define TRACE(x...) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -31,7 +30,6 @@ using namespace BPrivate;
|
|||||||
|
|
||||||
IMAPCommand::~IMAPCommand()
|
IMAPCommand::~IMAPCommand()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,16 +46,17 @@ IMAPMailboxCommand::IMAPMailboxCommand(IMAPMailbox& mailbox)
|
|||||||
fStorage(mailbox.GetStorage()),
|
fStorage(mailbox.GetStorage()),
|
||||||
fConnectionReader(mailbox.GetConnectionReader())
|
fConnectionReader(mailbox.GetConnectionReader())
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IMAPMailboxCommand::~IMAPMailboxCommand()
|
IMAPMailboxCommand::~IMAPMailboxCommand()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
MailboxSelectHandler::MailboxSelectHandler(IMAPMailbox& mailbox)
|
MailboxSelectHandler::MailboxSelectHandler(IMAPMailbox& mailbox)
|
||||||
:
|
:
|
||||||
IMAPMailboxCommand(mailbox),
|
IMAPMailboxCommand(mailbox),
|
||||||
@@ -66,7 +65,6 @@ MailboxSelectHandler::MailboxSelectHandler(IMAPMailbox& mailbox)
|
|||||||
fNextUID(-1),
|
fNextUID(-1),
|
||||||
fUIDValidity(-1)
|
fUIDValidity(-1)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -105,11 +103,13 @@ MailboxSelectHandler::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
CapabilityHandler::CapabilityHandler()
|
CapabilityHandler::CapabilityHandler()
|
||||||
:
|
:
|
||||||
fCapabilities("")
|
fCapabilities("")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ CapabilityHandler::Capabilities()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// FetchHandler
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
FetchMinMessageCommand::FetchMinMessageCommand(IMAPMailbox& mailbox,
|
FetchMinMessageCommand::FetchMinMessageCommand(IMAPMailbox& mailbox,
|
||||||
@@ -152,7 +152,6 @@ FetchMinMessageCommand::FetchMinMessageCommand(IMAPMailbox& mailbox,
|
|||||||
fMinMessageList(list),
|
fMinMessageList(list),
|
||||||
fData(data)
|
fData(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -167,7 +166,6 @@ FetchMinMessageCommand::FetchMinMessageCommand(IMAPMailbox& mailbox,
|
|||||||
fMinMessageList(list),
|
fMinMessageList(list),
|
||||||
fData(data)
|
fData(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -255,6 +253,9 @@ FetchMinMessageCommand::ExtractFlags(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
FetchMessageListCommand::FetchMessageListCommand(IMAPMailbox& mailbox,
|
FetchMessageListCommand::FetchMessageListCommand(IMAPMailbox& mailbox,
|
||||||
MinMessageList* list, int32 nextId)
|
MinMessageList* list, int32 nextId)
|
||||||
:
|
:
|
||||||
@@ -263,7 +264,6 @@ FetchMessageListCommand::FetchMessageListCommand(IMAPMailbox& mailbox,
|
|||||||
fMinMessageList(list),
|
fMinMessageList(list),
|
||||||
fNextId(nextId)
|
fNextId(nextId)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -294,6 +294,9 @@ FetchMessageListCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
FetchMessageCommand::FetchMessageCommand(IMAPMailbox& mailbox, int32 message,
|
FetchMessageCommand::FetchMessageCommand(IMAPMailbox& mailbox, int32 message,
|
||||||
BPositionIO* data, int32 fetchBodyLimit)
|
BPositionIO* data, int32 fetchBodyLimit)
|
||||||
:
|
:
|
||||||
@@ -304,7 +307,6 @@ FetchMessageCommand::FetchMessageCommand(IMAPMailbox& mailbox, int32 message,
|
|||||||
fOutData(data),
|
fOutData(data),
|
||||||
fFetchBodyLimit(fetchBodyLimit)
|
fFetchBodyLimit(fetchBodyLimit)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -431,6 +433,9 @@ FetchMessageCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
FetchBodyCommand::FetchBodyCommand(IMAPMailbox& mailbox, int32 message,
|
FetchBodyCommand::FetchBodyCommand(IMAPMailbox& mailbox, int32 message,
|
||||||
BPositionIO* data)
|
BPositionIO* data)
|
||||||
:
|
:
|
||||||
@@ -439,7 +444,6 @@ FetchBodyCommand::FetchBodyCommand(IMAPMailbox& mailbox, int32 message,
|
|||||||
fMessage(message),
|
fMessage(message),
|
||||||
fOutData(data)
|
fOutData(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -502,6 +506,9 @@ FetchBodyCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
SetFlagsCommand::SetFlagsCommand(IMAPMailbox& mailbox, int32 message,
|
SetFlagsCommand::SetFlagsCommand(IMAPMailbox& mailbox, int32 message,
|
||||||
int32 flags)
|
int32 flags)
|
||||||
:
|
:
|
||||||
@@ -552,6 +559,9 @@ SetFlagsCommand::GenerateFlagList(int32 flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
AppendCommand::AppendCommand(IMAPMailbox& mailbox, BPositionIO& message,
|
AppendCommand::AppendCommand(IMAPMailbox& mailbox, BPositionIO& message,
|
||||||
off_t size, int32 flags, time_t time)
|
off_t size, int32 flags, time_t time)
|
||||||
:
|
:
|
||||||
@@ -562,7 +572,6 @@ AppendCommand::AppendCommand(IMAPMailbox& mailbox, BPositionIO& message,
|
|||||||
fFlags(flags),
|
fFlags(flags),
|
||||||
fTime(time)
|
fTime(time)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -607,13 +616,16 @@ AppendCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
ExistsHandler::ExistsHandler(IMAPMailbox& mailbox)
|
ExistsHandler::ExistsHandler(IMAPMailbox& mailbox)
|
||||||
:
|
:
|
||||||
IMAPMailboxCommand(mailbox)
|
IMAPMailboxCommand(mailbox)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ExistsHandler::Handle(const BString& response)
|
ExistsHandler::Handle(const BString& response)
|
||||||
{
|
{
|
||||||
@@ -647,13 +659,16 @@ ExistsHandler::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
ExpungeCommmand::ExpungeCommmand(IMAPMailbox& mailbox)
|
ExpungeCommmand::ExpungeCommmand(IMAPMailbox& mailbox)
|
||||||
:
|
:
|
||||||
IMAPMailboxCommand(mailbox)
|
IMAPMailboxCommand(mailbox)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
ExpungeCommmand::Command()
|
ExpungeCommmand::Command()
|
||||||
{
|
{
|
||||||
@@ -668,13 +683,16 @@ ExpungeCommmand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
ExpungeHandler::ExpungeHandler(IMAPMailbox& mailbox)
|
ExpungeHandler::ExpungeHandler(IMAPMailbox& mailbox)
|
||||||
:
|
:
|
||||||
IMAPMailboxCommand(mailbox)
|
IMAPMailboxCommand(mailbox)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ExpungeHandler::Handle(const BString& response)
|
ExpungeHandler::Handle(const BString& response)
|
||||||
{
|
{
|
||||||
@@ -703,11 +721,13 @@ ExpungeHandler::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
FlagsHandler::FlagsHandler(IMAPMailbox& mailbox)
|
FlagsHandler::FlagsHandler(IMAPMailbox& mailbox)
|
||||||
:
|
:
|
||||||
IMAPMailboxCommand(mailbox)
|
IMAPMailboxCommand(mailbox)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -731,6 +751,9 @@ FlagsHandler::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
ListCommand::Command()
|
ListCommand::Command()
|
||||||
{
|
{
|
||||||
@@ -783,6 +806,9 @@ ListCommand::ParseList(const char* command, const BString& response,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
ListSubscribedCommand::Command()
|
ListSubscribedCommand::Command()
|
||||||
{
|
{
|
||||||
@@ -805,11 +831,13 @@ ListSubscribedCommand::FolderList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
SubscribeCommand::SubscribeCommand(const char* mailboxName)
|
SubscribeCommand::SubscribeCommand(const char* mailboxName)
|
||||||
:
|
:
|
||||||
fMailboxName(mailboxName)
|
fMailboxName(mailboxName)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -830,11 +858,13 @@ SubscribeCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
UnsubscribeCommand::UnsubscribeCommand(const char* mailboxName)
|
UnsubscribeCommand::UnsubscribeCommand(const char* mailboxName)
|
||||||
:
|
:
|
||||||
fMailboxName(mailboxName)
|
fMailboxName(mailboxName)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -855,15 +885,15 @@ UnsubscribeCommand::Handle(const BString& response)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
GetQuotaCommand::GetQuotaCommand(const char* mailboxName)
|
GetQuotaCommand::GetQuotaCommand(const char* mailboxName)
|
||||||
:
|
:
|
||||||
fMailboxName(mailboxName),
|
fMailboxName(mailboxName),
|
||||||
|
fUsedStorage(0),
|
||||||
fUsedStorage(-1),
|
fTotalStorage(0)
|
||||||
fTotalStorage(-1)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -885,23 +915,21 @@ GetQuotaCommand::Handle(const BString& response)
|
|||||||
|
|
||||||
BString data = IMAPParser::ExtractBetweenBrackets(response, "(", ")");
|
BString data = IMAPParser::ExtractBetweenBrackets(response, "(", ")");
|
||||||
IMAPParser::RemovePrimitiveFromLeft(data);
|
IMAPParser::RemovePrimitiveFromLeft(data);
|
||||||
fUsedStorage = IMAPParser::RemoveIntegerFromLeft(data);
|
fUsedStorage = (uint64)IMAPParser::RemoveIntegerFromLeft(data) * 1024;
|
||||||
fUsedStorage *= 1024;
|
fTotalStorage = (uint64)IMAPParser::RemoveIntegerFromLeft(data) * 1024;
|
||||||
fTotalStorage = IMAPParser::RemoveIntegerFromLeft(data);
|
|
||||||
fTotalStorage *= 1024;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double
|
uint64
|
||||||
GetQuotaCommand::UsedStorage()
|
GetQuotaCommand::UsedStorage()
|
||||||
{
|
{
|
||||||
return fUsedStorage;
|
return fUsedStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double
|
uint64
|
||||||
GetQuotaCommand::TotalStorage()
|
GetQuotaCommand::TotalStorage()
|
||||||
{
|
{
|
||||||
return fTotalStorage;
|
return fTotalStorage;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010, Haiku Inc. All Rights Reserved.
|
* Copyright 2010-2011, Haiku Inc. All Rights Reserved.
|
||||||
* Copyright 2010 Clemens Zeidler. All rights reserved.
|
* Copyright 2010 Clemens Zeidler. All rights reserved.
|
||||||
*
|
*
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
@@ -74,10 +74,10 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
struct MinMessage {
|
struct MinMessage {
|
||||||
MinMessage();
|
MinMessage();
|
||||||
|
|
||||||
int32 uid;
|
int32 uid;
|
||||||
int32 flags;
|
int32 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -99,6 +99,7 @@ public:
|
|||||||
static bool ParseMinMessage(const BString& response,
|
static bool ParseMinMessage(const BString& response,
|
||||||
MinMessage& minMessage);
|
MinMessage& minMessage);
|
||||||
static int32 ExtractFlags(const BString& response);
|
static int32 ExtractFlags(const BString& response);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32 fMessage;
|
int32 fMessage;
|
||||||
int32 fEndMessage;
|
int32 fEndMessage;
|
||||||
@@ -169,6 +170,7 @@ public:
|
|||||||
bool Handle(const BString& response);
|
bool Handle(const BString& response);
|
||||||
|
|
||||||
static BString GenerateFlagList(int32 flags);
|
static BString GenerateFlagList(int32 flags);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32 fMessage;
|
int32 fMessage;
|
||||||
int32 fFlags;
|
int32 fFlags;
|
||||||
@@ -183,6 +185,7 @@ public:
|
|||||||
|
|
||||||
BString Command();
|
BString Command();
|
||||||
bool Handle(const BString& response);
|
bool Handle(const BString& response);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BPositionIO& fMessageData;
|
BPositionIO& fMessageData;
|
||||||
off_t fDataSize;
|
off_t fDataSize;
|
||||||
@@ -287,15 +290,14 @@ public:
|
|||||||
BString Command();
|
BString Command();
|
||||||
bool Handle(const BString& response);
|
bool Handle(const BString& response);
|
||||||
|
|
||||||
double UsedStorage();
|
uint64 UsedStorage();
|
||||||
double TotalStorage();
|
uint64 TotalStorage();
|
||||||
private:
|
private:
|
||||||
BString fMailboxName;
|
BString fMailboxName;
|
||||||
|
|
||||||
double fUsedStorage;
|
uint64 fUsedStorage;
|
||||||
double fTotalStorage;
|
uint64 fTotalStorage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // IMAP_HANDLER_H
|
#endif // IMAP_HANDLER_H
|
||||||
|
|||||||
@@ -12,12 +12,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#define DEBUG_IMAP_MAILBOX
|
#define DEBUG_IMAP_MAILBOX
|
||||||
|
|
||||||
#ifdef DEBUG_IMAP_MAILBOX
|
#ifdef DEBUG_IMAP_MAILBOX
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#define TRACE(x...) printf(x)
|
# define TRACE(x...) printf(x)
|
||||||
#else
|
#else
|
||||||
#define TRACE(x...) /* nothing */
|
# define TRACE(x...) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -28,6 +27,9 @@ MinMessage::MinMessage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
IMAPMailbox::IMAPMailbox(IMAPStorage& storage)
|
IMAPMailbox::IMAPMailbox(IMAPStorage& storage)
|
||||||
:
|
:
|
||||||
fStorage(storage),
|
fStorage(storage),
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Haiku Inc. All Rights Reserved.
|
||||||
|
* Copyright 2010 Clemens Zeidler. All rights reserved.
|
||||||
|
*
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "IMAPParser.h"
|
#include "IMAPParser.h"
|
||||||
|
|
||||||
#include <stdlib.h> // for atoi
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
BString
|
BString
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
#else
|
#else
|
||||||
#define TRACE(x...) /* nothing */
|
#define TRACE(x...) /* nothing */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ConnectionReader::ConnectionReader(ServerConnection* connection)
|
ConnectionReader::ConnectionReader(ServerConnection* connection)
|
||||||
:
|
:
|
||||||
fServerConnection(connection)
|
fServerConnection(connection)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -130,6 +130,9 @@ ConnectionReader::_ExtractTillEndOfLine(BString& out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
IMAPProtocol::IMAPProtocol()
|
IMAPProtocol::IMAPProtocol()
|
||||||
:
|
:
|
||||||
fServerConnection(&fOwnServerConnection),
|
fServerConnection(&fOwnServerConnection),
|
||||||
@@ -138,7 +141,6 @@ IMAPProtocol::IMAPProtocol()
|
|||||||
fStopNow(0),
|
fStopNow(0),
|
||||||
fIsConnected(false)
|
fIsConnected(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +152,6 @@ IMAPProtocol::IMAPProtocol(IMAPProtocol& connection)
|
|||||||
fStopNow(0),
|
fStopNow(0),
|
||||||
fIsConnected(false)
|
fIsConnected(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -320,7 +321,7 @@ IMAPProtocol::HandleResponse(int32 commandId, bigtime_t timeout, bool disconnect
|
|||||||
TRACE("S:read error %s", line.String());
|
TRACE("S:read error %s", line.String());
|
||||||
_Disconnect();
|
_Disconnect();
|
||||||
} else if (disconnectOnTimeout) {
|
} else if (disconnectOnTimeout) {
|
||||||
_Disconnect();
|
_Disconnect();
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2011, Haiku Inc. All Rights Reserved.
|
||||||
|
* Copyright 2010 Clemens Zeidler. All rights reserved.
|
||||||
|
*
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "IMAPStorage.h"
|
#include "IMAPStorage.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -13,12 +21,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#define DEBUG_IMAP_STORAGE
|
#define DEBUG_IMAP_STORAGE
|
||||||
|
|
||||||
#ifdef DEBUG_IMAP_STORAGE
|
#ifdef DEBUG_IMAP_STORAGE
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#define TRACE(x...) printf(x)
|
# define TRACE(x...) printf(x)
|
||||||
#else
|
#else
|
||||||
#define TRACE(x...) /* nothing */
|
# define TRACE(x...) /* nothing */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -100,12 +107,7 @@ IMAPMailboxSync::Sync(IMAPStorage& storage, IMAPMailbox& mailbox)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32
|
// #pragma mark -
|
||||||
ReadDirThreadFunction(void *data)
|
|
||||||
{
|
|
||||||
IMAPStorage* storage = (IMAPStorage*)data;
|
|
||||||
return storage->_ReadFilesThread();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IMAPStorage::IMAPStorage()
|
IMAPStorage::IMAPStorage()
|
||||||
@@ -134,7 +136,7 @@ IMAPStorage::StartReadDatabase()
|
|||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
thread_id id = spawn_thread(ReadDirThreadFunction, "read mailbox",
|
thread_id id = spawn_thread(_ReadFilesThreadFunction, "read mailbox",
|
||||||
B_LOW_PRIORITY, this);
|
B_LOW_PRIORITY, this);
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
return id;
|
return id;
|
||||||
@@ -417,7 +419,15 @@ IMAPStorage::UIDToRef(int32 uid, entry_ref& ref)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
IMAPStorage::_ReadFilesThread()
|
IMAPStorage::_ReadFilesThreadFunction(void* data)
|
||||||
|
{
|
||||||
|
IMAPStorage* storage = (IMAPStorage*)data;
|
||||||
|
return storage->_ReadFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
IMAPStorage::_ReadFiles()
|
||||||
{
|
{
|
||||||
fMailEntryMap.clear();
|
fMailEntryMap.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ public:
|
|||||||
status_t ReadUniqueID(BNode& node, int32& uid);
|
status_t ReadUniqueID(BNode& node, int32& uid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend int32 ReadDirThreadFunction(void *data);
|
static status_t _ReadFilesThreadFunction(void* data);
|
||||||
|
status_t _ReadFiles();
|
||||||
status_t _ReadFilesThread();
|
|
||||||
|
|
||||||
status_t _WriteFlags(int32 flags, BNode& node);
|
status_t _WriteFlags(int32 flags, BNode& node);
|
||||||
status_t _WriteUniqueID(BNode& node, int32 uid);
|
status_t _WriteUniqueID(BNode& node, int32 uid);
|
||||||
|
|
||||||
|
private:
|
||||||
BPath fMailboxPath;
|
BPath fMailboxPath;
|
||||||
|
|
||||||
sem_id fLoadDatabaseLock;
|
sem_id fLoadDatabaseLock;
|
||||||
@@ -104,6 +104,7 @@ public:
|
|||||||
status_t Sync(IMAPStorage& storage,
|
status_t Sync(IMAPStorage& storage,
|
||||||
IMAPMailbox& mailbox);
|
IMAPMailbox& mailbox);
|
||||||
const MessageNumberList& ToFetchList() { return fToFetchList; }
|
const MessageNumberList& ToFetchList() { return fToFetchList; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MessageNumberList fToFetchList;
|
MessageNumberList fToFetchList;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user