/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * 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.
 *
 * END FLOCK GPL
 */

#include "nsISupports.idl"

interface nsIFile;
interface nsIURL;

interface flockIError;
interface flockIFeedFolder;
interface flockIFeed;

[scriptable, uuid(87a66924-e0bd-4df4-816d-375a83d12a47)]
interface flockIOpmlSubscribeListener : nsISupports {
    boolean onSubscribe(in nsIURL aURL,
                        in nsISupports aCtxt,
                        in unsigned long long aProgress,
                        in unsigned long long aProgressMax);
    void onFinish(in nsISupports aCtxt);

    void onLoadError(in nsISupports aCtxt, in flockIError aError);
    void onError(in AUTF8String aURL,
                 in nsISupports aCtxt,
                 in flockIError aError,
                 in unsigned long long aProgress,
                 in unsigned long long aProgressMax);

    void onGetFeed(in flockIFeed aFeed, in nsISupports aCtxt);
};

[scriptable, uuid(13bef0df-89ba-4608-bfc1-c80a0a8b64a5)]
interface flockIOpmlService : nsISupports {
    void subscribe(in nsIURL url, in flockIFeedFolder folder,
                   in boolean flatRoot,
                   in flockIOpmlSubscribeListener listener,
                   in nsISupports ctxt);
    void export(in flockIFeedFolder folder, in AString title, in nsIFile file);
};
