michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0:
michael@0: #include "nsISupports.idl"
michael@0:
michael@0: /**
michael@0: * A datasource that may load asynchronously
michael@0: */
michael@0: [scriptable, uuid(1D297320-27F7-11d3-BE01-000064657374)]
michael@0: interface nsIRDFRemoteDataSource : nsISupports
michael@0: {
michael@0: /**
michael@0: * This value is true
when the datasource has
michael@0: * fully loaded itself.
michael@0: */
michael@0: readonly attribute boolean loaded;
michael@0:
michael@0: /**
michael@0: * Specify the URI for the data source: this is the prefix
michael@0: * that will be used to register the data source in the
michael@0: * data source registry.
michael@0: * @param aURI the URI to load
michael@0: */
michael@0: void Init(in string aURI);
michael@0:
michael@0: /**
michael@0: * Refresh the remote datasource, re-loading its contents
michael@0: * from the URI.
michael@0: *
michael@0: * @param aBlocking If true
, the call will block
michael@0: * until the datasource has completely reloaded.
michael@0: */
michael@0: void Refresh(in boolean aBlocking);
michael@0:
michael@0: /**
michael@0: * Request that a data source write its contents out to
michael@0: * permanent storage, if applicable.
michael@0: */
michael@0: void Flush();
michael@0: void FlushTo(in string aURI);
michael@0: };
michael@0: