返回介绍

QNPStream Class

发布于 2019-10-04 15:01:48 字数 3050 浏览 985 评论 0 收藏 0

The QNPStream class provides a stream of data provided to a QNPInstance by the browser.

This class is part of the Qt NSPlugin Extension. More...

#include <qnp.h>

List of all member functions.

Public Members

  • ~QNPStream ()
  • const char * url () const
  • uint end () const
  • uint lastModified () const
  • const char * type () const
  • bool seekable () const
  • bool okay () const
  • bool complete () const
  • void requestRead ( intoffset, uintlength )
  • int write ( intlen, void*buffer )
  • QNPInstance * instance ()
  • QNPStream ( QNPInstance*in, constchar*mt, _NPStream*st, boolse )

Detailed Description

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

The QNPStream class provides a stream of data provided to a QNPInstance by the browser.

Note that this is neither a QTextStream nor a QDataStream.

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


Member Function Documentation

QNPStream::QNPStream ( QNPInstance*in, constchar*mt, _NPStream*st, boolse )

Creates a stream. Plugins should not call this, but rather QNPInstance::newStream() if a stream is required.

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

QNPStream::~QNPStream ()

Destroys the stream.

bool QNPStream::complete () const

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

uint QNPStream::end () const

Returns the length of the stream in bytes. Can be 0 for streams of unknown length.

QNPInstance* QNPStream::instance ()

Returns the QNPInstance for which this stream was created.

uint QNPStream::lastModified () const

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

bool QNPStream::okay () const

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

void QNPStream::requestRead ( intoffset, uintlength )

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

bool QNPStream::seekable () const

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

const char * QNPStream::type () const

Returns the MIME type of the stream.

const char * QNPStream::url () const

Returns the URL from which the stream was created.

int QNPStream::write ( intlen, void*buffer )

Writes len bytes from buffer to the stream.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文