OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Getting around QNetworkProtocol, Suggestions anyone?
vanstrien
post Oct 17 2004, 11:48 AM
Post #1





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



I've been looking through some of the missing components from QT which were supposedly removed due to size. It seems like the most important ones relate to transformation functions, dialogs and network protocols.

The dialogs seems easy enough to deal with: qinputdialog.h just needs a few small changes and it will compile just fine. As for transformations I've just used replacement functions I've found elsewhere or written myself.

The networking protocols are a bit more tricky. The lack of qurloperator and qnetworkprotocol.h is a bit of a loss and I don't think they would be easy to port back in. Besides rewriting what I need or doing the trick that lets you compile libqte.so.3.3.3, have any of the more experienced programmers developed any workarounds?

I've checked out the code to zaurss and I have no idea how Nokubi got it to compile. As for some of the other applications I've looked at they tend to only do the minimum networking possible.
Go to the top of the page
 
+Quote Post
vanstrien
post Oct 24 2004, 03:15 PM
Post #2





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



To answer my own question, and in part because I didn't like the way that QUrlOperator works in the first place, I've put together a quick hack that lets you do a HTTP get as a static method. Ie:
CODE
#include "tturloperator.h"
QString page = TTUrlOperator::getPage("http://www.cnn.com");


It will retrieve urls of type 'http' or 'file'. I didn't have a chance to add FTP. This just uses raw sockets, by the way. It doesn't do anything fancy with headers nor have I added in proxy code (although that should be a snap).

There is other code in there to replicate QUrlOperator but I've commented it out to reduce executable size. If anyone wants anything added let me know and I'll try to put something together.

You can get it here.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th November 2014 - 02:59 PM