Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

TQNPStream Class Reference

The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser. More...

This class is part of the TQt Netscape Extension.

#include <qnp.h>

List of all member functions.

Public Members


Detailed Description

This class is defined in the TQt Netscape Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API.

The TQNPStream class provides a stream of data provided to a TQNPInstance by the browser.

Note that this is neither a TQTextStream nor a TQDataStream.

See also TQNPInstance::write() and TQNPInstance::newStreamCreated().


Member Function Documentation

TQNPStream::TQNPStream ( TQNPInstance * in, const char * mt, _NPStream * st, bool se )

Creates a stream. Plugins should not call this; they should call TQNPInstance::newStream() if they need a stream.

Takes a TQNPInstance in, MIME type mt, a pointer to an _NPStream st and a seekable flag se.

TQNPStream::~TQNPStream ()

Destroys the stream.

bool TQNPStream::complete () const

Returns TRUE if the stream has received all the data from the source; otherwise returns FALSE.

uint TQNPStream::end () const

Returns the length of the stream in bytes. The function might return 0 for streams of unknown length.

TQNPInstance * TQNPStream::instance ()

Returns the TQNPInstance for which this stream was created.

uint TQNPStream::lastModified () const

Returns the time when the source of the stream was last modified.

bool TQNPStream::okay () const

Returns TRUE if no errors have occurred on the stream; otherwise returns FALSE.

void TQNPStream::requestRead ( int offset, uint length )

Requests the section of the stream, of length bytes from offset, be sent to the TQNPInstance::write() function of the instance() of this stream.

bool TQNPStream::seekable () const

Returns TRUE if the stream is seekable; otherwise returns FALSE.

const char * TQNPStream::type () const

Returns the MIME type of the stream.

const char * TQNPStream::url () const

Returns the URL from which the stream was created.

int TQNPStream::write ( int len, void * buffer )

Writes len bytes from buffer to the stream.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.


Copyright © 2007 TrolltechTrademarks
TQt 3.3.8