230 Commits

Author SHA1 Message Date
Axel Dörfler
eba458b940 imap: Fetching headers is now working.
* No state is stored yet, though, so that all messages will be downloaded
  over and over again.
2015-01-06 15:25:47 +01:00
Axel Dörfler
3302df142e imap: WIP of getting fetching headers to work.
* Changed the FetchListener mechanism quite a bit.
* Doesn't seem to work correctly yet, although most pieces are in
  place now.
2015-01-06 15:25:33 +01:00
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
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
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
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
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
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
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
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
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
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
Axel Dörfler
715bf3d17a Work in progress of mail rework.
* Not everything compiles; all protocols, and inbound filters do, though.
* Renamed a few classes to give a better idea what they are for; prefixed
  public classes with the 'B' prefix.
* Moved ProtocolConfigView's classes into the BPrivate namespace.
* Moved BMailFilter into its own file.
* Added BMailFilter::DescriptiveName(). This is now used by the RuleFilter
  in order to give a description of what it's doing (ie. no more dozens of
  "Rule filter" entries in the preferences).
* Removed no longer used MailAddon.h.
* Renamed Addon to AddOn where found, since that is more consistent with the
  rest of the API.
* Merged the former MailProtocol with the former MailProtocolThread; the
  differentiation between those two was pretty messy.
* All configuration views touched so far are now using the layout kit.
* The RuleFilter is currently broken functionality wise; I have not yet decided
  how to solve the stuff it uses (TriggerFileMove() does not exist anymore,
  for example).
* BMailAddOnSettings (formerly known as AddonSettings) now directly subclass
  BMessage; there are no Settings() and EditSettings() method anymore. The
  class uses a copy of itself to determine whether or not it has been changed.
* Lots of cleanup.
2015-01-06 15:21:36 +01:00
Axel Dörfler
7135c4f8fe Renamed pop3.{cpp|h} to POP3.{cpp|h}. 2015-01-06 15:21:17 +01:00
Axel Dörfler
6a6b7ae7a0 Style cleanup, no functional change. 2015-01-06 15:21:12 +01:00
Axel Dörfler
f06916d572 Initial work on a class that manages an IMAP folder on disk. 2015-01-06 15:21:07 +01:00
Axel Dörfler
077338a9b8 Completed literal handling.
* LiteralHandler commands now receive the literal data as intended.
* The 'fetch' command in the imap_tester now uses this to print the literal
  to stdout.
2015-01-06 15:21:03 +01:00
Axel Dörfler
3e4e5c2cf6 Improved folder config window a bit.
* Now uses the BLayoutBuilder instead of ALM layout - not only is the code much
  simpler now, resizing the window isn't as sluggish anymore (less flickering).
* Fixed a drawing bug in the list view; the drawing state wasn't properly
  maintained, leading to rendering artefacts.
* Moved the checkbox to the start of the line.
* Use B_ASYNCHRONOUS_CONTROLS for all windows.
* Fixed a few typos.
2015-01-06 15:20:58 +01:00
Axel Dörfler
cc3aa99cb3 Use GETQUOTAROOT instead of GETQUOTA.
* At least with my ISP, there is no "" root, so the command would fail when used
  as is.
* Now we always use the GETQUOTAROOT command instead, by default for the INBOX
  mailbox. This isn't entirely correct either, but better than nothing.
2015-01-06 15:20:49 +01:00
Axel Dörfler
f1c9cc4292 We need to copy the settings message. 2015-01-06 15:20:44 +01:00
Axel Dörfler
fe26284795 Added support for decoding RFC-3501 mailbox names.
* Added new RFC3501Encoding class that implements modified UTF-7 as specified
  in RFC-3501; only decoding is implemented right now.
* ListCommand now uses this new class to encode, and decode the folder names.
2015-01-06 15:20:39 +01:00
Axel Dörfler
9192d4dcf3 Started working on the IMAP add-on itself.
* Renamed imap_config.cpp to ConfigView.cpp, IMAPFolderConfig.(h|cpp)
  to FolderConfigWindow.(h|cpp).
* Got the latter to build.
* Added Settings class to simplify and unify the BMessage based
  settings access.
* Removed the InboundProtocol[Thread] implementation from the build for now.
2015-01-06 15:20:35 +01:00
Axel Dörfler
1704480100 Read some more specs, cleaned Protocol a bit.
* Added some TODO comments based on the various IMAP specs and extensions.
* Removed SelectMailbox() functionality from the Protocol class; it's not
  really useful to have it there.
* Removed some other methods that don't belong into the Protocol class.
2015-01-06 15:20:25 +01:00
Axel Dörfler
db0a4f2c00 More work in progress of the IMAP rework.
* Implemented FetchCommand, and some more.
* Improved and extended the imap_tester.
* The base to implement the new InboundProtocol on is now mostly done, at least
  for a start.
2015-01-06 15:20:20 +01:00
Axel Dörfler
a517047070 Got rid of the ConnectionReader, and implemented parsing literals.
* The parser now works on a BDataIO instead. It's now even a bit simpler
  overall.
* Implemented ParseLiteral() - the default implementation just reads the data
  into a string. Thanks to BDataIO this was now very simple to do.
* Tested the code: imap_tester can now successfully read mails (using the raw
  command only, at the moment).
2015-01-06 15:20:16 +01:00
Axel Dörfler
37d26ae5e2 Work in progress of rewrite; IMAP doesn't even compile at this point. 2015-01-06 15:20:11 +01:00
Adrien Destugues
961fdd8cc3 BMessageFormat: parse the pattern at construction
* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)
2014-10-08 15:12:48 +02:00
Adrien Destugues
53382a8aa7 Start making use of BMessageFormat. 2014-10-07 10:05:40 +02:00
Oliver Tappe
220d040227 Use libstdc++, libsupc++ and libgcc from gcc_syslibs.
* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
  from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
  x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
  necessary since we're only using libgcc-as-single-object for libroot
  with x86_gcc2, where the filtered object file doesn't exist. Should
  the objects that used to be filtered cause any problems as part of
  libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
  x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
  x86_gcc2, we still build libstdc++.so from the sources in the Haiku
  source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.
2014-08-13 13:32:44 +02:00
Oliver Tappe
1a7bcf6962 Lots of B_PRI... insertions to fix errors with DEBUG=1. 2014-06-02 02:00:28 +02:00
Pawel Dziepak
d0f2d8282f Merge branch 'scheduler'
Conflicts:
	build/jam/packages/Haiku
	headers/os/kernel/OS.h
	headers/os/opengl/GLRenderer.h
	headers/private/shared/cpu_type.h
	src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
	src/bin/sysinfo.cpp
	src/bin/top.c
	src/system/kernel/arch/x86/arch_system_info.cpp
	src/system/kernel/port.cpp
2014-01-17 04:06:15 +01:00
Pawel Dziepak
077c84eb27 kernel: atomic_*() functions rework
* No need for the atomically changed variables to be declared as
   volatile.
 * Drop support for atomically getting and setting unaligned data.
 * Introduce atomic_get_and_set[64]() which works the same as
   atomic_set[64]() used to. atomic_set[64]() does not return the
   previous value anymore.
2013-11-05 22:32:59 +01:00
Ingo Weinhold
38fa81bf8f Remove B_COMMON*_DIRECTORY and kCommon*Directory constants
* This does intentionally break source compatibility, so that a review
  of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
  of the constants for the writable directories are now used for the
  writable system directories. The values for the non-writable
  directories are mapped to "/boot/system/data/empty/...", an empty or
  non-existent directory, so that they will simply be skipped in search
  paths. Only code that explicitly expects to find something in a
  B_COMMON_* directory, will fail.
2013-10-04 02:30:30 +02:00
Ingo Weinhold
57190167ef Fix usage of obsolete HAIKU_BUILD_FEATURE_OPENSSL_ENABLED 2013-08-05 00:25:30 +02:00
Ingo Weinhold
b0944c78b0 More work towards hybrid support
* All packaging architecture dependent variables do now have a
  respective suffix and are set up for each configured packaging
  architecture, save for the kernel and boot loader variables, which
  are still only set up for the primary architecture.
  For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
  and TARGET_LIBSTDC++ are set to the respective values for the primary
  packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
  multiple packaging architectures. Generally the respective targets are
  (additionally) gristed with the packaging architecture. For libraries
  the additional grist is usually omitted for the primary architecture
  (e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
  Jamfiles for targets built only for the primary architecture don't
  need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
  cross devel package as well as for libbe (untested).
2013-08-01 08:54:06 +02:00
Ingo Weinhold
ff2e520912 Remove the old "CVS" package rules
... and all their invocations.
2013-06-30 18:59:11 +02:00
Ingo Weinhold
ebb78dd9b7 Update openssl package
Also use the new build feature rules
2013-06-13 16:43:40 +02:00