michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** A class holding information about a directory index. michael@0: * These have no reference back to their original source - michael@0: * changing these attributes won't affect the directory michael@0: */ michael@0: [scriptable, uuid(23bbabd0-1dd2-11b2-86b7-aad68ae7d7e0)] michael@0: interface nsIDirIndex : nsISupports michael@0: { michael@0: /** michael@0: * Entry's type is unknown michael@0: */ michael@0: const unsigned long TYPE_UNKNOWN = 0; michael@0: michael@0: /** michael@0: * Entry is a directory michael@0: */ michael@0: const unsigned long TYPE_DIRECTORY = 1; michael@0: michael@0: /** michael@0: * Entry is a file michael@0: */ michael@0: const unsigned long TYPE_FILE = 2; michael@0: michael@0: /** michael@0: * Entry is a symlink michael@0: */ michael@0: const unsigned long TYPE_SYMLINK = 3; michael@0: michael@0: /** michael@0: * The type of the entry - one of the constants above michael@0: */ michael@0: attribute unsigned long type; michael@0: michael@0: /** michael@0: * The content type - may be null if it is unknown. michael@0: * Unspecified for directories michael@0: */ michael@0: attribute string contentType; michael@0: michael@0: /** michael@0: * The fully qualified filename, expressed as a uri michael@0: * michael@0: * This is encoded with the encoding specified in michael@0: * the nsIDirIndexParser, and is also escaped. michael@0: */ michael@0: attribute string location; michael@0: michael@0: /** michael@0: * A description for the filename, which should be michael@0: * displayed by a viewer michael@0: */ michael@0: attribute wstring description; michael@0: michael@0: /** michael@0: * File size, with -1 meaning "unknown" michael@0: */ michael@0: attribute long long size; michael@0: michael@0: /** michael@0: * Last-modified time in seconds-since-epoch. michael@0: * -1 means unknown - this is valid, because there were no michael@0: * ftp servers in 1969 michael@0: */ michael@0: attribute PRTime lastModified; michael@0: }; michael@0: michael@0: %{C++ michael@0: michael@0: #define NS_DIRINDEX_CID \ michael@0: /* { f6913e2e-1dd1-11b2-84be-f455dee342af } */ \ michael@0: { 0xf6913e2e, \ michael@0: 0x1dd1, \ michael@0: 0x11b2, \ michael@0: { 0x84, 0xbe, 0xf4, 0x55, 0xde, 0xe3, 0x42, 0xaf } \ michael@0: } michael@0: %}