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.

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

mercurial