Commit Graph

63 Commits

Author SHA1 Message Date
Axel Dörfler 3d7aaa308c Network: added notify settings updated method.
* And call it from the DNS client -- this is the only add-on that does
  not trigger a configuration or settings update, so we have to notify
  the changes manually.
2015-03-27 13:25:27 +01:00
Axel Dörfler d26777c4e4 Network: added BNetworkSettingsListener.
* Same as the configuration listener, just for SettingsUpdated().
* This is now broadcasted to all list items, too.
2015-03-27 13:24:07 +01:00
Axel Dörfler f7ccc9af85 BNetworkSettings: added const, server IsRunning() method.
* Get{Interface|Network|Service}() methods are now const.
* Added variants of Interface(), and Service() that are const.
* Added new BNetworkServiceSettings::IsRunning() convenience method that
  reflects the status quo rather than the settings.
2015-03-27 13:24:07 +01:00
Axel Dörfler 1f94cdcdff BNetworkServiceSettings: Added missing functions/constructor. 2015-03-27 13:23:00 +01:00
Axel Dörfler 7ca40f60bc BNetworkSettings: made service stuff writable.
* And added the ability to disable a service without losing its
  configuration.
2015-03-27 13:22:30 +01:00
Axel Dörfler d1f0b8db1d Network: fixed top item creation, sort entries.
* Need a way to access the NetworkWindow object from a static
  method in order to sort all entries correctly, though.
2015-03-27 13:22:29 +01:00
Axel Dörfler 5274e9b004 Network: added interface list item.
* Added BNetworkInterfaceListItem that can be used by interface protocol
  add-ons to represent their functionality in the list view.
* It will automatically update itself on changes, and will show the
  specified label, and address, if any, as well as indicate whether or
  not the family has been disabled (which doesn't work perfectly yet,
  as IFF_AUTO_CONFIGURED is on the interface level).
* Therefore, the interface list item will no longer show the address,
  but the type of the device instead.
* Introduced the BNetworkConfigurationListener interface that is used
  to broadcast network updates to.
2015-03-27 13:22:28 +01:00
Axel Dörfler b00dcbcad2 BNetworkSettings: added some convenience methods.
* From InterfaceAddressView: FindFirstAddress(), and IsAutoConfigure().
* Removed some debug leftovers in InterfaceAddressView, too.
2015-03-27 13:22:27 +01:00
Axel Dörfler e4f4658a1b BNetworkSettings: made interface settings writable.
* It also makes use of the new driver settings converter mechanism.
2015-03-27 13:21:51 +01:00
Axel Dörfler 07addd7ef5 Network: broadcast updates, remove apply button.
* Network now monitors all network, and network settings changes, and
  will notify all add-ons about those changes.
* Removed the global apply button. Instead, the static IP configuration
  now got that button. All other changes will be instant.
2015-03-27 13:21:49 +01:00
Axel Dörfler f16f9ee4ee Moved more functionality from net_server to NetworkSettings.
* Added (still incomplete) helper classes for the settings messages.
* The net_server now uses these classes for its interfaces, and services.
* Renamed service_address to service_connection, as that better matches
  what it is used for.
2015-03-27 13:21:49 +01:00
Axel Dörfler 2864e4da5e Network: added global settings.
* NetworkWindow now manages a single BNetworkSettings object
  that is shared with all add-ons.
2015-03-27 13:21:48 +01:00
Axel Dörfler d880e2d91f BNetworkSettings: added Get*() by name methods. 2015-03-27 13:21:46 +01:00
Axel Dörfler fd55fb6615 Moved net_server's settings to libbnetapi.
* As experimental API class BNetworkSettings.
* Added add/remove methods for interfaces, and services, too.
* Moved the conversion of the wireless networks into the settings class,
  too, so that it only gives out converted ones (but accepts both
  variants).
2015-03-27 13:21:46 +01:00
Axel Dörfler 3401ff7c2f BNetworkSettingsAddOn: added missing destructor. 2015-03-27 13:08:44 +01:00
Axel Dörfler f6c7cf44b5 Network: integrated former hardware view from add-on.
* The interfaces logic is within the main application, so is the
  new interface view.
* Disabling/renegotiating does not work yet.
* Reveals a bug in some interface code; when you click on an ethernet
  device first, there is no place for the wireless menu. When you then
  press on a wireless device, it crashes in BMenuField code.
  In the other direction, there is then an empty space.
* Fixed list item width reporting.
2015-03-27 13:08:44 +01:00
Axel Dörfler 021ff1ca46 Network: no need for public constants. 2015-03-27 13:08:42 +01:00
Axel Dörfler 77db25ddc7 Network: moved add-on headers to the correct position.
* Ie. they've moved to headers/os/add-ons/network_settings now.
2015-03-27 13:08:41 +01:00
Axel Dörfler d33e4744df IMAP: downloading mails is now working.
* Changed the way the attributes are written to make sure that everything
  that can be written once is in fact written just once.
* The rename code in BMailProtocol::_ProcessFetchedHeader() was broken,
  and caused the hang of the last commit.
2015-01-06 15:26:47 +01:00
Axel Dörfler 549949b26f Mail Kit: Changed how filter changes work.
* BMailFilter::HeaderFetched() now only alters the entry_ref, and returns
  B_MOVE_MAIL_ACTION to move a mail.
* Instead of potentially moving the file around several times, the
  BMailProtocol now takes care of carrying out the filter action just once,
  including trying to make the file name unique.
* This also allows the IMAP add-on to know the final location of the mail,
  and thus downloading a message actually works.
* However, with my test inbox, it currently hangs, and a current Debugger does
  not work on my older system -- I guess I need to update.
* Replaced the duplicated space mechanism within the "HaikuMailFormatFilter"
  that is substantially faster, and handles all whitespace, not just spaces.
  It will also replace tabs with spaces.
2015-01-06 15:26:37 +01:00
Axel Dörfler f8b5e17a23 Minor cleanup. 2015-01-06 15:24:47 +01:00
Axel Dörfler 93608baf60 Clarified progress parameter names for the MailProtocol. 2015-01-06 15:24:14 +01:00
Axel Dörfler 518698c7e7 Removed commented out method in BMailSettingsView. 2015-01-06 15:23:10 +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 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 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 0f11280e6d Minor MailNotifier cleanup.
* Renamed to BMailNotifier, as it's part of the public API.
* Renamed Notifier.{cpp|h} to DefaultNotifier.{cpp|h} as that's the class it
  implements.
* Made the mail counts uint32, and the byte counts uint64.
2015-01-06 15:21:31 +01:00
Axel Dörfler e0676bb982 Fixed typo. 2015-01-06 15:21:26 +01:00
Axel Dörfler ed80f189ce Applied an updated patch by looncraz to enable hardware cursor.
I made the following changes to the original patch:
 * Add const to the cursor setting functions.
 * Removed the legacy cursor copying code.
 * Minor coding style cleanup.
2012-11-28 22:33:08 +01:00
czeidler ed77847ca4 Remove private BStringList implementation from mail. Tested it but however please be careful an review. This fixes bug #8174. 2011-12-15 19:45:07 +13:00
Clemens Zeidler b8d2bbd616 - Partial downloaded messages are now opened by Mail and not by the mail daemon. Mail request the body fetch and get notified when the daemon is done. During this time the Mail window title is showing "Downloading: subject". This fixes #7256.
- Some cleanup in Mail.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-03 09:05:04 +00:00
Clemens Zeidler 9967dfd924 - Extend MarkMailAsRead to take a flag not only a bool value. Write an additional MAIL:read attribute.
- Remove some hard coded paths.
- Catch failure of FindMessage correctly. Thanks Axel.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 07:24:29 +00:00
Clemens Zeidler 0e657c0b6c Remember tracker message when downloading a partial message and open it with Mail. This is needed to get the next/previous message after downloading the body.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-20 07:55:47 +00:00
Clemens Zeidler 1af4fa4ba6 Major restructuring of the mail server:
Accounts are now stored in a separate file. Previously they where somehow magically assembled from the chain ids. Now its possible to remove a account temporary by removing the account file form the account folder.

Each account could have an inbound protocol, an outbound protocol and some filters.

Mails are now associated with an account and not with a chain. This required to replace the chain id attribute by an account attribute.

Replace BMailFilter and BMailChain by a less general approach. Basically the chain had a list of filters and call the ProcessMailMessage for each filter. This made it sometime difficult to understand what is going on, e.g. sometimes a filter used information gathered by another filters. The new MailProtocol and MailFilter classes are calling more dedicated hook functions, e.g. HeaderFetched or MessageReadyToSend.

As before all MailProtocol's (plus their filters) are running in their own thread.

Cleaned up the error and status window a bit. Abstracted the interface to these windows. Should be easy to write a BNotification api back-end now.

Parsing of mail headers is much faster now. Fetching the headers of a large mailbox takes ~min and not ~hour now! Initial checkout time is in the same order like Opera. The problem was the massive use of fgets in parse_header (mail_util.cpp) now the complete header is read in one go. Furthermore, only interesting fields are extracted.

Remove some unused files, BeOS relicts... Feel free to translate the mail server and remove the own language system (headers/private/mail/MDRLanguage.h).

Sorry for the remaining old (and new) coding style issues, sometime just ignore them, to many :(



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 01:49:01 +00:00
Stephan Aßmus a69c16fec5 Rewrote headers.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 12:35:43 +00:00
Axel Dörfler 23debb05d0 * Rewrote InputServerDevice.h header.
* Renamed _BDeviceAddOn_ to DeviceAddOn, and put it into the BPrivate namespace.
* Moved the DeviceManager functionality into the AddOnManager - this also
  solves a locking issue, as BInputServerDevice::Control() was called in the
  context of the DeviceManager before.
* The AddOnManager now uses the BPathMonitor to monitor the devices that
  BInputServerDevices ask for - this greatly simplifies the code.
* Got rid of TList.h, and use ObjectList.h instead.
* Added PathList class that has a list of paths with reference count, used by
  DeviceAddOn and the AddOnManager.
* DeviceAddOn got an actual implementation that lives in InputServerDevice.cpp.
* Added an experimental BInputServerDevice::AddDevices() that could be used
  instead of recursing over devices manually. It replaces the functionality
  that was found in the DeviceManager before (this was done implicitely for
  all monitored devices).
* Greatly cleaned up and simplified the AddOnManager.
* Also fixed lots of potential errors/leaks when things go wrong.
* Removed the extra locker in AddOnManager - its BLooper lock is now used
  instead.
* Replaced PRINT()/PRINTERR() macros in the AddOnManager with TRACE(), and
  ERROR(), both now use debug_printf().
* Hopefully this fixes the problem that I don't have keyboard under VirtualBox
  from time to time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 15:48:34 +00:00
Axel Dörfler 828573bac7 * Rewrote TrackerAddOn.h header :-)
* Removed Background.h - to be replaced by the one in be_apps (which has OT license)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 22:56:37 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Axel Dörfler c278448653 * Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
  API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
  app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 11:41:47 +00:00
Axel Dörfler 4191a211aa * Started accelerant extension to be able to get the preferred mode from
the accelerant, as well as its EDID info. B_GET_PREFERRED_DISPLAY_MODE and
  B_GET_EDID_INFO are both optional. The preferred mode will be taken from the
  EDID info if only the latter hook is implemented, or the former returned an
  error.
* Currently, the app_server should correctly set the preferred mode on start,
  but no accelerant supports that yet, so it's not really tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 16:50:24 +00:00
Jérôme Duval 7a5fa89446 drop old fsproto.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-01 08:01:38 +00:00
Ingo Weinhold e4f35acf7c * Added new (currently private) API class BMimeSnifferAddon,
representing the interface for, well, MIME sniffer add-ons.
* Implemented the respective add-on manager and make use of it in
  the MIME database code. Unfortunately the MIME DB code completely
  lives in libbe.so and hence I had to put my code there too.
  IMHO we should (one day) remove the direct (read-only) MIME DB
  access from libbe and move everything into the registrar.
  Currently the add-on manager supports built-in add-ons only; it
  doesn't really load anything from disk ATM.
* Added a built-in text sniffer add-on to the registrar. It's based
  upon the BSD file tool code.

This closes bug #250 (plain text files are identified as such, now).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-09 20:48:50 +00:00
Axel Dörfler 7cae4a1ee0 * Big time cleanup of the screen saver stuff, not yet finished yet, though.
Renamed lots of things, like ScreenSaverThread to ScreenSaverRunner,
  refactored code, etc. Much cleaner interfaces and code.
* Fixed a couple of bugs and in the add-on handling, especially some settings
  related bugs (ie. testing a screen saver will now use its latest settings,
  etc.).
* Correctly implemented DPMS support in ScreenSaverPrefs and the ScreenSaver
  preferences application - screen_blanker still ignores them, though.
* It's not yet font sensitive either.
* Changed the input_server add-on to not switch to the screen blanker immediately
  when it's in the "blank corner" - doesn't seem to work yet, though (only tested
  under Qemu).
* Correctly implemented the "preview" function (before, a screen saver would
  never know it rendered a preview).
* Evaluates the return value of BScreenSaver::StartSaver().
* The screen saver thread is no longer killed without notice - it's now
  always shut down properly.
* Made the code more robust against failure.
* Introduced some new bugs as well (the screen saver list view doesn't jump to
  the selection anymore, for some reason), those will be fixed later (as the
  remaining issues).
* Probably some more I forgot about.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-06 08:16:46 +00:00
Axel Dörfler d85db27509 Screw source compatibility. Cleaning up the legacy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 23:57:47 +00:00
Nathan Whitehorn 96b5ca7902 Made public headers not depend on private ones
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 04:27:05 +00:00
Jérôme Duval 123a598023 change to friend classes; field is now private again
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-17 22:43:06 +00:00
Nathan Whitehorn fcdc48f1a7 Fixed a nasty bug I introduced when I fixed IMAP that made it impossible to send mail. Apparently I don't send that much.... it's been in there for a good week or so.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-30 17:19:06 +00:00
Jérôme Duval 53b29c4b26 It's useful to me to have this field public :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 14:13:12 +00:00
Nathan Whitehorn c60f83369f Renamed BMailRemoteStorageProtocol to BRemoteMailStorageProtocol. Because I like it better. This should complete the API modifications from the Haiku import.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-16 17:21:26 +00:00