Commit Graph

31 Commits

Author SHA1 Message Date
PB
da581ccc1a Remove BCC makefiles (again)
All BCC makefiles were removed as a part of "Remove support for Borland
C++ compiler" PR; however, a few of them sneaked back as a part of the
newly introduced wxWebRequest.

Remove them for good.
2021-05-01 18:40:38 +02:00
Vadim Zeitlin
8b854d2f92 Remove MSVC 7 project files and support for generating them
This compiler is not supported any longer.
2021-04-26 16:24:02 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Maarten Bent
5bdd5e1432 Check if wxUSE_WEBREQUEST is defined 2021-03-18 20:49:57 +01:00
Vadim Zeitlin
970ab0a1ae Make sure wxEVT_WEBREQUEST_DATA is processed in the main thread
This event was processed in a worker thread, which was different from
all the other events and also almost surely not thread-safe, so change
this and queue it for processing in the main thread instead.

Use wxMemoryBuffer instead of non-owning pointer in wxWebRequestEvent
and reset the buffer used internally every time to ensure the data is
still available by the time the event is processed.

Also increase the amount of data downloaded in the "advanced" page of
the sample as it has to be greater than wxWEBREQUEST_BUFFER_SIZE, which
is currently 64KiB, to have a chance of seeing the value actually
change, otherwise all the data arrives in a single event. As it is,
using the maximal size supported by the httpbin service, we only get 2
events.
2021-01-16 23:53:15 +01:00
Vadim Zeitlin
20a3317839 Rename wxWebRequestEvent::GetResponseFileName() to GetDataFile()
This is shorter and doesn't imply that just the name (and not the full
path) is being returned.

Also rename wxWebResponse::GetFileName() to GetDataFile() for the same
reasons and for consistency. And document this previously undocumented
method.
2021-01-12 03:34:40 +01:00
Catalin Raceanu
76167e271b Insert comma for clarity in a message in the sample
No real changes.
2021-01-11 02:57:15 +01:00
Vadim Zeitlin
e530016723 Remove unnecessary trailing backslashes from the sample
Multiline strings don't need backslashes for continuation.
2021-01-11 02:55:51 +01:00
Vadim Zeitlin
abcc31c6b2 Update wxCredentialEntryDialog to use wxWebCredentials
As a side effect, make wxWebCredentials default-constructible.

Also demonstrate using wxCredentialEntryDialog in the sample.
2021-01-10 21:27:15 +01:00
Vadim Zeitlin
ec2ea5c7fa Handle request still in progress gracefully on shut down
Cancel the request and wait until it actually is cancelled when exiting
the sample.

This is a bit ugly, especially the busy-waiting part, but still better
than potentially crashing.
2021-01-06 23:54:51 +01:00
Vadim Zeitlin
d2dc11da4f Allow starting request by pressing "Enter" in the sample
Just a small ergonomic improvement.
2021-01-04 23:16:52 +01:00
Vadim Zeitlin
f89781bfdd Simplify status bar updates in the webrequest sample
Use wxLogStatus() to update the status bar, this is shorter and simpler
than using GetStatusBar()->SetStatusText(wxString::Format(...)).

Also use wxFrame::SetStatusText() which forwards to wxStatusBar method
with the same name when we want to just clear the status bar.

No real changes.
2021-01-04 02:13:53 +01:00
Vadim Zeitlin
50424cba2c Change wxWebRequest and related objects to hide ref counting
Don't force the application code to deal with wxObjectDataPtr<> or,
worse, calling {Inc,Dec}Ref() manually by hiding it inside the wx
objects themselves and giving the value-like semantics to them.

There should be no real changes in the behaviour, but the API does
change significantly. Notably, wxWebRequest is not a wxEvtHandler itself
any longer, as this would be incompatible with the value semantics, and
an event handler needs to be specified when creating it, so that it
could be notified about the request state changes.
2020-12-30 02:02:20 +01:00
Vadim Zeitlin
fd040b702d Remove trailing spaces from webrequest sample
No real changes.
2020-12-13 01:07:55 +01:00
Vadim Zeitlin
6bdab7b3c8 Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
2020-12-12 18:12:25 +01:00
Tobias Taschner
5077eaee6c Expand button sizer in webrequest sample 2018-12-10 19:38:16 +01:00
Tobias Taschner
45f006d752 Add wxWebSession::GetLibraryVersionInfo() 2018-12-10 19:38:12 +01:00
Tobias Taschner
4af4dd6cbf Init image handlers webrequest sample 2018-12-10 19:38:11 +01:00
Cătălin Răceanu
58ad18adf3 Update samples/webrequest/webrequest.cpp
Co-Authored-By: TcT2k <TcT2k@users.noreply.github.com>
2018-12-10 19:38:01 +01:00
Maarten Bent
17d77fe8ce Fix various small issues in webrequest sample 2018-12-10 19:37:52 +01:00
Tobias Taschner
6bafed4ceb Add Cancel button to webrequest sample 2018-12-10 19:37:48 +01:00
Tobias Taschner
d32e27191d Implement advanced page in webrequest sample 2018-12-10 19:37:47 +01:00
Tobias Taschner
e9618ce657 Implement Download page in webrequest sample 2018-12-10 19:37:43 +01:00
Tobias Taschner
701f697fa4 Change wxWebRequest API to use STATE event 2018-12-10 19:37:30 +01:00
Tobias Taschner
d7dee7019e Implement sending request data with wxWebRequest 2018-12-10 19:37:25 +01:00
Tobias Taschner
3971a9ef7f Expand webrequest sample 2018-12-10 19:37:24 +01:00
Tobias Taschner
a4279752f8 Start wxWebRequestWinHTTP implementation
Can already run the GET request in the sample app
2018-12-10 19:37:23 +01:00
Tobias Taschner
e07c1bf40c Prepared wxWebRequest implementation 2018-12-10 19:37:21 +01:00
Cătălin Răceanu
bd73551f1f Fix various typos and style in wxWebRequest documentation 2018-12-10 19:37:15 +01:00
Tobias Taschner
1090e8f6e9 Add webrequest sample application 2018-12-10 19:37:14 +01:00