Commit graph

388 commits

Author SHA1 Message Date
Andreas Kling
5043c4a3e5 LibCore+WebServer+LibWeb: Make MIME type guesser take a StringView
This reverts my previous commit in WebServer and fixes the whole issue
in a much better way. Instead of having the MIME type guesser take a
URL (which we don't actually have in the WebServer at that point),
just take a path as a StringView.

Also, make use of the case-insensitive StringView::ends_with() :^)
2020-10-21 21:16:20 +02:00
asynts
c9ca897a45 LibCore: Use new format functions in some places. 2020-10-17 23:20:31 +02:00
asynts
56cf272ed5 LibCore: Add formatter for Object. 2020-10-17 23:20:31 +02:00
Nico Weber
4153a99ae1 LibCore: Make Object::m_all_objects_list_node private 2020-10-17 23:19:14 +02:00
Itamar
fec4152220 LibCore: Add ensure_parent_directories to LibCore::File
Moved the implementation in SystemServer/Service.cpp to LibCore.
2020-09-30 21:46:59 +02:00
Andreas Kling
62785b7872 LibCore: Expose origin timestamp of Core::ElapsedTime 2020-09-29 18:22:53 +02:00
Andreas Kling
f88a7cd4e1 LibCore: Make TCPServer::listen() report failure instead of asserting 2020-09-28 22:14:23 +02:00
Ben Wiederhake
ede5dbd7b3 Meta+LibC through LibHTTP: Make clang-format-10 clean
Why break at LibHTTP? Because "Meta+Libraries" would be insanely large,
and breaking between LibHTTP and LibJS makes the commits roughly evenly large.
2020-09-25 21:18:17 +02:00
Peter Elliott
3d34724d37 LibCore: Add Core::Account for login management.
Core::Account abstracts login semantics like password checking and
switching uid/gid.
2020-09-21 20:18:05 +02:00
asynts
a9f7b576a4 LibCore: Add missing .characters() for String::format. 2020-09-16 20:52:30 +02:00
asynts
3283f5bb5d LibCore: Add find_executable_in_path. 2020-09-16 19:39:17 +02:00
Tom
d67553e128 LibCore: Add Notifier::close
If a file descriptor is being closed, we need to permanently disable
any Notifier and remove it from the event loop. This method removes
the notifier and disables it so that the EventLoop does not use a
invalid file descriptor.
2020-09-16 17:50:43 +02:00
Andreas Kling
e2f32b8f9d LibCore: Make Core::Object properties more dynamic
Instead of everyone overriding save_to() and set_property() and doing
a pretty asymmetric job of implementing the various properties, let's
add a bit of structure here.

Object properties are now represented by a Core::Property. Properties
are registered with a getter and setter (optional) in constructors.
I've added some convenience macros for creating and registering
properties, but this does still feel a bit bulky. We'll have to
iterate on this and see where it goes.
2020-09-15 21:46:26 +02:00
Itamar
7b66469ab3 LibCore: Add command() utility functions
Add utility functions for executing commands and getting their output.
2020-09-15 21:43:29 +02:00
asynts
96edcbc27c AK: Lower the requirements for InputStream::eof and rename it.
Consider the following snippet:

    void foo(InputStream& stream) {
        if(!stream.eof()) {
            u8 byte;
            stream >> byte;
        }
    }

There is a very subtle bug in this snippet, for some input streams eof()
might return false even if no more data can be read. In this case an
error flag would be set on the stream.

Until now I've always ensured that this is not the case, but this made
the implementation of eof() unnecessarily complicated.
InputFileStream::eof had to keep a ByteBuffer around just to make this
possible. That meant a ton of unnecessary copies just to get a reliable
eof().

In most cases it isn't actually necessary to have a reliable eof()
implementation.

In most other cases a reliable eof() is avaliable anyways because in
some cases like InputMemoryStream it is very easy to implement.
2020-09-14 20:58:12 +02:00
Andreas Kling
aa3c28957a LibCore: Include object names in Object::dump_tree() output 2020-09-14 16:16:36 +02:00
pkotzbach
072e94caa2
LibCore: Fixed DeferredInvoke debug message (#3456) 2020-09-11 18:41:50 +02:00
AnotherTest
c3dbe77024 LibCore: Add 'notify_forked()' to tear down the eventloop in forked child
This makes the forked process capable of constructing a new event loop,
should it choose to.
2020-09-09 20:35:21 +02:00
Simon Danner
05be6481b7 LibWeb: make it possible to directly load .svg files
Make LibWeb load svg files by guessing the svg mime type from the file
extension and parsing it with the HTML parser.
2020-09-08 13:57:18 +02:00
Andreas Kling
6d8c4af9c2 LibCore+top: Use pid_t for pgid/pgrp/sid numbers 2020-09-06 19:04:47 +02:00
Andreas Kling
35b844ba4c LibCore: Add Core::IODevice::truncate()
This is just a wrapper around ftruncate(). Today I also learned that
ftruncate() does not reset the file descriptor offset. :^)
2020-09-06 16:09:26 +02:00
asynts
6de63782c7 Streams: Consistent behaviour when reading from stream with error.
The streaming operator doesn't short-circuit, consider the following
snippet:

    void foo(InputStream& stream) {
        int a, b;
        stream >> a >> b;
    }

If the first read fails, the second is called regardless. It should be
well defined what happens in this case: nothing.
2020-09-06 12:54:45 +02:00
asynts
b9a6c07bb7 LibCore: FileStream.h: Fix infinite loop when trying to read past end-of-file. 2020-09-06 12:54:45 +02:00
asynts
612c1bc84d Userland: Use Buffered<T> in gunzip. 2020-09-06 12:54:45 +02:00
asynts
9ce4475907 Streams: Distinguish recoverable and fatal errors. 2020-09-01 17:25:26 +02:00
Sergey Bugaev
852454746e Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
Nico Weber
9ad5a261f7 LibCore: Let DateTime::create()/set_time() take summer time into account
DateTime::create() takes a date/time in local time, but it set
tm_isdst to 0, which meant it was in local winter time always.
Set tm_isdst to -1 so that times during summer time are treated
in summer time, and times in winter time are treated as winter
time (when appropriate). When the time is adjusted backward by
one hour, the same time can be in winter time or summer time,
so this isn't 100% reliable, but for most of the year it should
work fine.

Since LibJS uses DateTime, this means that the Date tuple
ctor (which creates a timestamp from year/month/day/hours/etc
in local time) and getTime() should now have consistent (and
correct) output, which should fix #3327.

In Serenity itself, dst handling (and timezones) are unimplemented
and this doens't have any effect yet, but in Lagom this has an effect.
2020-08-30 16:56:47 +02:00
asynts
9664453739 LibCore: Add InputFileStream and OutputFileStream. 2020-08-30 09:56:10 +02:00
Ben Wiederhake
9f7ec33180 Meta: Force semi-colon after MAKE_AK_NONXXXABLE()
Before, we had about these occurrence counts:
COPY: 13 without, 33 with
MOVE: 12 without, 28 with

Clearly, 'with' was the preferred way. However, this introduced double-semicolons
all over the place, and caused some warnings to trigger.

This patch *forces* the usage of a semi-colon when calling the macro,
by removing the semi-colon within the macro. (And thus also gets rid
of the double-semicolon.)
2020-08-27 10:12:04 +02:00
Ben Wiederhake
6454969d6b LibCore: Remove data pointer from CustomEvent
It wasn't used anywhere.

Also, if it were used, then it should have been marked AK_NONCOPYABLE().
Or even more cleanly, it should use a RefPtr<> or OwnPtr<> instead of
a 'naked' pointer. And because I didn't want to impose any such decision
on a possible future use case that we don't even know, I just removed
that unused feature.
2020-08-27 10:12:04 +02:00
Nico Weber
1ab8939077 AK+LibC+LibCore: Have fewer implementations of day_of_week
The implementation in LibC did a timestamp->day-of-week conversion
which looks like a valuable thing to have. But we only need it in
time_to_tm, where we already computed year/month/day -- so let's
consolidate on the day_of_week function in DateTime (which is
getting extracted to AK).
2020-08-26 08:52:07 +02:00
Nico Weber
2236385e1f AK+LibC+LibCore: Add a days_in_year function 2020-08-26 08:52:07 +02:00
Nico Weber
a7a18b478e AK+LibC+LibCore: Have fewer implementations of days_in_month 2020-08-26 08:52:07 +02:00
Nico Weber
dcb81fc199 LibCore: Use is_leap_year more in DateTime 2020-08-26 08:52:07 +02:00
Nico Weber
c85e679e2d AK+LibCore+Kernel: Have fewer implementations of day_of_year
The JS tests pointed out that the implementation in DateTime
had an off-by-one in the month when doing the leap year check,
so this change fixes that bug.
2020-08-26 08:52:07 +02:00
Nico Weber
84ed257959 AK+LibC+LibCore+Kernel: Have fewer implementations of is_leap_year 2020-08-26 08:52:07 +02:00
Nico Weber
5b9d43767c LibCore: Make DateTime::create() and set_time() handle out-of-range values
Set member variables after calling mktime(), which canonicalizes
out-of-range values.

With this, DateTime::create(2020, 13, ...) will return a DateTime
on Jan 2021 (assuming the other parameters are in range).
2020-08-24 18:20:07 +02:00
Nico Weber
593b0b9fcc LibCore: Less code duplication in DateTime
DateTime::create() an just call DateTime::set_time().

No behavior change.
2020-08-24 18:20:07 +02:00
Ben Wiederhake
e682967d7e LibCore: Prefer strlcpy over strncpy, fix overflow
A malicious caller can create a SocketAddress for a local unix socket with an
over-long name that does not fit into struct sock_addr_un.
- Socket::connet: This caused the 'sun_path' field to
  overflow, probably overwriting the return pointer of the call frame, and thus
  crashing the process (in the best case).
- SocketAddress::to_sockaddr_un: This triggered a RELEASE_ASSERT, and thus
  crashing the process.

Both have been fixed to return a nice error code instead of crashing.
2020-08-24 00:45:03 +02:00
thankyouverycool
918f2c592d LibCore: Fix spelling for month of "August" 2020-08-22 11:54:30 +02:00
Peter Elliott
f69b419c05 LibCore: Add File::{stdin, stdout, stderr}()
This should make it easier to get a Core::File for standard streams.
2020-08-21 12:26:30 +02:00
Nico Weber
221b412210 LibCore: Make DateTime::create() not fill in tm_wday and tm_yday for calling mktime() 2020-08-21 12:11:48 +02:00
Nico Weber
45827cace9 LibCore: Comment that DateTime is in local time.
The timestamp is always in UTC, but hours/minutes are in local time.
2020-08-20 20:53:43 +02:00
AnotherTest
afbeb8f977 LibCore: Add ConfigFile::get_for_lib() 2020-08-18 12:07:32 +02:00
Brian Gianforcaro
6fa76ed2e3 LibCore: Fix unitialized struct member in to_address_in, found by Coverity 2020-08-17 09:17:57 +02:00
Diego Iastrubni
64c15798e7 LibCore: Add support for double on argparse
Code is pretty trivial. If someone needs "float" support, a copy-paste
will be in place.

Build system was confused between math.h from rootfs, and toolchain. I
fixed the problem caused by `math.h` by locally using the builtin
`isnan()` from the compiler. It's ugly - but works. I am looking for
other alternatives.
2020-08-12 13:57:06 +02:00
Muhammad Zahalqa
de5e542930 LibCore: remove redundant UDPSocket constructor
The comment claims it is for use from UDPServer::accept
Which is not a real function.
2020-08-10 20:03:18 +02:00
Muhammad Zahalqa
eb77568d8c LibCore: update m_bound on socket bind 2020-08-10 20:03:18 +02:00
Ben Wiederhake
bee08a4b9f Kernel: More PID/TID typing 2020-08-10 11:51:45 +02:00
Muhammad Zahalqa
043d548b39 LibCore: fix UDP Server receive to trim buffer to actuall bytes receiveed 2020-08-09 21:10:01 +02:00
Muhammad Zahalqa
d9470bdae7 LibCore: close socket on LocalServer dtor 2020-08-09 21:10:01 +02:00
Muhammad Zahalqa
9150f3c266 LibCore: close socket on TCPServer dtor 2020-08-09 21:10:01 +02:00
Muhammad Zahalqa
0246e2ae6c LibCore: close socket on UDPServer dtor 2020-08-09 21:10:01 +02:00
Andreas Kling
bc615572a9 LibCore+Base: Move user-specific config files to $HOME/.config 2020-08-05 17:40:47 +02:00
Brian Gianforcaro
64ba289cfb LibCore: ConfFile::read_entry should not sneakily write default entries
I noticed on boot, WindowServer was getting an veil error:

    [WindowServer(13:13)]: Rejecting path '/res/themes/Default.ini' since it hasn't been unveiled with 'c' permission.
    [WindowServer(13:13)]: 0xc014367f  _ZN6Kernel3VFS34validate_path_against_process_veilEN2AK10StringViewEi +681
    [WindowServer(13:13)]: 0xc01439d7  _ZN6Kernel3VFS12resolve_pathEN2AK10StringViewERNS_7CustodyEPNS1_6RefPtrIS3_EEii +163
    [WindowServer(13:13)]: 0xc0143d03  _ZN6Kernel3VFS4openEN2AK10StringViewEitRNS_7CustodyENS1_8OptionalINS_9UidAndGidEEE +121
    [WindowServer(13:13)]: 0xc016fbc4  _ZN6Kernel7Process8sys$openEPKNS_7Syscall14SC_open_paramsE +854
    [WindowServer(13:13)]: 0xc0164af8  syscall_handler +1320
    [WindowServer(13:13)]: 0xc0164541  syscall_asm_entry +49
    [WindowServer(13:13)]: 0x08097ca0  open_with_path_length +24
    [WindowServer(13:13)]: 0x08097cf8  open +63
    [WindowServer(13:13)]: 0x080a3c59  fopen +31
    [WindowServer(13:13)]: 0x0806abf0  _ZN4Core10ConfigFile4syncEv +48
    [WindowServer(13:13)]: 0x0806af6a  _ZN4Core10ConfigFileD2Ev +16
    [WindowServer(13:13)]: 0x08093e2a  _ZN3Gfx17load_system_themeERKN2AK6StringE +1869
    [WindowServer(13:13)]: 0x08048633  main +491
    [WindowServer(13:13)]: 0x08048dae  _start +94

With some digging I found out that the ConfigFile class was causing
trying to flush writes of default values, not present in the .ini
file back to disk on destruction of the object.

This sneaky behavior from ConfigFile seems to violate the public facing
semantics of the function (it's const). It also makes it very hard to reason
about the system with technologies like unveil where we are trying to
explicitly state what is exposed to apps, how those exposed items can be
used.

The functionality also doesn't seem to be all that useful, as we'll just
return the default value from the API's anyway.

This change removes the write back of default values.
2020-08-02 21:11:28 +02:00
Andreas Kling
5e2b8d160b LibCore: Rename puff.c => puff.cpp
Now that we don't keep a C compiler around in the toolchain (to save
space) we can't have .c files in the build.

This reminds me that #362 exists and we should fix that at some point.
2020-07-29 14:41:57 +02:00
Peter Elliott
1211a036ba LibCore: add get_password().
A serenity-style getpass that is thread-safe
2020-07-28 17:07:22 +02:00
asynts
21de20825a LibCore: Change the signature of Socket::send() to use Span. 2020-07-27 19:58:09 +02:00
Andreas Kling
78518d230c LibCore+LibWeb: Move guess-mimetype-based-on-filename logic to LibCore
This could be useful in more places.
2020-07-27 19:57:20 +02:00
Andreas Kling
e0b8b4ac67 LibCore+LibGUI: Switch to using AK::is and AK::downcast 2020-07-26 17:51:00 +02:00
Andreas Kling
6d27915f4b LibCore: Turns some heap-allocated events into stack-allocated ones 2020-07-16 20:46:44 +02:00
Tom
6751d03ea7 LibCore: Add register_signal and unregister_signal to EventLoop
This allows safer asynchronous handling of signals. Signals are
dispatched with highest priority.
2020-07-09 21:58:07 +02:00
Andreas Kling
41066b009f LibCore: Don't fire Socket::on_ready_to_read if !can_read()
This is a bit of a pickle and I'm unsure what's the best behavior here.

Since notifiers fire asynchronously via the event loop, we may end up
firing a notifier for a socket fd, but then reading/writing that socket
fd before ending up in the notifier callback.

In that situation, the socket is no longer in the same state as it was
when the event loop generated the notifier event.

This patch stops Socket from firing one hook in this situation but this
probably needs a global rethink.

With this change, Browser starts reliably in multi-process mode. :^)
2020-07-06 23:17:10 +02:00
Andreas Kling
e5933ec739 LibCore: Only deliver Read/Write events to listening notifiers
If a notifier has disabled read/write notifications via its event mask,
we should not spam it with events, even if they have a hook callback.
2020-07-06 23:17:10 +02:00
AnotherTest
6f7ac5d2e2 LibCore: Stop select()'ing after an interrupt if a quit was requested
This allows signal handlers to request the loop to terminate.
2020-07-05 15:43:14 +02:00
Andreas Kling
11c4a28660 Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Tom
d99901660d Kernel/LibCore: Expose processor id where a thread last ran 2020-07-01 12:07:01 +02:00
Andreas Kling
b191f24f05 LibCore: Remove some debug spam in Local{Server,Socket} 2020-06-22 21:21:38 +02:00
Andreas Kling
32dfde746a LibCore: Put safe_syscall() debug spam behind #ifdef 2020-06-22 21:19:10 +02:00
Andreas Kling
6bc40b20b8 LibCore: Add API for taking over an accepted socket from SystemServer
Core::LocalSocket::take_over_accepted_socket_from_system_server() now
allows you to construct a Core::LocalSocket for a pre-accepted socket
when using SystemServer's new AcceptSocketConnections mode.
2020-06-21 21:54:30 +02:00
Sergey Bugaev
d89843f96f LibCore: Add File::read_link() :^)
This is a convenient wrapper around readlink() that hides away the details
of buffers and buffer sizes, and simply returns a String. The best part is it
doesn't rely on PATH_MAX :D

It comes in two versions, for Serenity, where we can pass non-null-terminated
strings to syscalls, and where sys$readlink() returns the total link size, and
for other systems, where we have to copy out the string, and always have to do
two syscalls.
2020-06-17 15:02:03 +02:00
Matthew Olsson
e8e728454c AK: JsonParser improvements
- Parsing invalid JSON no longer asserts
    Instead of asserting when coming across malformed JSON,
    JsonParser::parse now returns an Optional<JsonValue>.
- Disallow trailing commas in JSON objects and arrays
- No longer parse 'undefined', as that is a purely JS thing
- No longer allow non-whitespace after anything consumed by the initial
  parse() call. Examples of things that were valid and no longer are:
    - undefineddfz
    - {"foo": 1}abcd
    - [1,2,3]4
- JsonObject.for_each_member now iterates in original insertion order
2020-06-13 12:43:22 +02:00
Andreas Kling
d54ace5f04 LibCore: Add Core::File::real_path_for()
A slightly convenient wrapper around realpath(3).
2020-06-12 21:29:01 +02:00
Andreas Kling
fdfda6dec2 AK: Make string-to-number conversion helpers return Optional
Get rid of the weird old signature:

- int StringType::to_int(bool& ok) const

And replace it with sensible new signature:

- Optional<int> StringType::to_int() const
2020-06-12 21:28:55 +02:00
Andreas Kling
940fbea3a7 LibCore: Fix typo in Forward.h 2020-06-11 22:44:54 +02:00
Andreas Kling
7bb4f3764c LibCore: Add Timer::restart() convenience API
This simply restarts the timer with the existing millisecond interval.
2020-06-11 22:35:37 +02:00
Sergey Bugaev
89004a3a40 LibCore: Make sure to disable notifiers when closing a socket
RefPtr<Notifier> doesn't work quite like it appears to, since the notifier
is also a "child" of the socket, in Core::Object sense. Thus we have to both
remove it from the parent (socket) and drop the additional RefPtr<Notifier> for
it to actually go away.

A proper fix for this would be to untangle parent-child relashionship from
refcounting and inspectability.

This fixes use-after-close of client file descriptors in IPC servers.
2020-06-08 13:58:32 +02:00
Andreas Kling
59adccb987 LibCore: Put some annoying debug spam behind EVENTLOOP_DEBUG 2020-06-02 12:46:52 +02:00
Sergey Bugaev
b4ca45b5ec LibCore: Update Core::ArgsParser to the new error message format 2020-05-30 15:01:18 +02:00
Marcin Gasperowicz
9a4ee9aa1a Lagom: Adjust AK, LibCore and LibTLS to build on MacOS 2020-05-30 00:36:13 +02:00
Emanuele Torre
937d0be762 Meta: Add a script check the presence of "#pragma once" in header files
.. and make travis run it.

I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.

It also checks the presence of a (single) blank line above and below the
"#pragma once" line.

I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.

I also ran clang-format on the files I modified.
2020-05-29 07:59:45 +02:00
Sergey Bugaev
ec4902d1dd LibCore+Inspector: Move RPC sockets to /tmp/rpc
We have a hierarchical filesystem, let's make use of it :^)
2020-05-29 07:53:30 +02:00
Sergey Bugaev
8afcf0d87a LibCore: Do not assert that we can start the RPC server
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp
is unwritable.
2020-05-29 07:53:30 +02:00
Sergey Bugaev
602c3fdb3a AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath.

This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
2020-05-26 14:35:10 +02:00
Marcin Gasperowicz
c21dc21f36
Build: Make Lagom build under macOS (#2341)
Lagom now builds under macOS. Only two minor adjustments were required:

* LibCore TCP/UDP code can't use `SOCK_{NONBLOCK,CLOEXEC}` on macOS,
use ioctl() and fcntl() instead

* LibJS `Heap` code pthread usage ported to MacOS
2020-05-23 15:31:30 +02:00
Andreas Kling
4b202a3c79 LibCore+LibTLS: Don't keep a "ready to write" notifier on all Sockets
The "ready to write" notifier we set up in generic socket connection is
really only meant to detect a successful connection. Once we have a TCP
connection, for example, it will fire on every event loop iteration.

This was causing IRC Client to max out the CPU by getting this no-op
notifier callback over and over.

Since this was only used by TLSv12, I changed that code to create its
own notifier instead. It might be possible to improve TLS performance
by only processing writes when actually needed, but I didn't look very
closely at that for this patch. :^)
2020-05-18 20:16:52 +02:00
AnotherTest
1c4f38749e LibCore: Allow ArgsParser::parse() to not exit on failure
This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
2020-05-17 11:58:08 +02:00
AnotherTest
16ba0b39f3 LibCore: Reset getopt's state when starting parse()
This way, a program can use ArgsParser multiple times, potentially with
multiple different options.
2020-05-17 11:58:08 +02:00
Andreas Kling
c3379e3734 LibCore: Always wait_for_events() when pumping the event loop
This fixes an issue where continuously posting new events to the queue
would keep the event loop saturated, causing it to ignore notifiers.

Since notifiers are part of the big select(), we always have to call
wait_for_events() even if there are pending events. We're already smart
enough to select() without a timeout if we already have pending events.
2020-05-16 22:06:33 +02:00
Sergey Bugaev
345fbd1fc1 LibCore: Fix timer expiration processing
The previous code did not account for the case when there are timers present,
but none are enabled, and used a zero polling timeout.

Fixes https://github.com/SerenityOS/serenity/issues/2222
2020-05-15 17:41:54 +02:00
AnotherTest
3485613f4a LibCore: Make IODevice::can_read_line() const
This also makes LibHTTP's Job::can_read_line() const, as IODevice was
keeping that from being const.
Fixes #2219
2020-05-15 09:50:48 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Nicholas Hollett
b7810a31c3 LibDesktop: Switch to LaunchServer for DesktopServices::open
Moves DirectoryServices out of LibCore (because we need to link with
LibIPC), renames it Desktop::Launcher (because Desktop::DesktopServices
doesn't scan right) and ports it to use the LaunchServer which is now
responsible for starting programs for a file.
2020-05-09 15:13:32 +02:00
Hüseyin ASLITÜRK
a3367cf4fa LibCore: DesktopServices, open fonts with FontEditor 2020-05-08 09:49:41 +02:00
AnotherTest
d051fffe25 LibCore: Add a primitive comparison function to DateTime
This should go away when we get the ability to parse strings to
DateTime's.
2020-05-07 10:23:58 +02:00
Linus Groh
9dbab2d05e Misc: Replace "String(string_view)" with "string_view.to_string()"
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
2020-05-06 19:28:59 +02:00
Andreas Kling
76dd1e3284 LibCore: Add a standard downloads directory (~/Downloads) 2020-05-05 23:56:57 +02:00
AnotherTest
06cf9d3fb7 ProtocolServer: Implement and handle download progress
Also updates `pro` to display download progress and speed on stderr
2020-05-03 12:59:26 +02:00
AnotherTest
7670e5ccf0 LibCore+LibHTTP: Move out the HTTP handler and add HTTPS 2020-05-02 12:24:10 +02:00
AnotherTest
7eb72c72e8 LibCore: Mark Socket::{common_,}connect() virtual and add a on_write 2020-05-02 12:24:10 +02:00