Netscape DevEdge

Skip to: [content] [navigation]

TOC PREV NEXT

plug-ins!


NPByteRange


Represents a particular range of bytes from a stream.

Syntax

typedef struct _NPByteRange
 
{
 
    int32  offset;  /* negative offset = from the end */
 
    uint32 length;
 
    struct _NPByteRange* next;
 
} NPByteRange;
 

 

Fields

The data structure has the following fields:

offset
 

Offset in bytes of the requested range, either positive or negative:

  • Positive value: Offset from the beginning of the stream.
  • Negative value: Offset from the end of the stream.
length
 
Number of bytes to fetch from the specified offset.
next
 

Points to the next NPByteRange request in the list of requests, or null if this is the last request.


Description

The plug-in seeks within a stream by building a linked list of one or more NPByteRange objects, which represents a set of discontiguous byte ranges. The only Plug-in API call that uses the NPByteRange type is NPN_RequestRead, which allows the plug-in to read specified parts of a file without downloading it.

The plug-in is responsible for deleting NPByteRange objects when finished with them. The browser makes a copy if it needs to keep the objects beyond the call to NPN_RequestRead.

See Also

NPN_RequestRead


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT
A+R