1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 17:15:06 +00:00

Start working on a Downloader app and backing classes in LibGUI.

LibGUI is slowly becoming LibKitchensink but I'm okay with this for now.
This commit is contained in:
Andreas Kling 2019-04-07 14:36:10 +02:00
parent c7365a00f8
commit 8f30657390
21 changed files with 375 additions and 1 deletions

27
LibGUI/GNetworkJob.cpp Normal file
View file

@ -0,0 +1,27 @@
#include <LibGUI/GNetworkJob.h>
#include <LibGUI/GNetworkResponse.h>
#include <stdio.h>
GNetworkJob::GNetworkJob()
{
}
GNetworkJob::~GNetworkJob()
{
}
void GNetworkJob::did_finish(Retained<GNetworkResponse>&& response)
{
m_response = move(response);
printf("%s{%p} job did_finish!\n", class_name(), this);
ASSERT(on_finish);
on_finish(true);
}
void GNetworkJob::did_fail(Error error)
{
m_error = error;
dbgprintf("%s{%} job did_fail! error=%u\n", class_name(), this, (unsigned)error);
ASSERT(on_finish);
on_finish(false);
}