netwerk/streamconv/public/nsIDirIndex.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/streamconv/public/nsIDirIndex.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,82 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/** A class holding information about a directory index.
    1.12 + * These have no reference back to their original source -
    1.13 + * changing these attributes won't affect the directory
    1.14 + */
    1.15 +[scriptable, uuid(23bbabd0-1dd2-11b2-86b7-aad68ae7d7e0)]
    1.16 +interface nsIDirIndex : nsISupports
    1.17 +{
    1.18 +    /**
    1.19 +     * Entry's type is unknown
    1.20 +     */
    1.21 +    const unsigned long TYPE_UNKNOWN = 0;
    1.22 +
    1.23 +    /**
    1.24 +     * Entry is a directory
    1.25 +     */
    1.26 +    const unsigned long TYPE_DIRECTORY = 1;
    1.27 +    
    1.28 +    /**
    1.29 +     * Entry is a file
    1.30 +     */
    1.31 +    const unsigned long TYPE_FILE = 2;
    1.32 +    
    1.33 +    /**
    1.34 +     * Entry is a symlink
    1.35 +     */
    1.36 +    const unsigned long TYPE_SYMLINK = 3;
    1.37 +
    1.38 +    /**
    1.39 +     * The type of the entry - one of the constants above
    1.40 +     */
    1.41 +    attribute unsigned long type;
    1.42 +
    1.43 +    /**
    1.44 +     * The content type - may be null if it is unknown.
    1.45 +     * Unspecified for directories
    1.46 +     */
    1.47 +    attribute string contentType;
    1.48 +
    1.49 +    /**
    1.50 +     * The fully qualified filename, expressed as a uri
    1.51 +     *
    1.52 +     * This is encoded with the encoding specified in
    1.53 +     * the nsIDirIndexParser, and is also escaped.
    1.54 +     */
    1.55 +    attribute string location;
    1.56 +
    1.57 +    /**
    1.58 +     * A description for the filename, which should be
    1.59 +     * displayed by a viewer
    1.60 +     */
    1.61 +    attribute wstring description;
    1.62 +
    1.63 +    /**
    1.64 +     * File size, with -1 meaning "unknown"
    1.65 +     */
    1.66 +    attribute long long size;
    1.67 +    
    1.68 +    /**
    1.69 +     * Last-modified time in seconds-since-epoch.
    1.70 +     * -1 means unknown - this is valid, because there were no
    1.71 +     * ftp servers in 1969
    1.72 +     */
    1.73 +    attribute PRTime lastModified;
    1.74 +};
    1.75 +
    1.76 +%{C++
    1.77 +
    1.78 +#define NS_DIRINDEX_CID \
    1.79 +/* { f6913e2e-1dd1-11b2-84be-f455dee342af } */ \
    1.80 +{ 0xf6913e2e, \
    1.81 +  0x1dd1, \
    1.82 +  0x11b2, \
    1.83 +  { 0x84, 0xbe, 0xf4, 0x55, 0xde, 0xe3, 0x42, 0xaf } \
    1.84 +}
    1.85 +%}

mercurial