Connection

The Connection class is the abstract base class for any type of data retrieval class. More...

Publicly inherits QObject.

Publicly inherited by FileConn, HttpConn.

Public Methods

Connection( const Url& url );
voidguessFileType( QString& mediaType, QString& mediaSubtype );
virtual boolopen( );
virtual ~Connection( );

Public Slots

virtual voidabort( );
virtual voidexception( );
virtual voidreadable( );
virtual voidwritable( );

Signals

virtual voiddata( const char* bytes, int length );
virtual voidendOfData( );
virtual voidstartOfData( QString mediaType, QString mediaSubtype, int totalSize );
virtual voidstatus( QString msg );
virtual voidurlChanged( const Url& url );

Protected Data Members

char_bytes[];
int_fd;
int_size;
Url_url;

Detailed Documentation

The Connection class is the abstract base class for any type of data retrieval class.

The Connection class provides the interface, and some common functionality, for all of the classes that retrieve data.

Public Methods Documentation

Connection ( const Url& url );

Create a new connection.

virtual bool open ( );

Establish a new connection.

virtual ~Connection ( );

Abort the connection, if it is still active.

Public Slots Documentation

virtual void abort ( );

Close the current connection immediately.

virtual void exception ( );

Process an exception on the file descriptor.

virtual void readable ( );

Process notification from the Poller that there is data to be read from the file descriptor.

virtual void writable ( );

Process notification from the Poller that data can be written to the file descriptor.

Signals Documentation

virtual void data ( const char* bytes, int length );

This signal is emitted whenever any data is received. There can be many data signals emitted between the startOfData and endOfData signals.

virtual void endOfData ( );

This signal is emitted after all data has been received, and the connection is closed.

virtual void startOfData ( QString mediaType, QString mediaSubtype, int totalSize );

This signal is emitted after the connection has determined the Internet media type and subtype of the data stream. The total expected size of the data stream is also provided, but this may not always be known.

virtual void status ( QString msg );

This signal is emitted by the connection to update the browser window with changes in the connection status. The types of status messages are data being recieved, the connection being opened, etc.

virtual void urlChanged ( const Url& url );

This signal is emitted when the URL that is being retrieved changes. The URL may change as the Connection follows HTTP redirects.


Return to Index.
Automatically generated on Aug 11 23:32