[Marble-devel] Network handling

tackat at t-online.de tackat at t-online.de
Sat Aug 30 17:03:28 CEST 2008


On Saturday 30 August 2008 01:15:06 Pino Toscano wrote:
> Hello,
>
> as a result of a recent kde-core-devel[1] discussion, it would be nice
to
> have Marble using or the networking part more recent Qt technologies
(like
> QNetworkAccessManager, introduced with Qt 4.4), or even KDE ones (just
like
> the KPart integration).
>
> My idea about that is the following: introduce a plugin structure
(like
> MarbleRenderPlugin) to handle the HTTP jobs, and use it in
> HttpDownloadManager. In addition to that, also the current QHttp-base
> system would be a "plugin", but compiled built-in in marblewidget, and
used
> as fallback when no other plugin is found/usable.
>
> Small draft:
> class NetworkPlugin
> {
> public:
>     virtual HttpJob* createJob(QUrl src, QString dest, QString id) =
0;
> };
>
> then also having HttpJob partially virtual (with eg execute() and
> prepareExecution(): this way, a network plugin has to:
> - implement a NetworkPlugin subclass (can be quite trivial)
> - specializing (by inheritance) its particular HttpJob
>
> To accomplish that, a first step would be getting rid of
HttpFetchFile, in
> favour of making HttpDownloadManager handle directly the HttpJob's;
for
> this, a working (hopefully) patch is attached.

Thanks.

> Second step would be creating a plugin structure, and decouple HttpJob
in
> two: the abstract HttpJob and the QHttpHttpJob plugin (of course,
still
> making things working after this).
> Then, it comes writing plugins for QNetworkAccessManager and KIO.

For that part you'd also need to take the proxy setting into account
that is 
currently located in the settings dialog. I guess the job-plugin would
then 
offer a property which tells whether displaying the proxy setting inside
the 
settings dialog is needed, right?
For the case where Marble would use KIO, usage of the common proxy is
probably 
mandatory I guess ... (or does anyone see a reason why Marble should
have its 
own proxy setting?).
For the case where Marble would just use the NAM the proxy setting
should 
still get displayed.

Your patch seems to work fine. So please go on :)





More information about the Marble-devel mailing list