nsIRDFLiteral.idl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 "nsIRDFNode.idl"
  6. %{C++
  7. #include "nscore.h" // for char16_t
  8. %}
  9. [ptr] native const_octet_ptr(const uint8_t);
  10. /**
  11. * A literal node in the graph, whose value is a string.
  12. */
  13. [scriptable, uuid(E0C493D2-9542-11d2-8EB8-00805F29F370)]
  14. interface nsIRDFLiteral : nsIRDFNode {
  15. /**
  16. * The Unicode string value of the literal.
  17. */
  18. readonly attribute wstring Value;
  19. /**
  20. * An unscriptable version used to avoid a string copy. Meant
  21. * for use as a performance optimization.
  22. */
  23. [noscript] void GetValueConst([shared] out wstring aConstValue);
  24. };
  25. /**
  26. * A literal node in the graph, whose value is a date
  27. */
  28. [scriptable, uuid(E13A24E1-C77A-11d2-80BE-006097B76B8E)]
  29. interface nsIRDFDate : nsIRDFNode {
  30. /**
  31. * The date value of the literal
  32. */
  33. readonly attribute PRTime Value;
  34. };
  35. /**
  36. * A literal node in the graph, whose value is an integer
  37. */
  38. [scriptable, uuid(E13A24E3-C77A-11d2-80BE-006097B76B8E)]
  39. interface nsIRDFInt : nsIRDFNode {
  40. /**
  41. * The integer value of the literal
  42. */
  43. readonly attribute long Value;
  44. };
  45. /**
  46. * A literal node in the graph, whose value is arbitrary
  47. * binary data.
  48. */
  49. [scriptable, uuid(237f85a2-1dd2-11b2-94af-8122582fc45e)]
  50. interface nsIRDFBlob : nsIRDFNode {
  51. /**
  52. * The binary data.
  53. */
  54. [noscript] readonly attribute const_octet_ptr value;
  55. /**
  56. * The data's length.
  57. */
  58. readonly attribute long length;
  59. };