mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-02 16:22:40 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@4830 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
28471b5a29
commit
49061f09ba
4 changed files with 11 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef _SocketProgress_icpp_init_stub
|
||||
#define _SocketProgress_icpp_init_stub
|
||||
#ifndef _GuiWebDownload_icpp_init_stub
|
||||
#define _GuiWebDownload_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,13 +21,14 @@ void Loader::Perform()
|
|||
if(!EditText(url, "Download", "URL"))
|
||||
break;
|
||||
loaded = 0;
|
||||
HttpRequest http(url);
|
||||
http.MaxContentSize(INT_MAX);
|
||||
pi.Reset();
|
||||
http.New();
|
||||
http.Url(url).MaxContentSize(INT_MAX);
|
||||
http.WhenContent = THISBACK(ProcessContent);
|
||||
http.WhenWait = THISBACK(ShowProgress);
|
||||
http.WhenWait = http.WhenDo = THISBACK(ShowProgress);
|
||||
http.Execute();
|
||||
if(!http.IsSuccess())
|
||||
Exclamation("Failed !");
|
||||
Exclamation("Failed !&\1" + http.GetErrorDesc());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +39,7 @@ void Loader::ProcessContent(const void *ptr, int size)
|
|||
|
||||
void Loader::ShowProgress()
|
||||
{
|
||||
DDUMP(http.GetPeerAddr());
|
||||
DDUMP(http.GetPeerAddr());
|
||||
if(http.GetContentLength() >= 0)
|
||||
pi.Set((int)loaded, (int)http.GetContentLength());
|
||||
else
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ CONSOLE_APP_MAIN
|
|||
catch(CParser::Error) {
|
||||
LOG("invalid JSON");
|
||||
}
|
||||
|
||||
|
||||
LOG("- Composing JSON using support classes");
|
||||
Json json;
|
||||
json
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Json based object persistency\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue