Adriaan de Groot
badbdf59ee
[libcalamares] Build synchronous get w/ async-get
2019-09-02 13:43:10 +02:00
Adriaan de Groot
f8356a6dcc
[libcalamares] Add an async get method
...
- Mostly a "cheap" wrapper for a half-dozen boilerplate lines
of Qt NAM code.
2019-09-02 12:21:33 +02:00
Adriaan de Groot
e2c6591a77
[libcalamares] Refactor request internals
...
- distinguish timeouts from other failures
- git synchronousPing() a more detailed result, which is
still bool-compatible.
2019-08-26 15:24:58 +02:00
Adriaan de Groot
f0be7fd4aa
[libcalamares] Make failures in the internal methods obvious
...
- internally, timeout and error will return nullptr
2019-08-26 14:43:41 +02:00
Adriaan de Groot
ededebbc6c
[libcalamares] Return reply early if the request is bad
2019-08-24 15:23:07 +02:00
Adriaan de Groot
85f0d38698
[libcalamares] Refactor synchronous get
...
- Add timeout support
- Refactor into a static helper method
2019-08-23 14:59:35 +02:00
Adriaan de Groot
1f2b3b734d
[libcalamares] Extend synchronous API with options
2019-08-23 12:18:59 +02:00
Adriaan de Groot
af1aa701bc
[libcalamares] Shuffle namespace lines around
...
- put all the definitions inside namespace {} to avoid
needlessly long source lines.
2019-08-23 12:09:30 +02:00
Adriaan de Groot
8ea1ea6662
[libcalamares] Add synchronousGet() to network service
...
- Synchronous download of a given URL; not something to
do from the GUI thread.
- Use it from the GeoIP service, which downloads in a
separate thread to do GeoIP lookups.
- Drop now-unused headers.
- Adjust tests for GeoIP to use network service
2019-08-22 16:11:26 +02:00
Adriaan de Groot
eae931f2ed
[libcalamares] Ping only when accessibility is unknown
...
- Restores exact functionality of previous version
(noted by Kevin Kofler)
- Short-circuit ping if the URL is bad.
2019-08-21 03:43:51 -04:00
Adriaan de Groot
4389c254df
[libcalamares] Rely directly on QNAM's networkAccessible()
2019-08-20 10:57:34 -04:00
Adriaan de Groot
d7602df51e
[libcalamares] Introduce networking service
...
- The networking service is intended to wrap up use of
QNetworkAccessManager and others for consumption within
Calamares, and to provide some convenience functions
for internet access.
- Medium term, it may also monitor network access, so that
we can respond to changes in network availability during
installation.
Currently very minimal and undocumented.
2019-08-20 09:52:11 -04:00