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
Sergey Bugaev
b319aca81a
LibCore: Do not assert that NonnullRefPtr is non-null
...
Clang complains about this; with the change the next commit is going
to make to ASSERT() internals, GCC is going to start to complain as well.
2020-04-30 11:30:27 +02:00
Andreas Kling
36a5e0be4b
LibCore: Don't continue in forked child if exec() fails
...
Fixes #1854 .
2020-04-30 09:52:07 +02:00
AnotherTest
8d419c1915
LibCore: Trim decompressed Gzip output to size
...
Prior to this commit, we would (re-)allocate the output buffer aligned
to 1024 bytes, but never trim it down to size, which caused
Gzip::decompress to return uninitialised data.
2020-04-28 09:32:33 +02:00
Hüseyin ASLITÜRK
e7b9e03285
LibCore: Open gif files with QuickShow
2020-04-26 18:44:20 +02:00
Brendan Coles
edd8abc4cf
LibCore: read_bool_entry parse "true" / "false" strings in config files
...
`read_bool_entry()` can now interpret both integers (1 or 0) and
Boolean strings ("true" or "false") in configuration files.
All values other than "1" or "true" are considered false.
2020-04-23 11:04:25 +02:00
Brendan Coles
c3b2bfabfe
DesktopServices: Add irc URL protocol handler
2020-04-23 09:50:19 +02:00
Andreas Kling
a19690170f
LibCore: Make Core::File::open() return a Result<NNRP<File>, String>
...
It was impractical to return a RefPtr<File> since that left us no way
to extract the error string. This is usually needed for the UI, so the
old static open() got basically no use.
2020-04-21 16:19:18 +02:00
Andreas Kling
c45e16f605
LibCore: Add StandardPaths thing to retrieve various standard locations
...
Fixes #1853 .
2020-04-19 19:57:05 +02:00
Sergey Bugaev
50c139e61c
LibCore: Check for fork() failure
...
For those good boy points :^)
2020-04-19 11:14:26 +02:00
Sergey Bugaev
f8b2a7b4a7
LibCore+LibGUI: Move DesktopServices to LibCore
2020-04-19 11:14:26 +02:00
Andreas Kling
a53cf81374
LibCore: Add Core::Timer::create_single_shot()
...
This is just a convenience function for creating single-shot timers.
2020-04-07 23:01:43 +02:00
Andreas Kling
20e58c5513
AK: Make dbgprintf() and dbgputstr() go to stderr on non-Serenity hosts
2020-04-06 10:49:27 +02:00
AnotherTest
d8e944e899
LibCore: Fix UDPServer up to properly receive data
...
Prior to this, UDPServer was using listen/accept, which does not make
sense in the context of UDP.
2020-04-04 12:25:33 +02:00
Andreas Kling
eeec1c1293
LibCore: Don't replay last handled event when leaving nested event loop
...
The event that triggered the exit from an inner event loop would always
get re-delivered in the outer event loop due to a silly off-by-one
mistake when transferring pending events between loops.
2020-04-03 22:55:48 +02:00
Andreas Kling
0df15823b5
LibCore: Add a static Core::File::open() convenience function
...
This helper opens a file with a given name, mode and permissions and
returns it in a RefPtr<File>. I think this will be a bit nicer to use
than having to go through Core::File::construct() every time.
2020-03-30 12:08:25 +02:00
Andreas Kling
290ea11739
LibCore: Tweak DateTime.cpp so it compiles on Linux + drive-by bug fix
2020-03-23 13:13:36 +01:00
Shannon Booth
83425b1ac0
LibCore: Wrap commented out debug messages in a preprocessor define
...
We can also remove an outdated FIXME as dbg() does now support unsigned
longs :^)
2020-03-22 08:51:40 +01:00
Liav A
7268499c76
LibCore: Use monotonic time when handling timers
2020-03-19 15:48:00 +01:00
rhin123
08a30a4961
LibCore: Moved cal.cpp functions to DateTime
2020-03-18 08:17:01 +01:00
Shannon Booth
5dc5b8a2b6
LibCore: Rename Udp classes to UDP
...
The kernel was already using the UDP prefix, and the TCP LibCore classes
are also uppercased. Let's rename for consistency.
Also order the LibCore Makefile alphabetically, because everywhere else
seems to be doing that :)
2020-03-14 23:56:12 +01:00
Alex Muscar
81c6f72134
EventLoop: Don't destroy ID allocator ( #1403 )
...
The ID allocator is destroyed before a timer in HackStudio is
is unregistered leading to an access violation.
Fixes #1382 .
2020-03-10 11:31:37 +01:00
Andreas Kling
37fc6c117c
Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller
2020-03-08 13:06:51 +01:00
Andreas Kling
b1058b33fb
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
...
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
2020-03-08 13:06:51 +01:00
howar6hill
10e0d4a196
LibCore: Add format option for DateTime::to_string() ( #1358 )
2020-03-08 11:35:26 +01:00
Shannon Booth
57f1c919df
LibCore: Remove all remaining C prefix references
...
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-07 01:33:53 +01:00
Andreas Kling
42f2696355
LibCore: Add a way to set an individual Core::Object property remotely
2020-03-05 15:50:22 +01:00
Andreas Kling
d16f8214d8
LibCore: Allow RPC clients to specify the currently inspected object
...
Add a SetInspectedObject call that tells us which Core::Object a remote
client is currently looking it. Objects get notified when they gain
their first inspector, and when they lose their last one.
2020-03-05 14:40:47 +01:00
Andreas Kling
028c011760
LibCore: Make Core::Object::add<ChildType> return a ChildType&
...
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
2020-03-04 21:04:06 +01:00
Andreas Kling
22d0a6d92f
AK: Remove unnecessary casts to size_t, after Vector changes
...
Now that Vector uses size_t, we can remove a whole bunch of redundant
casts to size_t.
2020-03-01 12:58:22 +01:00
Jesse Buhagiar
22cdf12ec4
LibCore: Allow ConfigFile::read_num_entry to handle negative numbers
...
Previously, this function was using `AK::String::to_uint()`, which is
wrong considering the function returns type `int`. This also means that
configuration files would revert to the default value on negative
values.
2020-02-26 11:48:53 +01:00
howar6hill
35024154cc
DateTime: Fix a typo
2020-02-26 09:31:43 +01:00
Andreas Kling
ceec1a7d38
AK: Make Vector use size_t for its size and capacity
2020-02-25 14:52:35 +01:00
Andreas Kling
d9e459293b
LibCore: Add Core::Object::add<T> helper for creating child objects
...
Consider the old pattern for creating a Core::Object parent and child:
auto parent = Core::Object::construct(...);
auto child = Core::Object::construct(..., parent);
The above was an artifact of the pre-reference-counting Object era.
Now that objects have less esoteric lifetime management, we can replace
the old pattern with something more expressive:
auto parent = Core::Object::construct(...);
auto child = parent->add<Core::Object>(...);
This reads a lot more naturally, and it also means we can get rid of
all the parent pointer arguments to Core::Object subclass constructors.
2020-02-23 11:10:52 +01:00
Andreas Kling
28f1486627
LibCore: Log a more helpful message when Socket::connect() fails
...
Fixes #1272 .
2020-02-22 16:41:31 +01:00
Andreas Kling
82fd09e8fe
LibCore: Fix wrong return value in Core::Socket::destination_address()
2020-02-22 16:38:10 +01:00
Andreas Kling
88b9fcb976
AK: Use size_t for ByteBuffer sizes
...
This matches what we already do for string types.
2020-02-20 13:20:34 +01:00
Shannon Booth
42399167b3
LibCore: Add DirIterator::next_full_path()
2020-02-16 02:19:22 +01:00
Shannon Booth
6764b77788
LibCore: Add SkipParentAndBaseDir flag in DirIterator
...
Sometimes we may want to iterate over dotfiles but not include the
parent or base directory
2020-02-15 11:40:05 +01:00
Shannon Booth
3879d75219
LibCore: Simplify some of DirIterator's code
...
The main changes are in advance_next() where we flatten some of the
nesting to improve readability
2020-02-15 11:40:05 +01:00
Andreas Kling
0e3a9d8e9d
LibCore: Reduce header dependencies of EventLoop
2020-02-15 02:09:00 +01:00
Andreas Kling
3866e0d4d4
LibCore: Move LogStream::operator<< overloads into cpp files
2020-02-15 00:58:52 +01:00
Andreas Kling
2a41bff329
LibCore: Remove a bunch of unnecessary forward declarations
...
Now that we get LibCore forward declarations from <LibCore/Forward.h>,
we don't need to declare things manually.
2020-02-15 00:32:33 +01:00
Andreas Kling
a368cf7d51
LibGfx: Replace manual forward declarations with <LibGfx/Forward.h>
2020-02-15 00:10:34 +01:00
Andreas Kling
8f7333f080
LibCore: Add a forward declaration header
...
This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
2020-02-14 23:31:18 +01:00
Andreas Kling
3cba9c3c25
LibCore: Add Core::MimeData class
...
This object contains zero or more { mime_type, data } entries and will
be used for clipboard data as well as drag & drop.
2020-02-14 13:17:26 +01:00
Andreas Kling
90fec9c732
LibCore: Add "static bool Core::File::exists(filename)"
2020-02-12 21:17:00 +01:00