History log of /haiku/src/kits/app/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
9bc51ee0 21-Jun-2020 X512 <danger_mail@list.ru>

BLooper: implement scripting

Change-Id: I73dd301ca7109675a4b629464ba7275a8095c77b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2940
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

02e45e32 01-Mar-2020 Niels Sascha Reedijk <niels.reedijk@gmail.com>

HaikuBook: Initial documentation for BNotification

The implementation file contained some documentation. This has been moved
to the Haiku Book (and is rewritten in most cases). The documentation gives
some insight on how the notification_server works.

Change-Id: I82bafcf57101d4882bdf07e7f731df9cd8adc861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2299
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

feeb4b5d 21-Dec-2019 Jérôme Duval <jerome.duval@gmail.com>

RosterPrivate: add IsShutDownInProgress()

enable to check whether a shutdown process is in progress.

Change-Id: I8efdddb3caa80e9fd188f202b6e92a888a7608e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

d761df9f 14-Sep-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

BMessage: fix NULL pointer dereference in out of memory condition.

Change-Id: I75ba6e5069cda8a92fd88bf7d1e999232359e73c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1864
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

4eaa1f35 24-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRoster: preserve symlink as "app" if given one

Symlink name or attributes may be relevant to the launched app, so it's
important that we pass the unresolved symlink as argv[0] when running

Change-Id: Ie1d73bc4e9d5c3d0476f205ce635aafd9203e553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1739
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

6faf979d 24-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

BRoster: Fix infinite loop when trying to launch app with missing libraries.

Fixes #14986.

Change-Id: I727fde0c475f0684567a46be5af616cad56a9b4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1738
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

96e64e6e 11-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

Application Kit: Add B_CLONEABLE_AREA permission to cloned server areas.

The Media Kit needs this for overlays.

2846db2e 31-Jul-2019 CodeforEvolution <secundaja@gmail.com>

Implement is_app_showing_modal_window()

Also do some cleanup in private headers, I can't imagine why the build
libraries would need this function.

Change-Id: Ib08810b6efe4738dad596a735d741582a3781b28
Reviewed-on: https://review.haiku-os.org/c/1670
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>

d2e51939 08-Jul-2019 Jérôme Duval <jerome.duval@gmail.com>

Messenger: style fix.

Change-Id: I5b1b7e745de91bd1bedbbbe13faf848fdd284785
Reviewed-on: https://review.haiku-os.org/c/1565
Reviewed-by: Rene Gollent <rene@gollent.com>

ebb0db62 04-Jul-2019 Augustin Cavalier <waddlesplash@gmail.com>

kits: Only export private dummy copy constructors for R5 ABI.

Fixes #546 (after all these years!)

f7397837 24-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

BMessage: Use assignment operator instead of memcpy().

The only non-POD types the macro is used on are BPoint, BRect, BSize,
and rgb_color, so the first change should essentially be a no-op.

The second change will technically have different behavior,
as the BMessenger copy constructor does not touch the _reserved_
field; but this shouldn't break anything, of course.

ad38b80f 30-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

BMessage: Fix R5 checksum calculation on 64-bit.

Change-Id: I0d418883bb66c6ad9e351c955e213f5cbc975e56
Reviewed-on: https://review.haiku-os.org/c/1336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

5ffbe7d7 30-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

Change all references to "__INTEL__" to "__i386__".

They are functionally identical, but the former is a BeOS/Haiku-specfic
macro that we include in the compiler specs, and the latter is defined
by GCC.

5f48948f 05-Mar-2019 Murai Takashi <tmurai01@gmail.com>

Roster: Fix PVS 460

Replace do...while(false) loop with while(true)... loop,
so that 'continue' at line 1968 can continue loop.

Change-Id: I4d64ff2699ad0837f29d49c63b683b134c4ccc1e
Reviewed-on: https://review.haiku-os.org/c/1149
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>

c5e4e4ff 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

headers/kernel: Include declarations of initialization functions in image.h.

No "real" functional change, but this causes GCC7 to throw errors when
these functions are declared without the image_id argument, which
in some files they were (as this commit repairs.)

This change is largely inconsequential on x86, but on callee-cleanup-args
targets, leaving out the argument would probably cause stack corruption.

ab6bcb08 25-Dec-2018 Murai Takashi <tmurai01@gmail.com>

Roster: Fix PVS 456-459

Remove unneed if condition, since 'error' is initialized to B_OK.

Change-Id: I2fd0edb99a3d055beafaf15f1140071a31140892
Reviewed-on: https://review.haiku-os.org/798
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>

9effbd7e 15-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove some unused cruft from the early days.

These lines were added in 2002...

151343eb 27-Nov-2018 Adrien Destugues <pulkomandy@pulkomandy.tk>

BLooper: API to hijack existing thread.

I need this to use loopers in WebKit, which spawns threads and expects
to be able to turn them into event loops later on.

This is the pattern already used in BApplication, we may as well make it
available elsewhere.

Change-Id: I5939ca89d33cb3bcc92567b302c2038d976af598
Reviewed-on: https://review.haiku-os.org/735
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

8636e31a 26-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

BNotification: Fix copy-n-paste bug in OnClickRefAt.

Fixes #14405.

27bba9c3 17-Mar-2018 Jérôme Duval <jerome.duval@gmail.com>

registrar: flat_app_info size was arch dependent.

copy each member of app_info instead.

Change-Id: Ica8d0a195b2dbaaf57d28f2fe2f7efd73c37b2c4

a77aa747 25-Apr-2018 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Added basic logging facility

* The daemon now stores many events in am internal log.
* You can use "launch_roster log" to retrieve it.

09320f38 10-Mar-2018 Jérôme Duval <jerome.duval@gmail.com>

Roster: fix debug build on x86_64.

08a4536b 12-Dec-2017 Axel Dörfler <axeld@pinc-software.de>

BMessage: Added missing [Get|Set]Pointer()

* SetPointer() was declared, but not defined.

e96835a9 27-Nov-2017 Axel Dörfler <axeld@pinc-software.de>

Added simple test_launch_daemon.

* Expects its config files in /boot/home/test_launch.
* Uses standard I/O, and is always in user mode.
* Also added test_launch_roster command that is able to talk to the test
server like it does to the real thing.

16af9b4c 05-Nov-2017 Humdinger <humdingerb@gmail.com>

Style, no functional changes

Make termination consistant with that last commit hrev51521.
As wished and proof-read by waddlesplash. Hope all's well...

8856b518 28-Sep-2017 Brian Hill <supernova@tycho.email>

BNotification ABI padding

Add reserved functions and data to avoid future ABI breakage

6aa05872 23-Sep-2017 Brian Hill <supernova@tycho.email>

Notifications preflet and notification_server

Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
message which is not reliable

1416521f 22-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Notifications: default to application icon.

It is possible to SetIcon(NULL) to remove it.
But in msot cases we want the application icon to be the default.

as discussed in #13590.

852e09d6 29-Nov-2016 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Added stop target ability.

* Before, you had to stop each job by itself.

22097d7a 26-Apr-2016 John Scipione <jscipione@gmail.com>

Style fixes to BPeropertyInfo class

90fd6af0 12-Jan-2016 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Added ability to enable/disable a job.

* Instead of just starting/stopping it.
* Also available via the launch_roster command.

35929329 04-Jan-2016 Augustin Cavalier <waddlesplash@gmail.com>

BApplication: Remove added PrintToStream().

Another missed debugging snippet from the merge.

2567fac2 09-Dec-2015 looncraz <looncraz@looncraz.net>

app_server: Fix for LinkReciever.

LinkReceiver would spin endlessly when given a timeout value which prevented
DelayedMessageSender from being operational.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patch 0002 from looncraz, unmodified.

7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

SetViewUIColor(color_which, float tint)
ViewUIColor(float* tint)

BWindow gains a simple helper method:

BMessage gains:

HasColor() * allegedly this API is deprecated, but I implemented it anyway

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

05962bb1 28-Nov-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

Add a way to register loopers for quit

* BApplication can now take the job to quit a BLooper at
the application quit. It's rejecting requests from windows too.
* BMediaRoster is using now this service in conjunction with the
* The BeBook specify that we should have a valid BApplication
before to instantiate the BMediaRoster. While in theory we should
add a debugger call when this situation happens, in pratice this
might lead to more problems. For example libraries might use the
media_kit and create a BApplication object, but they aren't
applications, this is a design problem. So I decided to replace it
with a TRACE call for the moment.

9e73b627 11-Nov-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Fixed preregister consequences.

* Since the last change, the user launch_daemon would talk to the
registrar again.
* However, this also caused BRoster::Launch() to preregister the app,
which messed up our preallocated port.
* BRoster::Private::Launch() now allows to get the port that the
registrar created in such a case, and the launch_daemon will now just
use that one as default port.
* This lets us talk to the Deskbar again, and should fix #12455, as
well as #12454 (again).

6109a208 10-Nov-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

Merge branch 'app_server'


In addition, the following files were also adapted to master branch
BPicture changes during the merge:

5860caae 07-Nov-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Added basic ability to stop/start jobs via API.

* Stopping a job is very simplistic right now, and will have to be
extended considerably, probably with its own job.

3282b758 04-Nov-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Add API to get information on jobs.

* Ie. a listing of all targets/jobs, as well as specific (basic) info
on each.
* Also added a bit of optional debug output.
* Moved translating the path to launch time -- we should take the job's
environment into account here at some point.

2e17b650 21-Oct-2015 Axel Dörfler <axeld@pinc-software.de>

BLaunchRoster::ResetStickyEvent() added.

* Used to unflag sticky events that already have been triggered once.

7cd19b7e 17-Oct-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Implemented sticky events, and registration.

* Sticky events are events that keep their signal raised, ie. even if
a job is initialized afterwards, it will still be triggered.
* Consolidated naming for external events.
* Events are now registered once they are actually being used. This
allows them to allocate the resources they need to do their thing.

71cc4d49 01-Sep-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

Merge branch 'master' into app_server


c0c883cf 29-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

BMessage: Fix precedence of KMessage vs. size check.

A KMessage request always needs to be honoured, regardless of the data

KMessage does not currently protect against messages that are too large,
but this needs to be solved in KMessage when it becomes a problem.

5b9f6b54 28-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

BRoster: Add launchSuspended option to _LaunchApp().

It allows to launch the app, but keep its main thread suspended instead
of automatically resuming it.

Also add appThread argument which allows to retrieve the main thread of
the launched team.

ee5575d9 26-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

BRoster: Apply no-registrar mode in a few more cases.

Avoids some more attempts at communicating with the registrar if the
no-registrar flag has been set.

e3d73948 15-Aug-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

app_server: fix test-app_server for launch_daemon changes

* Make test-app_server work again in a launch_daemon environment

* test_registrar gets a separate signature and port name again so the
host system can distinguish it from the system registrar

* AppServer is normally a BServer now, however, there can't be two
BApplications in one team. A class TestServerLoopAdapter is added,
which becomes the base class of AppServer instead of BServer when
compiling for libbe_test. It's an adapter class which looks towards
AppServer as it if was a BServer, but internally it is derived from
MessageLooper (like the old AppServer before the transition to

This way, AppServer can stay a BServer in normal builds and it also
avoids having to use too many #ifdefs to distinguish the two

3667f6ef 21-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

BApplication: Avoid create_app_meta_mime() for the registrar.

BApplication::_InitData() already avoided the use of BRoster from the
registrar (and launch_daemon) where it isn't available. Since
create_app_meta_mime() indirectly just sends a message to the registrar
using BRoster, it too cannot work when the registrar isn't available.

811f0164 21-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

BRoster: Make sure we aren't the registrar when initializing.

This fixes a regression introduced in 9bfc833, where the old way of
getting the roster port was replaced with its launch_daemon counterpart.

The previous method of finding the roster did always fail when running
from the registrar, as at the time of initialization (initialize_before
of libbe) the registrar looper doesn't exist yet. This commit restores
the previous behaviour by checking if the returned registrar team is the
current team and avoiding initialization in that case.

The regression caused a 5 second boot delay when later BApplication
initialization of the registrar tried to communicate with itself with a
reply timeout of that length.

Fixes #12258 at least partially and might affect #12237.

7d407a1e 08-Aug-2015 Augustin Cavalier <waddlesplash@gmail.com>

BLooper: Fix inverted check that was causing a port leak.

Fixes #12286. Thanks to ttcoder & jackburton for investigating!

239f8573 23-Jul-2015 Axel Dörfler <axeld@pinc-software.de>

libbe: ui_color() now works without UI connection.

* Since the app_server is a BApplication, too, now, Workspaces would
trigger this problem.
* Now it checks whether the shared memory is actually set, and only
uses it in this case. This will also fix using ui_color() in any
BServer without UI connection.

326e03f7 17-Jul-2015 Axel Dörfler <axeld@pinc-software.de>

BLaunchRoster: removed be_launch_roster again.

* Not implemented, an unused -- no need for a global instance.

d94e9c97 16-Jul-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Added support for external events.

* Other apps can register events, and the launch_daemon can act on them
when they are triggered.

fb7dad2b 07-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

BRoster: Added ability to pass env on launch.

* Added BRoster::Private::Launch() that adds an additional parameter
to pass a pointer to the environment of the launched app.

4c67f79c 01-Jul-2015 Axel Dörfler <axeld@pinc-software.de>

FirstBootPrompt: launch installer/desktop targets directly.

* No need for shell scripting here.

560119c9 25-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Don't verify passwords.

* Instead, the caller should have done this already. This is really
outside of the scope of the launch_daemon.
* Fixed Login with empty passwords; removed the (unused) test login
feature along the way.

78e39852 17-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Use BRoster::Launch() without registrar.

* BRoster now allows settings a "no-registrar" mode that is currently
only honored in _LaunchApp(), though.
* Job::Launch() is now using this, which also allows launching
applications by signature (ie. if the job name matches the
signature, you can omit the "launch" option).

1f9826a7 17-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

BRoster: minor cleanup.

c086a183 15-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Improved target support.

* You can now put jobs/services into a target.
* Instead of having Login started as part of the normal boot process,
it's now in the "login" target.
* The app_server now launches the login target when a login becomes
available (ie. during startup, but that could be improved later on).

ac0a462f 10-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: Basic user session implementation.

* Instead of launching Tracker/Deskbar directly, we now launch the
Login application.
* This will now start a new session for the selected user (the password
is currently ignored).
* When a user session is started, the launch_daemon forks, and the
child then restarts the LaunchDaemon application in user mode.
* It then registers itself with its parent, in order to resolve user
dependent services.
* Added a user launch file that will cause Tracker, and Deskbar to
start in the new session.

bea38cb7 11-May-2015 Axel Dörfler <axeld@pinc-software.de>

registrar: implemented auth port via launch_daemon.

* get_roster_port_name() is no longer needed.
* This also removes the app_server restart code from the debug
server -- this will be done by the launch_daemon in the future.

798ad3db 23-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BLooper: don't delete a launch_daemon port.

* Unless the service is really to be quit, the port should stay around;
but that decision is to be made by the launch_daemon, not the service

9d69dc09 21-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

libroot: added ability to communicate with the launch_daemon.

* These methods don't really work yet, as BMessage doesn't support
replying with a KMessage; the request is received, but the reply
never gets to the target.

43aec2c7 21-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: added support for arbitrary ports.

* Dropped "create_port" -- this is now the default for services.
* Additionally (or alternatively, if you use the "legacy" mode), you can
now create named ports, and specify their capacity.
* Added convenience methods to BLaunchRoster that automatically use the
signature of the current be_app.

592ffe64 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

The app_server is now a regular BServer.

2bc07d28 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BRoster::Private::SendTo() cannot be used in registrar.

* We're checking with IsTargetLocal() if we're allowed to access
it or not.
* This might introduce regressions, if the registrar is using its own
services via the BRoster API.
* This fixes a deadlock when the system clipboard tries to get
initialized within the registrar.

9bfc8331 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BRoster: find the registrar port via launch roster.

d3206115 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BMessenger: support launch daemon when set to signature.

* Before asking the roster, we now ask the launch roster if it knows
about the target.

e3114809 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BMessage: fixed reply port race condition.

* When the team that we got the synchronous reply from immediately
terminated afterwards, it might have still owned (and therefore
destroyed) our reply port.
* Make sure it's not added to the pool again, but is recreated instead.

d482c7ca 15-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

launch_daemon: actually launch the jobs.

* BRoster::Launch() cannot be used (yet), as it pre-registers the
application we're launching, and that won't work for the registrar or
anything else until the registrar is up and running.
* Add the team ID to the get-launch-data reply.
* Added BLaunchRoster::GetPort() for convenience.
* Removed some superfluous debug output, but temporarily dump all stdio
to /dev/dprintf (ie. the syslog).
* Made job matching case insensitive (as MIME types should be).

1480e5da 02-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

The beginnings of a launch_daemon for Haiku.

* This will be heavily inspired by Apple's launchd, as well as
systemd -- for now it really doesn't do a whole lot, though.
* What works so far: the configuration files are read, parsed, and
the jobs created.
* The jobs are even initialized, and their message ports created.
* BApplication now retrieves a previously created port from the
launch_daemon for use with BServer.
* Only the registrar actually uses this for now.

45888dab 01-Jul-2015 Philippe Saint-Pierre <stpere@gmail.com>

Crash fix in BMessage::ReplaceData()

The call to _CopyForWrite() invalidated the pointer previously assigned.
There was also an unrelated null-pointer derefence situation in the copy constructor.

Fixes #3074 and CID 610886 and CID 610887.

7c3d316b 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

Style fixes.

9bc4bd38 11-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

BLooperList: reset list contents after fork.

* No point in keeping those around; their threads are all gone.

8a86ad75 09-Jun-2015 Axel Dörfler <axeld@pinc-software.de>

libbe: Fixed current_team() to work after a fork.

* This allows to start a valid looper in the forked child, for example.

88f90128 22-May-2015 Alexander G. M. Smith <agmsmith@ncf.ca>

BMessage: fix an off-by-one error in SetCurrentSpecifier.

You could set the index to be past the end of the Specifier array.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #12087.

5ce80a78 21-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

BMessage: implemented KMessage reply.

* When you receive a message from a KMessage, and reply to it,
it will automatically reply as KMessage, too.
* This allows to communicate with BLoopers from within the kernel
or libroot.so.

446d4dca 30-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

Looper.cpp: fixed include order.

4d50aa32 29-Apr-2015 Axel Dörfler <axeld@pinc-software.de>

MessageAdapter: cleanup, no functional change.

9b3be140 20-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BApplication: Fix B_ARGV_* handling on silent relaunch.

In hrev47355 a logic reversal was introduced as part of a cleanup
commit which caused B_ARGV_RECEIVED to be sent only to apps with the
B_ARGV_ONLY flag set instead of clear.

In addition to that, don't send the B_SILENT_RELAUNCH message for apps
with B_ARGV_ONLY either, as they are not supposed to receive messages
after launch. This is in line with the documentation and what BRoster

0690387c 26-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

BServer/BApplication: added constructor for looper name.

* Added an extra looperName argument to the private BApplication
constructor that BServer is using.
* This is now used to fix the ugliness that gave the registrar
a different looper name, and even saves a string comparison.

85f43155 28-Jan-2015 Axel Dörfler <axeld@pinc-software.de>

BRoster: added missing const in Launch() variant.

* The argument array passed in is never touched.

30238c04 27-Jan-2015 Axel Dörfler <axeld@pinc-software.de>

Added BApplication::Signature() getter.

1f4de50d 16-Jan-2015 John Scipione <jscipione@gmail.com>

Style fixes to BMessageRunner, no functional changes intended

fd3c25a9 16-Jan-2015 John Scipione <jscipione@gmail.com>

Move the operator function docs over too

6fd09955 16-Jan-2015 John Scipione <jscipione@gmail.com>

Style fixes to Messenger, no functional change intended

f894ab70 09-Jan-2015 Rene Gollent <anevilyak@gmail.com>

BMessage: Fix #11710.

The refactored version of Unflatten() encapsulated the raw buffer
into a BMemoryIO with a specified size of SIZE_MAX, since the total
size of the messageisn't known up front. On 32-bit this was no problem,
but on x86_64, this would lead to an overflow in BMemoryIO, since it
stores its internal length as a size_t, which on that platform is the same
size as off_t. Consequently, when it would cast its length to off_t to
compare against the requested seek position in ReadAt/WriteAt, this would
overflow to a negative, leading it to reject all requests, which
subsequently caused Unflatten() to fail.

caf3e27a 06-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

BMessage: fix unflattening from a KMessage buffer

The BDataIO version of MessagePrivate::Unflatten only handles the R5 and
Dano formats, so we must call the buffer version for KMessages.

607dfee2 06-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Really fix passing BMessages by area.

1bfcb75b 06-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

BMessage: fix passing messages by area

I missed the fact that the BDataIO based Unflatten didn't handle this.
Restore the code from the recently removed buffer-based unflatten, so
it's possible to pass a message by area again.

d33e4744 03-Jul-2013 Axel Dörfler <axeld@pinc-software.de>

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.

8705e1f6 22-May-2013 Axel Dörfler <axeld@pinc-software.de>

mail_daemon: cleanup, 30s auto check startup delay.

* Refactored new message retrieval a bit, so that the notification strings
aren't duplicated.
* The daemon now waits 30 seconds before doing the first mail check.

46851a74 13-Dec-2012 Axel Dörfler <axeld@pinc-software.de>

BMessage::SetString() was broken.

* We cannot use the macro for this, unfortunately.

a6943acb 12-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added missing BMessage::{Get|Set}String() methods.

* Forgot to add those before accidentally.

62ede2e6 05-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

BMessage: avoid code duplication in Unflatten

The buffer version of Unflatten can be implemented by wrapping the
buffer in a BMemoryIO. This allows sharing more code, and the BDataIO
version of Unflatten has some extra error checks.

Fixes #11670.

a6f1bc98 24-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BMessage::ReplaceData: potential corruption on realloc fail

The method would update the field offsets first, and would not restore
them in case of realloc failure, leaving them pointing to the wrong

c254f99c 24-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

BApplication: remove AboutRequested implementation

The Be Book says this is a hook method, so the default behavior should
be to do nothing (didn't test BeOS, my install is currently broken).

Showing an alert with just the application thread name is less than
helpful anyway, and this was causing crashes.

Fixes #5554.

8007a392 08-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

BMessage: add AddFlat taking a const BFlattenable

It seems the const was forgotten in the BeOS version. But there is no
reason not to have it.

a0b6efc8 01-Nov-2014 Michael Lotz <mmlr@mlotz.ch>

BMessage: Check message area is owned by the current team.

When a message is passed by area, the sender is supposed to transfer
area ownership to the target team. If the area is not mapped within
the current team, accessing the area address would be invalid.

Also mark the area as read-only so accidental writes to the area would
become obvious.

d3344ffc 01-Nov-2014 Michael Lotz <mmlr@mlotz.ch>

BMessage: Check the return of _CopyForWrite().

When a message is passed by area, any modification to the message must
first trigger a copy of the message content. The success of this
operation was not checked however, possibly leading to later reallocs
on non-heap memory.

58844015 01-Oct-2014 Jessica Hamilton <jessica.l.hamilton@gmail.com>

BNotification: correct SetIcon documentation

d53fe46d 08-Aug-2014 François Revol <revol@free.fr>

Add a non-const compatibility BRoster::Launch() call

BartLAuncher needs this one...

3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949

b43baaba 26-Jun-2014 John Scipione <jscipione@gmail.com>

BRoster: Remove brief desc comments

As per discussion, you'll just have to look in the Haiku Book for this.
Thanks Axel

e4652fba 26-Jun-2014 John Scipione <jscipione@gmail.com>

BRoster: small doc fix

1909b63b 26-Jun-2014 John Scipione <jscipione@gmail.com>

BRoster: whitespace

807a7aa0 25-Jun-2014 John Scipione <jscipione@gmail.com>

Roster: print when sending B_READY_TO_RUN

732c5797 25-Jun-2014 John Scipione <jscipione@gmail.com>

Roster: style fixes.

* Check if == NULL or == 0 explicitily
* Use NULL instead of 0 as default value for pointers in header.
* other little stuff, new lines, comments

e0016ffd 24-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to BRoster, move docs to doxygen.

Keep the brief description as a regular comment above each public method.

Leave the docs of private methods.

Some variable renaming mostly because of abbreviations.

Add documentation for all the public methods and app_info members and defines
that didn't have docs in the cpp file.

b44215c0 17-Jun-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BRoster::Private::SendTo(): Actually support NULL reply

Unlike documented passing a NULL reply would just fail instead of
sending the message without waiting for a reply.

2776568d 12-Jun-2014 John Scipione <jscipione@gmail.com>

Fix BHandler::GetSupportedSuites()

The logic was reversed accidentally in hrev47355

Rewrite the method to make more sense. If data is NULL return
B_BAD_VALUE right away. Otherwise set the status based on the first
operation, if that succeeds perform a second one, and return the

Fixes CID 1222666

be902ac4 11-Jun-2014 John Scipione <jscipione@gmail.com>

App Kit: style changes.

No functional change intended.

Focused on documented classes only.

* Update copyright information.
* whitespace fixes.
* pointer style
* Rename some variables, msg => message, form => what
* Need consistent variable names to make documentation easier,
allows us to use \copydoc or \copydetails instead of repeating
ourselves over and over again.

f4c2f7eb 10-Jan-2014 Jonathan Schleifer <js@webkeks.org>

Remove variable length arrays of non-PODs.

Variable length arrays of non-PODs are not part of the C++ standard, but
a GNU extension that never worked correctly. Instead, BStackOrHeap array
is used now, which makes sure that it's not too big for the stack, calls
all constructors and is valid C++.

6abec6b9 10-Jan-2014 Jonathan Schleifer <js@webkeks.org>

Declare BLooperListIterator in the right place.

Before, it tried to typedef it to a private struct, but outside of the

5d7f782d 20-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BLooper: Add DispatchExternalMessage()

* This is primarily a service method for ports of widget tool kits
that require single-threaded GUI. DispatchExternalMessage() calls
DispatchMessage(), but also sets fLastMessage, so that
[Detach]CurrentMessage() work correctly. This allows to detach a
message in DispatchMessage() when called from the window thread,
add it to a global queue, and later process the queued messages in
a different thread that calls DispatchExternalMessage().
* BLooper/BWindow: Make sure fLastMessage is accessed only when locked.

fc5dbdc9 17-Dec-2013 Jonathan Schleifer <js@webkeks.org>

Get rid of an error caused by -Werror=unused-function.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>

fd5c87d5 26-Oct-2013 Axel Dörfler <axeld@pinc-software.de>

BLooper: removed superfluous locking and code in PostMessage().

* The code duplicated the code found in the BMessenger constructor that
it called a few lines below. This should improve PostMessage()
performance a tiny bit.

cf70d345 12-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge remote-tracking branch 'haiku/master' into package-management

This reverts 8f7f28a7c3db28711920ad5d15df401fae90bcf1 (OpenGL: Upgrade
Mesa 9.2).


b0944c78 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.
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).

998b880a 28-Jul-2013 Rene Gollent <anevilyak@gmail.com>

libbe: Fix MessageAdapter on x86-64.

When unflattening an R5 formatted message, explicitly use int32 rather
than ssize_t, since the latter's size differs by architecture.

cd15d8c3 17-Jul-2013 Philippe Saint-Pierre <stpere@gmail.com>

Style fix, no functional change intended

3e8daeb7 27-Jun-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add BMessenger::HashValue()

25a7b01d 05-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'master' into package-management

Additional changes:
* Add src/system/kernel/lib/zlib, which builds a kernel version of zlib,
needed by packagefs.
* BuildFeatures: Add a build feature "gcc2" to allow for easier checks.
* Referenceable.cpp: Include <OS.h> instead of <debugger.h>. The latter
is not needed and prevents building for the build platform.
* zlib/zutil.h: Fix gcc 2 build. We really should use the external
package instead.


cf0a957f 19-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BMessage: Add {Add,Find}Strings()

They add a BStringList to/extract it from a B_STRING_TYPE field.

4e66f871 31-Mar-2013 Michael Lotz <mmlr@mlotz.ch>

Launch the keystore_server on demand from BKeyStore.

This allows leaving the keystore_server closed as long as it isn't
used and still avoids having to launch it manually.

6de47836 31-Mar-2013 Michael Lotz <mmlr@mlotz.ch>

Add BMessenger::SetTo() to reinitialize a BMessenger.

This allows to reuse BMessenger objects for different targets, or to
recheck validity after initial creation. With that one can use the same
BMessenger after launching an application that was previously not found
valid for example.

4a0460a9 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Add generic unlock key setting and removal.

* Replace {Set|Remove}MasterKey() by generic {Set|Remove}UnlockKey()
that works on a keyring.
* Implement {Set|Remove}MasterUnlockKey() on top of that.
* Rename the commands and constants accrodingly.
* Implement setting and removing keyring unlock keys.

d4d6d123 25-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Don't require a key when creating a new keyring.

There will be key setting/removal functions so the step of adding the
keyring and setting a key on it can be done individually.

f8ccc323 24-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Remove the API part of the concept of apps per key.

The application access concept is on the keyring level only for now.
Generally it probably would get pretty complicated and therefore harder
to use when application access needs to be granted on a per key basis.

c8ae843f 24-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Rename keyring "access/revoke" to "unlock/lock".

The unlock/lock concept just seems easier to grasp and is used in
various similar tools as well.

f17ddab8 23-Jun-2012 Michael Lotz <mmlr@mlotz.ch>

Initialize the BKey to default values and set fCreationTime.

* Using Unset() initializes the BKey to default values.
* Also set fCreationTime to 0 for now. It is still unused but needs to
have a stable value for the exact matches when comparing keys.

64ca113f 07-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Add keyring specific versions of the *Application() methods.

51ab46a8 07-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Remove the purpose argument from all GetKey() variants.

The type is relevant and required as it determines the type of the
handed in key. The purpose however isn't actually needed and rather
inconvenient to get by depending on the situation.

94f897de 07-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Make Flatten/Unflatten public and remove IsRegistered().

The BKey doesn't know anything about the keyring concept, so the
registered info isn't really useful. May be re-added later with
keyring info as well.

5d4a0da4 06-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Remove unneeded master access revoke command.

Revoking master access currently simply means to revoke access
to the default keyring.

95eee1a3 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Make the keystore_server keyring aware.

* Move the *Key() functions into a Keyring class.
* Retrieve and select the right keyring for various commands.
* Implement adding/removing/enumerating keyrings.
* Rework the keystore database read/write to work with keyrings.
* Sync BKeyStore::IsKeyringAccessible() with the changed message.
* Remove leftover template code from registrar.

d962e210 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Add B_KEY_PURPOSE_KEYRING for keyring keys.

37ac7cb2 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Update the cookie from the reply message.

c494c061 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Add B*Key::PrintToStream() method for debugging convenience.

005a15bb 04-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Move keystore message constants and use a messenger.

* The keystore backend will (at least for the time being) reside in a
separate server. This one can be reached via normal messaging, so use
a BMessenger for sending key messages.
* Move the message constants from RegistrarDefs.h into a new
KeyStoreDefs.h that also contains the server signature.
* Update the message constants to reflect the new situation.

1c399649 03-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Implement all KeyStore methods except for password generation.

* Add all relevant message constants.
* Implement the messaging to send/retrieve key info.
* Implement _Flatten/_Unflatten for sending flat BKey objects.
* Remove application list from BKey, the key can't only differ by
allowed applications as the identifiers would still collide, so the
comparison isn't needed to uniquely identify the key. The applications
can be enumerated via the BKeyStore instead.

b7398289 03-Jan-2012 Michael Lotz <mmlr@mlotz.ch>

Rename [Un]Register* functions to Add/Remove*.

dc1acef8 22-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Flesh out the API and implement stubs.

* Modified the API greatly to be based on BKey* instead of BPassword*.
* Added BKeyPurpose and used it instead of BKeyType. It is supposed to
indicate the purpose of a key so that an app can look up keys on a
more granular level. The BKeyType on the other hand actually
identifies the type (i.e. subclass of BKey) so an app knows how to
handle a given key or may only enumerate/use keys it is compatible
* Made everything based on a raw data buffer for now, only BPasswordKey
is implemented yet which stores the (0 terminated) string into that
data buffer.
* Removed the additional data BMessage as I don't yet see where it fits
in. While I could imagine adding meta data to a key may be nice it
might be an interoperability concern when keys are shared by
different apps.
* Moved the app functions to the keystore as per the TODO, but not sure
how to actually implement them.

3b3884d9 16-Nov-2011 Michael Lotz <mmlr@mlotz.ch>

KeyStore and Key interface/stubs draft per Axel Dörfler.

A draft API and (mostly) stubs to back it up. Initial import of yet
unmodified sources.

d2239cb8 13-Dec-2012 Axel Dörfler <axeld@pinc-software.de>

BMessage::SetString() was broken.

* We cannot use the macro for this, unfortunately.

11c9f9a1 18-Nov-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64


a2f6e5ac 12-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added missing BMessage::{Get|Set}String() methods.

* Forgot to add those before accidentally.

762e4eca 04-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

BMessage::Append() is now actually working.

6e50e79e 03-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added Get*()/Set*() methods like the ones from KMessage.

009fd257 26-Oct-2012 Axel Dörfler <axeld@pinc-software.de>

Added BMessage::Append(), and new(std::nothrow_t).

* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.

33570266 02-Sep-2012 Ryan Leavengood <leavengood@gmail.com>

Get all parameters from a notification message.

Fixes #8916. Thanks Prodito for the patch.

ac4525b2 10-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Changed BRegion to use int32 instead of long.

There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that

4b8a51c3 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed incorrect sizeof in LinkReceiver::ReadRegion.

The type of BRegion::fCount is long, and ServerLink sends/receives it
with sizeof(long), but LinkReceiver was using sizeof(int32). Due to
long being 64 bit this was resulting in a mismatch. This fixes the
drawing problems on x86_64.

c802257b 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Merge branch 'master' into x86_64

aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button

9be774b5 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.

8e2140fa 29-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Fixed a large client side memory leak for app_server memory.

* The areas allocated for BBitmaps were never deleted, even though the
app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
the areas, so that the app_server now notifies the client whenever that is
* This might fix #6824.

60f75e90 04-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

Merge liblocale.so into libbe.so.

* Make the locale kit a part of libbe.
* Drop the LocaleBackend kludge used from within libbe (and from
other places, too) in order to access system catalog strings.
This is now done via gSystemCatalog, which is provided and initialized
by libbe.
* Drop all references to liblocale.so from all Jamfiles.
* Add legacy symlink liblocale.so in order to keep optional packages
that rely on it in a working state.

TODO: the documentation hasn't been updated.

38d688cc 03-Mar-2012 Jérôme Duval <jerome.duval@gmail.com>

BHandler: hopefully fixes a regression introduced in hrev43777.

* BHandler scripting handles bad scripting syntax by returning the Messenger property.
* Thanks to Siarzhuk Zharski for pointing this out.

4bbb27e3 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

More 'GCC4.6 variable set but not used' fixes.

1b6bc267 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kits: Some spelling cleanup of common mistyped words

* Little whitespace cleanup
* No functional change

6c40fc5d 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server

0e35d5d2 12-Dec-2011 John Scipione <jscipione@gmail.com>

Change instances of wether in comments to whether. No functional change intended.

323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
* Other smaller cleanups, changes, and fixes.

19ae20e6 05-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge branch 'master' into pm-flat


279ca67d 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Missing from previous commit. The files for notifications are quite scattered all around...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43115 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef889769 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Reinitialize global locks after a fork (at least those in the Application
* This should fix #5668.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42982 a95241bf-73f2-0310-859d-f6bbb57e9c96

edbfa1c7 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42978 a95241bf-73f2-0310-859d-f6bbb57e9c96

a35bbf9f 29-Sep-2011 Axel Dörfler <axeld@pinc-software.de>

* Coding style cleanup.
* The Read() method remembers the last error, so you don't have to check each
read when you do several in a row.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42789 a95241bf-73f2-0310-859d-f6bbb57e9c96

3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn

4b48067a 10-Jul-2011 Rene Gollent <anevilyak@gmail.com>

BClipboard::{Start,Stop}Watching(): Return an error if the passed in messenger
isn't valid.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42401 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c5a0acc 24-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Do not reserve memory when the area is too large. This fixes #7740 where the
reserved amount was simply too small, but also works around address space
waste with many larger bitmaps.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42298 a95241bf-73f2-0310-859d-f6bbb57e9c96

46b619c3 21-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Fix several problems in Flatten() that could potentially lead to overflows
and/or crashes if given a smaller buffer size than the Flatten operation
actually required.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42282 a95241bf-73f2-0310-859d-f6bbb57e9c96

3270af3c 22-Jun-2011 Michael Lotz <mmlr@mlotz.ch>

* Check the no-init case consistently, no need to crash when we failed to
allocate the header.
* Code style cleanups: 80-char limit, pointer style of recent additions,
explicit NULL checks, check ports against 0 instead of B_OK, results != B_OK.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42281 a95241bf-73f2-0310-859d-f6bbb57e9c96

ed55a283 15-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* The previous solution was needlessly complicated.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42201 a95241bf-73f2-0310-859d-f6bbb57e9c96

535453d9 15-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Reset the passed string on failure for BeOS compatibility.
* Fixes #7701.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42200 a95241bf-73f2-0310-859d-f6bbb57e9c96

4bb026ea 14-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Missing header.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42175 a95241bf-73f2-0310-859d-f6bbb57e9c96

54cf3a72 14-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed sReplyPortInUse type from long to int32, so it be used with
atomic_add() also on 64 bit architectures.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42174 a95241bf-73f2-0310-859d-f6bbb57e9c96

cd511790 09-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Minor coding style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42076 a95241bf-73f2-0310-859d-f6bbb57e9c96

87aa57e8 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Fix minor oversight in previous commit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42074 a95241bf-73f2-0310-859d-f6bbb57e9c96

930a139d 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* LockTarget[WithTimeout()]: Detect potential race condition where the looper
is deleted/recreated in between retrieval and lock. Report failure if so.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42073 a95241bf-73f2-0310-859d-f6bbb57e9c96

a779d2cb 06-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* Reverted accidental Jamfile change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41985 a95241bf-73f2-0310-859d-f6bbb57e9c96

5ff09046 06-Jun-2011 Axel Dörfler <axeld@pinc-software.de>

* ServerMemoryAllocator::RemoveArea() never removed the deleted mapping from
the list.
* Might even help with #7632.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41983 a95241bf-73f2-0310-859d-f6bbb57e9c96

f47952f7 29-May-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

If the looper is B_QUIT_REQUESTED synchronously. First quit and then send the reply message. Please check if this is the
correct semantics. I expected that the looper is dead when SendMessage returned. This should fix #7559 where the looper
destructor has to be called before continuing the cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41821 a95241bf-73f2-0310-859d-f6bbb57e9c96

70da0d86 24-Feb-2011 Jonas Sundström <jonas@kirilla.com>

CID 6331, 6333, 6334, 6335 SECURE_CODING

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40677 a95241bf-73f2-0310-859d-f6bbb57e9c96

fb9fc445 24-Feb-2011 Jonas Sundström <jonas@kirilla.com>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40659 a95241bf-73f2-0310-859d-f6bbb57e9c96

dc36ea92 24-Feb-2011 Jonas Sundström <jonas@kirilla.com>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40658 a95241bf-73f2-0310-859d-f6bbb57e9c96

2b526613 07-Feb-2011 Stephan Aßmus <superstippi@gmx.de>

Added another GetInfo() variant with which one can retrieve the count and
fixed size flag at once. Not sure if this can be merged into one of the
existing GetInfo() variants without breaking binary compatibility.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40374 a95241bf-73f2-0310-859d-f6bbb57e9c96

17e54d27 04-Dec-2010 Rene Gollent <anevilyak@gmail.com>

r39419 accidentally introduced an additional local variable that shadowed the one used to return errors from _LaunchApp. This had the net effect that errors were never returned correctly.

Fixes #6956.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39723 a95241bf-73f2-0310-859d-f6bbb57e9c96

e492be31 17-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added versions of the constructors that take a const BMessage& instead of a
pointer. Allows for passing a temporary object.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39472 a95241bf-73f2-0310-859d-f6bbb57e9c96

8aabb37b 17-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39471 a95241bf-73f2-0310-859d-f6bbb57e9c96

da1c9317 17-Nov-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Revert r39462 because it was not really binary compatible.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39469 a95241bf-73f2-0310-859d-f6bbb57e9c96

a5cf354a 16-Nov-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add protected RestoreState, SaveState functions to BApplication. HasBeenRestored can be used to check in ReadyToRun if the RestoreState function has been called. The default implementation just store the window geometry and the decorator settings. Subclass implementations can use the global restore_window_geometry, save_window_geometry function for convenience. Please review. Will commit a simple session manager tomorrow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39462 a95241bf-73f2-0310-859d-f6bbb57e9c96

954c60cb 14-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* _wasDocument may be NULL.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39425 a95241bf-73f2-0310-859d-f6bbb57e9c96

4697f6ac 13-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* _LaunchApp() will now retry launching the app if the initial try ended with
an invalid META:PPATH attribute.
* _ResolveApp() now also sets the _wasDocument variable correctly for the
_TranslateType() case. This lets _LaunchApp() properly detected invalid
META:PPATH attributes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39419 a95241bf-73f2-0310-859d-f6bbb57e9c96

08ac2a49 25-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

I don't quite understand why the preferred handler of
the super type is only regarded for "installed" MIME types.
The comment says that uninstalled MIME types are assumed
to be application MIME types, but this is clearly not always
the case. Initializing the secondary signature regardless
fixes the problem that unkown document MIME types open in
a random application, even though their super type has a
preferred handler. If the type is indeed an application
itself, I suppose no harm is done, since the primary
signature takes precedence anyway. Closes ticket #4501.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38810 a95241bf-73f2-0310-859d-f6bbb57e9c96

0250598f 25-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Forgot to update copyright for the last change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38369 a95241bf-73f2-0310-859d-f6bbb57e9c96

d3e85ecc 25-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* LaunchApp() now removes an existing app hint if load_image() returned an
error. It could even try again in the case of launch-by-signature to make
it more robust.
* _ResolveApp() now only updates the MIME type's app hint if there is no hint
already. This means that only the first app launch will update the hint, not
the ones after that; ie. if you had two installations of an app, launching
it by signature will now always launch the first app, not the one started
* This is done since the app hint is written before its known whether or not
the app could be started at all. Now, if an app could not be started, the
hint is removed, which means it can be reset on next try.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38368 a95241bf-73f2-0310-859d-f6bbb57e9c96

c0eff345 17-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Remove unused PortLinkRef again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38217 a95241bf-73f2-0310-859d-f6bbb57e9c96

1195f511 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments - no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38200 a95241bf-73f2-0310-859d-f6bbb57e9c96

38d80987 17-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add PortLinkRef class which use a existing sender and receiver for communication. Suggestion for a better name?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38167 a95241bf-73f2-0310-859d-f6bbb57e9c96

6e24fc67 16-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1498 (and others) : when deleting a NULL pointer, operator delete is actually called. So, it must not dereference the
given pointer without checking first.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38147 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1008df2 14-Jul-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Alex Wilson: Added convenience methods for storing BAlignment and BSize
in BMessages. Also added type codes for them in TypeConstants.h. Closes ticket
#6302. Thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37511 a95241bf-73f2-0310-859d-f6bbb57e9c96

e5150e28 08-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96

908967a1 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

Improved the BNotification API after suggestions from Karsten, thanks! Using
cosnt BString& instead of const char* could potentially save copying the string,
although in most use cases, it will probably ammount to the same thing. It may
provide more flexibility later on, like for example when BString knows its
encoding or something similar. Removed superfluous second version of

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36958 a95241bf-73f2-0310-859d-f6bbb57e9c96

f33637d9 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

* Improved BNotification API.
- No more manual memory management.
- Make it clear who keeps or releases ownership of arguments passed.
- Copy icon, arguments and entry_refs.
- Do not expose implementation details (What do the BLists contain?!).
- BRoster takes const BNotification& and bigtime_t timeout.

* BRoster::Notify():
- Proper error handling.
- Fixed documentation.

* Adjusted notify:
- Renamed fOk to fHasGoodArguments.
- The "const char*" members were really "char*" members (self-managed).
- free() is NULL-safe.
- fRefs contains BEntries, so passing void* to delete does no good.
- Adjustments to the changed API.
- Coding style fixes.

* notification_server:
- Adjustment to the new type for timeout.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96

de9dcd41 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1784a9d 22-May-2010 Stephan Aßmus <superstippi@gmx.de>

Reworded commented out code with regards to not knowing the data size yet,
to decide whether to apply the mini data flag. Helps compilation with clang
according to ticket #5892.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36908 a95241bf-73f2-0310-859d-f6bbb57e9c96

6e1c9c64 27-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Adjusted the resolving algorithm such that when the preferred handler of the
super type is among the handlers with direct support for the sub-type, that this
handler is at the beginning of the list of fall-back handlers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36507 a95241bf-73f2-0310-859d-f6bbb57e9c96

da72ff26 27-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Changed the resolving of the best handler for a MIME type to consider other
supporting apps of the sub-type only when there is a preferred handler for the
sub-type configured at all. In this case, it is assumed that the super-type
preferred handler is not really suitable. In the case when no sub-type
preferred handler is configured, the super-type preferred handler will always
get precedence, even if there are applications installed that declare direct
support for the sub-type. This makes the behavior more consistent/deterministic
and the "Open With" menu that Tracker displays will have the checkmark at
the app again that will really be used to open the type by default. Should
fix #5821 for good, as suggested by Axel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36500 a95241bf-73f2-0310-859d-f6bbb57e9c96

713c42c5 26-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Adapted BRoster::FindApp() documentation which outlines the retrieval process
of preferred and supporting applications to the new behavior. Other methods
affected by the new behavior already refer to the documentation for FindApp().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36478 a95241bf-73f2-0310-859d-f6bbb57e9c96

da24e53c 25-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Changed the behavior for BRoster::FindApp(), Launch() and related functionality:
Instead of only checking the preferred applications of a given MIME type and its
super type (i.e. "text/html" and "text"), build a list of all supporting apps,
where the preferred types of the sub and super type lead the respective
sections of the list. Then try to find the first valid application in the list.

This makes it possible to double click "Welcome" on the Desktop, even though
the text/html MIME type still has BeZillaBrowser set as preferred application.
Previously it would launch StyledEdit, even though WebPositive was readily

The previous behavior was probably implementing exactly the BeOS behavior, but
I can't see a good reason why we should be compatible here. Until now, my
testing has also not revealed any regression.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36471 a95241bf-73f2-0310-859d-f6bbb57e9c96

d2e28b60 13-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36213 a95241bf-73f2-0310-859d-f6bbb57e9c96

b13b0b0f 11-Apr-2010 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96

393127df 06-Apr-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Use %c to print uint8. This avoids a crash. I'm not sure this is a gcc bug,
or we were using the previous form incorrectly. Anyway, this doesn't change
the functionality and fixes ticket #5676.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36052 a95241bf-73f2-0310-859d-f6bbb57e9c96

f0330c4a 19-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed AreaLink, not used

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35914 a95241bf-73f2-0310-859d-f6bbb57e9c96

e6dc15ca 19-Mar-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

int8 and uint8 passed 3 parameters to the printf string,
but only 2 were used, leading to various problems (like bug #5596).
I added another variation of print_type which handles that case.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35911 a95241bf-73f2-0310-859d-f6bbb57e9c96

cfbd7554 12-Mar-2010 Alexandre Deckner <alex@zappotek.com>

* When launching an app by signature, check against the correct device trash when checking if an executable is in the trash.

When using find_directory(B_TRASH_DIRECTORY... to check if an entry is in the trash one should always pass the entry's volume otherwise you might be checking in the wrong trash.
Might happen elsewhere in the tree, will have an opengrok look.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35826 a95241bf-73f2-0310-859d-f6bbb57e9c96

e59dc33e 07-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

* Added BCursorID enumeration in App Kit's Cursor.h and new constructor which
takes such an id.
* Reused the existing mechanism to to have hardcoded tokens for the system
cursors, i.e. removed cursor_which enumeration from ServerProtocol.h and
used BCursorID where cursor_which was previously used.
* Reworked CursorManager.h and CursorSet.h accordingly and removed some methods
that where intended to replace system cursors with client cursors, since
those would break the reference counting and forget to maintain the cursor
* Replaced the cursors in CursorData.h/cpp with the new ones I just designed.
* Removed HaikuSystemCursor.h and HaikuLogo.h from the source, as those are/were
no longer used.

I hope I will not get too much beating for this one... :-) I know the new
default cursor is slightly larger, but I believe the old one was just too small.
Also I noticed that the cursor may be slightly too dark, at least the old one
seems noticeably brighter when compared side by side (the new one has a slight
gradient). That is something I may correct at least. Otherwise I hope nothing
is broken, I've tested in QEMU and so far everything works as intended.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35782 a95241bf-73f2-0310-859d-f6bbb57e9c96

a3cd51c7 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Cleanup: BMessage::_Reference never hits the case of having to transfer the area since _SendMessage already takes care of this (and transfer_area doesn't allow it to take an area from another team anyways so this code never could have worked).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35683 a95241bf-73f2-0310-859d-f6bbb57e9c96

4f85bc9f 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Cleanup of previous work: whether or not we're talking to app_server is already determined at time of port assignment. As such we don't need to cache or care about that, but rather just cache the target team instead of looking it up from the port info every time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35682 a95241bf-73f2-0310-859d-f6bbb57e9c96

099f9551 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Cache the app_server port lazily so we don't have to look it up every time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35681 a95241bf-73f2-0310-859d-f6bbb57e9c96

57dc77bb 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

ServerLink tried to use the transfer_area semantics backwards ; this failed since only the owner of an area can transfer ownership elsewhere. As a result, sending messages which contained large enough amounts of data would fail entirely. This was most readily visible in Tracker, where some files (i.e. text/plain files where Tracker would attach the text content to the BMessage for DnD clipping purposes) would be undraggable due to the drag initiation message never getting successfully processed by app_server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35679 a95241bf-73f2-0310-859d-f6bbb57e9c96

e8e5e0ca 27-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

Strings in BMessages don't necessarily have to be \0 terminated. Use the already
known length to print the stream so printf() doesn't potentially crash when
trying a strlen() on the string. Fixes for example printing B_KEY_DOWN messages,
where such strings are used, in certain conditions.

Review welcome, printf() formatting is not one of my strengths. :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35629 a95241bf-73f2-0310-859d-f6bbb57e9c96

cee04e80 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96

67df6a72 29-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Cleanup, these aren't necessary anymore.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35337 a95241bf-73f2-0310-859d-f6bbb57e9c96

17ec4668 29-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Printing of basic types was broken when they were part of non fixed size fields.
The size instead of the data would be printed. The fixed/non-fixed handling is
generic though, so no need to special case the always non fixed elements.
Since adding of basic types through their Add*() function always generates fixed
size fields, this would only be visible if the data was added through AddData()
with isFixedSize == false. This is the case in compiled resources for example,
hence you would see it when printing the returned messages of BMimeType::Get*()
functions for pre-installed types.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35336 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8ec4c04 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Initialize BRoster's MIME messenger lazily.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34402 a95241bf-73f2-0310-859d-f6bbb57e9c96

ec1bcf62 01-Dec-2009 Axel Dörfler <axeld@pinc-software.de>

* Added private methods get_app_server_port() (that stores the server port,
and doesn't have to find it every time), and create_desktop_connection() that
is now used from BApplication::_ConnectToServer() as well as the DesktopLink.
* Move PortLink::SetTo() into base class ServerLink.
* Eliminated duplicated member fReplyPort in DesktopLink.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34397 a95241bf-73f2-0310-859d-f6bbb57e9c96

73bade36 30-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* The DesktopLink class creates a new link to the Desktop, and therefore also
uses the AS_GET_DESKTOP command - but I forgot to update this to the new
version (it also didn't know the target screen stuff yet).
* This probably fixes bug #5042.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34394 a95241bf-73f2-0310-859d-f6bbb57e9c96

4701b640 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Give the BClipboard lock a name.
* be_clipboard is no longer created at libbe initialization time. The
BApplication creates it as done in BeOS. This requires manual
initialization in the registrar to avoid a deadlock on shutdown.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34388 a95241bf-73f2-0310-859d-f6bbb57e9c96

3c0c94f8 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Give the token space lock a name.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34387 a95241bf-73f2-0310-859d-f6bbb57e9c96

240a2c89 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed no longer needed gInitializationLock.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34385 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b9cf09f 29-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Got rid of is_running_on_haiku(). It was used for the test environment,
but wouldn't work when running it on Haiku anyway. At any rate, it was
relatively expensive (uname()) and used already in the libbe
* Got rid of the non-Haiku support of main_thread_for().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34371 a95241bf-73f2-0310-859d-f6bbb57e9c96

879f9a09 30-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Got rid of the static app resources lock. We use pthread_once() now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34370 a95241bf-73f2-0310-859d-f6bbb57e9c96

b9d85c12 27-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Increased reply timeout considerably: with the amount of debug output the
registrar currently spits out, the net_server, and the debug_server sometimes
didn't receive a reply in time, causing them not to start.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34304 a95241bf-73f2-0310-859d-f6bbb57e9c96

4fb9da18 27-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34303 a95241bf-73f2-0310-859d-f6bbb57e9c96

41975f20 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4 32 and 64 bit warnings in the libbe_build code. This time ported
them back to the Haiku versions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34262 a95241bf-73f2-0310-859d-f6bbb57e9c96

e6604f48 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't use ssize_t in structs describing persistent structures.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34258 a95241bf-73f2-0310-859d-f6bbb57e9c96

15fe75b9 24-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a protocol version field to AS_GET_DESKTOP. This should be bumped after
incompatible releases, and makes sure clients using the old libbe.so will be

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34210 a95241bf-73f2-0310-859d-f6bbb57e9c96

29e37d88 03-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Made BTokenSpace not throw any exceptions on memory shortage.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33874 a95241bf-73f2-0310-859d-f6bbb57e9c96

59fa665d 23-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

The "was dropped" flag is only used to specify whether or not DropPoint()
returns valid data. Since the data is still valid in the copy, we don't need
to clear the corresponding flag when copying a message. This is most probably
the same behaviour as in R5 as Tracker seems to expect that in the case where
a drop is done after a menu was displayed as in #4757. Thanks to aldeck for
tracking that one down inside Tracker, should fix #4757.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33746 a95241bf-73f2-0310-859d-f6bbb57e9c96

534a4df1 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33727 a95241bf-73f2-0310-859d-f6bbb57e9c96

d0276ac8 11-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed the way BRoster launches apps by signature: before, only the version
info would decide which one to start. Now, this is only the last comparison
taken into account: first, the search path will be checked, then, any apps
in the /system folder are selected. Only after that, the version check will
be performed.
* This should improve the choices made, especially when you have a second set
of binaries around due to having built Haiku.
* This therefore also fixes that Haiku would wait for the wrong input_server on
shutdown, as the registrar didn't (and rightly so) recognize the input_server
as a system app since the wrong one had been started.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33528 a95241bf-73f2-0310-859d-f6bbb57e9c96

41983084 09-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Style cleanups, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33493 a95241bf-73f2-0310-859d-f6bbb57e9c96

68667bf4 04-Oct-2009 Michael Lotz <mmlr@mlotz.ch>

* Adding a remote desktop interface that operates on app_server drawing
primitives by providing a RemoteDrawingEngine and a RemoteHWInterface.
Not really optimized yet, still a bit WIP.
* Adding corresponding infrastructure like a blocking ring buffer and network
sender/receiver that are attached to the buffers to feed/drain them as well
as a RemoteMessage helper that provides a message based interface.
* Adding target screen concept to request an app to be run on a specific screen.
It's controlled by the TARGET_SCREEN environment variable which is added on
the app side and sent to the app_server.
* Right now only remote target screens are supported, in which case a new
RemoteHWInterface is created that tries to connect to the given host:port.
* Fix shape bounds when drawing, they need to be translated by the pen position
and converted to screen like the points as well. Wasn't visible though as the
bounds weren't used in the normal DrawingEngine.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33417 a95241bf-73f2-0310-859d-f6bbb57e9c96

e0b7c61c 10-Sep-2009 Oliver Tappe <zooey@hirschkaefer.de>

Closing ticket #4465:
Net_server starts services by invoking fork() followed by exec(). If the latter
fails (for instance because the service isn't installed), the forked child is
invoking exit(). This in turn unloads libbe, triggering static cleanup code in
BMessage, which deletes a couple of message ports that were inherited from the
parent during the fork. After that, net_server was desparately missing those
ports and no longer worked reliably.
* in InitTerminateLibBe, we now register an atfork-(child-)handler, which
takes care to re-initialize the static reply ports used by BMessage code
* added BMessage::Private::StaticReInitForkedChild wrapper and
BMessage::_StaticReInitForkedChild() implementation which overwrites the
inherited port IDs with a set of own ports

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33050 a95241bf-73f2-0310-859d-f6bbb57e9c96

35d1ffa9 27-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

That debug output was of course accidentally commited.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32773 a95241bf-73f2-0310-859d-f6bbb57e9c96

fa1b1031 27-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Not that I'd understand the problem GCC4 has with that while GCC2 doesn't care,
but this fixes the GCC4 build again, without breaking the function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32772 a95241bf-73f2-0310-859d-f6bbb57e9c96

77093be1 27-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Whatever r32042 was supposed to fix in that file, it really broke R5 message
unflattening if they included any target or reply info. Changing the reader
usage like this makes the first argument a pointer to a buffer. It would
therefore write to random locations, because it would use the literal value of
those header fields as pointers, crashing the using application.
Will check for GCC4 compliance next.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32771 a95241bf-73f2-0310-859d-f6bbb57e9c96

2c69b5b6 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Made the libbe_test environment basically working under Haiku - to actually
make it work, one would need to use versioning for all libbe symbols. This is
worth an 8k price per file that links against libbe.so, so I didn't want to
commit this as is. An alternative to this solution would be to write a
separate application that is responsible for the app_server's window. Comments
* Removed BeOS compatbility of the libbe_test stuff.
* Renamed the libbe_test targets from *haiku* to *test*, ie. libbe_haiku.so is
now called libbe_test.so, haiku_registrar is now test_registrar, etc.
* This also removes BeOS compatibility from tracker/FSUtils.cpp (all BeOS
compatibility should be removed, but I don't want to make Alexandre more work
in his branch, and it's not urgent at all).
* Replaced the former "run" scripts for the test environment with a single
run script (see updated NOTES file).
* Removed the libbe_test target from some applications - this was only to help
developing them under BeOS, and is thus no longer necessary.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32521 a95241bf-73f2-0310-859d-f6bbb57e9c96

81147288 11-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added missing space.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32253 a95241bf-73f2-0310-859d-f6bbb57e9c96

685a77f9 07-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32187 a95241bf-73f2-0310-859d-f6bbb57e9c96

a0bfe3ab 31-Jul-2009 Rene Gollent <anevilyak@gmail.com>

gcc4 build fix.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32042 a95241bf-73f2-0310-859d-f6bbb57e9c96

d7a16b23 31-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

* Fully switch to the Haiku message format so that it is also used for on-disk
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
* Move variables that are purely used by the instance out of the header and into
the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
because of padding.
* Fix message passing by area. It never worked because the created area was
never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32039 a95241bf-73f2-0310-859d-f6bbb57e9c96

48a7b12a 29-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

Clear the padding to 0 when flattening to the R5 message format. Besides being
cleaner it allows for binary comparison of flattened messages.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31908 a95241bf-73f2-0310-859d-f6bbb57e9c96

e20dc8a7 22-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing convenience methods for unsigned integers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31187 a95241bf-73f2-0310-859d-f6bbb57e9c96

19e179ca 19-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
race condition with asynchronous SetViewCursor and deleting the
cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
just in case...
* Added TODOs for caching the BView token, it's currently resolved
for every single BView call that talks to the server... not good!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96

5d62f8e0 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96

3609af39 19-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Renamed _kern_reserve_heap_address_range() to _kern_reserve_address_range(),
and added a _kern_unreserve_address_range() as well.
* The runtime loader now reserves the space needed for all its areas first
to make sure there is enough space left for all areas of a single image.
* This also fixes the final part of bug #4008.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31115 a95241bf-73f2-0310-859d-f6bbb57e9c96

4d8f5338 12-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

When sending a B_ARGV_RECEIVED message also add a "cwd" field.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30717 a95241bf-73f2-0310-859d-f6bbb57e9c96

81f82c54 04-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed _SniffFile() to _GetFileType() and change its semantics slightly. It
does now try to get the file type from the given node info first.
* _TranslateRef(): Added special handling for executable files that aren't
applications and have a preferred application set. In such a case we return
the preferred application instead of the given file. This mimics BeOS

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30624 a95241bf-73f2-0310-859d-f6bbb57e9c96

0cc382e8 04-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* BRoster::_TranslateRef(): Changed error handling style. No functional change.
* Automatic white space cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30623 a95241bf-73f2-0310-859d-f6bbb57e9c96

b15e2008 26-Apr-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

Removed some left over debug output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30439 a95241bf-73f2-0310-859d-f6bbb57e9c96

f3c32c1b 26-Apr-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

If a preferred app was manually set but it is not found anymore (say, it was
deleted) try to handle it as if there was no preferred app set and if a
handler for its type exists, use it to open the file.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30438 a95241bf-73f2-0310-859d-f6bbb57e9c96

8f73c97d 10-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

In the assignment operator, watch out if the passed message is ourself.
Fixes a crash in WonderBrush when dragging images over the layer list
to import them and triggering auto-scrolling. WonderBrush caches the
drag message and appearantly calls it's own MouseMoved() hood with the
cached message from within the auto-scrolling code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29464 a95241bf-73f2-0310-859d-f6bbb57e9c96

64eb49fd 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

* Cleanup in the Gradient department. No fuctional change.
Renamed BGradient::color_step to BGradient::ColorStop
as it's called everywhere else. Also renamed BGradient::gradient_type
to just BGradient::Type. Renamed BGradient::Type() to GetType().
* Simplification of method names in Painter.cpp. Some not yet
complete and yet inactive code to accelerate vertical gradients
(bypassing AGG for this special case).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29214 a95241bf-73f2-0310-859d-f6bbb57e9c96

6eb09230 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Resolve further warnings on GCC4.
* Enable -Werror on GCC4 builds as well (limited to the same selected targets).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29118 a95241bf-73f2-0310-859d-f6bbb57e9c96

18cd67c7 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Add missing headers (malloc/free, string functions, memcpy, etc. undeclared).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28982 a95241bf-73f2-0310-859d-f6bbb57e9c96

9dc97edd 22-Nov-2008 Jérôme Duval <korli@users.berlios.de>

check BMessage::Find*() result

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28718 a95241bf-73f2-0310-859d-f6bbb57e9c96

52de6dce 08-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96

d7513239 18-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

fixes ticket 1522, 1591, 1946, 2318 and propably more

While creating an BBitmap in BApplication the bitmaps window looper would
be added to the applications gLooperList, thus calling Quit() on that window
and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
would fix the problem, but tests on R5 have shown that BApplication hides the
offscreen window in CountWindows() and WindowAt().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96

a02979bb 18-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96

60a068c8 16-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Fix build. The deep version did use the CompareData of course.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28184 a95241bf-73f2-0310-859d-f6bbb57e9c96

3c6372b4 16-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Rename BMessage::CompareData() to HasSameData() as this makes more sense for the
bool return type. Did I mention this was an unstable Haiku extension?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96

5b25b917 16-Oct-2008 Michael Lotz <mmlr@mlotz.ch>

Introduce BMessage::CompareData() which is a Haiku API extension. It compares
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96

431dc47d 15-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski with some changes by myself:
* Resolved TODO: The type of the gradient is no longer encoded twice in the
app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
* Check success for (at least) ReadGradient() in ServerWindow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28150 a95241bf-73f2-0310-859d-f6bbb57e9c96

39fbf550 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96

991547ef 14-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96

2617261d 04-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* fix a nasty bug i introduced with 26383, leaving the looper locked
* grab the fLooper pointer in some more functions, just to play save
* remove wrong comment in UnlockLooper, since it's obviously possible to change fLooper

In case we remove the handler from the loopers handler list, we need to grab the looper
pointer first, since calling RemoveHandler(...) will call BHandler::SetLooper(...) thus
setting fLooper to NULL and calling UnlockLooper did nothing, leaving the looper locked.

Thanks Maurice for pointing out that 26383 broke Cortex, the wires where not draw and the
app was locked somehow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27872 a95241bf-73f2-0310-859d-f6bbb57e9c96

17e0fc6b 04-Oct-2008 Karsten Heimrich <host.haiku@gmx.de>

* cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27871 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8b51708 22-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

In case there is no error field in the reply message, make sure that we don't
continue with B_OK. This also fixes CID 1122 where in such a case an
uninitialized token would be returned.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27695 a95241bf-73f2-0310-859d-f6bbb57e9c96

c66c6997 13-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

CID 225: If the field size was <= 0 the field buffer wasn't allocated but still
used in the switch statement. Change that to continue early when a filed size of
<= 0 is encountered.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27488 a95241bf-73f2-0310-859d-f6bbb57e9c96

c4f7df69 10-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

be_app could be NULL in BApplication's destructor, if the BApplication didn't initialize itself fully on construction. This fixes a crash when launching some already running application (i.e. print_server)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27413 a95241bf-73f2-0310-859d-f6bbb57e9c96

ee24e75d 30-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* man, i managed to mess up an one liner...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27240 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1287e5d 30-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* the condition should not have change, thanks Stephan for pointing this out :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27239 a95241bf-73f2-0310-859d-f6bbb57e9c96

1678a1dd 28-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* if the given buffer size is to big, we will know we handle it in Attach
this should fix LinkSender usage like as in Stroke/ FillPolygon in BView

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27226 a95241bf-73f2-0310-859d-f6bbb57e9c96

4e61552e 27-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* first implementation of passing data via area to app_server
this makes printing of large images work, fixes task #1067

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27214 a95241bf-73f2-0310-859d-f6bbb57e9c96

f75add61 15-Aug-2008 Michael Lotz <mmlr@mlotz.ch>

Obviously noone ever really used BFlattenable objects with our BMessage, as it
was pretty broken. It would store the address of the buffer in the message
instead of the actual data. Funnily, since it was completely stack based before,
it would have stored the address plus the actual data (minus 4 bytes) as that
did reside directly after the address on the stack and the original buffer
length was still used. This corrupted the data, but still "worked" for MDR
because it has fault tolerance, loosing only part of its flattened StringList.
This broke however when switching to a heap allocated buffer for large sizes,
as then the heap address plus some random heap data was added to the message
instead of the actual buffer. Sure interesting that nobody noticed that before...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26984 a95241bf-73f2-0310-859d-f6bbb57e9c96

edc51252 12-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* A few versions of BMessage::AddXXX and ReplaceXXX did not check the argument
passed to the function against NULL.
* Made BMessage::AddFlat() use an optionally heap allocated buffer versus always
a stack allocated one.
* Small simplification in BMessage::AddMessage(), we can simply compare the
buffer with the stack based buffer to know whether we need to free() it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26943 a95241bf-73f2-0310-859d-f6bbb57e9c96

f72ed717 07-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

The previous loop to remove all the BHandlers in the destructor was really quite
inefficient. And while it did check if the handler was not NULL, it would have
resulted in an endless loop if it was. I think we can safely assume we have no
NULL BHandlers in that list though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26870 a95241bf-73f2-0310-859d-f6bbb57e9c96

d666a89e 31-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Check for index < 0 too for B_BAD_INDEX. This fixes for example Tracker-Grep
which does

message->GetInfo("field", &type, &count);
while (message->FindBlah("field", --count, &...) == B_OK)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26695 a95241bf-73f2-0310-859d-f6bbb57e9c96

731b9ac7 11-Jul-2008 Karsten Heimrich <host.haiku@gmx.de>

* If a handler goes away that has an looper, we should remove us from the
loppers fHandlers list, otherwise we might end up with a dangeling pointer.

This should fix the crashes seen in Cortex and Icon-O-Matic on app close.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26383 a95241bf-73f2-0310-859d-f6bbb57e9c96

d2805ca9 06-Jul-2008 Karsten Heimrich <host.haiku@gmx.de>

* Archive the thread priority as well, it can be found in an R5 archive if Run() was called.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26276 a95241bf-73f2-0310-859d-f6bbb57e9c96

d2e55e94 24-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Memory leak in error case. CID 807.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25645 a95241bf-73f2-0310-859d-f6bbb57e9c96

01c52d4f 14-May-2008 Stephan Aßmus <superstippi@gmx.de>

Print the error message to stdout, since that is where the
message->PrintToStream() output goes. Thanks, Jerome, for the suggestion!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25500 a95241bf-73f2-0310-859d-f6bbb57e9c96

1781abf7 14-May-2008 Stephan Aßmus <superstippi@gmx.de>

Print and error and the message in case _ArgvReceived() fails to parse the
message correctly, it is a bit strange why the message should not follow

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25499 a95241bf-73f2-0310-859d-f6bbb57e9c96

32f1d458 14-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Reworked James Woodcock/stippi's patch a bit: since the remaining entries
are NULL pointers anyway, we just adjust argc.
* Made argv processing more safe, it will now check if the allocation of the
argv array succeeded in the first place.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25496 a95241bf-73f2-0310-859d-f6bbb57e9c96

9765d748 14-May-2008 Stephan Aßmus <superstippi@gmx.de>

Just spotted a mistake in my previous commit... and while I am at it, I can
properly credit James Woodcock, who debugged this problem and whom I forgot
to mention in my previous commit. Sorry!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25495 a95241bf-73f2-0310-859d-f6bbb57e9c96

e5aa9e13 14-May-2008 Stephan Aßmus <superstippi@gmx.de>

If an error happens during extraction of the argument vectors in
_ArgvReceived(), the array elements still need to be set to NULL otherwise
the function will free() random pointers at the end.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25494 a95241bf-73f2-0310-859d-f6bbb57e9c96

6b202f4e 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96

88144954 12-May-2008 Rene Gollent <anevilyak@gmail.com>

GCC4 fix.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25471 a95241bf-73f2-0310-859d-f6bbb57e9c96

e2fe7e2f 12-May-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed PortQueue since it's not used. Small style (old) changes here
and there.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25468 a95241bf-73f2-0310-859d-f6bbb57e9c96

6bf15ffc 27-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed macros that enable tracing for individual components from
defined/undefined to numeric values (0 for undefined). This allows for
trace levels.
* Set SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT default to 1, since this is
what one usually wants.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25213 a95241bf-73f2-0310-859d-f6bbb57e9c96

157c0ced 21-Apr-2008 Jérôme Duval <korli@users.berlios.de>

don't try to archive BHandler::fName when it is null

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25092 a95241bf-73f2-0310-859d-f6bbb57e9c96

f4103e2b 20-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

Reverted r25084, and fixed bug #1762 again as suggested by Korli on the mailing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25091 a95241bf-73f2-0310-859d-f6bbb57e9c96

727f8f30 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

_QuitAllWindows()) calls _WindowQuitLoop() twice but we don't want to check two times a window (hence the use of the xor operator)
this fixes bug #1762 (Installer: trying to close it via alt+q shows warning twice)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25084 a95241bf-73f2-0310-859d-f6bbb57e9c96

cfc3fa87 09-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96

071f9c3a 27-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Build configurations shouldn't be done in svn controlled files, so I
finally created a solution to avoid that: Header files that contain
configuration settings (and nothing else) go to build/config_headers.
To change settings, create a directory build/user_config_headers (which
is ignored by svn), copy the respective header there and modify it at
your leisure. Currently only tracing_config.h has been moved to the new
location, but more files will follow eventually. It is also recommended
to move optional macro definitions in Jamfile (as for BFS) to a config
header instead; the build system will then automatically rebuild on

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24611 a95241bf-73f2-0310-859d-f6bbb57e9c96

781a7155 26-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Move RegistrarThread[Manager].cpp to the registrar. There was no point
in those living in libbe.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24603 a95241bf-73f2-0310-859d-f6bbb57e9c96

b6646cf8 26-Mar-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

I disclaim any responsibility for this file. I don't even know why it
lives here.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24602 a95241bf-73f2-0310-859d-f6bbb57e9c96

ce9ba9b3 22-Mar-2008 Niels Sascha Reedijk <niels.reedijk@gmail.com>

First version of the BMessageQueue documentation.

Note: I have cleared the original MessageQueue.cpp file from the inline documentation. When the storage kit comes up, we need to rediscuss the documentation policy.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24522 a95241bf-73f2-0310-859d-f6bbb57e9c96

8417b8d8 18-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a comment in _InitData() to make it more obvious when the looper is
* Removed some long and useless comments.
* Other minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24445 a95241bf-73f2-0310-859d-f6bbb57e9c96

a433b9fe 09-Mar-2008 Michael Lotz <mmlr@mlotz.ch>

Rewrite and activate message passing by area. Passing by area works now with
the new sematic of transfer_area so a message area is transfered into the right
teams' address space and it does not need to be cloned there anymore. Passing
by area is only used for messages bigger than a certain size (currently
hardcoded to 40KB) which should be somehow bound to the max port message size.
This makes passing large messages (i.e. > the port limit) possible, so for
example copy&paste of long text, image data, etc. should now work.
Got rid of the fClonedArea member as it is not necessary with the new design,
renamed shared_area to message_area in the private message_header, avoid
an unnecessary allocation of the header for the copy constructors, check
allocations in a few more places and some minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24321 a95241bf-73f2-0310-859d-f6bbb57e9c96

766c4616 07-Mar-2008 Rene Gollent <anevilyak@gmail.com>

Team debug effort with Michael Lotz:

Tracked down the root cause of the issue worked around in r24228.
The behavior that was occurring in this case was as follows:
Vision created a BInvoker off the heap, containing a BMessage likewise
off the heap. It then called BAlert::Go with this invoker. When any of
the buttons in the BAlert were pushed, _SendMessage would enqueue the
message into the target looper (in this case, Vision's window) and wake
it up with write_port_etc. However, in some cases this would result in
a reschedule such that Vision's looper executed before _SendMessage() was
able to complete all its processing. Upon receiving this message, Vision
destroyed the BInvoker in question, which in turn deleted its owned
BMessage -- which was the message that was still in the middle of _SendMessage()!.
Consequently it would crash a few lines later when it hit IsSourceWaiting() and
tried to check flags off its header off the already destroyed this. To fix this,
we now do the AddMessage/write_port_etc last before returning. Also removed the
sanity checks added in r24228 so we don't mask other problems of similar nature.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24297 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c5c17cd 03-Mar-2008 Rene Gollent <anevilyak@gmail.com>

Fixed a crash that would happen sometimes with BInvoker: If an invoker was
set up with a null replyTo, sometimes BMessage would crash
calling IsSourceWaiting() after delivering the message. This appeared
to be because fHeader was NULL, but I'm not entirely certain if this
is actually supposed to be possible, so this may be masking a different
bug. This was observable using the multiline paste spam BAlert in
Vision, which would sometimes but not always crash in Haiku after hitting
any of the buttons to dismiss it, though consistently when calling IsSourceWaiting()
from the private BMessage::_SendMessage().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24228 a95241bf-73f2-0310-859d-f6bbb57e9c96

3ba0ac74 02-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Fixed a few problems in AddMessage() (most of them were pointed out by Marcus):
- no need to initialize the buffer on stack
- no need to initialize "buffer" to NULL
- renamed "buf" to stackBuffer
- enlarged buffer on stack to 16384 bytes (we have a minimum of 192 kB of
stack per thread, anyway).
- check the actual size of the stack buffer against the message's flattened
size instead of the one of its pointer.
- check if the allocation of the helper buffer failed, and return B_NO_MEMORY
in this case.
* Moved static helper functions to the top of the file.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24204 a95241bf-73f2-0310-859d-f6bbb57e9c96

0f9d90aa 01-Mar-2008 Karsten Heimrich <host.haiku@gmx.de>

* This fixes ticket #1865
* Allocate the buffer to flatten the message on the heap, if it's size is bigger then a given
buffer on the stack. It seem's to exceed the stack size (this might count for AddFlat() too).

Note: With this change one is able to copy the text into the clipboard (1mb), but it
is still impossible to paste it somewhere, as in BClipboard::_DownloadFromSystem()
SendMessage() fails transferring the data back in the reply msg because of the port size limit...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24196 a95241bf-73f2-0310-859d-f6bbb57e9c96

bd6a90a7 04-Feb-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

_PostMessage() was holding the BLooperList lock while calling
BMessenger::SendMessage(), which could lead to deadlocks (as in bug

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23865 a95241bf-73f2-0310-859d-f6bbb57e9c96

90e3bbf0 31-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added optional kernel tracing for sending BMessages. Currently only the
destination of the message and it's "what" field are stored. It might be
nice to also get some info about its fields -- maybe as an additional

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23810 a95241bf-73f2-0310-859d-f6bbb57e9c96

616e68e7 21-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

* IsLocked() now also uses the fCachedStack method that check_lock() is
already using.
* We don't have to try posting _QUIT_ more than once, as it cannot block; the
looper is local, so direct message passing is used in this case.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23690 a95241bf-73f2-0310-859d-f6bbb57e9c96

69666c91 13-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Clarified documentation of the "asynchronous" SendMessage() methods.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23504 a95241bf-73f2-0310-859d-f6bbb57e9c96

37d8f330 04-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

* ResolveSpecifier() used the window's handler name instead of its title for the "Window"
B_NAME_SPECIFIER. This should fix bug #1681.
* Improved ResolveSpecifier() code.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23239 a95241bf-73f2-0310-859d-f6bbb57e9c96

bfccde1f 13-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Forwarding did not work anymore for direct targets, since the header::flags
field was not initialized properly, and the reply target was taken from the
wrong header in this case.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22925 a95241bf-73f2-0310-859d-f6bbb57e9c96

10ffdaa2 17-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Added TODO.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22597 a95241bf-73f2-0310-859d-f6bbb57e9c96

ab64dcc9 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed some instances of incorrect erase() while iterating. Shouldn't
have been a problem though, since the iterated container is a list.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22535 a95241bf-73f2-0310-859d-f6bbb57e9c96

67c578e7 10-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added global lock that can be used for lazy initializations.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22502 a95241bf-73f2-0310-859d-f6bbb57e9c96

a632458d 29-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The wonders of signals:
* Since the app_server launched the input_server, it would also get notified
when the latter died via a signal - but LinkReceiver could return B_INTERRUPTED
in that case (it didn't check the return value of port_buffer_size()) which
the app_server misinterpreted and quit itself... this fixes the hanging part
of bug #1298.
* But the input_server still wasn't restarted, because the Registrar had it
still listed as being running. Now, the Registrar checks not just periodically
for died teams, it will also check for it when a new application registers
itself. This fixes the rest of bug #1298.
* Removed the old (disabled) R5 style input_server launch mechanism from the
* MessageLooper now prints a bit more information when a port is supposed to
have been deleted.
* The default implementation of MessageLooper::_GetLooperName() is now
returning the name of the semaphore of its BLocker instead of "unnamed

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22115 a95241bf-73f2-0310-859d-f6bbb57e9c96

d570f3bf 23-Aug-2007 Michael Lotz <mmlr@mlotz.ch>

* Don't leak buffers when reallocs fail
* Always check the return of the resize function
* Handle resize errors gracefully and ensure that the message stays intact
* Don't crash when printing a message that contains a field with no items (unlikely but possible in low memory situations)
* Fixed renaming fields - was completely broken and would have missed up field names and contents
* Some cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22047 a95241bf-73f2-0310-859d-f6bbb57e9c96

2272b5db 16-Aug-2007 Jérôme Duval <korli@users.berlios.de>

actually don't send B_SILENT_RELAUNCH for any message in the initial message list

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21990 a95241bf-73f2-0310-859d-f6bbb57e9c96

a3192bf3 16-Aug-2007 Jérôme Duval <korli@users.berlios.de>

Tracker seems to launch applications with a B_REFS_RECEIVED message in the initial message list.
Now checks if such a message is present and avoids sending B_SILENT_RELAUNCH in this case, and also in the standard case with a ref.
This fixes bug #1387

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21987 a95241bf-73f2-0310-859d-f6bbb57e9c96

d3ce129e 12-Aug-2007 Michael Lotz <mmlr@mlotz.ch>

Use swap_data() when unflattening a swapped message. It fits this purpose perfectly as it does conversion based on the type code. Now known type like B_INT32_TYPE will get swapped automatically.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21913 a95241bf-73f2-0310-859d-f6bbb57e9c96

fddbc231 12-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* fix attaching and reading empty regions

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21909 a95241bf-73f2-0310-859d-f6bbb57e9c96

0127fb77 12-Aug-2007 Michael Lotz <mmlr@mlotz.ch>

* Respect endiannes for item lengths inside swapped BMessages
* Also swap the flattened size when creating the read buffer
* Define specialized byte_swap()s for unsigned types too so that type_code and the like get swapped correctly

This should fix bug #1371.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21901 a95241bf-73f2-0310-859d-f6bbb57e9c96

1260fa65 08-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

fCachedStack needs to be initialized and reset when the looper is unlocked.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21864 a95241bf-73f2-0310-859d-f6bbb57e9c96

eaad52e8 08-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Now uses the cache stack trick for a cheaper check_lock() version as suggested by stippi.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21863 a95241bf-73f2-0310-859d-f6bbb57e9c96

c7f1e4bd 31-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

Sorry, the previous patch for WindowAt() by Váradi Zsolt Gyula was broken as well.
This change now actually fixes its logic; thanks for the hint, though :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21777 a95241bf-73f2-0310-859d-f6bbb57e9c96

c10776a2 31-Jul-2007 Jérôme Duval <korli@users.berlios.de>

applied patch from Váradi Zsolt Gyula: fixes People's (#1308) and Launchbox's closing problem. Thanks.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21776 a95241bf-73f2-0310-859d-f6bbb57e9c96

582da173 19-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* complete reimplementation of BRegion and it's backend

I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96

ccaa095f 03-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

<malloc.h> ain't a standard header. Should fix the build on platforms that
don't have it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21546 a95241bf-73f2-0310-859d-f6bbb57e9c96

5dc45eb4 27-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

* Unified handling of different BMessage formats into MessageAdapter.cpp
* Removed r5_message.cpp and dano_message.cpp accordingly
* Also moved out KMessage handling from Message.cpp to MessageAdapter.cpp
* Fixed some minor style issues in Message.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21514 a95241bf-73f2-0310-859d-f6bbb57e9c96

d2d8f91a 25-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed copy&paste bug, thanks Stippi for noticing!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21506 a95241bf-73f2-0310-859d-f6bbb57e9c96

b4183984 25-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

* Removed _GetWindowList()
* _WindowAt() and _CountWindows() now have an individual version of that
code which should be magnitudes faster.
* _WindowQuitLoop() no longer handles hidden windows specially - instead,
it now walks the window list in the correct direction which should fix
the issues.
* Also, it now uses WindowAt() and thus has an up-to-date view of the
window list (it will no longer ignore new windows).
* And finally, it will no longer dereference an unsafe pointer (for

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21505 a95241bf-73f2-0310-859d-f6bbb57e9c96

82d0e2c2 24-Jun-2007 Stephan Aßmus <superstippi@gmx.de>

* do not ask hidden windows if they want to quit (not to be confused with
minimized windows, those need to be asked of course)
* added some comments about why this code is a little flawed but works anyways

NOTE: I really wonder wether traversing the window list in reverse is correct

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21501 a95241bf-73f2-0310-859d-f6bbb57e9c96

618b37dc 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed various incorrect uses of the erase() method of several STL containers I introduced before. Thanks to Stefano for the hint!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21332 a95241bf-73f2-0310-859d-f6bbb57e9c96

2f03d0e0 05-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Changed the loops in BHandler::_SendNotices() and ::_ValidateHandlers().
See also r20183.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21331 a95241bf-73f2-0310-859d-f6bbb57e9c96

4cad5aba 10-May-2007 Axel Dörfler <axeld@pinc-software.de>

Made IsTargetLocal() a lot faster by using BPrivate::current_team() which caches the team ID.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21104 a95241bf-73f2-0310-859d-f6bbb57e9c96

94f814b3 09-May-2007 Jérôme Duval <korli@users.berlios.de>

fHandlerToken can be equal to B_PREFERRED_TOKEN

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21096 a95241bf-73f2-0310-859d-f6bbb57e9c96

42315414 30-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented atomic commit support to the clipboard as described by #1187.
* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20919 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca615cfc 17-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

BRoster::Launch() didn't send a B_SILENT_RELAUNCH message to an already
running app. Fixes bug #1162.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20743 a95241bf-73f2-0310-859d-f6bbb57e9c96

38220fb0 02-Apr-2007 Jérôme Duval <korli@users.berlios.de>

fix ServerLink::ReadShape and ServerLink::AttachShape for empty shapes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20517 a95241bf-73f2-0310-859d-f6bbb57e9c96

2b2ec438 26-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the AutoLocker class out of the kernel/utils/AutoLock.h header
into its own shared/AutoLocker.h. It can be used by userland code too.
* Removed headers/private/shared/ObjectLocker.h and replaced all uses of
BObjectLocker by AutoLocker.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20432 a95241bf-73f2-0310-859d-f6bbb57e9c96

eb9b1980 03-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed gcc 4(.1.2) build problems.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20320 a95241bf-73f2-0310-859d-f6bbb57e9c96

cf2aeb20 21-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96

11ef32df 20-Feb-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

erase() shrinks the vector, so we decrement the handler. Fixes the crash in case there are invalid handlers (Time application, for example). Should be fixed in the other _SendNotices() call too ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20183 a95241bf-73f2-0310-859d-f6bbb57e9c96

7b95cc63 16-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

The BRoster initialization (contacting the registrar) can now time out
(generous 1s for delivery and for reply). This allows for the registrar
main thread to be debugged. Before the libbe initialization in gdb would
block, since it constructed the global be_roster which waited forever for
a reply from the registrar.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20144 a95241bf-73f2-0310-859d-f6bbb57e9c96

cd9660c7 06-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved sending the B_NO_REPLY reply from the destructor to the more
general _Clear(), so that the assignment operator and Flatten() will
trigger such a reply as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20083 a95241bf-73f2-0310-859d-f6bbb57e9c96

c1c0c220 05-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* In the BMessage assignment operator we do now clear some of the message
header flags after copying the header of the original message. Before
cloning a message that still needed a reply would result in the clone
also needing a reply, which, in the end, led to two replies being sent,
thus screwing up the cached reply ports used for synchronous messaging.
Fixes bug #1008.
BTW, also clearing the reply info breaks Tracker and Deskbar, so I suppose
R5 keeps it and Tracker and Deskbar rely on that behavior.

* Added a bit of debug code removing and printing spurious messages from a
cached reply port.

* Added TODO in BMessage::~BMessage(). ATM, we only send a B_NO_REPLY in the
destructor, but not in case the message is overwritten using the
assignment operator or Flatten().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20074 a95241bf-73f2-0310-859d-f6bbb57e9c96

f6c08206 01-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* The BHandler observer mechanism was completely broken in Haiku for remote targets;
this fixes bug #1005. As a result, the Disks icon will now appear in file panels
when you change that setting with a panel open.
* _ObserverList is now in the BPrivate namespace (and renamed to ObserverList).
* its BHandler map is now only temporarily used for handlers that do not belong to
a looper yet; when BHandler::SendNotices() is called, they will be transferred
into the BMessenger map.
* Invalid messengers are now removed from the map when encountered.
* Added TODO comments about a possible reference counting if a handler is added
twice to a list (right now, this will be ignored).
* All {Start|Stop}Watching() methods are now more or less safe to be used in low
memory situations (adding some items to the map can still throw an exception...).
* Renamed BHandler::InitData() to _InitData().
* Some refactoring and cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20029 a95241bf-73f2-0310-859d-f6bbb57e9c96

f91bf83f 29-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

We must not wait for the reply of the registrar - this fixes a deadlock between
the registrar and the app_server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20013 a95241bf-73f2-0310-859d-f6bbb57e9c96

6af9dcbf 28-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Another cleanup patch by Vasilis Kaoutsis - thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19998 a95241bf-73f2-0310-859d-f6bbb57e9c96

9dbe170a 26-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Implemented direct message passing for local targets; this fixes a deadlock
with PostMessage() in case the message queue is full.
Some notes:
* for synchronous replies, we don't use this mechanism yet, but it could be
extended to do that as well.
* the code looks so complicated because we need a way to access the looper's
queue without locking it (to prevent deadlocks); like Dano's solution, I've
abused BTokenSpace to store a BDirectMessageTarget with a BHandler.
* we also need to decouple the lifetime of a looper's queue from its target,
as we cannot lock the looper, and therefore, can't guarantee it stays valid
as long as we're accessing it outside of BLooper.
* init_clipboard() now needs to be done after the global constructors have
been called - since sending messages now needs gDefaultTokens to be initialized.
Since this is done per image, it shouldn't cause any troubles, though.
* some minor cleanup, removed unused _msg_cache_cleanup_() and friends.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19968 a95241bf-73f2-0310-859d-f6bbb57e9c96

c01f349e 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

* Got rid of unused BLooper members
* renamed fTaskID to fThread
* Removed private and deprecated AddLooper()/RemoveLooper()/... stuff; BLooper is now
directly calling BLooperList methods.
* Got rid of extensive and useless comments
* Made a few TODOs more clear
* Merged InitData() and InitData(...) to _InitData(...)
* BLooper::Team() now uses BPrivate::current_team(), sTeamID is gone now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19966 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa33d0a9 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of the looper ID stuff - it seems nowhere to be used.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19965 a95241bf-73f2-0310-859d-f6bbb57e9c96

88df8322 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Optimized current_team() - it now uses a static variable to hold the team ID.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19964 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca9b9188 25-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

* Added a Dano extension to BMessageQueue: IsNextMessage().
* BLooper::AddMessage() is now using this method to determine wether or not to
update its looper thread.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19956 a95241bf-73f2-0310-859d-f6bbb57e9c96

e30afed4 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

As per Ingo's request, I moved calling BRoster::Private::UpdateActiveApp() into
the app_server (and updated all comments that said otherwise).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19865 a95241bf-73f2-0310-859d-f6bbb57e9c96

c2f641f2 18-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out the whole "active app" mechanism in the registrar wasn't used at all; the
Switcher now works as expected.
* Renamed TRoster::ActivateApp() to UpdateActiveApp(), as the app is already activated
at that point (the registrar only keeps track of it).
* BWindow::DispatchMessage() now calls the new BRoster::Private::UpdateActiveApp()
method when it receives a B_WINDOW_ACTIVATED message.
* Added BRoster::_UpdateActiveApp() which calls the new B_REG_UPDATE_ACTIVE_APP.
* Removed now unused B_REG_ACTIVATE_APP.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19857 a95241bf-73f2-0310-859d-f6bbb57e9c96

252f4767 12-Dec-2006 Ryan Leavengood <leavengood@gmail.com>

Added some needed stdio.h includes. I don't know what magic was used to compile
these for other people, but they wouldn't compile for me when building the
app_server test environment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19479 a95241bf-73f2-0310-859d-f6bbb57e9c96

ab12785c 02-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* I think I finally caught that bug where the test environment crashed
so frequently when unflattening R5 messages (each mouse event arrives
as an R5 message in the test environment): unflatten_r5_message()
retrieved the pointer to the message header, but afterwards cleared
the message... resulting in the header pointer to be invalid.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19412 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa389c6b 22-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Now sends the B_SILENT_RELAUNCH message if the app is already running and has
no arguments (or doesn't want them). We even already had the correct handler for

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19359 a95241bf-73f2-0310-859d-f6bbb57e9c96

3354a9cc 25-Sep-2006 Jérôme Duval <korli@users.berlios.de>

B_MESSAGE_NOT_UNDERSTOOD is better than B_ERROR for what fields

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18934 a95241bf-73f2-0310-859d-f6bbb57e9c96

6bfd06d1 31-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

BRoster::Launch() eventually launches the application in question
in several steps:
1. early pre-registration with the registrar ("I wanna launch the
app, make sure noone interferes.")
2. load the app image
3. finish pre-registration with the registrar ("I have launched
the app, here is its team ID.")
4. start app main thread
5. send "on launch" messages to the app (argv, refs, others)

If the app is already running or being launched, 1. fails with a
conclusive error code and returns the team ID and the pre-registration
token of the app. Steps 2 - 4 are skipped and only the messages are
delivered using the team ID returned by 1.

This change fixes a race condition: The failed early pre-registration
request obviously cannot return the team ID, if the other thread
launching the app has not finished step 3 yet. Thus the argv/refs
message would not get delivered and Launch() would not return the
correct team ID.

Now we wait for the pre-registration to be finished in this case, using
the former _IsAppPreRegistered() mechanism, which already provided
such a waiting feature for one request. It has been extended to
accomodate an arbitrary number of waiting requests and renamed to

This fixed bug #763.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18728 a95241bf-73f2-0310-859d-f6bbb57e9c96

1c1c6688 30-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Make sure "otherTeam" is -1 when it's not found in the reply.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18709 a95241bf-73f2-0310-859d-f6bbb57e9c96

9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96

67bdea52 10-Jul-2006 Jérôme Duval <korli@users.berlios.de>

hope no one minds with this Dano-like version of BMessage::PrintToStream()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18089 a95241bf-73f2-0310-859d-f6bbb57e9c96

d134f892 23-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Sending a forwarded message that had required a synchronous reply, can now be sent
again with a synchronous reply - the "reply done" flag wasn't cleared before sending.
* Improved error message in case the buffer for flattening the message couldn't be
allocated. BTW this would be a good place to use the new writev_port() function and
don't do any allocation at all.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17914 a95241bf-73f2-0310-859d-f6bbb57e9c96

3a59f3e4 14-Jun-2006 Jérôme Duval <korli@users.berlios.de>

should have been cur, dunno how it built before ...
fixed bug #661

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17841 a95241bf-73f2-0310-859d-f6bbb57e9c96

a5845049 13-Jun-2006 Jérôme Duval <korli@users.berlios.de>

now handles also the case when all specifiers are solved, and behaves as if we were asked the Messenger

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17837 a95241bf-73f2-0310-859d-f6bbb57e9c96

c4dde2f7 13-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* No need to create a BPath object for the leaf name in CreateAppMetaMimeThread.
* The preferred application is now written with the case preserved. This fixes
bug #635.
* Minor cleanup.
* BApplication::_InitData() now also corrects a pre-registered application signature
if the case is different. Note, however, that the application watching mechanism
doesn't seem to work correctly with this, maybe sending out those should be postponed
until the registration is completed?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17836 a95241bf-73f2-0310-859d-f6bbb57e9c96

39207b00 14-Jun-2006 Jérôme Duval <korli@users.berlios.de>

BMessage::GetCurrentSpecifier() set index even if it is a negative one and returns
This would explain why BLooper::resolve_specifier() was misbehaving before I fixed it

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17834 a95241bf-73f2-0310-859d-f6bbb57e9c96

7675c75f 13-Jun-2006 Jérôme Duval <korli@users.berlios.de>

avoid adding _previous_ on forwarded synchronous messages
tested with ForwardMessageTest.cpp
well I hope it doesn't break anything :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17831 a95241bf-73f2-0310-859d-f6bbb57e9c96

ddcab3b5 13-Jun-2006 Jérôme Duval <korli@users.berlios.de>

also check for GetCurrentSpecifier status instead of just the index

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17821 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b770c6e 13-Jun-2006 Jérôme Duval <korli@users.berlios.de>

reverted to 17808, BLooper::resolve_specifier should be fixed instead

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17820 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b25c488 12-Jun-2006 Jérôme Duval <korli@users.berlios.de>

BMessage::GetCurrentSpecifier returns B_OK if current specifier is negative

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17809 a95241bf-73f2-0310-859d-f6bbb57e9c96

e91315aa 11-Jun-2006 Jérôme Duval <korli@users.berlios.de>

scripting in BApplication is mostly fixed
BLooper had a be-handler named suite
BWindow is now exposing Active
scripting to BViews isn't working yet

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17797 a95241bf-73f2-0310-859d-f6bbb57e9c96

82584ab9 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96

99e2816c 08-Jun-2006 Jérôme Duval <korli@users.berlios.de>

begin of implementation for ScriptReceived

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17781 a95241bf-73f2-0310-859d-f6bbb57e9c96

1f8172a4 08-Jun-2006 Jérôme Duval <korli@users.berlios.de>

implemented ResolveSpecifier()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17780 a95241bf-73f2-0310-859d-f6bbb57e9c96

58c7d50a 07-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed the Dano message reader:
* The size returned was too big, as the size in the flattened message included
the message format.
* Made it a bit more robust, too (bail out if the section header size is smaller
than zero).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17772 a95241bf-73f2-0310-859d-f6bbb57e9c96

c13a4ddf 07-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Unflattening R5/Dano messages are both using the TReadHelper class which throws
exceptions in case of an error. Therefore, whenever those methods are called,
we need to surround them with a try/catch block.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17766 a95241bf-73f2-0310-859d-f6bbb57e9c96

f4fc3d62 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

* fixed some more GetSupportedSuites implementations
* fixed some local variables names
* fixed the case of some message attribute names

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17734 a95241bf-73f2-0310-859d-f6bbb57e9c96

82c410dc 02-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Tracker no longer wants to remove the executable bits from the kernel or the
runtime_loader when trying to start them.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17708 a95241bf-73f2-0310-859d-f6bbb57e9c96

3df4580e 24-May-2006 Axel Dörfler <axeld@pinc-software.de>

Made the registrar communication more robust (would have cured the symptoms of
bug #513 as well).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17585 a95241bf-73f2-0310-859d-f6bbb57e9c96

8780db59 24-May-2006 Axel Dörfler <axeld@pinc-software.de>

* Forwarding message that had someone waiting for a reply did not work correctly;
both messages wanted to reply then, which could get the wrong reply (B_NO_REPLY)
into the reply port. This fixes bug #513, took me some hours to figure that out...
* _SendMessage() no longer allows to forward a message and asking for a synchronous
reply that already has a source waiting for a reply.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17584 a95241bf-73f2-0310-859d-f6bbb57e9c96

b0bc48fb 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17515 a95241bf-73f2-0310-859d-f6bbb57e9c96

04b15907 16-May-2006 Axel Dörfler <axeld@pinc-software.de>

docRef can be NULL - this fixes the crash of the media server I introduced yesterday...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17478 a95241bf-73f2-0310-859d-f6bbb57e9c96

81d6346e 15-May-2006 Axel Dörfler <axeld@pinc-software.de>

Launching scripts via the Roster is now actually working (there were some app
registering stuff left that prevented that before).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17475 a95241bf-73f2-0310-859d-f6bbb57e9c96

973582ac 15-May-2006 Axel Dörfler <axeld@pinc-software.de>

_LaunchApp() no longer registers scripts.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17474 a95241bf-73f2-0310-859d-f6bbb57e9c96

f2274165 04-May-2006 Michael Lotz <mmlr@mlotz.ch>

Changing AddMessage() and ReplaceMessage() to use R5 message format to ensure compatibility.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17322 a95241bf-73f2-0310-859d-f6bbb57e9c96

035eafc5 03-May-2006 Michael Lotz <mmlr@mlotz.ch>

We should never mess with fQueueLink as it's maintained by the BMessageQueue. Small simplification.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17313 a95241bf-73f2-0310-859d-f6bbb57e9c96

bb40a685 03-May-2006 Axel Dörfler <axeld@pinc-software.de>

* The mapping is now also removed from the area list in case creating the
area failed.
* "base" is no longer used uninitialized in combination with B_BASE_ADDRESS.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17304 a95241bf-73f2-0310-859d-f6bbb57e9c96

6d5488e1 25-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96

704c03b9 22-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Got rid of that unused and superfluous TokenSpace callback stuff.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17200 a95241bf-73f2-0310-859d-f6bbb57e9c96

eef81495 11-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed wrong length calculation for memmove. This should at least fix bug #314 and probably more yet unknown problems with ReplaceData(). Also optimized removing data from the end of the buffer.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17101 a95241bf-73f2-0310-859d-f6bbb57e9c96

791b9c21 07-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

in case DEBUG is defined, BLooper don't use the benaphore style lock. Useful for debugging

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17045 a95241bf-73f2-0310-859d-f6bbb57e9c96

4ac06083 07-Apr-2006 DarkWyrm <darkwyrm@gmail.com>

Added missing symbol for Gobe Productive

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17036 a95241bf-73f2-0310-859d-f6bbb57e9c96

90a8acbf 06-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

BRoster::Launch() no longer replace B_NOT_AN_EXECUTABLE with B_LAUNCH_FAILED_EXECUTABLE
for everything - they now do that only for document files.
Also, I extended _TranslateRef() to not report anything that has the executable bit
set as executable - it now only does this if the BEOS:TYPE attribute says it's an
This fixes the error message Tracker was giving when trying to launch a shared library
("This file was mistakenly set as executable...").

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17023 a95241bf-73f2-0310-859d-f6bbb57e9c96

ac1f397e 02-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Rewrote the private query_for_app() function to search on all mounted volumes
instead of just the boot volume.
It now also has a second pass in case nothing could be found. The second pass
does a case insensitive query for the application's signature, and fixes the
problem that some apps couldn't be started by signature until they were launched
once (because the MIME database is always case insensitive).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16967 a95241bf-73f2-0310-859d-f6bbb57e9c96

60bf6a1f 02-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Removed the detached version of the BMessageRunner object again, and instead
have a static method for spawning one (BMessageRunner::StartSending()), as
suggested by Ingo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16966 a95241bf-73f2-0310-859d-f6bbb57e9c96

600fbd78 01-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
have retrieved a cursor until they have called Acquire() on the
cursor. (Axel: what good is using atomic* stuff in Acquire() and
Release() if we have to protect this by a lock anyways?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96

ad236123 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Removed some unnecessary TODO items.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16913 a95241bf-73f2-0310-859d-f6bbb57e9c96

090dcfd4 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Removed some more musings about LockLooper() and token space.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16912 a95241bf-73f2-0310-859d-f6bbb57e9c96

689dc9f9 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Simplified LockLooper() and LockLooperWithTimeout(), got rid of not really
helpful but extensive comments in the code.
* Fixed possible wrong error values of LockLooperWithTimeout().
* AddFilter()/RemoveFilter() now check if the looper is locked in case this
handler belongs to a looper - as SetFilterList() already did.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16911 a95241bf-73f2-0310-859d-f6bbb57e9c96

68ead3ea 22-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BLooper uses a benaphore style lock, should save some cycles. I hope this wasn't left out on purpose

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16864 a95241bf-73f2-0310-859d-f6bbb57e9c96

2297a36b 22-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* added functions to improve binary compatibility with old apps
-> Guido (for which there is source available though) is now
running fine on Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16860 a95241bf-73f2-0310-859d-f6bbb57e9c96

16ed1e1d 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96

38a6ea1d 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed the old AS_AREA_MESSAGE stuff - it's currently not used at all, and
even though we might need something similar, we can't use it (since it was
based on BGet++).
* Removed BGet++, it's not used anymore.
* Removed ServerMemIO class, was never used.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16830 a95241bf-73f2-0310-859d-f6bbb57e9c96

04768381 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

The test environment should now build okay again, as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16829 a95241bf-73f2-0310-859d-f6bbb57e9c96

c7c61938 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

We should delete our server memory as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16828 a95241bf-73f2-0310-859d-f6bbb57e9c96

9a44fdc9 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
them all several times in BBitmap, we now have one or more areas per team,
and BBitmap will only clone areas once if needed. As a side effect, this
method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
maintenance structures into those everyone-read-write areas, they are now
separated, so that faulty applications cannot crash the app_server this
way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
(ie. via ServerApp), per area (for overlays, not yet implemented), and using
malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96

1dec8769 12-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* Micheals patch alone didn't fix the problem.
I'm also wondering where those exceptions are actually caught.
* when unflattening into a message, MakeEmpty() will be called
on it first. This will actually fix the crashing bug I observed,
but it makes me suspicious - there should be an error somewhere
else. Something to do with initialization perhaps?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16763 a95241bf-73f2-0310-859d-f6bbb57e9c96

3dd881e3 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed memory leak in StressTest and BWindow: they both did not delete the
message they passed to a BMessageRunner object.
* Added note about the ownership of the message to the BMessageRunner

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16751 a95241bf-73f2-0310-859d-f6bbb57e9c96

3bb07059 12-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed the build for the libbe_test target.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16748 a95241bf-73f2-0310-859d-f6bbb57e9c96

641a8290 12-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed converting KMessages, their target and reply info weren't preserved. Fixes bug 295.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16734 a95241bf-73f2-0310-859d-f6bbb57e9c96

1daa34ec 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed two small errors that prevented _NativeFlatten() from working. Should fix at least the Deskbar and shutdown issues of bug 295.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16732 a95241bf-73f2-0310-859d-f6bbb57e9c96

43d7fe97 11-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Added two new constructor forms that allow you to create a BMessageRunner
that is detached from its local object; ie. it will continue to send its
messages when you delete the object.
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16730 a95241bf-73f2-0310-859d-f6bbb57e9c96

47c2c0f2 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

fix some memory leaks, please review

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16715 a95241bf-73f2-0310-859d-f6bbb57e9c96

a9bee75b 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

fix a problem in case the port id was indeed 0, which is very unlikely though

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16714 a95241bf-73f2-0310-859d-f6bbb57e9c96

a45369f0 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Renaming the Message4 magic to Haiku Message Format 1. Now off to real work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16711 a95241bf-73f2-0310-859d-f6bbb57e9c96

bdbd1cb4 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing the USING_MESSAGE4 define.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16710 a95241bf-73f2-0310-859d-f6bbb57e9c96

2bf8fb3a 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Putting Message4 into place to become the new BMessage implementation. Will cleanup USING_MESSAGE4 now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16709 a95241bf-73f2-0310-859d-f6bbb57e9c96

16ba0dc5 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing old BMessage implementation. Message4 will replace it in the next commit.
This will allow to fix message related problems like drag and drop and scripting.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16708 a95241bf-73f2-0310-859d-f6bbb57e9c96

be25ae86 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Flushing last changes in preparation of replacing the old BMessage with Message4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16707 a95241bf-73f2-0310-859d-f6bbb57e9c96

39e26f61 02-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug in the previous commit that prevented the Roster to find an
app if the type had no preferred application at all.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16566 a95241bf-73f2-0310-859d-f6bbb57e9c96

0bad0dd0 02-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

_TranslateType() now falls back to the preferred app of the super type in
case the preferred app of the type itself is not available or valid.
Ie. if you have deleted an application that was the preferred app for
"image/png", the system will now try to open the file with the preferred
app for "image".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16565 a95241bf-73f2-0310-859d-f6bbb57e9c96

bc2f09bb 01-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed a possible endless loop: when the calling team should receive the B_REFS_RECEIVED
message, we no longer send a message. This seems to be what BeOS does, and it prevents
Tracker from playing ping-pong when trying opening generic files.
* Eliminated superfluous otherTeam & targetTeam variables in _LaunchApp().
* Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16564 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c807cdd 27-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot to commit LinkReceiver... this fixes the build again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16534 a95241bf-73f2-0310-859d-f6bbb57e9c96

588259b6 26-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to handling custom cursors:
* all cursors owned by a team are visually different,
or (iaw) an already existing cursor is reused when
it is set by the client again
* changed various occurances of cursor data from "int8*"
to "uint8*"
* ServerCursors also remember the R5 data from which
they were created
* the reference counting and destruction of
ServerCursors changed: The cursor knows it is attached
to a CursorManager and one can simply use
ServerCursor::Acquire() and Release() and the reference
counting and everything is being taken care of
* destroying a ViewLayer will now correctly release a set
* fixed a race condition when setting a cursor through
BView::SetViewCursor(): If the client code looks like this:

BCursor cursor(cursorData);
someView->SetViewCursor(&cursor, false);

there is a relatively high chance the BCursor destructor
told the ServerApp thread to destroy the cursor before
the ServerWindow thread got to "acquire" the cursor for
use by the view layer. The very same problem is likely the
reason that SetViewCursor works to unreliably on R5, even
when the "sync" flag is set to "true" (although it should
theoretically work in that case).

all these fixes make WonderBrush work fine again with the
new support of custom cursors.... coded by axeld and myself
(the joys of pair programming :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16521 a95241bf-73f2-0310-859d-f6bbb57e9c96

69904185 23-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed some more bugs in the message passing by area
* Reordered some functions
* Area messages can now be unflattened instead of using the private _Reference and a special port code

Passing by area is now mostly working but it's not yet enabled. I will have to conduct performance tests first to see if and starting at what messagesize the overhead is reasonable.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16500 a95241bf-73f2-0310-859d-f6bbb57e9c96

5b62df9d 20-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

* Fixed some bugs noticed by rereading the whole implementation
* Added checksum generation and checking

The data itself is now checksummed too (unlike R5 where only the header gets a checksum). This might be a performance problem for larger messages. Opinions?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16482 a95241bf-73f2-0310-859d-f6bbb57e9c96

8900925b 19-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

Fixed some bugs reported by Marcus Overhagen.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16475 a95241bf-73f2-0310-859d-f6bbb57e9c96

38b52de9 18-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

Hopefully fixed the build when not using Message4. As Message4 works well and is less broken than the older implementation we should maybe switch to it completely.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16461 a95241bf-73f2-0310-859d-f6bbb57e9c96

721a0fe3 17-Feb-2006 Michael Lotz <mmlr@mlotz.ch>

Started implementing message passing by area. This will be needed for drag & drop messages and will probably be used for large messages instead of sending them through a port. Not yet finished and not enabled. Cleaned up a part of BLooper - this class should probably be cleaned up completely.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16459 a95241bf-73f2-0310-859d-f6bbb57e9c96

91fe5e6e 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16431 a95241bf-73f2-0310-859d-f6bbb57e9c96

eb797182 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16430 a95241bf-73f2-0310-859d-f6bbb57e9c96

9bce8e57 15-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

BMessage::AddString() no longer crashes when the string to add is NULL.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16410 a95241bf-73f2-0310-859d-f6bbb57e9c96

3d6c7116 12-Feb-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

added shutdown_media_server and start_media_server into libmedia.so, based on an older implementation from svn history, but modified and bugfixed

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16367 a95241bf-73f2-0310-859d-f6bbb57e9c96

ab093a2c 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Removed TODO item, it's already resolved.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16239 a95241bf-73f2-0310-859d-f6bbb57e9c96

aa1f5437 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96

a5eeb74a 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Let's play SetToken() and NewToken() play nice together.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16234 a95241bf-73f2-0310-859d-f6bbb57e9c96

1ba1f4be 30-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

If the "if" block is more than one line long, braces should be used, even
if it doesn't make a semantical difference. I can't believe I've written
that code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16162 a95241bf-73f2-0310-859d-f6bbb57e9c96

1ae42108 28-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Improved the window_quit_loop() situation:
* We no longer try to dynamic_cast<>() a BLooper* into a BWindow* in
an unsafe context (i.e. without the looper or the looper list being
* We no longer try to quit windows that haven't been run yet (e.g.
bitmap's offscreen windows). Those windows conceptually still belong
to their creator. In the best case trying to lock such a window
simply failed (e.g. when the creator was another window that had been
told to quit earlier and deleted the window in question just not too
early). In worse cases we would dead-lock (when the owner has not
been told to quit (or refuses to do so)), cause "locker must be
locked" debugger calls or die painfully when accessing an already
deleted object.

BTW, I doubt, that the whole window quitting procedure is as it should
be. There's still a huge race condition: When a window is created after
we capture the window list at the beginning of window_quit_loop() that
completely escapes us.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16134 a95241bf-73f2-0310-859d-f6bbb57e9c96

05b4b0d7 23-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Node monitoring didn't work because unflattening KMessages didn't take the
message header into account. It worked before at some point as BLooper was
letting the looper handle messages to invalid targets - they are now just
This fixes bug #93.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16045 a95241bf-73f2-0310-859d-f6bbb57e9c96

5edcfe96 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15806 a95241bf-73f2-0310-859d-f6bbb57e9c96

a31ddcb3 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot to include this in the last commit: added big endian support to R5 format.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15805 a95241bf-73f2-0310-859d-f6bbb57e9c96

5c7f8768 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Added big endian support for R5 messages, minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15804 a95241bf-73f2-0310-859d-f6bbb57e9c96

9f8f6275 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed shutting down apps with file panels - no more hang:
* if file panels shouldn't be quit, we no longer call QuitRequested() for
them and stop quitting windows (which left normal windows open, because
file panels always return "false" in QuitRequested())

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15715 a95241bf-73f2-0310-859d-f6bbb57e9c96

6700022a 22-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Looks like the fix didn't work

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15658 a95241bf-73f2-0310-859d-f6bbb57e9c96

291540f5 22-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Signatures are case insensitive. This should allow Clock to start.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15654 a95241bf-73f2-0310-859d-f6bbb57e9c96

579d1b23 15-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15553 a95241bf-73f2-0310-859d-f6bbb57e9c96

706fb459 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Oops, remaining messages in the link should be taken into account as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15513 a95241bf-73f2-0310-859d-f6bbb57e9c96

1b974d07 12-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

You can now test if there are more messages waiting in the link.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15512 a95241bf-73f2-0310-859d-f6bbb57e9c96

3106b9ec 30-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

You shall not break the build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15244 a95241bf-73f2-0310-859d-f6bbb57e9c96

17adbf1f 30-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc style changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15243 a95241bf-73f2-0310-859d-f6bbb57e9c96

7c686564 25-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Don't trust a message that we got goes to a handler that belongs to us.
* when we terminate gracefully and in the looper's thread, we no longer
unlock ourselves.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15155 a95241bf-73f2-0310-859d-f6bbb57e9c96

45d4256f 24-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Added a BTokenSpace::SetToken() to assign a specific token.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15111 a95241bf-73f2-0310-859d-f6bbb57e9c96

43ca7765 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* applied the logic from BWindow::task_looper() to BLooper as well (messages to
invalid target handlers are dropped).
* B_PREFERRED messages now go to the looper if there is no other preferred handler.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15088 a95241bf-73f2-0310-859d-f6bbb57e9c96

6338e9da 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed RemoveMessage() I broke before.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15085 a95241bf-73f2-0310-859d-f6bbb57e9c96

85606ee1 22-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed DetachCurrentMessage():
* the current message is not part of the queue when it's dispatched, so it
doesn't make any sense to try to remove it.
* it's only to be called during message processing - and at that time, the
looper is locked, anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15079 a95241bf-73f2-0310-859d-f6bbb57e9c96

85b31e1b 21-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Removing Message2 and Message3. They did not proof to be good enough so they don't need to take up space either.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15062 a95241bf-73f2-0310-859d-f6bbb57e9c96

b360ada4 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

If a handler passes a BMessage on to the next handler, it will now make sure
its filters are taken into account.
It will also filter out messages in case the filter targeted the current handler
again - note, this is not really a good solution, as ideally, all previous handlers
must be ignored.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15061 a95241bf-73f2-0310-859d-f6bbb57e9c96

14d02d22 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
(this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
(previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
compatible to that one.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15060 a95241bf-73f2-0310-859d-f6bbb57e9c96

3cace414 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Removed run_task(), as it's not really needed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15057 a95241bf-73f2-0310-859d-f6bbb57e9c96

174459d7 20-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Fix build when not using Message4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15056 a95241bf-73f2-0310-859d-f6bbb57e9c96

e4890297 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* made the dano and r5 message more similar to use (naming).
* coding style changes to structure naming.
* but no bug fixes yet...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15055 a95241bf-73f2-0310-859d-f6bbb57e9c96

8fe49312 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Added swapped endian type codes for the R5 and Dano message readers.
* when Unflatten() encounters an unknown message format, it will now return

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15050 a95241bf-73f2-0310-859d-f6bbb57e9c96

9e2023b1 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Fixed sending/receiving "use preferred handler" messages - it simply didn't
work before.
* Removed the private header fPreferredTarget field.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15047 a95241bf-73f2-0310-859d-f6bbb57e9c96

4ceb1e51 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
to your UserBuildConfig:
AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
target the client handler, while the other will target the preferred handler of the
client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96

ace01f86 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15037 a95241bf-73f2-0310-859d-f6bbb57e9c96

0139f287 19-Nov-2005 Adi Oanca <adioanca@nowhere.fake>

Following recent changes (Axel's token stuff or Message4 impl) I could not launch a single application/window in app_server. This fixes the problem. Note I always test with DEBUG=1. Am I the only one who had this problem?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15033 a95241bf-73f2-0310-859d-f6bbb57e9c96

17de8ec2 19-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

GetToken() is supposed to always set the _option argument - not only on success.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15032 a95241bf-73f2-0310-859d-f6bbb57e9c96

d081112c 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* removed tokens are no longer put on a stack and reused - every token is only
used once now. If tokens were reused, you could eventually target the wrong
(but valid again) messenger.
* removed unused stuff (like GetList()).
* some cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15028 a95241bf-73f2-0310-859d-f6bbb57e9c96

4ad46aa9 18-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Made BMessage::GetInfo() pointer arguments optional (ie. passing NULL doesn't
cause a crash anymore).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15022 a95241bf-73f2-0310-859d-f6bbb57e9c96

1ba67cc8 16-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* almost rewrote BMessageQueue; simplified code, removed over-extensive documentation,
* made BMessageQueue::IsLocked() const - the non-const version is still provided
for binary compatibility.
* Both BMessageQueue::FindMessage() versions are now thread safe, the queue's BLocker
is now mutable to allow for this.
* renamed BMessage::link to fQueueLink as the "Message4" implementation uses it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14955 a95241bf-73f2-0310-859d-f6bbb57e9c96

cf10934e 13-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14882 a95241bf-73f2-0310-859d-f6bbb57e9c96

97078ce5 09-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

also return B_BAD_VALUE in case NULL pointer passed, please yell if you disagree with this change, but I thought the client code could look less cluttered this way

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14817 a95241bf-73f2-0310-859d-f6bbb57e9c96

f46e077c 09-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Changed the meaning of the second parameter in AttachString(): it's now the maximum
length, not the length of the string.
Introduced a maximal string length that may be sent at once.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14799 a95241bf-73f2-0310-859d-f6bbb57e9c96

db103be7 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Learning how to merge correctly...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14769 a95241bf-73f2-0310-859d-f6bbb57e9c96

c8997cf4 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Now that Michael has fixed all bugs, I took the liberty and applied our style guide
(I was actually investigating the bugs, but Michael beat me).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14767 a95241bf-73f2-0310-859d-f6bbb57e9c96

7638a8e2 07-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Fixing dano_message some more. Tested successfully with all field types I could find.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14766 a95241bf-73f2-0310-859d-f6bbb57e9c96

878e800c 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Applied fix by Michael.
Added him to the list of authors of this file.
Minor style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14757 a95241bf-73f2-0310-859d-f6bbb57e9c96

41572514 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* Added BString version of LinkReceiver::ReadString().
* adopted this method for ServerLink as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14750 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca9e5772 07-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reintroduced third LinkAgainst parameter <mapLibs>, defaulting to true.
Library names are now mapped for all targets but "host" (not only for
"haiku") -- added one more level of indirection to achieve that.
* Renamed build/HaikuBuildCompatibility.h to BeOSBuildCompatibility.h
(auto-included when compiling something that uses the Be API for platform
"host" on anon-BeOS platform), and introduced build/HaikuBuildCompatibility.h,
which can be included when compiling something that can be built for both,
Haiku and BeOS compatible platforms.
* Introduced libhaikucompat.a, a library that adds a few functions existing
under Haiku, but not under BeOS.
* New rule AddSubDirSupportedPlatforms.
* Renamed libopenbeos.so to libbe_haiku.so.
* Introduced new target platform "libbe_test", which is basically equivalent
to a BeOS compatible host platform target, with the exception, that instead
of the host platform's libbe.so a special build of Haiku's libbe.so
(libbe_haiku.so (formerly known as libopenbeos.so)) is used. Furthermore
Haiku's public app, interface, storage, and support kit headers are used
when compiling. This replaces the less nice way in which the test app server
and applications for this test environment were built.
When building for platform "libbe_test", the library name "be" is
autotranslated to "libbe_haiku.so". Thus most applications don't need
special fiddling when them building them for the app server test environment;
usually an "AddSubDirSupportedPlatforms libbe_test ;" will suffice.
* Reduced the dependencies of <syscalls.h> and fixed problems caused by this
(e.g. source files not including the needed headers directly).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14749 a95241bf-73f2-0310-859d-f6bbb57e9c96

c7615473 07-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Removed superfluous strcode() and bstrcode() from the code - it wasn't maintained
for ages, and not really that useful, anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14743 a95241bf-73f2-0310-859d-f6bbb57e9c96

5f9ebca6 06-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Adapting the dano message reader to the documentation. Not really tested yet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14738 a95241bf-73f2-0310-859d-f6bbb57e9c96

89bdf573 04-Nov-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

assigned names to "some BLocker"s to aid debugging

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14702 a95241bf-73f2-0310-859d-f6bbb57e9c96

36a7c30e 04-Nov-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Assigned a name to the LooperList BLocker.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14698 a95241bf-73f2-0310-859d-f6bbb57e9c96

1156138b 01-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Removed unused files like PortMessage.cpp/h and Session.cpp/h.
Renamed LinkMsgReceiver.h and LinkMsgSender.h to LinkReceiver.h and LinkSender.h like
the classes they contain.
Split up PortLink.cpp/h into ServerLink.cpp/h and PortLink.cpp/h.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14635 a95241bf-73f2-0310-859d-f6bbb57e9c96

0083a1f3 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Added an alternate ReadString() in case you know how large the string can get.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14601 a95241bf-73f2-0310-859d-f6bbb57e9c96

4f86bb69 31-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

BRoster::ActivateApp() now talks to the Desktop, not the app_server anymore.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14600 a95241bf-73f2-0310-859d-f6bbb57e9c96

338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96

d35c42a0 09-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Ok, hopefully fixed all problems with Message3 now. Flat buffers are so fragile...
Also cleaned up Message3.h revert it if you think its a binary compatibility issue.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13920 a95241bf-73f2-0310-859d-f6bbb57e9c96

90dc9461 08-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Actually the Message3 implementation was broken. It still is, because we lose one (but an important) byte somewhere when resizing the flat buffer. But at least the design flaws should be corrected with this commit. You can go ahead and review it Ingo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13917 a95241bf-73f2-0310-859d-f6bbb57e9c96

3019039f 07-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

This is the third implementation of BMessage. It operates purly on a flat buffer. It should be completely working and it is fast. See: http://haiku.mlotz.ch/messagespeed.html
Sorry to pollute the repository with all those extra files, they will be (re-)moved when the decision about which implementation to use is made.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13916 a95241bf-73f2-0310-859d-f6bbb57e9c96

54ca2a11 06-Aug-2005 Michael Lotz <mmlr@mlotz.ch>

Moving towards more flat buffering. Speed is still lower than the original Be implementation, but it's not because of the backend, it's probably the slow BMessage::Header implementation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13909 a95241bf-73f2-0310-859d-f6bbb57e9c96

459a7cfc 05-Aug-2005 Philippe Houdoin <philippe.houdoin@gmail.com>

Removed obsoleted .src includes files.
Removed Interface's kit BTextView Jamfile, as it's build right from src/kits/interface/Jamfile now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13902 a95241bf-73f2-0310-859d-f6bbb57e9c96

cb5da7de 05-Aug-2005 Philippe Houdoin <philippe.houdoin@gmail.com>

Cleanup libbe.so build system, using MergeObject power:
a) Make main Jamfile more easier to understand to new (and old even) developers.
Currently it looks a little too messy compared to usual Haiku's jamfiles.
b) Get ride of app.src, interface.src, storage.src and support.src includes files.
c) Move each kit objects files built back to their respective
objects/x86.R1/kits/{app|interface|storage|support} location.
d) Move private headers and source search hints back to each respective kit
Jamfiles. Most of them, at least.

{app|interface|storage|support}.src files effective deletion will come soon.
Hope I didn't break all *again* :-\

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13901 a95241bf-73f2-0310-859d-f6bbb57e9c96

43abf8a3 31-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

More optimization for Message2. It now uses a more lightweight BSimpleMallocIO instead of the full blown BMallocIO. This wastes less memory and reduces unnecessary overhead when unflattening.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13861 a95241bf-73f2-0310-859d-f6bbb57e9c96

770c05d6 25-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The Desktop class now gets its own message processing loop: moved application
creation/deletion (and management) over to that class.
ServerApp now gets a desktop pointer, and no longer uses gDesktop.
Converted private MessageLooper::_MessagePort() to a public method MessagePort()
so that the looper can be addressed from elsewhere without using PostMessage().
Added a real basic message loop to MessageLooper::_MessageLoop().
BApplication now only asks the app_server to get its desktop object which should
now be used for everything that's not in the realm of the application.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13824 a95241bf-73f2-0310-859d-f6bbb57e9c96

63d5a418 24-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Cleaned up and optimized Message2.cpp. It avoids as many unnecessary copies as it can now.
The unflatten time is now reduced to about a third of the current BMessage implementation but it's still
about half as quick as R5 (we're talking about microseconds here).
A third version of BMessage that operates purely on a flat buffer is in the works. We'll see which one
will be faster for normal uses.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13821 a95241bf-73f2-0310-859d-f6bbb57e9c96

18b5424c 24-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented BRoster::ActivateApp().
* Added the respective case statement in AppServer::DispatchMessage().
The code that actually activates the app is still missing.
* Removed the remnants of the old way of notifying the registrar about
what app got activated (the activated client window did that).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13820 a95241bf-73f2-0310-859d-f6bbb57e9c96

fcf209d9 20-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Added padding calculation (not final) so that flattening / unflattening actually works.
Passes all unit tests now and works on Haiku too. Speed is not yet optimized and Message2.cpp is still not cleaned up.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13785 a95241bf-73f2-0310-859d-f6bbb57e9c96

bbe759b3 20-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Took Ingos considerations into account and added a simple hashtable implementation.
It's currently really broken so don't even try to test it, but you can still review it ;-).
Message2.cpp is not yet cleaned - more to come...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13784 a95241bf-73f2-0310-859d-f6bbb57e9c96

eddf2adc 20-Jul-2005 Jérôme Duval <korli@users.berlios.de>

style change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13783 a95241bf-73f2-0310-859d-f6bbb57e9c96

3f107259 20-Jul-2005 Jérôme Duval <korli@users.berlios.de>

style change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13782 a95241bf-73f2-0310-859d-f6bbb57e9c96

57071061 19-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

These should have gone with the last commit. Last commit for tonight.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13780 a95241bf-73f2-0310-859d-f6bbb57e9c96

e8b43dc0 19-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Fixed includes and removed some debug output. You could now switch Message.cpp, MessageBody.cpp and MessageField.cpp in src/kits/app/app.src to Message2.cpp, MessageBody2.cpp and MessageField2.cpp to test the new implementation. Fixed the wrong commit message by the way (via svn propset).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13778 a95241bf-73f2-0310-859d-f6bbb57e9c96

1a3441a4 19-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Added a new BMessageBody and BMessageField implementation and added a version of BMessage to
use it. It is not (yet) included in the build and won't break anything.
As we now only have thin wrappers around the *Data() functions, the templatized implementation does
not make much sense anymore and wouldn't work either.
I started this new implementation to be as clean as possible. Instead of using a std::map and
BDataBuffer it uses BList and BMallocIO. It passes the unit tests and it even seems to be a bit quicker
in some tests (but not as quick as the R5 one).
Flattening/Unflattening does not work yet so you can't use it under Haiku right now. It's completely work in progress (I started it just 4 hours ago).
Shout if you see something completely broken, reviews welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13776 a95241bf-73f2-0310-859d-f6bbb57e9c96

1771f7ae 18-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Signatures are case insensitive - I hope I fixed all occurences now... (but probably not)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13731 a95241bf-73f2-0310-859d-f6bbb57e9c96

2fd4a041 17-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a boolean "synchronous" parameter to BRoster::Shutdown(). Used in the
Deskbar to initiate the shutdown process asynchronously. Couldn't test it,
because opening the Be menu doesn't work:
***PANIC: BW: Can't find view with ID: 19 !***

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13722 a95241bf-73f2-0310-859d-f6bbb57e9c96

cd05d511 14-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Introduced generalized versions of get_app_path() and get_app_ref() returning the path/ref for an arbitrary team.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13681 a95241bf-73f2-0310-859d-f6bbb57e9c96

b8b9dc1c 14-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Fix FindPointer (tested with unit tests)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13675 a95241bf-73f2-0310-859d-f6bbb57e9c96

ea563033 13-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Same as before, but for Replace*() methods: fixed memory leaks, small
optimazation for ReplaceFlat() (also done for AddFlat() before).
Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13662 a95241bf-73f2-0310-859d-f6bbb57e9c96

b9dddc39 13-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some memory leaks in case of errors (Add*() only).
Some minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13661 a95241bf-73f2-0310-859d-f6bbb57e9c96

11889447 13-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Readded TYPE()
Init Messenger, Ref, Message on error

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13659 a95241bf-73f2-0310-859d-f6bbb57e9c96

ce42d864 13-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Took Axel's remarks into account

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13655 a95241bf-73f2-0310-859d-f6bbb57e9c96

b0ba19ba 12-Jul-2005 Jérôme Duval <korli@users.berlios.de>

Moved Add* through AddData, Find* through FindData, Replace* through ReplaceData
I think BMessageBody::FindData<>, BMessageBody::AddData<>, BMessageBody::ReplaceData<> could be untemplatized
Works here, not unit tested though
Axel, please review this.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13653 a95241bf-73f2-0310-859d-f6bbb57e9c96

9ea776d7 12-Jul-2005 Michael Lotz <mmlr@mlotz.ch>

Removed (unimplemented) BMessageBody::Unflatten() as Unflattening happens directly at the BMessage level.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13647 a95241bf-73f2-0310-859d-f6bbb57e9c96

a13df0dc 09-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a "confirm" parameter to BRoster::Shutdown() which causes the registrar
to ask the user to confirm shutting down the system.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13563 a95241bf-73f2-0310-859d-f6bbb57e9c96

c39d6b97 07-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced is_app_showing_modal_window(). Not implemented yet. Maybe
someone with app server insight wants to do that. :-)
* Simplified main_thread_for() for Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13538 a95241bf-73f2-0310-859d-f6bbb57e9c96

b93d2480 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Now drops into the debugger if the window/looper is still locked in task_looper().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13480 a95241bf-73f2-0310-859d-f6bbb57e9c96

4c3e1ace 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug in quit_all_windows(): we need to Unlock() the application
because BWindow::QuitRequested() must be allowed to lock it.
This fixes a deadlock when trying to quit Tracker.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13479 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef571f67 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Cleanup. Added BTokenSpace::GetList(), though it's probably not needed after all
(we can still remove it later if needed).
Added B_SERVER_TOKEN type.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13451 a95241bf-73f2-0310-859d-f6bbb57e9c96

b2086a9b 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

just in case someone continues in the debugger

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13449 a95241bf-73f2-0310-859d-f6bbb57e9c96

f4b64fa6 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

GetToken() did not check for the correct token type.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13443 a95241bf-73f2-0310-859d-f6bbb57e9c96

a84bd95f 05-Jul-2005 Axel Dörfler <axeld@pinc-software.de>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13442 a95241bf-73f2-0310-859d-f6bbb57e9c96

ae8de521 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed an obvious bug in _checksum_() that isn't triggered by its current use:
"temp" was added to "sum" in the loop, so that some int8 values were taken
into account more than once.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13431 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1e14283 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

The stream was reused later, so it was a dumb idea to not include the
magic in it (it was written twice then, later).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13430 a95241bf-73f2-0310-859d-f6bbb57e9c96

749a772b 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Accidently broke BMessage::_SendFlattenedMessage() with the last commit;
the magic is not part of the header anymore when read from a stream (because
BDataIO does not support seeking, and we need to know the magic before actually
reading the header).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13429 a95241bf-73f2-0310-859d-f6bbb57e9c96

dc9e836b 04-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

*Very* basic read-only Dano/Zeta message support. Only briefly tested.
Not really suited for message sending/retrieval (because target stuff is
missing), but should work more or less with disk based messages.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13428 a95241bf-73f2-0310-859d-f6bbb57e9c96

7089b0e3 04-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

If a filter was added to a handler which belonged to a looper, the filter's looper was never initialized. BHandler::SetLooper() now also sets the looper for every filter (moved from BLooper::AddHandler)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13426 a95241bf-73f2-0310-859d-f6bbb57e9c96

6f4cf451 03-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The default version of BMessageFilter::Filter() doesn't do anything. Small style changes, removed a todo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13422 a95241bf-73f2-0310-859d-f6bbb57e9c96

2f903d78 04-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the handling of B_QUIT_REQUESTED in BApplication::DispatchMessage().
It's already done in BLooper. Now we additionally send a reply to it, when
the message comes from the registrar on shutdown.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13419 a95241bf-73f2-0310-859d-f6bbb57e9c96

925d069d 03-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added BRoster::ShutDown().
* Adjusted the shutdown command to use BRoster::ShutDown(). Removed
the alert.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13416 a95241bf-73f2-0310-859d-f6bbb57e9c96

9fac7d6c 03-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

BServer now remembers whether the GUI context has already been initialized, so that InitGUIContext() can be invoked twice without harm.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13415 a95241bf-73f2-0310-859d-f6bbb57e9c96

a60ea282 03-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made BApplication::Private public. Should not have worked before (probably
a compiler bug).
* Don't try to cleanup the app server connection stuff, when compiled

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13414 a95241bf-73f2-0310-859d-f6bbb57e9c96

86fa5942 01-Jul-2005 Axel Dörfler <axeld@pinc-software.de>

Added a LinkReceiver::Code() method, that can be used to retrieve the
code of the current message.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13377 a95241bf-73f2-0310-859d-f6bbb57e9c96

93514534 28-Jun-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added a private API class BServer, a BApplication subclass especially
for servers, that don't have a GUI or want to control when the app server
connection is established.
* BServer is necessarily a friend of BApplication, for it uses a private
constructor. Hence BApplication::Private::InitGUIContext() is no longer

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13315 a95241bf-73f2-0310-859d-f6bbb57e9c96

c8e7f53e 27-Jun-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Radically culled the list of BApplication friends and introduced a
BApplication::Private class for accessing relevant parts.
* Pulled the app server connection and IK initialization out of
InitData() into a new method _InitGUIContext() and introduced a private
constructor that allows to avoid this initialization. This will be used
for servers that don't have GUI respectively want to init the app server
connection later.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13312 a95241bf-73f2-0310-859d-f6bbb57e9c96

418ab064 26-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Apparently I can't reuse those references, as it leads to every kind of bugs. I wonder if it's just plain wrong or it's a gcc bug. Minor changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13292 a95241bf-73f2-0310-859d-f6bbb57e9c96

83f9178d 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Better rounding code.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13258 a95241bf-73f2-0310-859d-f6bbb57e9c96

014ddc87 23-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Now also sets fInitError when the app_server did not create the app
(and not only drop into the debugger).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13237 a95241bf-73f2-0310-859d-f6bbb57e9c96

5b6aece6 22-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

SendNotices() should send messages also to observers interested to all kind of messages.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13222 a95241bf-73f2-0310-859d-f6bbb57e9c96

5f8e562f 16-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Added a ToDo comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13185 a95241bf-73f2-0310-859d-f6bbb57e9c96

837261c6 16-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

This removes the "error: looper must be locked when quit" message.
I haven't yet fully investigated the looper quitting mechanism in
detail, so there might be more bugs left.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13184 a95241bf-73f2-0310-859d-f6bbb57e9c96

410d5c37 15-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented BLooper::check_lock().
Use AssertLock() more often instead of varying debugger messages.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13167 a95241bf-73f2-0310-859d-f6bbb57e9c96

507ff76a 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Added empty stubs for shutdown_media_server() and launch_media_server(),
so that we could theoretically run the Media preferences app.
IMO, these belong into libmedia.so; they should be rarely needed with
the new media kit, anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13141 a95241bf-73f2-0310-859d-f6bbb57e9c96

6a27b3b3 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed source files for LinkReceiver and LinkSender to match their class names.
Headers will follow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13133 a95241bf-73f2-0310-859d-f6bbb57e9c96

0cb92588 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Made sLocker static, as originally intended.
If there is no be_app when the AppServerLink is created, it now
falls into the debugger (maybe only for now?).
Removed some debugging cruft.

BTW I changed the standard app_server resolution to 800x600 by
intention - at least for testing this is much more appropriate,
and can be reversed later again.
FWIW I think we should use 1024x768 as a standard or whatever
is the native display resolution. Use 640x480 as a fall back
only in safemode.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13130 a95241bf-73f2-0310-859d-f6bbb57e9c96

f395db37 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Updated a comment I forgot before.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13129 a95241bf-73f2-0310-859d-f6bbb57e9c96

dd10337f 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96

2c458b6d 12-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now inits fInitialWorkspace correctly, calling current_workspace()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13073 a95241bf-73f2-0310-859d-f6bbb57e9c96

8eae8b05 08-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Every BApplication (even applications which didn't use it) allocated a BPrivateScreen object. Now they are created/destroyed on demand (when a BScreen object is constructed), and reference counted, so that there is still only one per app. Note that since we are creating/deleting them, constructing a BScreen object can be more time consuming than before, but personally I find this approach much cleaner.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13006 a95241bf-73f2-0310-859d-f6bbb57e9c96

bd28b3c7 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BAppServerLink is now using BApplication::fServerTo/From for its messaging.
Added LinkMsgReader::NeedsReply() method.
Completely redone ServerApp messaging: no more "replyport" from BAppServerLink; instead,
the registered client reply port is used. Fixed some more weak messaging stuff.
ServerApp now recognizes if an unknown message needs a reply, and sends it - for example,
the "Screen" preferences app no longer hangs, but crashes on start :)
Made LinkMsgReader::Read() virtual again, since it's needed by RAMLinkMsgReader.cpp.
Renamed BPortLink::GetNextReply() to GetNextMessage().
Some more cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13004 a95241bf-73f2-0310-859d-f6bbb57e9c96

be835bdf 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed LinkMsgReader::ReadString() for empty strings I just broke before.
Extended the PortLinkTest application a bit (and updated it).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13003 a95241bf-73f2-0310-859d-f6bbb57e9c96

75936a02 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12998 a95241bf-73f2-0310-859d-f6bbb57e9c96

750b92fa 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Almost rewrote LinkMsgSender; it's now much cleaner and works better:
- StartMessage() can now get a size to make sure there is enough free space
- if StartMessage() is called with the current message behind a certain
watermark, the buffer is flushed in order to prevent moving around messages
in the buffer. The actual value should be tested in real life, though.
- enlarged maximum buffer size to 64k
- fixed bug: could use memcpy() to move overlapping memory around
- added a flag to Flush() that marks messages as needing a reply - the other
way would be to mark the message "code" to contain this information

Some cleanup in LinkMsgReader.
BPortLink now has most methods as inlines.
The buffer sizes are now declared in a shared header, so that receiver and
sender are always equipped equally.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12997 a95241bf-73f2-0310-859d-f6bbb57e9c96

7475dcdf 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96

c493c217 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Cleanup only.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12990 a95241bf-73f2-0310-859d-f6bbb57e9c96

683be71e 05-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Added stuff for AddMessage() and _AddMessagePriv() - mostly comments
on what they should.
More cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12960 a95241bf-73f2-0310-859d-f6bbb57e9c96

851fc4f1 04-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Private class BAppServerLink now has a global locker, instead of
(ab)using the BApplication lock to synchronize messaging.
Also, it now has one global reply port, that is created on demand,
but never freed - hope this doesn't cause any other trouble.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12957 a95241bf-73f2-0310-859d-f6bbb57e9c96

3cd9c864 04-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Quit() when called from another thread, never posted _QUIT_ to the looper,
and therefore waited indefinitely for its demise.
Run() had the usual "if error != my special error -> everything fine" that
seems to be everywhere in the Application Kit.
Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12956 a95241bf-73f2-0310-859d-f6bbb57e9c96

72d6bb98 04-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

Add a string regardless if a NULL pointer was passed. This fixes a fragility in the comm code, and People is now displayed correctly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12951 a95241bf-73f2-0310-859d-f6bbb57e9c96

dd3d1f72 28-May-2005 Axel Dörfler <axeld@pinc-software.de>

BLooper::InitData() will now choose a default name ("anonymous looper") in case
no name was specified on creation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12878 a95241bf-73f2-0310-859d-f6bbb57e9c96

04dc040e 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

No more B_MESSAGE_NOT_UNDERSTOOD messages for standard messages.
Added another ToDo item about missing filtering.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12734 a95241bf-73f2-0310-859d-f6bbb57e9c96

8829157f 29-Apr-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved headers around

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12512 a95241bf-73f2-0310-859d-f6bbb57e9c96

d058b5f8 11-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Added TypeConstants.cpp that exports the constants of TypeConstants.h. Needed for binary compatibility.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12289 a95241bf-73f2-0310-859d-f6bbb57e9c96

c2da902f 01-Apr-2005 Michael Lotz <mmlr@mlotz.ch>

Implemented BPortLink::AttachShape and BPortLink::ReadShape and used them for passing the shapes in AS_GET_GLYPH_SHAPES.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12215 a95241bf-73f2-0310-859d-f6bbb57e9c96

d95383a3 23-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed various binary compatibility problems with R4.5.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11957 a95241bf-73f2-0310-859d-f6bbb57e9c96

dfb8cfea 21-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some obvious bugs: B_GET_PROPERTY shouldn't enter the debugger fow unknown
properties; it should pass on to the next handler (and only if there is none
message anymore, as this lead to an endless loop (for example when starting the
Added some ToDo comments - someone please check what has to be done and fill it
out some more.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11950 a95241bf-73f2-0310-859d-f6bbb57e9c96

f79cd266 12-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

GetLooperList(BList* list) returns only valid loopers

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11700 a95241bf-73f2-0310-859d-f6bbb57e9c96

c92d9509 12-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Solved a deadlock situation which occured when quiting be_app.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11699 a95241bf-73f2-0310-859d-f6bbb57e9c96

47761c47 01-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Adapted to match our style guide.
Fixed warnings.
Made gArchiveNameField static (and therefore changed the prefix to 's').

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11528 a95241bf-73f2-0310-859d-f6bbb57e9c96

f8411ab1 28-Feb-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented handler for B_APP_ACTIVATED and (but not really) for _SHOW_DRAG_HANDLES_

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11512 a95241bf-73f2-0310-859d-f6bbb57e9c96

135c6d41 22-Feb-2005 DarkWyrm <darkwyrm@gmail.com>

A couple tweaks for testing without the registrar running - eliminates a crash

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11456 a95241bf-73f2-0310-859d-f6bbb57e9c96

2a862ff0 22-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Got rid of the temporary BMessage in BMessage::_send_().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11450 a95241bf-73f2-0310-859d-f6bbb57e9c96

2f197f33 18-Feb-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BHandler::MessageReceived handles also B_GET_SUPPORTED_SUITES as it should, and prints the message to the stream if it doesn't understand it. Restyled the function to follow our guidelines (more or less).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11411 a95241bf-73f2-0310-859d-f6bbb57e9c96

0d0f1600 14-Feb-2005 Jérôme Duval <korli@users.berlios.de>

fixes forwards of BMessages
iroster now works successfully

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11367 a95241bf-73f2-0310-859d-f6bbb57e9c96

fde1c7aa 06-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

Sorry I did not know about BMessage::Private::SetTarget()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11280 a95241bf-73f2-0310-859d-f6bbb57e9c96

ecb03027 06-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

implemented _set_message_target_()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11278 a95241bf-73f2-0310-859d-f6bbb57e9c96

bee72328 01-Feb-2005 Axel Dörfler <axeld@pinc-software.de>

fill_argv_message() now takes a reference as parameter.
Also fixed BApplication::do_argv() which didn't NULL terminate the array
as it should have done, and would call ArgvReceived() with argc == 0 and
a NULL parameter for argv.
Removed strange trailing spaces at the end of the lines for those two functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11199 a95241bf-73f2-0310-859d-f6bbb57e9c96

1a2f24bb 29-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Made some debug output debug conditional.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11140 a95241bf-73f2-0310-859d-f6bbb57e9c96

09b770dd 29-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added Dump() to BMessage::Header for debugging purposes.
* In BMessage::Header::ReadFrom(DataIO &) the checksum was checked before
the fBodySize field was initialized, which could make
BMessage::Unflatten() fail.
* Calculate the header checksum now by writing the header to a buffer and
checksumming that. This is simpler and avoids problems when something
else is written than is actually stored in the header (e.g. when a
preferred target token is replaced by B_PREFERRED_TOKEN).
While the BMessage unit tests always passed, now the other App Kit tests
pass as well.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11130 a95241bf-73f2-0310-859d-f6bbb57e9c96

94b98dff 29-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Consequently use B_{NULL,PREFERRED}_TOKEN to prevent problems with BMessage code checking against B_NULL_TOKEN.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11129 a95241bf-73f2-0310-859d-f6bbb57e9c96

01225b39 29-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Disabled debugging. Was accidentally committed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11127 a95241bf-73f2-0310-859d-f6bbb57e9c96

efbea3a0 28-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the functionality to flatten and unflatten a BMessage header into
a separate class. This allowed to improve _SendFlattenedMessage() to
deal properly with flattened BMessages as well.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11116 a95241bf-73f2-0310-859d-f6bbb57e9c96

534ef684 28-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Turned _init_message_(), _delete_message_(), and _clean_msg_cache_() into
proper private static BMessage members and made them accessible through
BMessage::Private. Got rid of unused _reconstruct_message_().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11106 a95241bf-73f2-0310-859d-f6bbb57e9c96

9d0a9900 28-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Updated copyright date and added myself to the authors. :-)
* Removed 1500 lines of unused non-template-madness code. We have version
control to resurrect it, if we ever wish to.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11105 a95241bf-73f2-0310-859d-f6bbb57e9c96

37787255 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for unflatting from flattened KMessages. At least when
a buffer is given.
* Added method for sending flattened messages. The KMessage support is
complete, but for BMessages this is a bit tricky. We currently unflatten
the BMessages and send those.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11060 a95241bf-73f2-0310-859d-f6bbb57e9c96

5ac11568 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced _init_roster_() _delete_roster_() by static functions in BRoster::Private.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11033 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b8aafea 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

BMessenger has no friends besides Private anymore.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11023 a95241bf-73f2-0310-859d-f6bbb57e9c96

4afc60d3 25-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Turned the private constructor into a SetTo().
* The < operator uses BMessenger::Private now (it's no longer a friend).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11022 a95241bf-73f2-0310-859d-f6bbb57e9c96

84de162b 22-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

More debug output in case of failure.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10952 a95241bf-73f2-0310-859d-f6bbb57e9c96

27c5631f 22-Jan-2005 Adi Oanca <adioanca@nowhere.fake>

Added support for sending BRegions

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10943 a95241bf-73f2-0310-859d-f6bbb57e9c96

4e51dee8 19-Jan-2005 DarkWyrm <darkwyrm@gmail.com>

don't prevent ReadyToRun from being called when running without the registrar

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10877 a95241bf-73f2-0310-859d-f6bbb57e9c96

289adc04 17-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed due to moving RegistrarDefs.h stuff into the BPrivate namespace and replacing kRosterPortName.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10813 a95241bf-73f2-0310-859d-f6bbb57e9c96

0ffb21a6 17-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved everything into the BPrivate namespace.
* Replaced the constant kRosterPortName by a function returning that name
(we need different port names under BeOS and Haiku, and already at
libbe init time).
* The settings directory is obtained via find_directory() (critized by
Axel :-).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10812 a95241bf-73f2-0310-859d-f6bbb57e9c96

9171d496 16-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added function is_running_on_haiku(), which returns at runtime whether we're running under Haiku.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10783 a95241bf-73f2-0310-859d-f6bbb57e9c96

2d36bfd6 15-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for the DEBUG_PRINTF macro.
* More debugging output in error cases.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10763 a95241bf-73f2-0310-859d-f6bbb57e9c96

26afdd62 15-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added more debug output.
* In handle_reply(), in case the port message code is not as expected,
don't return B_OK and let the caller proceed with an uninitialized
BMessage, but return an error.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10762 a95241bf-73f2-0310-859d-f6bbb57e9c96

bcab07ad 14-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* More sophisticated debug output macro.
* Fixed BLooper::ReadMessageFromPort(). If ReadRawFromPort() failed,
there was nevertheless a message created and dispatched.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10738 a95241bf-73f2-0310-859d-f6bbb57e9c96

77cbf881 12-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Got rid of the BClipboard::fCount. It was modified, but never read.
Renamed fSystemCount to fCount.
* be_clipboard is now initialized by init_clipboard().
* Documented at least {Local,System}Count(), since their meaning wasn't
very obvious to me (neither helped the BeBook description).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10706 a95241bf-73f2-0310-859d-f6bbb57e9c96

5fa51856 12-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Use new init_clipboard() function which initializes the global be_clipboard at libbe init time.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10705 a95241bf-73f2-0310-859d-f6bbb57e9c96

51634653 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Fixed BMessageBody::GetInfo(): Indexed based iteration was broken for
two different reasons.
* Fixed BMessageBody::FindData() in case of type B_ANY_TYPE, which should
match any matchingly-named field.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10678 a95241bf-73f2-0310-859d-f6bbb57e9c96

c9f9a6b2 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* fReplyTo.target (the handler token) is internally checked even, if the
preferred handler is addressed. So make sure, it has a usable value in
this case, otherwise ReturnAddress() usually won't work.
* If the message to be read from the port is bigger than the on-stack
buffer, the chunk of memory to be allocated on the heap has to be the
size of the message, not the size of the on-stack buffer. This caused
all kind of nasty, hard-trackable problems.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10677 a95241bf-73f2-0310-859d-f6bbb57e9c96

c5c962d4 11-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Enhanced debugging output to print also the thread ID.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10676 a95241bf-73f2-0310-859d-f6bbb57e9c96

86832512 27-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now includes MenuWindow.h instead of duplicating the declaration

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10535 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca8ed922 21-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved gPrivateScreen into the BPrivate namespace. Small cleanups to Application.cpp. Refined some comments. Used strdup() instead of new because it`s nicer for strings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10514 a95241bf-73f2-0310-859d-f6bbb57e9c96

e372dc78 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Added handling of B_QUIT_REQUESTED messages, even if it might not be complete.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10513 a95241bf-73f2-0310-859d-f6bbb57e9c96

c18d8429 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Grouped all constructors together.
Moved InitData() to be close to the constructors.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10501 a95241bf-73f2-0310-859d-f6bbb57e9c96

72f5d860 19-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Moved the quit window code into window_quit_loop() which is now called by
quit_all_windows(). I've also implemented the file panel quit mechanism,
but I'm not sure it's correctly done yet.
The BApplication destructor now locks the looper. Added commented out
deletion of fServerTo port and a ToDo comment if this should be done.
Run() no longer checks fMsgPort somewhere, but fInitError at the beginning;
if a missing fMsgPort doesn't set this, I guess InitData() is broken (or
better, BRoster::Private::CompleteRegistration() is). It now also deletes
any fPulseRunner (could be moved to ~BApplication, though).
QuitRequested() now correctly calls quit_all_windows().
Added a question to Quit() about the usefulness of special casing calling
the function from another thread.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10500 a95241bf-73f2-0310-859d-f6bbb57e9c96

af34fbf1 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Moved the unmaintainable list of initializers for the different constructors
to InitData(). Also fixed the initial value of fPulseRate (was 500000 but
according to the BeBook, it should have been 0).
Implemented SetPulseRate() (untested, but should be okay).
Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10499 a95241bf-73f2-0310-859d-f6bbb57e9c96

beabca50 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Collision with our style guide.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10495 a95241bf-73f2-0310-859d-f6bbb57e9c96

bae6988e 20-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed some bugs and added some missing functionality:
- DispatchMessage() would swallow all handled messages, no matter if they were
intended for this handler.
- B_REFS_RECEIVED does now maintain the recent folder/document lists.
- Now calls Pulse() when a B_PULSE is received.
- No longer calls ReadyToRun() more than once, no matter how many B_READY_TO_RUN
are sent to the app.
- Added B_APP_ACTIVATED to the yet unhandled messages; furthermore, the known
unhandled messages now dump themselves to stdout.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10494 a95241bf-73f2-0310-859d-f6bbb57e9c96

f19d9d3b 14-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved functionality of do_argv() into a new static helper function called fill_argv_message(). Now do_argv() handles the B_ARGV_RECEIVED message (incidentally, that`s almost how it`s done in beos). That made DispatchMessage() a bit cleaner.Added some comments. B_PATH_NAME_LENGTH + 1 --> B_PATH_NAME_LENGTH.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10448 a95241bf-73f2-0310-859d-f6bbb57e9c96

bd6c2601 13-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now it calls ScriptReceived if it receives a scripting message in MessageReceived(). Falls back to BLooper::MessageReceived() in case something goes wrong (just to be safe).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10442 a95241bf-73f2-0310-859d-f6bbb57e9c96

833a5922 13-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added B_SILENT_RELAUNCH handler. Expanded a comment.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10412 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1ce1640 11-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Renamed gApplicationPropInfo to sPropertyInfo and made it static.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10390 a95241bf-73f2-0310-859d-f6bbb57e9c96

a8fc5954 11-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented get_window_list(), and used it in count_windows() and window_at(). That simplified the code a lot. Removed some unused headers.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10389 a95241bf-73f2-0310-859d-f6bbb57e9c96

41f6b937 09-Dec-2004 DarkWyrm <darkwyrm@gmail.com>

Submission of Stefano's BApplication patch - archiving support

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10383 a95241bf-73f2-0310-859d-f6bbb57e9c96

cc171626 02-Nov-2004 ejakowatz <ejakowatz@nowhere.fake>

Added clarifying comments and a bit more error checking

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9744 a95241bf-73f2-0310-859d-f6bbb57e9c96

c2f63fb5 13-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Moved functionality of PortLink into LinkMsg* to avoid serious code duplication in the app_server

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9335 a95241bf-73f2-0310-859d-f6bbb57e9c96

a3bd1e1c 09-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Added class for requesting shared client-server memory

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9270 a95241bf-73f2-0310-859d-f6bbb57e9c96

059b143a 05-Oct-2004 ejakowatz <ejakowatz@nowhere.fake>

The fWasDelivered member was never getting initialized, so replying to
messages which did not explicitely request a reply would fail. The member
is now initialized if an unflattened message has the MSG_FLAG_INCL_REPLY
flag set.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9193 a95241bf-73f2-0310-859d-f6bbb57e9c96

5958205f 07-Sep-2004 ejakowatz <ejakowatz@nowhere.fake>

Fixed bug. There was an issue with unflattening. When moving dataPtr along the buffer to the next variable-size item, the padding was being incorrectly calculated (too large) because the four-byte size header was not being taken into account. E.g., for an 18-byte item, the padding was calculated as 6 bytes, rather than two, placing dataPtr directly past the size header for the next item. An incorrect value would be used as the size for the next item, which could result in anything from a segment violation to an allocation failure.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8891 a95241bf-73f2-0310-859d-f6bbb57e9c96

974d4545 07-Sep-2004 ejakowatz <ejakowatz@nowhere.fake>

Fixed bug. BMessageBody's assignment operator was making a generic copy of the map which maintains the data -- meaning only pointers to contained BMessageFields were being copied. Added Clone() operation to BMessageField and Copy() to BMessageFieldStoragePolicy, along with a specialization of BMessageFieldStoragePolicy for BDataBuffer; a straight copy of the vector is sufficient for all other data types. This fixes issues with BMessage unittests where BMessage, entry_ref, BFlattenable, and raw data are exercises.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8890 a95241bf-73f2-0310-859d-f6bbb57e9c96

02043d35 07-Sep-2004 ejakowatz <ejakowatz@nowhere.fake>

Added calc_padding() convenience function for calculating how much padding to add to a buffer in order for it to fall on a specified byte boundary.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8889 a95241bf-73f2-0310-859d-f6bbb57e9c96

044be4e2 28-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Introduced a new build flag and macro RUN_WITHOUT_APP_SERVER, to allow
several things to work without a running app server (the Storage Kit to
begin with).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8695 a95241bf-73f2-0310-859d-f6bbb57e9c96

b9c2cb3c 24-Aug-2004 ejakowatz <ejakowatz@nowhere.fake>

BMessage now sends B_NO_REPLY on destruction if no reply has been sent.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8637 a95241bf-73f2-0310-859d-f6bbb57e9c96

68247322 24-Aug-2004 ejakowatz <ejakowatz@nowhere.fake>

Squished another possible memory leak.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8636 a95241bf-73f2-0310-859d-f6bbb57e9c96

72a80451 24-Aug-2004 ejakowatz <ejakowatz@nowhere.fake>

Fixed a couple of memory leaks and an incorrect index bounds check.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8635 a95241bf-73f2-0310-859d-f6bbb57e9c96

bceb8166 21-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Added a function to the BPortLink debugging code
Made a couple of style tweaks to BApplication::connect_to_app_server

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8620 a95241bf-73f2-0310-859d-f6bbb57e9c96

38e110b1 08-Aug-2004 DarkWyrm <darkwyrm@gmail.com>

Client-server messaging fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8543 a95241bf-73f2-0310-859d-f6bbb57e9c96

3ceb31b9 30-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Pahtz's changes from PortLink/BSession/PortMessage/PortQueue to BPortLink

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8519 a95241bf-73f2-0310-859d-f6bbb57e9c96

5dccfc19 29-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Some small changes (mostly suggested by Axel). Added more ToDO items, changed some comments, added some more (unhandled yet) message codes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8496 a95241bf-73f2-0310-859d-f6bbb57e9c96

6cd5d5b1 27-Jul-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented AppResources() "by the book" (not tested), InitialWorkspace(), researched and implemented a TODO item, some small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8481 a95241bf-73f2-0310-859d-f6bbb57e9c96

9a663361 02-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Added a NULL pointer check. Eliminates a way to crash the app_server in just two keystrokes. :P

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8285 a95241bf-73f2-0310-859d-f6bbb57e9c96

576416d2 29-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed a warning about the uninitialized use of variable team.
Added a ToDo item because gcc is right and itemSize may be used uninitialized;
someone with a better understanding of this code should fix it.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8233 a95241bf-73f2-0310-859d-f6bbb57e9c96

2410a823 29-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed some warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8232 a95241bf-73f2-0310-859d-f6bbb57e9c96

359aeca0 28-Jun-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Should use private interface headers

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8211 a95241bf-73f2-0310-859d-f6bbb57e9c96

6542ca9b 28-Jun-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added gPrivateScreen declaration

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8210 a95241bf-73f2-0310-859d-f6bbb57e9c96

1787eef9 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added B_I_BEAM_CURSOR and B_HAND_CURSOR in new file AppDefs.cpp.
B_CURSOR_SYSTEM_DEFAULT and B_CURSOR_I_BEAM are now initialized in BApplication::InitData().
Added a todo note about how to save the app server communication to get those initialized.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8201 a95241bf-73f2-0310-859d-f6bbb57e9c96

917cf3f7 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Constructor no longer crashes when data == NULL.
Now exports B_CURSOR_SYSTEM_DEFAULT and B_CURSOR_I_BEAM - maybe they should
be part of AppDefs.cpp, though.
Style update.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8200 a95241bf-73f2-0310-859d-f6bbb57e9c96

14c2eb06 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Applied our coding style. Theoretically improved return values.
Data() now enters the debugger as well if called in unlocked state.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8191 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef423608 27-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added be_clipboard global variable (not initialized yet anywhere, though).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8190 a95241bf-73f2-0310-859d-f6bbb57e9c96

768ec791 11-Jun-2004 DarkWyrm <darkwyrm@gmail.com>

Plugged a memory leak (thanks Matthijs!)
Removed the use of malloc() -- deprecated
Deprecated PortLink::FlushToSession()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7906 a95241bf-73f2-0310-859d-f6bbb57e9c96

86469b8c 10-Jun-2004 DarkWyrm <darkwyrm@gmail.com>

Added header
Code readability improvements
Removed SetMsgCode()
Documented class
Added some minor error-handling

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7904 a95241bf-73f2-0310-859d-f6bbb57e9c96

76441bab 15-May-2004 DarkWyrm <darkwyrm@gmail.com>

Add header
Minor tweaks to BClipboard

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7587 a95241bf-73f2-0310-859d-f6bbb57e9c96

f6dc8f8d 06-Apr-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Hm, how come I removed that ?

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7169 a95241bf-73f2-0310-859d-f6bbb57e9c96

fcb11fb1 06-Apr-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a TODO reminder

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7168 a95241bf-73f2-0310-859d-f6bbb57e9c96

3339a96b 04-Mar-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed ReadFromRawPort(); it was severly broken (the missing B_RELATIVE_TIMEOUT
flag was reported by Bill Hayden).
I fixed only this method, and nothing else, but please have a look at how
I did it, and apply the same fixes, thanks!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6902 a95241bf-73f2-0310-859d-f6bbb57e9c96

3905fad3 22-Feb-2004 Axel Dörfler <axeld@pinc-software.de>

Added a ToDo comment about the missing reply sending on destruction (as reported by Ingo).
You don't have to check against NULL when deleting an object.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6674 a95241bf-73f2-0310-859d-f6bbb57e9c96

1e620294 15-Feb-2004 DarkWyrm <darkwyrm@gmail.com>

Reintegrated Bill Hayden's removal of malloc.h. Stupid me. :/

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6596 a95241bf-73f2-0310-859d-f6bbb57e9c96

539232f2 11-Feb-2004 DarkWyrm <darkwyrm@gmail.com>

Removed a warning

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6561 a95241bf-73f2-0310-859d-f6bbb57e9c96

b7d3f36e 22-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

"Fixed" the write_port_etc() call: it used a hardcoded 8 instead of B_RELATIVE_TIMEOUT (ts ts ts).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6234 a95241bf-73f2-0310-859d-f6bbb57e9c96

eca8c2bc 22-Jan-2004 haydentech <haydentech@nowhere.fake>

malloc.h is obsolete, use stdlib.h

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6231 a95241bf-73f2-0310-859d-f6bbb57e9c96

75d41856 17-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Removed a crash because of a call to get_menu_info in init_interface_kit()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6118 a95241bf-73f2-0310-859d-f6bbb57e9c96

dc3ebdec 17-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

fixed the problems Ingo pointed out

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6115 a95241bf-73f2-0310-859d-f6bbb57e9c96

36aeb57d 12-Jan-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

* Doh! Signatures are case insensitive.
* Removed the definition of RUN_WITHOUT_REGISTRAR. This can be triggered
by an environment variable now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6054 a95241bf-73f2-0310-859d-f6bbb57e9c96

3638a5ea 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

just a simple variable set to true....

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6047 a95241bf-73f2-0310-859d-f6bbb57e9c96

f28a6f70 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

It know asks and waits for all loopers to quit

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6046 a95241bf-73f2-0310-859d-f6bbb57e9c96

71a3d0e5 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

modified some methods to return 'void'
rendered BSession operationable, again...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6043 a95241bf-73f2-0310-859d-f6bbb57e9c96

b0591ec2 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

added an new method to be able to port message sto a BSession handler

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6042 a95241bf-73f2-0310-859d-f6bbb57e9c96

f7420728 30-Dec-2003 haydentech <haydentech@nowhere.fake>

gcc 3 fix (no default args in implementation)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5840 a95241bf-73f2-0310-859d-f6bbb57e9c96

53b9eef8 19-Dec-2003 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented AboutRequested(), reorganized a bit the connection to app server, added a call to _init_interface_kit_()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5712 a95241bf-73f2-0310-859d-f6bbb57e9c96

2e4c9e21 13-Nov-2003 DarkWyrm <darkwyrm@gmail.com>

Attachment data bugfixes related to fDataSize

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5357 a95241bf-73f2-0310-859d-f6bbb57e9c96

b07c31a7 17-Oct-2003 ejakowatz <ejakowatz@nowhere.fake>

Finished up some scripting-related items.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5080 a95241bf-73f2-0310-859d-f6bbb57e9c96

83f96471 13-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Updates to sync with (hopefully) final tweaks to messaging protocols
Implemented BSession::DropInputBuffer with code from Adi

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5013 a95241bf-73f2-0310-859d-f6bbb57e9c96

45799af7 04-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Tweaked all messaging classes to comply with new message protocol policies
AppServerLink no longer inherits from BSession
Modified client files which talk to the server to sync with changes in messaging classes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4942 a95241bf-73f2-0310-859d-f6bbb57e9c96

591d280e 03-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Added PortMessage::ReadString and PortLink::AttachString to support BSession-style string attachments
Tweaks to startup code for BApplication
Tweaked PortQueue to utilize the BSession workaround for PortMessages
Tweaks to message protocol for BCursor

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4939 a95241bf-73f2-0310-859d-f6bbb57e9c96

8123b61c 03-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Eliminated a memory allocation bug
Added a sensible workaround for BSession message code packaging

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4937 a95241bf-73f2-0310-859d-f6bbb57e9c96

b8b711a0 03-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

BSession no longer a parent class
Removed deprecated reply functions
Global protocol change - reply port attached last, not first
Still uses BSession-style messaging (msg code attached to buffer followed by attachement data)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4935 a95241bf-73f2-0310-859d-f6bbb57e9c96

582e2ddd 02-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Conversion to BSession messaging

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4931 a95241bf-73f2-0310-859d-f6bbb57e9c96

5e69d026 02-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Moved BSession messaging code to ServerProtocol.h

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4930 a95241bf-73f2-0310-859d-f6bbb57e9c96

594cf26a 01-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Conversion over to BSession API

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4923 a95241bf-73f2-0310-859d-f6bbb57e9c96

2dd8584c 01-Oct-2003 DarkWyrm <darkwyrm@gmail.com>

Implemented some functions referenced elsewhere to remove linker errors

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4921 a95241bf-73f2-0310-859d-f6bbb57e9c96

1e56330f 17-Sep-2003 DarkWyrm <darkwyrm@gmail.com>

Updated constructor to use newer replay API
Tweaked messaging so that things should work properly now

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4735 a95241bf-73f2-0310-859d-f6bbb57e9c96

1cfc4961 15-Sep-2003 shatty <shatty@nowhere.fake>

fixed BMessage::Flatten(x) so that it does not crash

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4710 a95241bf-73f2-0310-859d-f6bbb57e9c96

5c85a290 04-Sep-2003 haydentech <haydentech@nowhere.fake>

Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4509 a95241bf-73f2-0310-859d-f6bbb57e9c96

0bc90486 31-Aug-2003 DarkWyrm <darkwyrm@gmail.com>

Added BSession to build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4434 a95241bf-73f2-0310-859d-f6bbb57e9c96

2eaa0ee6 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

New communication class that will be used by app_server - BWindow/BView ... later, maybe by every class!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4429 a95241bf-73f2-0310-859d-f6bbb57e9c96

ae1338ef 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

New PortLink implementation based on BSession

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4428 a95241bf-73f2-0310-859d-f6bbb57e9c96

0784fd8b 29-Aug-2003 ejakowatz <ejakowatz@nowhere.fake>

Fixed bugs in (un)flattening code.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4403 a95241bf-73f2-0310-859d-f6bbb57e9c96

66abd4d0 26-Aug-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed a few warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4381 a95241bf-73f2-0310-859d-f6bbb57e9c96

9f01bd91 26-Aug-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

send_message(): B_ANY_TOKEN -> B_PREFERRED_TOKEN. That's the right one.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4380 a95241bf-73f2-0310-859d-f6bbb57e9c96

d4d9f701 26-Aug-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

flatten_hdr() checks the reply handler token for B_NULL_TOKEN, so it's not wise to use exactly that one as dummy for sending synchronous messages.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4379 a95241bf-73f2-0310-859d-f6bbb57e9c96

0ab25acd 25-Aug-2003 ejakowatz <ejakowatz@nowhere.fake>

Fixed bug with fBody not being properly initialized on construction.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4377 a95241bf-73f2-0310-859d-f6bbb57e9c96

e9e500cb 25-Aug-2003 ejakowatz <ejakowatz@nowhere.fake>

Minor tweak to BHandler::UnlockLooper()
Added calls to _init_message_(), _delete_message_(), and
_msg_cache_cleanup() to InitTerminateLibBe.cpp
Finished first implementation of BMessage::SendReply(), BMessage::_send_(),
and BMessage::_send_message()
Add BMessage to app.src, removed BBlockCache from support.src.
New BMessage::Private class has functions for twiddling BMessage internals

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4371 a95241bf-73f2-0310-859d-f6bbb57e9c96

17e6de7a 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96

c3ba6ec9 28-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Checking in a wild pointer fix which I *swear* was already checked in

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4121 a95241bf-73f2-0310-859d-f6bbb57e9c96

297ffbbb 24-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Removed memory leak in InitData

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4064 a95241bf-73f2-0310-859d-f6bbb57e9c96

78cc8d1a 11-Jul-2003 shadow303 <shadow303@nowhere.fake>

Fix templates for PortMessage & PortLink.
Update BApplication for changes to PortLink

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3959 a95241bf-73f2-0310-859d-f6bbb57e9c96

36535a17 11-Jul-2003 haydentech <haydentech@nowhere.fake>

Fix use of uninitialized variable

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3956 a95241bf-73f2-0310-859d-f6bbb57e9c96

d1acc68a 10-Jul-2003 shadow303 <shadow303@nowhere.fake>

Templatize PortLink & PortMessage

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3950 a95241bf-73f2-0310-859d-f6bbb57e9c96

e76917c6 10-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Added Read(int64*)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3947 a95241bf-73f2-0310-859d-f6bbb57e9c96

2a4311ae 10-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Added Read(bool*)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3935 a95241bf-73f2-0310-859d-f6bbb57e9c96

faa6a273 10-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Simplfied AppServerLink interface

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3933 a95241bf-73f2-0310-859d-f6bbb57e9c96

c73b41b9 09-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Build fix

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3920 a95241bf-73f2-0310-859d-f6bbb57e9c96

19225ae1 07-Jul-2003 Marc Flerackers <mflerackers@nowhere.fake>

A new BInvoker implementation. The InvokeNotify is now implemented as it should.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3886 a95241bf-73f2-0310-859d-f6bbb57e9c96

3bc6d6c5 04-Jul-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3845 a95241bf-73f2-0310-859d-f6bbb57e9c96

99966f78 26-Jun-2003 haydentech <haydentech@nowhere.fake>

Namespace/gcc3 fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3671 a95241bf-73f2-0310-859d-f6bbb57e9c96

6b76dd01 23-Jun-2003 DarkWyrm <darkwyrm@gmail.com>

Can get replies as PortMessages now

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3627 a95241bf-73f2-0310-859d-f6bbb57e9c96

c27b0019 22-Jun-2003 shadow303 <shadow303@nowhere.fake>

gcc3 cleanup & fix stupid mistake

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3617 a95241bf-73f2-0310-859d-f6bbb57e9c96

21099b69 22-Jun-2003 DarkWyrm <darkwyrm@gmail.com>

Separated PortQueue and PortMessage into separate files.
Added read methods to PortMessage

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3594 a95241bf-73f2-0310-859d-f6bbb57e9c96

37faaade 19-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the (BHandler*, BLooper*,) constructor more robust. Now the looper list is locked and the looper checked for validity.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3581 a95241bf-73f2-0310-859d-f6bbb57e9c96

2e9a7f0c 11-Jun-2003 haydentech <haydentech@nowhere.fake>

Fix unintended code path when debug macros are turned off

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3474 a95241bf-73f2-0310-859d-f6bbb57e9c96

14f0c2cf 08-Jun-2003 DarkWyrm <darkwyrm@gmail.com>

Removed a minor bug from the InitData server communication code

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3451 a95241bf-73f2-0310-859d-f6bbb57e9c96

d37e75d9 07-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

If our incomplete BMessage (missing sending of messages) is linked into libopenbeos, anything involving the registrar blocks on library initialization (more precisely anything linked against libopenbeos and started while the registrar is running).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3448 a95241bf-73f2-0310-859d-f6bbb57e9c96

0cc48ce6 03-Jun-2003 ejakowatz <ejakowatz@nowhere.fake>

Unit tests to ensure robust handling of bogus params to convenience funcs
plus fixes for the bugs they exposes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3416 a95241bf-73f2-0310-859d-f6bbb57e9c96

df1b8782 02-Jun-2003 ejakowatz <ejakowatz@nowhere.fake>

Fixes for bugs in BFlattenable convenience functions (revealed by the new
unit tests).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3404 a95241bf-73f2-0310-859d-f6bbb57e9c96

67833f26 29-May-2003 ejakowatz <ejakowatz@nowhere.fake>

Fixed adding pointers. BMessage::AddPointer() was specifying const void*
as the template param (where everything else was using void*) and
BMessage::AddData() was adding the pointer to the pointer as the data.
Unit tests save the day again!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3385 a95241bf-73f2-0310-859d-f6bbb57e9c96

80e96696 23-May-2003 ejakowatz <ejakowatz@nowhere.fake>

Little tweaks and fixes too numerous to count, but mostly involved with
adding entry_refs and BMessages. Lots of stuff for specifiers and also for
sending replies (with thanks to Mike Nordell).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3295 a95241bf-73f2-0310-859d-f6bbb57e9c96

30fd5147 14-May-2003 haydentech <haydentech@nowhere.fake>

Minor header-related changes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3246 a95241bf-73f2-0310-859d-f6bbb57e9c96

cf8525ee 14-May-2003 haydentech <haydentech@nowhere.fake>

Default args allowed only in header (not implementation) with gcc 3.X

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3244 a95241bf-73f2-0310-859d-f6bbb57e9c96

1847fb9c 05-Apr-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Always save before checking in. UpdateActiveApp() comment has been changed slightly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3054 a95241bf-73f2-0310-859d-f6bbb57e9c96

c99847b4 05-Apr-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Unimplemented ActivateApp(); it has to ask the app server instead. Moved its code to UpdateActiveApp(), which has exactly the matching semantics. :-)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3053 a95241bf-73f2-0310-859d-f6bbb57e9c96

0f434a0a 29-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

The mother of all commits. :P
Unremoved zlib and added libpng to public libs (C'mon DW, make up your mind... ;^)
Added screenshot support to app_server
Added full keyboard message support to app_server
Added UseLibraryHeaders and LibraryHeaders rules to jamrules
Updated ColorUtils to convert uint32 colors to rgb_colors
BAppServerLink now autolocks client-server communications on the client side (as it should)
app_server now also juliennes and makes french fries. Yum.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3045 a95241bf-73f2-0310-859d-f6bbb57e9c96

fec61fee 24-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Initial checkin of PortQueue class

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3036 a95241bf-73f2-0310-859d-f6bbb57e9c96

dc4e96ca 23-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Removed bug which caused goofy app signature names in app_server

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3003 a95241bf-73f2-0310-859d-f6bbb57e9c96

61078508 23-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Filled in AppServerLink

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3000 a95241bf-73f2-0310-859d-f6bbb57e9c96

f9439a60 21-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Initial checkin of AreaLink

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2977 a95241bf-73f2-0310-859d-f6bbb57e9c96

c3289882 21-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Effectively made Attach(*,size) a const function

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2974 a95241bf-73f2-0310-859d-f6bbb57e9c96

74d92165 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

New tests for Add/Find/Replace/HasRef, and tweak in MessageTest.cpp to use
it. Also, minor fix in entry_ref handling in BMessage::AddData().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2967 a95241bf-73f2-0310-859d-f6bbb57e9c96

e60c601e 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

Tweaks to make the tests work correctly and properly scope a BMessage

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2966 a95241bf-73f2-0310-859d-f6bbb57e9c96

9895f0ea 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

Some clean up and tweaks to the specifier handling code, plus the
beginnings of SendReply() functionality.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2958 a95241bf-73f2-0310-859d-f6bbb57e9c96

2be975a1 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

_get_object_token_ has found its permanent home in AppMisc.h, which the
other files were modified to include.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2957 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1055b4c 19-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

This is all the code for the backing store for BMessage (BMessageBody &
BMessageField) for the "template madness" version. Also included is
BDataBuffer which is a little reference counting raw data container.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2955 a95241bf-73f2-0310-859d-f6bbb57e9c96

9abaf1df 18-Mar-2003 ejakowatz <ejakowatz@nowhere.fake>

Resolved conflict. DarkWyrm tweaked the old version (which I had #if 0'd
out all over the place). There is now a giant
separating the two versions. At some point, the common code should be

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2953 a95241bf-73f2-0310-859d-f6bbb57e9c96

c503a7bc 18-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added BHandler tokens to app_server communications setup

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2947 a95241bf-73f2-0310-859d-f6bbb57e9c96

e26cbbcf 18-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Implemented _get_object_token_ to allow app_server to receive BHandler tokens

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2946 a95241bf-73f2-0310-859d-f6bbb57e9c96

53ea435d 16-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Multiple fixes and added to build. Not yet complete, but close

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2925 a95241bf-73f2-0310-859d-f6bbb57e9c96

71c04058 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

FlushWithReply(ReplyData *) checks for non-NULL buffers - eliminates a memory leak

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2902 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca34e8a0 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added startup code to talk to app_server
We can now run simple applications with app_server!!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2900 a95241bf-73f2-0310-859d-f6bbb57e9c96

c51942ea 06-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Removed fixed attachment limit

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2870 a95241bf-73f2-0310-859d-f6bbb57e9c96

364bb57e 24-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Updated sources to reflect changes in <ServerProtocol.h>

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2832 a95241bf-73f2-0310-859d-f6bbb57e9c96

16d1f45f 23-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Implemented IsCursorHidden
Removed PortLink usage where unnecessary

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2813 a95241bf-73f2-0310-859d-f6bbb57e9c96

de1a825e 14-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing file AppServerLink.cpp.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2710 a95241bf-73f2-0310-859d-f6bbb57e9c96

4b883396 11-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed warning.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2684 a95241bf-73f2-0310-859d-f6bbb57e9c96

2ed834e3 08-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Cleaned up BRoster's friends mess. All access to private BRoster functionality is now done through the newly added BRoster::Private class, which is BRoster's only friend (poor BRoster ;-).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2664 a95241bf-73f2-0310-859d-f6bbb57e9c96

83969b95 04-Feb-2003 Ingo Weinhold <ingo_weinhold@gmx.de>


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2631 a95241bf-73f2-0310-859d-f6bbb57e9c96

fe517480 19-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

More testing and fixes. Removed an attachment bug.
Port capacity checking a compile-time option.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2018 a95241bf-73f2-0310-859d-f6bbb57e9c96

51c9c2f9 18-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

Added new FlushWithReply method and some error checking. Mostly tested.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2010 a95241bf-73f2-0310-859d-f6bbb57e9c96

18d65fb5 11-Nov-2002 shadow303 <shadow303@nowhere.fake>

Include ServerProtocol.h instead of using #define SET_CURSOR_BCURSOR

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1905 a95241bf-73f2-0310-859d-f6bbb57e9c96

7c7ee64a 09-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

Partially implemented SetCursor
Completely implemented ShowCursor, HideCursor, ObscureCursor
Documented necessary steps for connect_to_app_server

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1898 a95241bf-73f2-0310-859d-f6bbb57e9c96

af554d2a 09-Nov-2002 shadow303 <shadow303@nowhere.fake>

Add Clipboard to build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1892 a95241bf-73f2-0310-859d-f6bbb57e9c96

bcb52961 09-Nov-2002 shadow303 <shadow303@nowhere.fake>

Minor bug fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1891 a95241bf-73f2-0310-859d-f6bbb57e9c96

1bde02ae 08-Nov-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Fleshed out any missing pieces of BRoster::
- ClearRecent{Docs,Folders,Apps}
- AddToRecentApps()
- {Load,Save}RecentLists()

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1878 a95241bf-73f2-0310-859d-f6bbb57e9c96

e4840f5b 02-Nov-2002 DarkWyrm <darkwyrm@gmail.com>

Checkin for Gabe Yoder

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1826 a95241bf-73f2-0310-859d-f6bbb57e9c96

44db8a08 27-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added {Get,Add,Clear}Recent{Apps,Documents,Folders} framework
+ Fleshed out {Get,Add}RecentApps calls
+ Updated argument names for GetRecent{Documents,Folders} to
versions used in R5 release notes in the Be Book.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1715 a95241bf-73f2-0310-859d-f6bbb57e9c96

259a6f74 24-Oct-2002 ejakowatz <ejakowatz@nowhere.fake>

Proxy for the connection to app_server; just a skeleton at this point.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1637 a95241bf-73f2-0310-859d-f6bbb57e9c96

b010ca67 21-Oct-2002 DarkWyrm <darkwyrm@gmail.com>

Checkin for Gabe Yoder

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1590 a95241bf-73f2-0310-859d-f6bbb57e9c96

edb7407e 18-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented {Start,Stop}Watching().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1577 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c7ccd0b 15-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BRoster::Broadcast().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1541 a95241bf-73f2-0310-859d-f6bbb57e9c96

05d576c2 14-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added/fixed some doxygen comments.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1511 a95241bf-73f2-0310-859d-f6bbb57e9c96

6f1a85ef 12-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BMessageRunner class.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1502 a95241bf-73f2-0310-859d-f6bbb57e9c96

121f83dd 12-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the miscellaneous app kit functions into the BPrivate namespace and added the function current_team() which returns the ID of the current team.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1501 a95241bf-73f2-0310-859d-f6bbb57e9c96

065aba53 08-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BMessageRunner to the build. Not implemented yet.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1464 a95241bf-73f2-0310-859d-f6bbb57e9c96

beebfc0a 08-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added empty implementation with doxygen comments for public methods.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1463 a95241bf-73f2-0310-859d-f6bbb57e9c96

7fb951b1 07-Oct-2002 DarkWyrm <darkwyrm@gmail.com>

Added PortLink class to libopenbeos build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1445 a95241bf-73f2-0310-859d-f6bbb57e9c96

8c7b7c86 07-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* resolve_app() and translate_ref() do now traverse the supplied ref and
set it to the resolved entry. Fixed bug causing non-traversal of app
links. Unset the app meta MIME type's app hint, if it is invalid.
* resolve_app(): Fixed incorrect behavior in case the signature of the
found app is not the signature of the preferred app.
* Implemented SetSignature(). It is indeed needed and I finally found out.
* xLaunchAppPrivate(): The document ref is always resolved.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1436 a95241bf-73f2-0310-859d-f6bbb57e9c96

d8c0f6e4 07-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

InitData(): Set the correct signature when pre-registered under a wrong one.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1435 a95241bf-73f2-0310-859d-f6bbb57e9c96

f2d61cef 06-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented the Launch() methods and their helpers.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1413 a95241bf-73f2-0310-859d-f6bbb57e9c96

717a24b7 06-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed synchronous SendMessage() calls. _send_()'s wantsReply must always be false, otherwise we get flooded with B_NO_REPLY messages.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1412 a95241bf-73f2-0310-859d-f6bbb57e9c96

ad4fdf8d 06-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Don't uninitialized be_app_messenger in the destructor.
* Fixed missing variable initialization in GetSupportedSuites().
* InitData(): Don't post B_ARGV_RECEIVED to ourselfs when pre-registered.
* InitData(): Added create_app_meta_mime().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1411 a95241bf-73f2-0310-859d-f6bbb57e9c96

c0aa02a8 04-Oct-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added doxygen documentation for BRoster::Launch(). Implementation tomorrow. :-)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1373 a95241bf-73f2-0310-859d-f6bbb57e9c96

ef3fb646 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added RegistrarThreadManager to the build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1324 a95241bf-73f2-0310-859d-f6bbb57e9c96

9f6eedfa 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Renamed and moved from src/servers/registrar/ThreadManager.{h,cpp}
+ Fixed iteration bugs
+ Added more complete debugging output

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1320 a95241bf-73f2-0310-859d-f6bbb57e9c96

8d22950d 30-Sep-2002 DarkWyrm <darkwyrm@gmail.com>

API and stability improvements

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1318 a95241bf-73f2-0310-859d-f6bbb57e9c96

05b9dff7 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added RegistrarThread to the build

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1272 a95241bf-73f2-0310-859d-f6bbb57e9c96

cd7adc0b 29-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

RegistrarThread class, which is the base class for threads
spawned in the registrar.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1265 a95241bf-73f2-0310-859d-f6bbb57e9c96

0fb7a107 28-Sep-2002 shatty <shatty@nowhere.fake>

fixed newline at end of file.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1242 a95241bf-73f2-0310-859d-f6bbb57e9c96

92a1f241 21-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BRoster::FindApp() and a bunch of helper functions needed for it. Tweaked some of the helpers signatures.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1110 a95241bf-73f2-0310-859d-f6bbb57e9c96

15685713 20-Sep-2002 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Commit per Jeremy Rand, fixes build on Dano compiler

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1097 a95241bf-73f2-0310-859d-f6bbb57e9c96

7bb1eb82 03-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed BLooper::UnlockFully(): It assumed benaphore style locking whereas semaphore style is used.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@977 a95241bf-73f2-0310-859d-f6bbb57e9c96

69b461cd 02-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed typo.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@965 a95241bf-73f2-0310-859d-f6bbb57e9c96

77a6586a 25-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Another test with minor tweaks to BLooper.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@874 a95241bf-73f2-0310-859d-f6bbb57e9c96

cb5b0f6d 24-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Fixed SetCommonFilterList() so that the same list can't be added to more
than one looper.
Implemented UnlockFully(), and changed destructor and Quit() to use it.
Reordered the destructor slightly so as to delete fLockSem *after* the call
to UnlockFully().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@869 a95241bf-73f2-0310-859d-f6bbb57e9c96

d008c62d 23-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Fixed a narsty little bug that suddenly started rearing its ugly head in
IsMessageWaiting() test #3. fLastMessage wasn't getting initialized to
NULL on construction, and the random value was finally biting me. All
better now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@856 a95241bf-73f2-0310-859d-f6bbb57e9c96

ff1ade6b 21-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

More tests and fixes for bugs exposed by them. Also removed spurious
instantiation of BRoster from BArchivable, line 323, as per Tyler's
mention. =)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@852 a95241bf-73f2-0310-859d-f6bbb57e9c96

e39c71fc 21-Aug-2002 jrand <jrand@nowhere.fake>

Remove R3 compatibility details from BPropertyInfo, fix memory leak and implement endian-ness
aware flatten and unflatten code.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@844 a95241bf-73f2-0310-859d-f6bbb57e9c96

41b5558a 19-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added explanative comment to get_app_path() and fixed the error return value of main_thread_for().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@827 a95241bf-73f2-0310-859d-f6bbb57e9c96

3841621d 18-Aug-2002 jrand <jrand@nowhere.fake>

Fixed Flatten() and FlattenedSize() implementation so the unit tests pass now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@813 a95241bf-73f2-0310-859d-f6bbb57e9c96

52ec2aa8 18-Aug-2002 jrand <jrand@nowhere.fake>

Fixed Unflatten() and FindMatch() so the unit tests pass now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@805 a95241bf-73f2-0310-859d-f6bbb57e9c96

75d07a50 17-Aug-2002 jrand <jrand@nowhere.fake>

Add the BPropertyInfo implementation to the library.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@804 a95241bf-73f2-0310-859d-f6bbb57e9c96

765a2199 17-Aug-2002 jrand <jrand@nowhere.fake>

Add initial BPropertyInfo implementation, courtesy of Marc Flerackers.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@803 a95241bf-73f2-0310-859d-f6bbb57e9c96

4a87ab98 13-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Set the the application BHandler's name correctly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@754 a95241bf-73f2-0310-859d-f6bbb57e9c96

54831cd6 13-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Initial checkin for Gabe Yoder.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@739 a95241bf-73f2-0310-859d-f6bbb57e9c96

bbab11ba 09-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed BRoster::GetRunningAppInfo() return value back to B_BAD_TEAM_ID in case the team ID is < 0. I thought R5 returns B_ERROR, but it does only for -1, otherwise it also returns B_BAD_TEAM_ID. We don't mimic this slightly insane behavior.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@680 a95241bf-73f2-0310-859d-f6bbb57e9c96

ca3e9dba 09-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed the return value in case of team ID < 0. R5 returns B_ERROR instead of B_BAD_TEAM_ID and so do we now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@677 a95241bf-73f2-0310-859d-f6bbb57e9c96

9e9f5a1a 09-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Improved BMessenger::InitData() a bit: Now only one roster call is done, when a signature but no team ID is given.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@676 a95241bf-73f2-0310-859d-f6bbb57e9c96

672c1ea9 06-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed return codes in InitData().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@623 a95241bf-73f2-0310-859d-f6bbb57e9c96

9231d6b0 06-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added be_roster check in InitData().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@622 a95241bf-73f2-0310-859d-f6bbb57e9c96

2e2e159a 05-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Work on ResolveSpecifier().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@599 a95241bf-73f2-0310-859d-f6bbb57e9c96

6a757163 04-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO items in the destructor.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@579 a95241bf-73f2-0310-859d-f6bbb57e9c96

c9f4f5e1 04-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed InitData(): It must not be possible to construct a messenger targeting a B_ARGV_ONLY app.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@577 a95241bf-73f2-0310-859d-f6bbb57e9c96

c26a5cea 04-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* The destructor doesn't kill the looper thread any more, as this doesn't
work very well with BApplication and has some issue with plain loopers
* DispatchMessage(): _QUIT_ doesn't delete the object any longer. The
looper thread simply falls through the dispatching loop and deletes
the object.
* Caused by not killing the looper thread in the destructor, Quit() had
to be adjusted. When called from the looper thread the thread exists.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@576 a95241bf-73f2-0310-859d-f6bbb57e9c96

98207f6f 04-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed Quit():
* Error message, if not locked.
* Lock(), quit, Unlock(), if not locked.
* Don't call BLooper:Quit() any more. We post a _QUIT_ message when being
called from another than the looper thread.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@575 a95241bf-73f2-0310-859d-f6bbb57e9c96

752c4971 04-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

The last remnants of the Old Repub ... er, static looper list data has been
removed. The old static BLooper functions for managing the looper list are
still there, but they are officially deprecated. The approved interface
for this information is BPrivate::BLooperList, accessible via the global
BPrivate::gLooperList variable. Being as it lives in BPrivate, it is for
API-internal use *ONLY*. User apps use it to their own risk.
Also added a small test to make sure that the size of BLooper stays the
same. I will probably add this to other classes as well; doesn't hurt to
be safe. =)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@572 a95241bf-73f2-0310-859d-f6bbb57e9c96

ebbcbbca 03-Aug-2002 ejakowatz <ejakowatz@nowhere.fake>

Implemented count_loopers()/windows() and looper/window_at(). Minor
changes to BLooperList to accomodate.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@568 a95241bf-73f2-0310-859d-f6bbb57e9c96

9986313c 03-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed some bugs/behavioral differences to the R5 implementation.
* Run() was returning fTaskID, which was invalidated by Quit().
* assert_app_signature() -> check_app_signature(). InitData() now quits
when an error occured and no error variable has been supplied. That seems
to be what R5 does.
* When args are present B_ARGV_RECEIVED is always sent to the own team,
even if the app flags include B_ARGV_ONLY. But it is sent to a remote
application (already running instance), only if that app has NOT

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@564 a95241bf-73f2-0310-859d-f6bbb57e9c96

0b55d664 28-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

More tests, more fixes.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@528 a95241bf-73f2-0310-859d-f6bbb57e9c96

7bf6c069 28-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

More tests with fixes to BLooper so it will pass those tests.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@527 a95241bf-73f2-0310-859d-f6bbb57e9c96

b1698c8e 28-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Mostly fixes for silly compile error, plus an additional test.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@524 a95241bf-73f2-0310-859d-f6bbb57e9c96

7e24e06e 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed synchronous SendMessage() versions. They need to add be_app_messenger as reply target, if the supplied reply target is invalid.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@523 a95241bf-73f2-0310-859d-f6bbb57e9c96

822cdddb 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed bug in AddHandler(): SetNextHandler() must not be invoked on the looper itself.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@522 a95241bf-73f2-0310-859d-f6bbb57e9c96

2284462c 28-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Scripting-related changes. Also indulged in some unwarrented formatting
anality. =P

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@519 a95241bf-73f2-0310-859d-f6bbb57e9c96

1e298dbb 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added AppMisc.cpp.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@514 a95241bf-73f2-0310-859d-f6bbb57e9c96

8a526591 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved some reusable code into AppMisc.cpp/h.
* Init be_app in InitData().
* Uninit be_app and be_app_messenger in BApplication destructor.^

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@513 a95241bf-73f2-0310-859d-f6bbb57e9c96

8cd29201 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added _send_to_roster_() and _is_valid_roster_mess_().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@512 a95241bf-73f2-0310-859d-f6bbb57e9c96

4d7538b1 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved some reusable code from BApplication to this shiny new place.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@510 a95241bf-73f2-0310-859d-f6bbb57e9c96

80a604c9 28-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

All things BMessage; initial check in.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@503 a95241bf-73f2-0310-859d-f6bbb57e9c96

d958d047 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added doxygen comments for the implemented methods and fixed some smaller issues.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@493 a95241bf-73f2-0310-859d-f6bbb57e9c96

3057c103 28-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Init be_app_messenger in InitData().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@492 a95241bf-73f2-0310-859d-f6bbb57e9c96

92cf4c75 27-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented IsRunning(), TeamFor(), GetAppList(),
Get{Running,Active,}AppInfo() and ActivateApp().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@482 a95241bf-73f2-0310-859d-f6bbb57e9c96

47924e2b 27-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

A comment to remind me to call create_app_meta_mime() in InitData() once it is available.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@481 a95241bf-73f2-0310-859d-f6bbb57e9c96

b194af10 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added message and codes, a flat_app_info structure and the name of roster side created app looper ports.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@458 a95241bf-73f2-0310-859d-f6bbb57e9c96

73a2b29f 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented InitData(), which should now be complete with respect to
what we need for the roster.
* B_{ARGV,REFS}_RECEIVED and B_READY_TO_RUN messages are dispatched now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@457 a95241bf-73f2-0310-859d-f6bbb57e9c96

92180c47 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Get the current team not using fTaskID, the looper thread, but find_thread(NULL) instead. In InitData() the thread has not been spawned yet.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@456 a95241bf-73f2-0310-859d-f6bbb57e9c96

3b044715 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented InitData(). BMessenger is complete.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@455 a95241bf-73f2-0310-859d-f6bbb57e9c96

496ffb0a 26-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed return type of some private methods from void to status_t.
AddApplication() returns the token via reference parameter and
additionally returns the team ID of the already running app (if any).
* Implemented AddApplication(), SetThreadAndTeam(), CompleteRegistration(),
IsAppPreRegistered(), RemovePreRegApp(), RemoveApp(), or to to say it
briefly the complete set of app registration helper functions.
* Implemented GetRunningAppInfo() and GetActiveAppInfo().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@454 a95241bf-73f2-0310-859d-f6bbb57e9c96

caf7e04f 23-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented missing app_info constructor and destructor.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@411 a95241bf-73f2-0310-859d-f6bbb57e9c96

459de0d7 23-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Fixed stupid syntax errors generated by my property_info dump tool. Now to
fix the tool ...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@402 a95241bf-73f2-0310-859d-f6bbb57e9c96

17c00872 23-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented _init_roster_() and added _delete_roster_() which are now responsible for be_roster.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@399 a95241bf-73f2-0310-859d-f6bbb57e9c96

a3a31e26 23-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added library initialization/termination functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@398 a95241bf-73f2-0310-859d-f6bbb57e9c96

ec9673bf 22-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Added/tweaked tests for BLooper; fixes to BLooper stemming from those tests

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@389 a95241bf-73f2-0310-859d-f6bbb57e9c96

64c088d0 21-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BRoster and BApplication to libopenbeos.so.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@380 a95241bf-73f2-0310-859d-f6bbb57e9c96

30304f2d 21-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@379 a95241bf-73f2-0310-859d-f6bbb57e9c96

c7f20c70 21-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added minimal implementation to be able to Run() the application and to have MessageReceived() served. BApplication is aware of the registrar signature and names the looper port respectively.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@378 a95241bf-73f2-0310-859d-f6bbb57e9c96

cef079ab 21-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a minimal BRoster implementation, i.e. constructor + InitMessengers().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@377 a95241bf-73f2-0310-859d-f6bbb57e9c96

e0cc8c68 21-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

The beginning of the registrar - API classes interface.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@373 a95241bf-73f2-0310-859d-f6bbb57e9c96

8f1dc17d 20-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

* Assignment operator didn't return *this.
* Fixed comparisson operators: The team ID is ignored.
* Fixed second synchronous SendMessage(). The reply argument is checked for
NULL now, `if (error)' -> `if (error == B_OK)', and map B_BAD_TEAM_ID to
B_BAD_PORT_ID, which is what the R5 implementation returns.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@360 a95241bf-73f2-0310-859d-f6bbb57e9c96

76858a33 19-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

BLooper::LockWithTimeout() was always using B_INFINITE_TIMEOUT.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@344 a95241bf-73f2-0310-859d-f6bbb57e9c96

19ba51b7 17-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

More BLooper tests and minor tweaks.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@288 a95241bf-73f2-0310-859d-f6bbb57e9c96

04de1897 17-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

More tests for BLooper.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@286 a95241bf-73f2-0310-859d-f6bbb57e9c96

38f5ceca 17-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Some more BLooper unit tests, with some minor resulting tweaks to BLooper.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@264 a95241bf-73f2-0310-859d-f6bbb57e9c96

e1f41e5d 16-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

BMessenger::Target() uses BLooperList now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@261 a95241bf-73f2-0310-859d-f6bbb57e9c96

e3684651 16-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Finally figured out why the first assert in IsMessageWaiting5() always
worked under R5 but only sometimes for OBOS. Answer: the OBOS
implementation of BLooper was attempting to lock itself prior to fetching
the message from the queue. I moved the lock attempt after the fetch and
it worked the same. I realized that if the system was loaded heavily
enough, the assert might still fail simply because the looper would not had
enough time to get to the fetch (thereby emptying the queue), making the
assert pretty useless. Given that it was originally there as a probing
test (rather than as an integral part of the unit test), there is no real
need for it anyway, so it is no longer used.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@250 a95241bf-73f2-0310-859d-f6bbb57e9c96

df226cd7 15-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

A new class to manage the list of loopers in a team. Provides the
functionality of the existing static BLooper functions (which now call
through to it) in a nicer package. New code should use the global instance
of this (BPrivate::gLooperList) instead of the old BLooper functions (which
are officially deprecated).

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@244 a95241bf-73f2-0310-859d-f6bbb57e9c96

abb57933 15-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Tweaks to deal with new repository hierarchy and use of unified CppUnit;
some bug fixes and a couple of new tests for BLooper.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@242 a95241bf-73f2-0310-859d-f6bbb57e9c96

865f9d8e 11-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

Fixes in BLooper and its tests.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@84 a95241bf-73f2-0310-859d-f6bbb57e9c96

98602e04 09-Jul-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjusted to the new tree structure, though currently (?) not needed.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@19 a95241bf-73f2-0310-859d-f6bbb57e9c96

52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96