Commit Graph

56 Commits

Author SHA1 Message Date
Ingo Weinhold 05b565f4f2 Add private BDataPositionIOWrapper
Implements the BPositionIO interface on top of a BDataIO, requiring the
{Read,Write}At() accesses to be sequential.
2014-07-13 17:57:56 +02:00
Ingo Weinhold c55a06055f Add private class BFdIO
Simple BPositionIO implementation using the POSIX API on a FD. In effect
similar to BFile, but more easily ported to kernel and boot loader (and
the FD is reusable).
2014-07-12 15:40:21 +02:00
Ingo Weinhold b3263ad3e1 Switch package kit to BZlibCompressionAlgorithm
... and remove the Zlib{Compressor,Decompressor} API.
2014-06-30 21:55:41 +02:00
Ingo Weinhold dcdc33b0af Add B[Zlib]CompressionAlgorithm
* BCompressionAlgorithm is a base class for classes that provide
  compression/decompression functionality. There are methods for
  compressing/decompressing a single buffer and factory methods for
  a compressing/decompressing input/output BDataIO.
* BZlibCompressionAlgorithm is a BCompressionAlgorithm implementation
  using zlib.
2014-06-30 21:55:41 +02:00
Ingo Weinhold 6a89a36aa0 Move package kit Zlib* classes to support kit
Also move to B* namespace and no longer expose the zlib dependency in
the headers.
2014-06-30 21:55:41 +02:00
Ingo Weinhold 84297881bb Remove BPackageKit::[...]::AbstractDataWriter and friends
* FDDataWriter and ZlibDataWriter weren't used anymore.
* AbstractDataWriter was implemented only by PackageFileHeapWriter,
  which was only used by WriterImplBase.
* Add a PackageFileHeapWriter::AddDataThrows() which has semantics
  equivalent to the previously inherited WriteDataThrows().
2014-06-23 22:58:15 +02:00
Ingo Weinhold d2d1af830b Revert "Move ZlibDecompressor to libshared"
This reverts commit 9af2105d36.

Conflicts:
	src/kits/package/Jamfile
2014-06-18 22:13:39 +02:00
Adrien Destugues bec7cb1006 Also move the build version of BReferenceable.
* Should fix the build, but results in an internal compiler error here
(with a gcc2 haiku host). Let's see what the buildbots think...
2014-06-11 17:53:41 +02:00
Oliver Tappe 94089b909d Revert 6f68e52 and fix the gcc2 build via template.
* Instead of forcing the hash-table to use a copy of the key,
  introduce and use TypeOperation template to avoid taking a
  reference of a reference type (which gcc2 doesn't allow).
2014-04-20 00:26:29 +02:00
Adrien Destugues 9af2105d36 Move ZlibDecompressor to libshared
* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.
2014-02-11 12:06:38 +01:00
Ingo Weinhold 2b76973fa2 mimeset: Use TextSnifferAddon when using a custom MIME DB
That addresses the problem that packaged text files aren't correctly
identified (ticket #9972). All concerned packages have to be rebuilt,
of course.
2013-11-22 12:24:13 +01:00
Ingo Weinhold de49e34927 Add symbol versioning for find_directory()
Should already have been done back when the semantics for the
B_COMMON_*DIRECTORY constants was changed.

Currently old and new version behave the same. So this is just a
contingency measure ATM.
2013-10-05 01:33:26 +02:00
Ingo Weinhold 83462cc28d Refactor reusable pkgman code into libpackage
* Move RepositoryBuilder class to libpackage and add B* prefix to name.
* Pull BPackageManager class out of PackageManager and move to
  libpackage. The base class is customizable via three handler objects
  responsible for transaction handling, request execution, respectively
  user interaction.
* Reorganize _ApplyPackageChanges(): Now we first prepare the
  transactions for all affected installation locations (downloading
  files etc.) and then commit them.
2013-08-31 21:19:07 +02:00
Ingo Weinhold 30cdb26b5f Add BDriverSettings to libbe_build 2013-07-06 02:11:18 +02:00
Ingo Weinhold 01176bd944 Add basic BUuid class
ATM it's only able to generate random UUIDs.
2013-06-07 02:03:16 +02:00
Ingo Weinhold 1f633814fa hpkg format: compress the whole heap
Instead of handling compression for individual file/attribute data we
do now compress the whole heap where they are stored. This
significantly improves compression ratios. We still divide the
uncompressed data into 64 KiB chunks and use a chunk offset array for
the compressed chunks to allow for quick random access without too much
overhead. The tradeoff is a limited possible compression ratio -- i.e.
we won't be as good as tar.gz (though surprisingly with my test
archives we did better than zip).

The other package file sections (package attributes and TOC) are no
longer compressed individually. Their uncompressed data are simply
pushed onto the heap where the usual compression strategy applies. To
simplify things the repository format has been changed in the same
manner although it doesn't otherwise use the heap, since it only stores
meta data.

Due to the data compression having been exposed in public and private
API, this change touches a lot of package kit using code, including
packagefs and the boot loader packagefs support. The latter two haven't
been tested yet. Moreover packagefs needs a new kind of cache so we
avoid re-reading the same heap chunk for two different data items it
contains.
2013-05-25 01:12:25 +02:00
Ingo Weinhold 0ee1651856 Rename BBlockBufferCache and friends to *Pool*
Also move BBlockBufferPoolNoLock into BHPKG namespace with the other
classes. Not sure why it wasn't there before.
2013-05-25 01:12:25 +02:00
Ingo Weinhold 7575abbca2 Clone read support functionality for HPKG format version 1
It uses sub-namespace BPackage::BHPKG::V1. Unlike the one for the
current format version, the V1 version of BPackageInfoContentHandler
lives in BHPKG(::V1) sub-namespace and is private.
2013-05-25 01:12:22 +02:00
Ingo Weinhold baadb25955 Add te MimeInfoUpdater to libbe_build 2013-05-09 03:19:25 +02:00
Ingo Weinhold 865ab2816d Pull class MimeInfoUpdater out of UpdateMimeInfoThread
* Pull out base class MimeEntryProcessor out of AppMetaMimeCreator.
* Pull class MimeInfoUpdater out of UpdateMimeInfoThread and derive it
  from MimeEntryProcessor.
* MimeInfoUpdater: Instead of BMimeType::GuessMimeType(), use
  Database::GuessMimeType() directly.
2013-05-09 01:48:36 +02:00
Ingo Weinhold d0815ca03b Add private MIME DB classes to libbe_build
* This pulls in some more stuff, like libicon and agg which are also
  included in libbe_build, now.
* Update a few libbe_build classes and headers needed to get things
  building.
* This likely breaks the <build>mimeset build on Haiku.
2013-05-08 04:39:56 +02:00
Ingo Weinhold 85d2badf00 package daemon: Add support for activation change request
* daemon: Handle new request B_MESSAGE_COMMIT_TRANSACTION. It activates
  and deactivates given sets of packages. The new packages must be
  placed in a directory in the administrative directory. The daemon
  moves them to the packages directory and the deactivated packages to
  a subdirectory it creates. It also save the old activation state
  there.
* Add private BActivationTransaction, describing an activation change
  transaction.
* BDaemonClient: Add CommitTransaction(), which sends a given
  BActivationTransaction as a B_MESSAGE_COMMIT_TRANSACTION request to
  the daemon.

Completely untested yet.
2013-04-20 01:28:18 +02:00
Ingo Weinhold 82ce8682f2 Add missing build header Referenceable.h 2013-04-13 02:04:00 +02:00
Ingo Weinhold 7c29395824 Add some missing build headers 2013-04-02 17:06:56 +00:00
Ingo Weinhold e99df3a512 Fix build due to <directories.h> move
Apparently I should have done a complete rebuild after moving
directories.h from headers/private/libroot to .../system, since a lot of
stuff didn't build anymore.
2011-07-17 16:55:22 +02:00
Ingo Weinhold d0c417848b BString::Private class to access BString internals 2011-07-17 16:55:20 +02:00
Ingo Weinhold fce74facea Add Array.h and RangeArray.h build headers 2011-07-17 16:54:54 +02:00
Ingo Weinhold 0ee9bc97d0 Build libpackage for the build platform 2011-07-17 16:54:10 +02:00
Ingo Weinhold d451f7a329 Added several APIs to libbe_build/libshared_build 2011-07-17 16:54:09 +02:00
Ingo Weinhold 4cc4f7bb18 * Added KMessage to libroot_build.
* libbe_build: Where possible we directly use the actual Haiku headers and
  sources, now. In the headers/build headers we just include the respective
  Haiku headers as needed. That still allows overrides where necessary. The
  intention is to make it easier to keep the build stuff in sync.
* Fixed a few printf() format and signed/unsigned comparison warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 11:42:49 +00:00
Oliver Tappe 8a990d5228 Part of fixing #7226:
* the libbe_build version of BString was broken, at least with respect
  to LockBuffer() on an empty string - replaced the implementation and
  header with our current version (keeping the type-related changes
  required by the build-version)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-16 10:13:12 +00:00
Axel Dörfler b19e758b80 * The Keymap::IsDeadKey() of the Keymap preferences which was the main source
of BKeymap was not compatible with IsDeadKey() of the other Keymap
  incarnations.
* Now, I've renamed IsDeadKey() to DeadKey(), and introduced a new
  ActiveDeadKey() method that works like the other former IsDeadKey().
* This fixes the dead key problems my earlier BKeymap work introduced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:36:54 +00:00
Axel Dörfler 910f10f2fc * Added libshared_build.a, currently only contains Keymap.cpp.
* keymap and <build>keymap are now using the BKeymap class as a base as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 08:17:07 +00:00
Axel Dörfler 624693f0c8 * Added the BFileIO class to libbe_build.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 08:13:57 +00:00
Ingo Weinhold 7870a9ffc7 Updated the messaging related build platform code with the current Haiku
version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 21:34:59 +00:00
Ingo Weinhold 4d8a54be0d Updated the resources support with the unmodified Haiku version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 17:19:14 +00:00
Ingo Weinhold b5a20f9d11 Removed headers and sources not needed for build platform version for libbe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 18:59:40 +00:00
Stephan Aßmus 991547ef6c 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
  coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
  demo.
* 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! :-)

TODO:
* 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
2008-10-14 21:27:42 +00:00
Ingo Weinhold c3c841e223 Added <asm_defs.h> as a build header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-26 13:35:20 +00:00
Stefano Ceccherini 6dcce65687 port the changes made to the libbe counterpart (r27297 and r27485)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-17 09:15:48 +00:00
Michael Lotz d1189f0b05 Naive implementation of transfer_area(). It follows the suggested sematics
of the resolved ToDo, but could probably be made more efficient. Instead of
transfering the area, the area is cloned into the target teams' address space
and the original is deleted. This generates a new area_id for the transfered
area (as suggested by the ToDo). Updated syscall prototypes according to the
status_t to area_id return type change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 12:56:59 +00:00
Stephan Aßmus 6a0f79107d * fix the build of the libbe_test target
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 15:03:58 +00:00
Axel Dörfler 662e5c8ce4 Fixed warnings when building something for BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 12:53:25 +00:00
Stefano Ceccherini 2e46156d87 forgot that too...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 11:55:00 +00:00
Michael Lotz 154860eb4b Port endian conversion fixes to build version of BMessage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 11:47:11 +00:00
Michael Lotz da0f338e87 * Ported over a simplified version (no message sending) of the current BMessage implementation to the build libbe
* Also ported over the new MessageAdapter class
* Removed old BMessage implementation prototypes that apparently were left in the private folder

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-27 20:33:51 +00:00
Jérôme Duval 5c937cfa82 missing comment tokens
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 21:30:00 +00:00
Jérôme Duval a3ca7ebc40 x86_64 changes :
added atomic*64() functions
use int32 instead of long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 10:50:18 +00:00
Ingo Weinhold 3111f163b5 Fixed libbe_test build of app server:
* Added <safemode.h> headers.
* Added a failing _kern_get_safemode_option() to libhaikucompat.a.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-06 19:29:41 +00:00
Stephan Aßmus f591eb8ba0 * cleanup license header (and convert Jérôme to UTF8)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-19 19:26:44 +00:00