|
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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 /** |
|
9 * A datasource that may load asynchronously |
|
10 */ |
|
11 [scriptable, uuid(1D297320-27F7-11d3-BE01-000064657374)] |
|
12 interface nsIRDFRemoteDataSource : nsISupports |
|
13 { |
|
14 /** |
|
15 * This value is <code>true</code> when the datasource has |
|
16 * fully loaded itself. |
|
17 */ |
|
18 readonly attribute boolean loaded; |
|
19 |
|
20 /** |
|
21 * Specify the URI for the data source: this is the prefix |
|
22 * that will be used to register the data source in the |
|
23 * data source registry. |
|
24 * @param aURI the URI to load |
|
25 */ |
|
26 void Init(in string aURI); |
|
27 |
|
28 /** |
|
29 * Refresh the remote datasource, re-loading its contents |
|
30 * from the URI. |
|
31 * |
|
32 * @param aBlocking If <code>true</code>, the call will block |
|
33 * until the datasource has completely reloaded. |
|
34 */ |
|
35 void Refresh(in boolean aBlocking); |
|
36 |
|
37 /** |
|
38 * Request that a data source write its contents out to |
|
39 * permanent storage, if applicable. |
|
40 */ |
|
41 void Flush(); |
|
42 void FlushTo(in string aURI); |
|
43 }; |
|
44 |