/usr/share/idl/firefox/nsIXULTemplateResult.idl is in firefox-dev 11.0+build1-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Neil Deakin.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIAtom;
interface nsIDOMNode;
interface nsIRDFResource;
/**
* A single result generated from a template query. Each result is identified
* by an id, which must be unique within the set of results produced from a
* query. The result may optionally be identified by an RDF resource.
*
* Generally, the result and its id will be able to uniquely identify a node
* in the source data, such as an RDF or XML node. In other contexts, such as
* a database query, a result would represent a particular record.
*
* A result is expected to only be created by a query processor.
*
* Each result also contains a set of variable bindings. The value for a
* particular variable may be retrieved using the getBindingFor and
* getBindingObjectFor methods.
*/
[scriptable, uuid(ebea0230-36fa-41b7-8e31-760806057965)]
interface nsIXULTemplateResult : nsISupports
{
/**
* True if the result represents a container.
*/
readonly attribute boolean isContainer;
/**
* True if the result represents an empty container.
*/
readonly attribute boolean isEmpty;
/**
* True if the template builder may use this result as the reference point
* for additional recursive processing of the template. The template builder
* will reprocess the template using this result as the reference point and
* generate output content that is expected to be inserted as children of the
* output generated for this result. If false, child content is not
* processed. This property identifies only the default handling and may be
* overriden by syntax used in the template.
*/
readonly attribute boolean mayProcessChildren;
/**
* ID of the result. The DOM element created for this result, if any, will
* have its id attribute set to this value. The id must be unique for a
* query.
*/
readonly attribute AString id;
/**
* Resource for the result, which may be null. If set, the resource uri
* must be the same as the ID property.
*/
readonly attribute nsIRDFResource resource;
/**
* The type of the object. The predefined value 'separator' may be used
* for separators. Other values may be used for application specific
* purposes.
*/
readonly attribute AString type;
/**
* Get the string representation of the value of a variable for this
* result. This string will be used in the action body from a template as
* the replacement text. For instance, if the text ?name appears in an
* attribute within the action body, it will be replaced with the result
* of this method. The question mark is considered part of the variable
* name, thus aVar should be ?name and not simply name.
*
* @param aVar the variable to look up
*
* @return the value for the variable or a null string if it has no value
*/
AString getBindingFor(in nsIAtom aVar);
/**
* Get an object value for a variable such as ?name for this result.
*
* This method may return null for a variable, even if getBindingFor returns
* a non-null value for the same variable. This method is provided as a
* convenience when sorting results.
*
* @param aVar the variable to look up
*
* @return the value for the variable or null if it has no value
*/
nsISupports getBindingObjectFor(in nsIAtom aVar);
/**
* Indicate that a particular rule of a query has matched and that output
* will be generated for it. Both the query as compiled by the query
* processor's compileQuery method and the XUL <rule> element are supplied.
* The query must always be one that was compiled by the query processor
* that created this result. The <rule> element must always be a child of
* the <query> element that was used to compile the query.
*
* @param aQuery the query that matched
* @param aRuleNode the rule node that matched
*/
void ruleMatched(in nsISupports aQuery, in nsIDOMNode aRuleNode);
/**
* Indicate that the output for a result has beeen removed and that the
* result is no longer being used by the builder.
*/
void hasBeenRemoved();
};
|