rdf/base/idl/nsIRDFLiteral.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/rdf/base/idl/nsIRDFLiteral.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,68 @@
     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 "nsIRDFNode.idl"
    1.10 +
    1.11 +%{C++
    1.12 +#include "nscore.h" // for char16_t
    1.13 +%}
    1.14 +
    1.15 +[ptr] native const_octet_ptr(const uint8_t);
    1.16 +
    1.17 +/**
    1.18 + * A literal node in the graph, whose value is a string.
    1.19 + */
    1.20 +[scriptable, uuid(E0C493D2-9542-11d2-8EB8-00805F29F370)]
    1.21 +interface nsIRDFLiteral : nsIRDFNode {
    1.22 +    /**
    1.23 +     * The Unicode string value of the literal.
    1.24 +     */
    1.25 +    readonly attribute wstring Value;
    1.26 +
    1.27 +    /**
    1.28 +     * An unscriptable version used to avoid a string copy. Meant
    1.29 +     * for use as a performance optimization.
    1.30 +     */
    1.31 +    [noscript] void GetValueConst([shared] out wstring aConstValue);
    1.32 +};
    1.33 +
    1.34 +/**
    1.35 + * A literal node in the graph, whose value is a date
    1.36 + */
    1.37 +[scriptable, uuid(E13A24E1-C77A-11d2-80BE-006097B76B8E)]
    1.38 +interface nsIRDFDate : nsIRDFNode {
    1.39 +    /**
    1.40 +     * The date value of the literal
    1.41 +     */
    1.42 +    readonly attribute PRTime Value;
    1.43 +};
    1.44 +
    1.45 +/**
    1.46 + * A literal node in the graph, whose value is an integer
    1.47 + */
    1.48 +[scriptable, uuid(E13A24E3-C77A-11d2-80BE-006097B76B8E)]
    1.49 +interface nsIRDFInt : nsIRDFNode {
    1.50 +    /**
    1.51 +     * The integer value of the literal
    1.52 +     */
    1.53 +    readonly attribute long Value;
    1.54 +};
    1.55 +
    1.56 +/**
    1.57 + * A literal node in the graph, whose value is arbitrary
    1.58 + * binary data.
    1.59 + */
    1.60 +[scriptable, uuid(237f85a2-1dd2-11b2-94af-8122582fc45e)]
    1.61 +interface nsIRDFBlob : nsIRDFNode {
    1.62 +    /**
    1.63 +     * The binary data.
    1.64 +     */
    1.65 +    [noscript] readonly attribute const_octet_ptr value;
    1.66 +
    1.67 +    /**
    1.68 +     * The data's length.
    1.69 +     */
    1.70 +    readonly attribute long length;
    1.71 +};

mercurial