Commit Graph

8019 Commits

Author SHA1 Message Date
John Scipione 24588f6b80 BShape: Rename these params back in header.
Accidentally renamed these in the header, rename them back to
match the cpp file. These param names might not be very good but
they match the struct variable names. They are private methods
anyway. No functional change intended in either commit.
2014-07-14 19:15:13 -04:00
John Scipione db1ef05aef BShape: Style fixes for docs 2014-07-14 19:02:44 -04:00
Ingo Weinhold e1e6c12480 BPackageWriter::Recompress(): Change param to BPositionIO*
Besides that this is a nicer interface, it allows us to get a the HPKG
header as a side effect of initializing the reader, thus preventing
seeking backward in the file. This makes "package recompress - <file>"
work.
2014-07-13 17:57:57 +02:00
Ingo Weinhold 43a6b92c64 PackageReaderImpl: Delay reading sections until ParseContent() 2014-07-13 17:57:56 +02:00
Ingo Weinhold 1606450b32 ReaderImplBase::Init(): Make file size check optional
If the file doesn't support GetSize(), skip the header total size file
size check.
2014-07-13 17:57:56 +02:00
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 44c4771163 BPackageWriter: Add BPositionIO support 2014-07-13 17:57:55 +02:00
Julian Harnath b916156a83 Move libroot synchronization functions to private namespace
* Prefix lock functions with __ to mark them as private. Add
  forwarding macros to keep existing code working.

* Avoids symbol name clashes with kernel lock APIs, occuring when
  using kernellandemu-lib in userlandfs. Thanks to Ingo for the
  suggestion.
2014-07-13 16:19:08 +02:00
Julian Harnath 2e75b75292 Fix building Haiku from Haiku
* Always include cdefs.h to have __[BEGIN|END]_DECLS defined.
  Somehow, this didn't affect cross-build, but it made building
  from Haiku fail.
2014-07-13 15:35:31 +02:00
Ingo Weinhold 8f5130edfa package kit: Actually add support for B_HPKG_COMPRESSION_NONE
Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.
2014-07-12 23:12:21 +02:00
Ingo Weinhold e527b79631 Switch package file accessor classes to use BPositionIO
* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
  their implementation and super classes do now internally use a
  BPositionIO instead of a FD to access the package file. This provides
  more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
  BPositionIO* parameter.
2014-07-12 15:40:22 +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 8546c4160e BPositionIO: Add {Read,Write}AtExactly()
Analoguous to {Read,Write}Exactly(), just for the *At() versions.
2014-07-12 15:40:21 +02:00
Jérôme Duval 74e1a530f8 Revert unrelated part of 17aa359b5d. 2014-07-11 22:23:21 +02:00
Akshay Jaggi 17aa359b5d XHCI USB: Fixes.
* Add support for hubs in AllocateDevice().
* Prevent page fault in FinishTransfers().
* Set fCapabilityLength
* Correct in BIOS ownership code
* Fix context errors in _InsertEndpointForPipe().
* Update constants according to latest Specification (v1.1)
* Fix SMI code (reference
http://lkml.iu.edu/hypermail/linux/kernel/1204.2/02460.html).
* Fix Memory/Device-Slot leaks.
* Fix area allocation for TRBs.
* Fix for Intel Lynx Point and Panther Point chipsets. Also move init
of xhci before ehci, to switch USB 2.0 ports before the ehci module
discovers them.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-11 22:14:05 +02:00
Axel Dörfler de9c061339 bfs: Use the QueryParserUtils instead of its own copy.
* Ingo copied the methods into a shared location, and then obviously
  "forgot" to let BFS use them. As a side note for Ingo: the complete
  error GCC reported was "std::fssh_size_t" not defined with the macro
  wrapper as code location. The actual problem was a "using std::size_t"
  in some C++ header that accidentally got included after the wrapper.
* The shared Query code is not yet used. That'll be done another time.
* Renamed BFS_SHELL define to FS_SHELL, such that QueryParserUtils can be
  used in any file system shell, not just the bfs_shell.
2014-07-09 22:54:39 +02:00
Ingo Weinhold cdfeba5a1e BPackageWriter: Add Recompress()
Allows rewriting an existing package file with a different compression.
2014-07-08 22:00:35 +02:00
Ingo Weinhold a5330a8e41 Remove private support kit BUrl
Use the public BUrl from the network kit instead.
2014-07-03 17:39:59 +02:00
Ingo Weinhold 72f6b787cf BUrl: Add missing functionality from support kit BUrl 2014-07-03 17:39:59 +02:00
Ingo Weinhold 6926863e37 DynamicBuffer::Write(): Fix return type and semantics 2014-07-03 17:39:58 +02:00
Ingo Weinhold 7616c39db6 DynamicBuffer: dos2unix 2014-07-03 17:39:57 +02:00
Ingo Weinhold 739f15e144 Revert "Revert "DynamicBuffer: implement BDataIO""
This reverts commit 747b401e87.
2014-07-03 17:39:57 +02:00
Ingo Weinhold 72cf56a0fd BZlibCompressionAlgorithm: Basic support for gzip format 2014-07-01 21:54:58 +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 b773d89eba BDataIO: Add Flush() 2014-06-30 21:55:40 +02:00
Ingo Weinhold 0dab9e5cb4 package kit: ReaderImplBase: Remove superfluous scratch buffer 2014-06-30 21:51:16 +02:00
Ingo Weinhold 0a62e01902 PackageWriterImpl: Remove superfluous method 2014-06-30 21:51:16 +02:00
Adrien Destugues eef22dfb75 Revert "Remove haiku_host/Errors.h"
This reverts commit f105756e27.

The host header gets included if this file is missing , rather than the
one in the build tree. Fix the build again.
2014-06-26 08:01:00 +02:00
John Scipione 732c579702 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
2014-06-25 19:31:24 -04:00
Adrien Destugues f105756e27 Remove haiku_host/Errors.h
The only purpose of this was to use the installed version of Errors.h,
which isn't strictly needed and create some annoyance when new error
codes are added.
2014-06-25 23:01:13 +02:00
John Scipione e0016ffde9 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.
2014-06-25 15:35:09 -04:00
Adrien Destugues 158ae74373 Escape reserved characters when converting paths to urls
* Introduce and use BUrl::BUrl(const BPath&)
* The path is url-encoded, and the protocol is set to "file"

Fixes #10964.
2014-06-25 10:45:03 +02:00
Adrien Destugues 6bcbdcc3c0 Use current Errors.h when building libbe_build
This allows adding new error codes to the libbe_build without breaking
the build on older Haiku versions.

Fixes the build for the newly introduced B_PARTIAL_READ and
B_PARTIAL_WRITE.
2014-06-25 08:59:14 +02:00
John Scipione 29e8fa5922 Style fixes to Support Kit files 2014-06-24 19:30:54 -04: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 32832cbe47 Remove BPackageKit::BDataOutput
Use BDataIO instead.
2014-06-23 22:58:15 +02:00
Ingo Weinhold 0d8b44e25b BDataIO: Add methods {Read,Write}Exactly() 2014-06-23 22:58:15 +02:00
Ingo Weinhold dec78bb27c Add new error codes B_PARTIAL_{READ,WRITE} 2014-06-23 22:58:15 +02:00
Ingo Weinhold 98759fe6e6 BDataIO: Provide default implementations for Read()/Write()
This makes the interface somewhat more suitable for unidirectional use,
since one doesn't have to implement the other, not needed method.
2014-06-23 22:58:14 +02:00
Adrien Destugues 33d60fa21f BRegion: add ScaleBy(BSize) and user documentation. 2014-06-19 19:23:31 +02:00
Adrien Destugues 9576c4b742 BRegion scaling: fix semantics to avoid holes/overlaps
Thanks to Stippi for pointing this out.
2014-06-19 19:23:29 +02:00
Adrien Destugues 669ac9d6f5 BRegion: add ScaleBy method.
* Is there a reason to not have it?
2014-06-19 18:05:14 +02:00
John Scipione 8d39283b71 While I'm at it fix tiny style issue I missed 2014-06-18 21:04:24 -04:00
John Scipione 5efee6dfb0 NodeMonitor: Revert enums back to #defines
While enums are presented much more clearly in the docs and the values didn't
change this apparently caused some issues so we're going back to using #defines.

Also update the docs changing the \var tags to \def tag and putting the description
in a \brief tag.
2014-06-18 20:57:49 -04:00
John Scipione a30a4a41f9 Style fixes to Storage Kit classes.
No functional changes intended.

* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.
2014-06-18 19:14:19 -04: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
Ingo Weinhold 747b401e87 Revert "DynamicBuffer: implement BDataIO"
This reverts commit 36b1f55a18.
2014-06-18 22:13:39 +02:00
Ingo Weinhold 707f60f4e9 Revert "Fix build."
This reverts commit 00dfae0bce.
2014-06-18 22:13:39 +02:00