nsIDirIndex.idl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/. */
  5. #include "nsISupports.idl"
  6. /** A class holding information about a directory index.
  7. * These have no reference back to their original source -
  8. * changing these attributes won't affect the directory
  9. */
  10. [scriptable, uuid(23bbabd0-1dd2-11b2-86b7-aad68ae7d7e0)]
  11. interface nsIDirIndex : nsISupports
  12. {
  13. /**
  14. * Entry's type is unknown
  15. */
  16. const unsigned long TYPE_UNKNOWN = 0;
  17. /**
  18. * Entry is a directory
  19. */
  20. const unsigned long TYPE_DIRECTORY = 1;
  21. /**
  22. * Entry is a file
  23. */
  24. const unsigned long TYPE_FILE = 2;
  25. /**
  26. * Entry is a symlink
  27. */
  28. const unsigned long TYPE_SYMLINK = 3;
  29. /**
  30. * The type of the entry - one of the constants above
  31. */
  32. attribute unsigned long type;
  33. /**
  34. * The content type - may be null if it is unknown.
  35. * Unspecified for directories
  36. */
  37. attribute string contentType;
  38. /**
  39. * The fully qualified filename, expressed as a uri
  40. *
  41. * This is encoded with the encoding specified in
  42. * the nsIDirIndexParser, and is also escaped.
  43. */
  44. attribute string location;
  45. /**
  46. * A description for the filename, which should be
  47. * displayed by a viewer
  48. */
  49. attribute wstring description;
  50. /**
  51. * File size, with -1 meaning "unknown"
  52. */
  53. attribute long long size;
  54. /**
  55. * Last-modified time in seconds-since-epoch.
  56. * -1 means unknown - this is valid, because there were no
  57. * ftp servers in 1969
  58. */
  59. attribute PRTime lastModified;
  60. };
  61. %{C++
  62. #define NS_DIRINDEX_CID \
  63. /* { f6913e2e-1dd1-11b2-84be-f455dee342af } */ \
  64. { 0xf6913e2e, \
  65. 0x1dd1, \
  66. 0x11b2, \
  67. { 0x84, 0xbe, 0xf4, 0x55, 0xde, 0xe3, 0x42, 0xaf } \
  68. }
  69. %}