netwerk/streamconv/public/nsIDirIndexListener.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsIStreamListener.idl"
     8 interface nsIDirIndex;
    10 /**
    11  * This interface is used to receive contents of directory index listings
    12  * from a protocol. They can then be transformed into an output format
    13  * (such as rdf, html, etc)
    14  */
    15 [scriptable, uuid(fae4e9a8-1dd1-11b2-b53c-8f3aa1bbf8f5)]
    16 interface nsIDirIndexListener : nsISupports {
    17     /**
    18      * Called for each directory entry
    19      *
    20      * @param request - the request
    21      * @param ctxt - opaque parameter
    22      * @param index - new index to add
    23      */
    24     void onIndexAvailable(in nsIRequest aRequest,
    25                           in nsISupports aCtxt,
    26                           in nsIDirIndex aIndex);
    28     /**
    29      * Called for each information line
    30      *
    31      * @param request - the request
    32      * @param ctxt - opaque parameter
    33      * @param info - new info to add
    34      */
    35     void onInformationAvailable(in nsIRequest aRequest,
    36                                 in nsISupports aCtxt,
    37                                 in AString aInfo);
    39 };
    41 %{C++
    42 #define NS_IDIRINDEXLISTENER_KEY         "@mozilla.org/dirIndexListener;1"
    43 %}
    45 /**
    46  * A parser for application/http-index-format
    47  */
    48 [scriptable, uuid(38e3066c-1dd2-11b2-9b59-8be515c1ee3f)]
    49 interface nsIDirIndexParser : nsIStreamListener {
    50     /**
    51      * The interface to use as a callback for new entries
    52      */
    53     attribute nsIDirIndexListener listener;
    55     /**
    56      * The comment given, if any
    57      * This result is only valid _after_ OnStopRequest has occurred,
    58      * because it can occur anywhere in the datastream
    59      */
    60     readonly attribute string comment;
    62     /**
    63      * The encoding to use
    64      */
    65     attribute string encoding;
    66 };
    68 %{C++
    69 #define NS_DIRINDEXPARSER_CID \
    70 { /* a0d6ad32-1dd1-11b2-aa55-a40187b54036 */ \
    71     0xa0d6ad32, \
    72     0x1dd1, \
    73     0x11b2, \
    74     { 0xaa, 0x55, 0xa4, 0x01, 0x87, 0xb5, 0x40, 0x36 } \
    75 }
    77 #define NS_DIRINDEXPARSER_CONTRACTID "@mozilla.org/dirIndexParser;1"
    79 %}

mercurial