Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 #ifndef nsXULTemplateResultXML_h__
7 #define nsXULTemplateResultXML_h__
9 #include "nsCOMPtr.h"
10 #include "nsIURI.h"
11 #include "nsIRDFResource.h"
12 #include "nsXULTemplateQueryProcessorXML.h"
13 #include "nsIXULTemplateResult.h"
14 #include "mozilla/Attributes.h"
16 /**
17 * An single result of an query
18 */
19 class nsXULTemplateResultXML MOZ_FINAL : public nsIXULTemplateResult
20 {
21 public:
22 NS_DECL_ISUPPORTS
24 NS_DECL_NSIXULTEMPLATERESULT
26 nsXULTemplateResultXML(nsXMLQuery* aQuery,
27 nsIDOMNode* aNode,
28 nsXMLBindingSet* aBindings);
30 ~nsXULTemplateResultXML() {}
32 void GetNode(nsIDOMNode** aNode);
34 protected:
36 // ID used for persisting data. It is constructed using the mNode's
37 // base uri plus the node's id to form 'baseuri#id'. If the node has no
38 // id, then an id of the form 'row<some number>' is generated. In the
39 // latter case, persistence will not work as there won't be a unique id.
40 nsAutoString mId;
42 // query that generated the result
43 nsCOMPtr<nsXMLQuery> mQuery;
45 // context node in datasource
46 nsCOMPtr<nsIDOMNode> mNode;
48 // assignments in query
49 nsXMLBindingValues mRequiredValues;
51 // extra assignments made by rules (<binding> tags)
52 nsXMLBindingValues mOptionalValues;
53 };
55 #endif // nsXULTemplateResultXML_h__