HTTPPostJob

Dawit A. adawit at kde.org
Thu Nov 28 19:12:57 GMT 2002


Hi,

The current KIO::http_post method is ill equipped to deal with uploading large 
data or files.  To alleviate this problem I wanted to write a HTTPPostJob to  
make it easier for app developers so they do not have to create a subclass of 
TransferJob to workaround this issue.  Though the code is simple enough to 
write, I am stuck on what interface HTTPPostJob should provide.  Any 
suggestion ?  I know taking filename is probably sufficient for khtml's 
purposes, but there might be other places where this is not.  So I need 
suggestions.  A pointer to a QIODevice perhaps (maybe not) ? 

class HTTPPostJob : public TransferJob 
{
Q_OBJECT
    
public:
  HTTPPostJob (const KURL& url, int command, const QByteArray& packedArgs,
                     const QString& file, bool showProgressInfo);
        
  HTTPPostJob (const KURL& url, int command, const QByteArray& packedArgs,
                     int fd, bool showProgressInfo);                    

protected slots:
  virtual void slotDataReq();
        
private:
  int fd;
  class HTTPPostPrivate* d;
};

Regards,
Dawit A.





More information about the kfm-devel mailing list