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.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsIRDFDataSource.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsISimpleEnumerator; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * An nsIRDFCompositeDataSource composes individual data sources, providing |
michael@0 | 12 | * the illusion of a single, coherent RDF graph. |
michael@0 | 13 | */ |
michael@0 | 14 | [scriptable, uuid(96343820-307C-11D2-BC15-00805F912FE7)] |
michael@0 | 15 | interface nsIRDFCompositeDataSource : nsIRDFDataSource { |
michael@0 | 16 | |
michael@0 | 17 | /** |
michael@0 | 18 | * |
michael@0 | 19 | * Set this value to <code>true</code> if the composite datasource |
michael@0 | 20 | * may contains at least one datasource that has <em>negative</em> |
michael@0 | 21 | * assertions. (This is the default.) |
michael@0 | 22 | * |
michael@0 | 23 | * Set this value to <code>false</code> if none of the datasources |
michael@0 | 24 | * being composed contains a negative assertion. This allows the |
michael@0 | 25 | * composite datasource to perform some query optimizations. |
michael@0 | 26 | * |
michael@0 | 27 | * By default, this value is <code>true</true>. |
michael@0 | 28 | */ |
michael@0 | 29 | attribute boolean allowNegativeAssertions; |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * Set to <code>true</code> if the composite datasource should |
michael@0 | 33 | * take care to coalesce duplicate arcs when returning values from |
michael@0 | 34 | * queries. (This is the default.) |
michael@0 | 35 | * |
michael@0 | 36 | * Set to <code>false</code> if the composite datasource shouldn't |
michael@0 | 37 | * bother to check for duplicates. This allows the composite |
michael@0 | 38 | * datasource to more efficiently answer queries. |
michael@0 | 39 | * |
michael@0 | 40 | * By default, this value is <code>true</code>. |
michael@0 | 41 | */ |
michael@0 | 42 | attribute boolean coalesceDuplicateArcs; |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Add a datasource the the composite data source. |
michael@0 | 46 | * @param aDataSource the datasource to add to composite |
michael@0 | 47 | */ |
michael@0 | 48 | void AddDataSource(in nsIRDFDataSource aDataSource); |
michael@0 | 49 | |
michael@0 | 50 | /** |
michael@0 | 51 | * Remove a datasource from the composite data source. |
michael@0 | 52 | * @param aDataSource the datasource to remove from the composite |
michael@0 | 53 | */ |
michael@0 | 54 | void RemoveDataSource(in nsIRDFDataSource aDataSource); |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * Retrieve the datasources in the composite data source. |
michael@0 | 58 | * @return an nsISimpleEnumerator that will enumerate each |
michael@0 | 59 | * of the datasources in the composite |
michael@0 | 60 | */ |
michael@0 | 61 | nsISimpleEnumerator GetDataSources(); |
michael@0 | 62 | }; |
michael@0 | 63 | |
michael@0 | 64 | %{C++ |
michael@0 | 65 | extern nsresult |
michael@0 | 66 | NS_NewRDFCompositeDataSource(nsIRDFCompositeDataSource** result); |
michael@0 | 67 | %} |
michael@0 | 68 |