Bug 458861. Validate TrueType headers before activating downloaded font. r=roc, sr...
[wine-gecko.git] / rdf / base / idl / nsIRDFResource.idl
blob1b284ba73f30dbd6515f1f7978206ed85fe5694b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsrootidl.idl"
39 #include "nsIRDFNode.idl"
42 /**
43 * An nsIRDFResource is an object that has unique identity in the
44 * RDF data model. The object's identity is determined by its URI.
46 [scriptable, uuid(fb9686a7-719a-49dc-9107-10dea5739341)]
47 interface nsIRDFResource : nsIRDFNode {
48 /**
49 * The single-byte string value of the resource.
50 * @note THIS IS OBSOLETE. C++ should use GetValueConst and script
51 * should use .valueUTF8
53 readonly attribute string Value;
55 /**
56 * The UTF-8 URI of the resource.
58 readonly attribute AUTF8String ValueUTF8;
60 /**
61 * An unscriptable version used to avoid a string copy. Meant
62 * for use as a performance optimization. The string is encoded
63 * in UTF-8.
65 [noscript] void GetValueConst([shared] out string aConstValue);
67 /**
68 * This method is called by the nsIRDFService after constructing
69 * a resource object to initialize its URI. You would not normally
70 * call this method directly
72 void Init(in string uri);
74 /**
75 * Determine if the resource has the given URI.
77 boolean EqualsString(in string aURI);
79 /**
80 * Retrieve the "delegate" object for this resource. A resource
81 * may have several delegate objects, each of whose lifetimes is
82 * bound to the life of the resource object.
84 * This method will return the delegate for the given key after
85 * QueryInterface()-ing it to the requested IID.
87 * If no delegate exists for the specified key, this method will
88 * attempt to create one using the component manager. Specifically,
89 * it will combine aKey with the resource's URI scheme to produce
90 * a ContractID as follows:
92 * component:/rdf/delegate-factory/[key]/[scheme]
94 * This ContractID will be used to locate a factory using the
95 * FindFactory() method of nsIComponentManager. If the nsIFactory
96 * exists, it will be used to create a "delegate factory"; that
97 * is, an object that supports nsIRDFDelegateFactory. The delegate
98 * factory will be used to construct the delegate object.
100 void GetDelegate(in string aKey, in nsIIDRef aIID,
101 [iid_is(aIID),retval] out nsQIResult aResult);
104 * Force a delegate to be "unbound" from the resource.
106 * Normally, a delegate object's lifetime will be identical to
107 * that of the resource to which it is bound; this method allows a
108 * delegate to unlink itself from an RDF resource prematurely.
110 void ReleaseDelegate(in string aKey);