mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
.referemce
git-svn-id: svn://ultimatepp.org/upp/trunk@15529 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
adea4df7e8
commit
8799050700
4 changed files with 7 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
#include <Core/SSL/SSL.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
description "Downloads www file directly to disc with GUI response (TcpSocket, HttpRequest demo)\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
CtrlLib,
|
||||
Core/SSL;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ struct Downloader {
|
|||
FileOut out;
|
||||
String path;
|
||||
|
||||
typedef Downloader CLASSNAME;
|
||||
|
||||
void Content(const void *ptr, int size);
|
||||
void Perform();
|
||||
void ShowProgress();
|
||||
|
|
@ -23,9 +21,9 @@ struct Downloader {
|
|||
Downloader::Downloader()
|
||||
{
|
||||
http.MaxContentSize(INT_MAX);
|
||||
http.WhenContent = THISBACK(Content);
|
||||
http.WhenWait = http.WhenDo = THISBACK(ShowProgress);
|
||||
http.WhenStart = THISBACK(Start);
|
||||
http.WhenContent = [=](const void *ptr, int size) { Content(ptr, size); };
|
||||
http.WhenWait = http.WhenDo = [=] { ShowProgress(); };
|
||||
http.WhenStart = [=] { Start(); };
|
||||
}
|
||||
|
||||
void Downloader::Start()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <Core/Core.h>
|
||||
#include <Core/SSL/SSL.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue