Commit Graph

1136 Commits

Author SHA1 Message Date
PulkoMandy
2db0fbd87e documentation: add a list of "media" keycodes to keyboard documentation.
Change-Id: Idd0249c2c19cea7a3435b5a73fc48c2027dcb8f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5961
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-12-23 16:55:17 +00:00
Máximo Castañeda
241f109ccb View: provide the transform between different coordinate spaces
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-13 04:04:30 +00:00
Augustin Cavalier
233c0ffd47 docs/develop: Add missed item to the branch steps and combine the last two. 2022-11-08 12:45:03 -05:00
Alexander von Gluck IV
28ca540854 docs/release: Bump these changes over to milestones
* There was a bit of overlap

Change-Id: I97b39a38cdb6b3b96aafb42fa1b5a6ed447a6d3c
2022-11-04 15:00:02 -05:00
Alexander von Gluck IV
b5e4f1faa3 docs/release: Extend release engineering documentation
Change-Id: Iade40740e6dfbc7ea5f3f74f572d70443f94841a
2022-11-04 14:38:14 -05:00
Niels Sascha Reedijk
1111dda699 NetServices: Add libnetservices2.a from dev/netservices into master
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].

The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.

The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.

The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.

The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.

[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2

Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
2022-11-02 01:37:17 +00:00
Máximo Castañeda
baf401757e HaikuBook: small list levels and grammar tweaks
Change-Id: I186e38108a57a8a8b82dbfbdf27766730fe659e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5774
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:23 +00:00
Augustin Cavalier
20136c336c docs/develop: Linkify version-change hrev. 2022-10-31 23:29:20 -04:00
Niels Sascha Reedijk
2710b4f5d4 Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I48c8cf4f03e281a5caeb9f27bf052285961529ff
2022-10-29 22:58:24 +01:00
Augustin Cavalier
5de85b8f98 docs: Remove the User Guide and Welcome pages.
These were not maintained here, merely mirrored from the Userguide Translator,
and rather infrequently at that. But as they were built with Haiku,
that meant new versions of these packages were built every hrev,
which meant a lot of wasted space and bandwith for updates.

Now there is a separate "userguide" repository which will collect the
files exported from the Translator, and recipes at HaikuPorts to build
the packages, instead, so we can delete these files from this repo.
2022-10-25 18:38:28 -04:00
Niels Sascha Reedijk
97f11716bf Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I588c4a840523995f820161d63741c137bc5c719c
2022-09-04 07:30:59 +01:00
Niels Sascha Reedijk
27196c4068 NetServices: use BBorrow<BDataIO> for custom body targets
Change-Id: Ib2d4b0ca3689338d906f943295278c086c6f2c83
2022-09-04 07:27:08 +01:00
Niels Sascha Reedijk
1e22817dfb NetServices: add the BExclusiveBorrow<T> smart pointer
This smart pointer is designed to help with putting some explicitness and
safety around the case where someone will use their own object that implements
the BDataIO interface to store the body of a network request. By default,
BDataIO objects do not require or enforce thread safety. Since accessing these
unsynchronized objects between two threads is undefined behavior, it should be
explicitly discouraged.

The BExclusiveBorrow/BBorrow smart pointer helper helps solve that by enforcing
the limitations on using an unsynchronized object in two threads. When used
correctly, there is a runtime check on incorrect use by the developer. This
should help write better code.

The design is based on shared_ptr, including having an admin block akin the
control block, that manages the internal object. This type-erased admin block
has the advantage that it allows the owner to have a different type than the
borrower. It also handles cases where the lifetime of the borrower is longer
than the owner: the borrower can continue to use the object until they want to
return it, after which it will be cleaned up. This will make it possible to do
some fire and forget pattern in the network services kit, where someone may
just wants to create a file and borrow it to the network request, and care
about further processing the file in the future.

Change-Id: Ie9b7e7472c868b60f663b4db4fa449d421e447eb
2022-09-04 06:54:37 +01:00
Máximo Castañeda
2eab9be564 HaikuBook: fix xml
Change-Id: If6dfe4de919d946f1ff19946e1fa1abe726ea95f
2022-09-02 12:12:01 +02:00
Augustin Cavalier
f5fcee0157 BAlert documentation: Clarify that SetIcon assumes ownership.
It always did, this documentation was incorrect.
Also, we introduced this method, it wasn't present on R5.
2022-08-26 21:25:23 -04:00
Niels Sascha Reedijk
8a16ecbce9 NetServices: Add debugging constants and messages
These allow for additional messages about the progress/status of the request.
For now, the messages are sent unconditionally, though it may be reasonable to
in the future switch to sending them only when enabled.

Change-Id: Ic45a0055037af02c689494fa5ce0acd03592ad7e
2022-08-14 14:53:48 +01:00
Mashijams
a3d8402537 Docs: xfs
Change-Id: I2da4c778801e4c34ffe75d19c0c5c9323979f5f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5533
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-08 15:25:26 +00:00
Niels Sascha Reedijk
7b1d966cf2 NetServices: Rework parsing of content-length and move to HttpParser
This fixes a bug in the HttpAuthTest, and in general, moves responsibility of determining
the shape and size of the content to the right place.

Still to do is to fix the case where there really is a variable length content. This will
now probably error out as a connection closed error.

Change-Id: I13c20028e834cc9af8c7bc1d7d7613bf60838e64
2022-08-08 07:58:45 +01:00
Niels Sascha Reedijk
9cb56a4881 NetServices: Add custom error message to BNetworkRequestError
Change-Id: I03970762531a689e25cd78a1091aecf755ee87ce
2022-08-07 08:47:19 +01:00
Niels Sascha Reedijk
6d1bb0e7ad NetServices: Remove BHttpRequest::SerializeTo(BDataIO*)
The private version that serializes to a HttpBuffer is now used.

Change-Id: I034933a641e98b3a8f918470a024ba32ea7c8663
2022-08-07 07:17:38 +01:00
Niels Sascha Reedijk
c7f925c3ee NetServices: add the HttpSerializer helper to help serialize requests
Change-Id: Ide1e2d387884ce4cf2d406057960cd0732d61f38
2022-08-07 06:47:15 +01:00
Niels Sascha Reedijk
9b33a931f1 NetServices: Implement controls on the number of concurrent requests.
This change allows the user to control how many concurrent request can be done
per session. This is going to be helpful to running the tests as well; they were
all fired up in parallel, which sometimes leads to our test server refusing a
connection.

Change-Id: I4f1f40b28b8e0199ea5589b36cd8d00ecd849a63
2022-07-27 09:02:09 +01:00
PulkoMandy
264f77da03 docs/develop/release: add the info from the ReleaseCookbook Trac wiki page
The corresponding Trac wiki page can be deleted once this is merged.

Some of this information is a little out of date, help is welcome on
updating it.

Change-Id: I9157b140bcb5de3fed3c95d994745b5a1cbee1f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5477
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 14:11:55 +00:00
Niels Sascha Reedijk
60355daec9 NetServices: Implement asynchronous status update messages.
The integration PostTest has a basic test that the expected messages are sent and
have the expected data fields. The gist is documented in book.dox.

To do are the messages around SSL. However, that functionality is also not
implemented yet, so there is nothing to send.

Change-Id: Ib8f36ed32f9854d643d8256338b71af7067059f0
2022-07-24 08:56:02 +01:00
PulkoMandy
3c1a967efb docs/develop: add some documentation for userlandfs and FUSE
Change-Id: Ic8ee1bb5b3ca3e926251db766a120c48b96af45c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5488
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-20 20:34:28 +00:00
Niels Sascha Reedijk
b74e852fd9 NetServices: Remove Accept as standard and protected header.
In the old service kit, the Accept header was automatically set. However, it is
not a required header. This removes the default value and the protection against
setting it manually.

Required to make HaikuDepot work.

Change-Id: Ic589bfc5829db25915b67f2a13b6c2436c053e25
2022-07-20 06:28:17 +01:00
PulkoMandy
abc159e3fd docs/develop: explain vendor branches for gcc and buildtools
Change-Id: I9bb3b4efd2d02013da1ec6656adb49cd7d050e86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5476
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-17 07:37:53 +00:00
Alexander von Gluck IV
fd482d0a57 docs/develop: Introduce release engineering documentation
* This has been floating around on trac forever.  We should formalize
  these steps to help future Haiku releases to be successful.

Change-Id: I5881e27a23e66a18539d04c5977593a827f8fcef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5441
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-15 15:31:13 +00:00
Leorize
86fa1c21e1 Shared Kit: Introduce BMemoryRingIO, a thread-safe ring buffer
This commit introduces a simple thread-safe ring buffer implementation
based on top of BDataIO. The main use case for this class will be to
implement shared buffers between threads for the upcoming refactoring
of Services Kit.

Change-Id: I526bc044b28c91496ad996fabebe538e75647f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2966
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-11 16:29:53 +00:00
Augustin Cavalier
d6fedd7fcf Userguide CSS: Fix banner color. 2022-07-06 12:01:20 -04:00
Pascal Abresch
05844f660c Userguide CSS: add dark mode
Change-Id: I94c308ea22a304f061544a28e1490b9c004191d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5329
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 15:49:23 +00:00
Niels Sascha Reedijk
92357c131e NetServices: Add support for an input body in a request and handle this with redirects.
Change-Id: Id2399d49aa673469c8c04ebd13884cdbcb24112d
2022-06-23 21:13:35 +01:00
Niels Sascha Reedijk
6cbbd9bf4e NetServices: Implement BHttpSession::Cancel()
Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
2022-06-03 13:38:28 +01:00
Niels Sascha Reedijk
2f3b9b18ac NetServices: Add/rework the MaxRedirections, Timeout and StopOnError options
Change-Id: I4e59b51c16c6777941dc92ce02505386257dad03
2022-06-03 09:40:42 +01:00
Niels Sascha Reedijk
f9d9d20245 NetServices: Add support for Basic authentication
Change-Id: I304104f7096fd935212e1bfa3e988e7945cb5cec
2022-05-29 15:13:54 +01:00
Adrien Destugues
4b0d8831c2 HaikuBook: better doc and example for BList::DoForEach
The description of the callback function was still quite confusing. The
main usage for the return argument from the callback function is not
handling failures, but knowing wether the function did something in the
list or not, and stopping the iteration if only one item was looked for.

Add an example use of the function return value to implement a linear
search in the list and remove the note about the function "failing",
which is not what this parameter was meant to do (and I think that lead
to the initial inversion of "true" and "false" values.

Change-Id: If8cae8b8ee21ced2c899aef6033a89ab8dbf1621
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-05-26 07:49:01 +00:00
Alexander von Gluck IV
6ec74693c7 docs/develop: Document how to build source hpkgs
Change-Id: I86a6cef5773c543e1b46d85091b9e73a7e3c016c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5342
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-05-25 12:48:27 +00:00
Jessica Hamilton
a0a83410c4 docs/BList: fix DoForEach to match BeOS.
* The function passed to `DoForEach` returns `true` to terminate
  the loop early

Change-Id: If445836b14c44b981d169564e7beab8c0ecac36f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-05-24 04:35:46 +00:00
Niels Sascha Reedijk
f751534257 NetServices: add optional fields to BHttpRequest
Change-Id: I6228419a55c81203ce2c26827d17ff6a402d86c5
2022-05-15 16:43:07 +01:00
Niels Sascha Reedijk
46b7da1f4f Merge branch 'master' into dev/netservices
Change-Id: I1eb6c2ea2fd0d794ad6378eab8bbb80ce46dfbb8
2022-05-08 09:00:42 +01:00
Niels Sascha Reedijk
cf54474e38 NetServices: Implement BHttpTime, parse_http_time() and format_http_time().
These utilities convert timestamp strings that are formatted according to
the HTTP RFC into BDateTime objects, and vice versa.

Change-Id: Ia2498944fb63d09233839f19d08f15d82a0a9685
2022-05-08 06:59:51 +01:00
David Karoly
dea541c4f4 docs/arm: update info for Raspberry Pi 2 & 3
Add some more details on peripherals.

Change-Id: I65e6ce5ff32cd8b40b95a707460a870f0f4d688e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5239
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 18:18:13 +00:00
David Karoly
e5165df648 docs/arm: remove TODO item for soft-float
soft-float/hard-float mismatch issues are tackled by introducing
libgcc-boot, libgcc_eh-boot, libsupc++-boot libraries in the
gcc_bootstrap package

Change-Id: I4d3eff12c4c78804cd1dd32d6c1c5c8a9b5ad51a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5238
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 18:17:19 +00:00
Niels Sascha Reedijk
13bfff7be3 NetServices: Implement BHttpStatusCode, BHttpStatusClass and Redirects
The user of the API can set whether redirects should be followed, and if so,
how many. This is part of the BHttpRequest API. The BHttpSession then follows
those instructions, and executes the maximum number of redirects the user
would like to follow.

As part of this commit, the BHttpStatusClass and BHttpStatusCodes helper enums
have been added, to give a friendlier access to HTTP status codes and status
classes.

Change-Id: Ic8c9e3fda158e2cce549c8f1d360951f7ac83311
2022-04-23 18:30:38 +01:00
PulkoMandy
d0c94afe0c docs/develop: fix incorrect title level 2022-04-23 13:59:49 +02:00
David Karoly
ba0c49863a docs/arm: add info on Raspberry Pi 4
Change-Id: Ic8cc47394c9e49f05e30b5ba54ff70557b1e2c47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5237
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-23 09:18:03 +00:00
David Karoly
097f72e92c docs/arm: update info for Raspberry Pi 2
Change-Id: I968752c3eae56bee099f3cec5db7856dbe007592
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5232
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-22 10:50:59 +00:00
David Karoly
be7333a8d7 docs/arm: add info on Raspberry Pi 3
Change-Id: Iee7bd2f99dfc11930a97683c2cf30c51110d6726
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5229
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-22 10:00:39 +00:00
David Karoly
2ba1112f62 docs/arm: remove TODO item for KDL hangman
It seems to be already implemented.

Welcome to Kernel Debugging Land...
Thread 14 "main2" running on CPU 0
frame            caller     <image>:function + offset
 0 801bc898 (+2145662824) 801b9734   <kernel_arm>  (nearest) + 0x00
kdebug> kdlhangman
word> ____
hangman> e
word> ___e
hangman> t
  ____
  |   |
  |   O
  |
  |
  |
word>

Change-Id: I40aa484a69a76482ddd8508d493b6c52c11558fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5228
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-04-22 09:46:30 +00:00
PulkoMandy
b5ab38ecf0 Add some docs about our compilers and patches done to them.
Change-Id: I60e0960499aec789ae6240eec949249adb2e35ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5224
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-04-21 17:53:48 +00:00
Niels Sascha Reedijk
59c359e5a9 NetServices: implement support for HEAD requests and 204 responses.
These particular responses will not have a body. This is now handled by the
BHttpSession object. There is also a minor fix in here that prevents a crash
when multiple requests are handled by the DataThread at the same time, and not
all of the requests have events.

Change-Id: I7f47d8b3cd8491c8193275be4b3fc1080780fa20
2022-04-18 14:34:46 +01:00
Niels Sascha Reedijk
8ccf8fb44d NetServices: Rewrite BHttpFields to use raw strings as underlying data storage
This change also drops the principle that fields with the same keys would be
grouped together. This was initially inspired by Boost::Beast, but it means a
lot of extra copying of data when adding/organizing the list, as well as
inefficient querying on each add. Now that the design choice is to fully go
for the raw string as underlying data storage, that choice is not necessary.
In the future it may be able to emulate the grouping or retrieving of lists
of values in the API, rather than as a fundamental principle of the data
storage.

Change-Id: I2667cfa38eb3b7b75393ee71fb038231a40b4193
2022-04-10 09:05:24 +01:00
Niels Sascha Reedijk
02ea57d7f9 NetServices: Introduce BHttpRequestStream and abstract interface.
This supports asynchronous transfers of Http Requests to a network
interface.

Change-Id: I845fb2e08160d219f85b7a08d2d8872ac7359b47
2022-04-03 12:17:05 +01:00
Niels Sascha Reedijk
d9a4c6070c NetServices: Serialize the header of a BHttpRequest to a string
Change-Id: Ib1e22536a0b39dc6e9461e7993ea6784f1ea0e2f
2022-03-30 07:38:57 +01:00
Niels Sascha Reedijk
3b172a3dc6 NetServices: implement hostname resolution and connection for BHttpRequest
BHttpSession::Execute() moves the request into the session, and returns a future BHttpResponse
object. Currently implemented are resolving the hostname, and opening the connection.

There is some scaffolding for the actual data transfer.

Change-Id: I5a8a7a7f8680036b91cdba4beee140bbed6bfd5a
2022-03-24 06:13:38 +00:00
Adrien Destugues
7b7cc2944b Allwinner A10 docs: fix broken link
Change-Id: I40d3bebd2f70def0a4074f2bec74c574f44d46cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5101
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-03-14 21:35:41 +00:00
Niels Sascha Reedijk
3b2aa6c31b NetServices: Add the BNetworkRequestError type
This is a generic error type that can be used by multiple protocols to describe errors that can
occur while processing a request. The error type supports adding an additional error code in cases
where there is an underlying system error.

The type will be used to describe errors that occur while processing requests by BHttpSession, and
it is generally going to be thrown by the receiving BHttpResult.

Change-Id: I76c0bbaedd38df8cfb79159c4beae2fbf1350aab
2022-03-07 07:59:03 +00:00
Niels Sascha Reedijk
1baacbfebf NetServices: Initial implementation of BHttpResult
Incomplete class, but will provide the basis to start working on the internals of the BHttpSession.

Change-Id: I3ca14b7bd823fc1b4a5a32f5784592d214c4e9a7
2022-03-05 14:56:57 +00:00
Niels Sascha Reedijk
6ce6e96470 NetServices: Introduce BHttpRequest class
Objects of this class describe a HTTP request. It contains several convenience
functions that will allow a user to describe the properties of the request.
More options to be added later.

Change-Id: If6a00d26808c5ed4b121cb36dc75a2a1cc449f95
2022-02-25 08:41:14 +00:00
Niels Sascha Reedijk
ec865cb87e NetServices: Add BHttpMethod that represents a HTTP method
This class provides defaults and performs basic validation for HTTP Methods as
defined by the standard. They will be used in conjunction with a future
BHttpRequest class.

Change-Id: If69a7ec186d9d1165e8efe5ab5df50d5a089208d
2022-02-20 15:34:55 +00:00
Niels Sascha Reedijk
a8003a7030 NetServices: Introduce BHttpFields to query and manipulate fields in HTTP messages
HTTP messages (requests and responses) have a header section that can contain
HTTP headers. These headers consist of name, value pairs. This class can be
used to query the headers on a response, and build a list of headers for a
request.

The internal implementation is designed around two different methods of storing
the underlying data. For HTTP requests, the name, value pairs are stored as
owned BString objects. For responses, the assumption is that there is a byte
buffer that contains the data and that has the same lifetime as the BHttpFields
object. The name, value pairs will then be stored as std::string_view to the
underlying buffer.

Still to do is:
 - The method to convert a BHttpFields list into a string buffer to transmit.
 - The method to parse a string buffer and turn it into a BHttpFields object.

Change-Id: I4819db100aa1671aa7403675216a4c85fd221da7
2022-02-20 13:10:19 +00:00
David Karoly
8d743ebd60 docs/arm: remove TODO item for bootloader memory map handling
Change-Id: Iabcada696eb87500dbcdb03cf742607e0e525707
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4892
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-01-27 20:25:22 +00:00
David Karoly
f06c2e7f5c docs/arm: remove TODO item for early page tables
Page directory and early page tables are allocated using
platform_allocate_region() and they don't need to be identity mapped
since commits 9103470bd and a7c69a4b1.

Change-Id: Ia7fcf1dd2fa34262e013f651139ad252a1ac9113
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4886
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-01-27 02:01:41 +00:00
David Karoly
dc3e1761e6 docs/arm: remove TODO item for serial port mapping
UART is mapped to kernel virtual address range since commit f5f10a9ec
so it does not overlap with user address range any more.

Change-Id: If8e18904fcddcbef1ccdc91e526d0e581f61e085
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4856
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-01-12 12:21:11 +00:00
Kacper Kasper
7323d0a21d Minor documentation fixes
* Remove duplicated Interface Kit description.
* Fixed links, a typo, inconsistent page names.

Change-Id: I38e5943f31bf30870d33f02a97b4ef899222ec36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4854
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-01-11 12:22:17 +00:00
Niels Sascha Reedijk
268f99dd7d Merge branch 'master' into dev/netservices 2021-12-22 20:46:13 +00:00
Niels Sascha Reedijk
34522da9e3 netservices: add BHttpHeader class and BHttpHeaderMap skeleton
Change-Id: I36a7c757a6909604d749355ecb1a9d42d05d7306
2021-12-17 17:40:15 +00:00
Niels Sascha Reedijk
1715bb67ea netservices: Flesh out BHttpSession::Impl data and control structures
Change-Id: I4230570ea8339b12d855f7de7fa72e4664013e2d
2021-12-17 17:40:15 +00:00
Niels Sascha Reedijk
ec7d71e612 NetServices: Add skeleton BHttpSession class and its documentation
Change-Id: Ia8a35588422908f6fe9b839ce239fb478baf298b
2021-12-17 17:40:15 +00:00
Niels Sascha Reedijk
f54a5a68d7 HaikuBook: Prepare for newer Network Services Kit docs
Change-Id: Ib2cc458f9121cb78250a643affc0933512e65bc8
2021-12-17 16:25:44 +00:00
Niels Sascha Reedijk
bcd6a663c2 BString: make move constructor and assignment noexcept
Change-Id: I87f5ecad22f46b59386a091a1bb502536f460315
2021-12-17 16:25:44 +00:00
Humdinger
1621d71af8 Fix typo in API docs (BBitmap)
Found by Scottmc.

Change-Id: Idd10040d798533a0aa731132f7282e7ce1423ed6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4687
Reviewed-by: humdinger <humdingerb@gmail.com>
2021-11-04 16:15:34 +00:00
Andrew Lindesay
0d4fa3e526 HaikuDepot: Show Publish Date
Add a column to the table to show the publish
date.  Also add text on the featured packages
view to show the publish date.  Supports
sorting.

Fixes #13006

Change-Id: I19d9bc5bf7f44b5673c2ade5d00de8fdadbe1b06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4649
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-10-27 05:27:53 +00:00
PulkoMandy
d1ecc0955f sparc docs: write down some more useful things
These are better here than in my bash history...

Change-Id: Iab8940f4efed950e26a8bad29cb8954464270e8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4645
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-22 20:23:01 +00:00
Adrien Destugues
f122405db8 Add some documentation about interface kit coordinate spaces
I hope this clears some of the confusion about it.
2021-10-09 21:10:26 +02:00
Niels Sascha Reedijk
0b86520c4d BString: add support for move semantics with C++11 and up.
This implements the "rule of 5" for this type. While the copy operation for
BString was already using shallow copies of the underlying data, this change
further optimizes moving the data from one object to another.

While it is not the intention to implement move semantics to all types in the
legacy Haiku/Be kits, data types like BString are good candidates, because move
operations are often useful when working with data within an application.

In this implementation, the internal data of the string object will be set to
NULL, thus leaving an empty string.

Change-Id: I16bf9424f9b17f622b0b57659b80628e18760288
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4428
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-08 07:07:36 +00:00
Adrien Destugues
a5061ecec5 Generate developer docs with Sphinx
An effort was started some time ago to consolidate all internal
documentation in the git tree. However, this was just an accumulation of
files in various formats without any strucutre or way to browse it,
which results in no one even knowing that we have docs here.

This converts most of the files to restructuredtext and uses Sphinx to
generate an HTML browsable user manual (with a table of content and a
first attempt to put things in a global hierarchy).

There are almost no changes to the documentation content in this commit
(some obviously obsolete things were removed). The plan is to get the
toolchain up and running to make these docs easily available, and only
then see about improving the content. We can migrate some things off the
wiki and website, and rework the table of contents to have some more
hierarchy levels because currently it's a bit messy.

Change-Id: I924ac9dc6e753887ab56f18a09bdb0a1e1793bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4370
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2021-08-27 11:41:17 +00:00
Leorize
42819a8b49 docs/user/net: add BUrlRequest documentation
Change-Id: I88bff3c452ed9e2025c7d258167ced14919c4e9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2984
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-07-25 11:52:21 +00:00
Leorize
9b692462b3 docs/user/net: add BUrlResult documentation
Change-Id: I94d7c258da60b2fa7add446dfc37aba0a14f6241
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2983
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-07-25 11:52:21 +00:00
Leorize
937388cdd8 docs/user/net: add BUrlProtocolDispatchingListener documentation
Change-Id: I8515f6d5feab3399f3b0357b78e7e791cdf6df25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2982
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-07-25 11:52:21 +00:00
Niels Sascha Reedijk
c18f9eb4ea User documentation: synchronize userguide from the userguide translator
Change-Id: I9b30ae27658a40b85c67a4c30aaea2b4bf9507f9
2021-07-21 12:54:38 +01:00
Niels Sascha Reedijk
510780798f User documentation: synchronize welcome docs from the userguide translator
Change-Id: I2a2b01d87c35f22f688d51740812a28acf51e11d
2021-07-21 12:54:19 +01:00
Adrien Destugues
e5fb17f0ca BCountry: add a GetPreferredLanguage method.
The APIs for this were introduced in ICU 63, so we'll need an update.
ICU 63 does not build with gcc2, so this method is disabled there.

Change-Id: Iabe49509ed6d4e578560d497d3ca336a97db4625
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1874
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-07-21 07:20:39 +00:00
John Scipione
830db1095f TextView docs: Add class overview
Change-Id: I4123822548f606812915211cd080c099b7413ef8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4045
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-06-06 12:44:28 +00:00
Niels Sascha Reedijk
dc31a541e0 HaikuBook: Add missing members to BWindow
BWindow: :MoveToScreen() and related enum flags
BWindow: :ResizeToPreferred()
BWindow: :Close()
Change-Id: I589f7c10753de232a09bdd3ed12b5dc42d5f12ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3885
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-04-24 10:44:10 +00:00
CodeforEvolution
123406799f input_server: Properly implement watch_input_devices() & add documentation
Allow for multiple programs to watch for changes in the state
of input devices connected to the system. Previously only one program
at a time could watch input devices. While this functionality was not
implemented in BeOS R5, it was at least documented in the BeBook.

Also added some API documentation where necessary for the function
and related constants.

Change-Id: Icd927998cffcab212bb63bcf10c64c620e9da9a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3872
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-04-19 19:48:29 +00:00
Niels Sascha Reedijk
82cd6aad15 HaikuBook: add missing object from AffineTransform.h
Change-Id: I3a3098db4a35b8fe12e763dd3a7e1e5fa9cafc69
2021-04-19 07:11:34 +01:00
Niels Sascha Reedijk
4497337b22 HaikuBook: unichar was removed in hrev54953
Change-Id: Ib5faf5b0e0d6c46bf6eb49a941c9fa4e0ef6b47d
2021-04-19 07:02:08 +01:00
Niels Sascha Reedijk
2aad295eb2 HaikuBook: escape the # character as it implies a link request
Change-Id: I9100d74fb3af9298b3386bea02c4a5818c45296b
2021-04-19 07:00:42 +01:00
Niels Sascha Reedijk
f125de8cc8 HaikuBook: Add internal skeletons for BGradient* classes
Change-Id: I9b75084550dc510692122994a102ccd9923ed987
2021-04-19 06:56:16 +01:00
Adrien Destugues
38e5e3401b repository build readme: add a missing dependency to instructions 2021-04-15 22:47:51 +02:00
Alexander von Gluck IV
37bebb702a docs: Update build-repository documentation
Change-Id: I4566c6e93dca4701eda19ba512e20b0f224956e7
2021-04-15 15:06:10 -05:00
Alexander G. M. Smith
3376ed1a72 Package Kit: Proper Installation for First Boot Packages
Do the final installation operations for all the packages in the
/system/packages directory when the OS is booted for the first time.

This will run their post-install scripts, create users, groups and generate
settings files (marked with a package version attribute).  Previously we just
ran all the shell scripts found in the /system/boot/post-install directory
(don't do that as much now).

Fixes bug #14382

This patch has simpler code flow in CommitTransactionHandler::_ApplyChanges
Tested on 32 and 64 bit systems.  Once it's official, need to remove the
open_ssh redundant post-install script that creates users etc. from HaikuPorts.
Now we can notice bugs like package version attributes on settings files aren't
fully working. :-)

Didn't remove special case for add_catalog_entry_attributes.sh since it
still does stuff that the build system doesn't do.  Might be able to add
that script as part of the Haiku.hpkg.  See change 3751 for removing it,
https://review.haiku-os.org/c/haiku/+/3751

Change-Id: I3807b78042fdb70e5a79eca2e2a45816ece0236f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2342
Reviewed-by: Alexander G. M. Smith <agmsmith@ncf.ca>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-03-14 09:10:18 +00:00
Leorize
78b1442051 libbnetapi: BUrlRequest now outputs to BDataIO
Previously, BUrlRequest returns data received via a callback that can't
return any value. This approach have several issues:

- It's not possible to signify failures to the request.
- Users have to implement custom listeners just to handle the common
  case of outputting to a buffer/file/etc.
- The received data has to be serialized into BMessage when
  BUrlProtocolDispatchingListener is employed. This can cause a
  noticible slowdown in real-world scenarios as evident by #10748.

With this change, BUrlRequest will output directly into a BDataIO, which
exposes a richer API for request handlers to work with (for example a
BitTorrent client can request a BPositionIO for non-linear data
delivery), as well as simplifying common cases for users.

The adaptation only requires one additional API:
BHttpRequest::SetStopOnError(). This API simply instructs the HTTP
request handler to cancel the request if an HTTP error is occurred.

Change-Id: I4160884d77bff0e7678e0a623e2587987704443a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3084
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
Leorize
3e27f8d5a7 libbnetservices: BUrlResult is no longer a BArchivable
The switch to make BUrlResult serializable was debuted in
f9e1854f19 with the rationale is that
BHttpRequest auto-redirection might cause the headers to become
obsolete by the time a client process the BMessage received from
BUrlProtocolDispatchingListener.

With the change to BHttpRequest to not notify listeners when
auto-redirection is enabled, this is no longer the case and the
serialization code can go away now. This simplifies BUrlResult and its
subclasses, and gain us some performance for clients using
BUrlProtocolDispatchingListener as the result object no longer has to be
serialized.

This also change the ABI of BUrlProtocolListener::HeadersReceived to no
longer passing a BUrlResult.

Additionally, BUrlResult and BHttpResult now express the size of the content
as an off_t, thus allowing results larger than 4 GB.

Change-Id: I9dd29a8b26fdd9aa8e5bbad8d1728084f136312d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3082
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-02-28 20:39:31 +00:00
Niels Sascha Reedijk
094b8dcf70 HaikuBook: housekeeping of the netservices documentation
Change-Id: I6f9444665e061047bfb024ac0274b69fa1396912
2021-01-29 09:56:28 +00:00
Adrien Destugues
4dcdff4fe3 Update "boot process specs" documentation
Quite a lot has happened since this was initially written.

Change-Id: Iad68ea821733ab7489d2f9713857d2752b80356d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3674
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-27 19:51:07 +00:00
Adrien Destugues
cef80a1fb7 devfs: translate partition offsets in B_TRIM_DEVICE
Fixes bfs part of #10336. Untested on SATA (don't have a testing drive
to sacrifice) but working fine on SD/MMC.

This requires moving the copy from kernel to userland into the devfs. As
a result the code in the disk drivers becomes a bit simpler.

Also add some documentation for the common ioctls to implement for a
disk device.

Change-Id: Ie84b6a1d293828d33902a64b3c9d4b19aa6eacb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3640
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-23 12:20:59 +00:00
Adrien Destugues
0e061f0903 FindDirectory docs: clarify where the functions are located
Only the C++ interface is in libbe. The C functions as well as the new
find_path functions are all in libroot.

Fixes #16749
2021-01-13 12:57:00 +01:00
Adrien Destugues
b9e03b90a5 sd/mmc: Update the documentation to reflect the current state 2021-01-06 20:06:17 +01:00