Commit Graph

52647 Commits

Author SHA1 Message Date
Axel Dörfler
9234fd439e imap: Implemented encoding RFC3501 strings.
* Was completely missing so far.
* Fixed bug in decoding that handled the "&-" sequence incorrectly.
* Added small test application that should easily be convertible to
  a unit test.
2015-01-06 15:25:28 +01:00
Axel Dörfler
229c777323 imap: Testing for new messages is now working.
* There is now a CheckSubscribedFoldersCommand that is issued on the main
  connection that triggers everything.
* The new CheckMailboxesCommand divides the new mail check into several
  portions, and requeues itself until the next step, ie. the
  FetchHeadersCommand.
* The headers of the new mails are downloaded, but nothing is done with
  them yet.
* The actual check for the new mails doesn't scale that well yet, not sure
  how to properly do this without having to rely on the mail indices. Might
  be sensible to solve this via some simple heuristic.
2015-01-06 15:25:24 +01:00
Axel Dörfler
82f27de238 imap_tester: Fixed build after Protocol.GetFolders() changes. 2015-01-06 15:25:19 +01:00
Axel Dörfler
7993ddfaba imap: Fleshed out command processing.
* Still doesn't do anything useful, though.
2015-01-06 15:25:14 +01:00
Axel Dörfler
a4bdd26d61 imap: Work in progress of connection setup.
* SelectCommand now correctly encodes the mailbox name again.
* Hierarchy separators from the LIST/LSUB commands are now properly parsed,
  and taken into account.
* Folders in the file system are now created for mailboxes on the server,
  supporting hierarchical mailbox names.
* A connection worker now has an IMAPFolder that handles the local side of the
  mailbox, and an IMAPMailbox that handles the server side.
* Connection workers are now created/deleted, and setup correctly. They will
  now also wait in case they don't have a mailbox until they get some.
2015-01-06 15:25:10 +01:00
Axel Dörfler
adbe8fc944 IMAP: The connection workers are now started.
* On SyncMessages(), the main connection worker is started if it is not already
  running (it may only run already in idle mode).
* This will then list the subscribed folders, and create as many more connection
  workers as allowed and make sense.
* Finally, it will distribute the folders to the workers which don't do anything
  further yet.
2015-01-06 15:25:05 +01:00
Axel Dörfler
bfe83adcb2 imap_tester: Fixed SSL build. 2015-01-06 15:25:00 +01:00
Axel Dörfler
4cab719ff2 mail_daemon: auto check message was leaked, send immediately.
* BMessageRunner does not take ownership of the message.
* Instead of waiting through the complete interval, we send an auto check
  message immediately after launch (or whenever else the timer is being
  started).
* Added constant instead of referring to 'moto' for the auto check message.
2015-01-06 15:24:56 +01:00
Axel Dörfler
c67313f3c3 imap: added Settings::MaxConnections()/IdleMode().
* Also made use of the new BMessage API for the existing methods.
2015-01-06 15:24:51 +01:00
Axel Dörfler
f8b5e17a23 Minor cleanup. 2015-01-06 15:24:47 +01:00
Axel Dörfler
186c96d50c IMAP: Early work in progress of main protocol class. 2015-01-06 15:24:42 +01:00
Axel Dörfler
3ab3f57ad2 IMAP: FolderList is supposed to be an interface.
* Made its methods pure virtual.
2015-01-06 15:24:37 +01:00
Axel Dörfler
edf77456f2 IMAP: close folder config window on error, show message. 2015-01-06 15:24:33 +01:00
Axel Dörfler
c9fb410e42 IMAP: fixed folder configuration.
* Store the settings, don't archive the view; removed leftovers of the
  old settings API.
2015-01-06 15:24:28 +01:00
Axel Dörfler
d6ce6060b9 pop3: minor cleanup. 2015-01-06 15:24:24 +01:00
Axel Dörfler
a9de7ece6b pop3: Fixed maintaining fSizes list, and more.
* The list was filled, but never emptied.
* If SyncMessages() was called more than once for the same POP3 instance,
  this could garble the mails retrieved in the second run.
* Maintain the total size of mails in fSizes to be able to report progress
  in more detail.
* Also adapted progress reporting to the argument changes made in MailProtocol
  earlier.
* Minor cleanup.
2015-01-06 15:24:19 +01:00
Axel Dörfler
93608baf60 Clarified progress parameter names for the MailProtocol. 2015-01-06 15:24:14 +01:00
Axel Dörfler
46851a74af BMessage::SetString() was broken.
* We cannot use the macro for this, unfortunately.
2015-01-06 15:24:10 +01:00
Axel Dörfler
acee88be99 E-mail settings are now stored as they should.
* ProtocolSettingsView was still using Archive() instead of SaveInto().
* However, it looks like BMessage::Set*() does corrupt the message fields.
2015-01-06 15:24:05 +01:00
Axel Dörfler
8651ebbe7a Fixed stale config view pointer in E-mail.
* When removing an account (all accounts would be removed when the app
  was quit), AccountItem::ConfigPanel() was used to remove views.
* However, this member was only set when a new view was created, never when
  it was removed. This could cause a crash on quit.
* Removed that member completely, as it was unnecessary, anyway.
* Fixed naming of AccountItem getters to lose their Get* prefix.
2015-01-06 15:24:01 +01:00
Axel Dörfler
dcb663f339 libmail: Fixed missing initialization in protocol view.
* This would cause a crash when the fields were actually not being
  used.
2015-01-06 15:23:56 +01:00
Axel Dörfler
fa587d2956 The protocol config view now adds some glue at the bottom.
* This makes all boxes fill the complete height of the window.
* The SMTP add-on did that itself which makes no sense.
2015-01-06 15:23:51 +01:00
Axel Dörfler
4235da3061 Improved label of the button to configure the IMAP folders. 2015-01-06 15:23:47 +01:00
Axel Dörfler
22fc80c6e3 Align all protocol config view labels to the right. 2015-01-06 15:23:42 +01:00
Axel Dörfler
19d947eb7f The E-mail window's frame is no longer stored.
* This is part of a clean up of BMailSettings; storing the window
  position might be implemented again later -- it just doesn't
  belong there.
* Changed the logic when the daemon is set to auto start. It's now
  always started if at least a single account exists.
2015-01-06 15:23:38 +01:00
Axel Dörfler
4a8448ce34 Major coding style cleanup. 2015-01-06 15:23:33 +01:00
Axel Dörfler
81ec973846 Minor coding style fix. 2015-01-06 15:23:28 +01:00
Axel Dörfler
792843e8af Adapted IMAP to the new MailSettingsView API. 2015-01-06 15:23:24 +01:00
Axel Dörfler
006040d06e Adapted POP3, and Fortune to the new MailSettingsView API. 2015-01-06 15:23:19 +01:00
Axel Dörfler
1da1e5a166 Renamed BodyDownloadConfig to BodyDownloadConfigView. 2015-01-06 15:23:15 +01:00
Axel Dörfler
518698c7e7 Removed commented out method in BMailSettingsView. 2015-01-06 15:23:10 +01:00
Axel Dörfler
57b305558b MailProtocolConfigView now is a BMailSettingsView.
* Changed the private settings base classes to follow the new style.
* Made BodyDownloadConfig use the layout API.
* Adapted SMTP to these changes.
2015-01-06 15:23:06 +01:00
Axel Dörfler
efd1602a79 Fixed debugger call in E-mail.
* The settings view is no longer a direct child of the protocol settings
  view.
2015-01-06 15:23:01 +01:00
Axel Dörfler
ca3341c7b4 Major mail protocol/filter settings rework.
* Instead of abusing BArchive::Archive() we now use a BMailSettingsView as
  a base view for all filter/protocol settings that works with
  BMailAddOnSettings.
* Cleanups in E-mail which is now completely layout friendly. But also still
  crashes when changing the views.
2015-01-06 15:22:56 +01:00
Axel Dörfler
a6943acbe0 Added missing BMessage::{Get|Set}String() methods.
* Forgot to add those before accidentally.
2015-01-06 15:22:51 +01:00
Axel Dörfler
5faab458af Reworked the mail preferences.
* Made it use the layout API.
* Removed options that no longer apply (dial-up, for example).
* Cleanup.
* There are a few issues left, though, for example, the BTextView is not
  correctly sized, and it currently crashes in the protocol panels.
2015-01-06 15:22:47 +01:00
Axel Dörfler
58b56ffc80 Improved mail protocol config view layout. 2015-01-06 15:22:42 +01:00
Axel Dörfler
f90a3bbd67 Added support for letting user mail add-ons override system ones.
* The path will now be relativized before storing it.
* On load, the add-on will be tried to load from the user, then common
  and finally system add-on directory.
2015-01-06 15:22:37 +01:00
Axel Dörfler
b448d260c3 Fixed mail daemon build.
* Removed cvs package leftovers.
2015-01-06 15:22:33 +01:00
Axel Dörfler
1f87386b0a Now also loads mail settings from common.
* Also removed the superfluous and unused timeout argument from Save().
2015-01-06 15:22:28 +01:00
Axel Dörfler
9d8cf1b6f7 E-mail now also builds, but doesn't work yet. 2015-01-06 15:22:23 +01:00
Axel Dörfler
bcf60bbb83 Fixed Mail build.
* The former kMsgBodyFetched (now B_MAIL_BODY_FETCHED, following the other
  message constant names in AppDefs.h) must be public.
2015-01-06 15:22:18 +01:00
Axel Dörfler
e1e78d4deb Reset the daemon messenger after a successful Launch(). 2015-01-06 15:22:14 +01:00
Axel Dörfler
daf972c99c Renamed MailDaemon{App|.cpp|.h} to MailDaemonApplication[.{cpp|h}]. 2015-01-06 15:22:09 +01:00
Axel Dörfler
ae9d8c6add IMAP now compiles again with GCC 4. 2015-01-06 15:22:04 +01:00
Axel Dörfler
4d30240166 Renamed smtp.{cpp|h} to SMTP.{cpp|h}. 2015-01-06 15:22:00 +01:00
Axel Dörfler
146357b547 Completed transition to the new mail API; ie. it compiles.
* Completely untested yet. Unlikely to work yet.
2015-01-06 15:21:55 +01:00
Axel Dörfler
383b34adac Moved ProtocolConfigView to headers/private/mail.
* This is by no means meant as a public header.
2015-01-06 15:21:50 +01:00
Axel Dörfler
bebcc474f8 Renamed a few files to better match their class names. 2015-01-06 15:21:45 +01:00
Axel Dörfler
794a013e9b Adapted fortune filter to the new mail API. 2015-01-06 15:21:40 +01:00