Vos résultats de recherche


    Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !

    « Gecko Plugin API Reference « Plug-in Side Plug-in API


    Represents a particular range of bytes from a stream.


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


    The data structure has the following fields:

    Offset in bytes to the start of the requested range. This value may be either positive or negative:
    • Positive value: Offset from the beginning of the stream.
    • Negative value: Offset from the end of the stream.
    Number of bytes to fetch from the specified offset.
    Points to the next NPByteRange request in the list of requests, or null if this is the last request.


    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 lets the plug-in 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


    Étiquettes et contributeurs liés au document

    Étiquettes : 
    Contributors to this page: Pmash, Sheppy
    Dernière mise à jour par : Sheppy,