/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2008
 * 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"

#include "nsIFile.idl"
#include "nsIURL.idl"

#include "flockIError.idl"
#include "flockIFeedFolder.idl"
#include "flockIFeed.idl"

[scriptable, uuid(1dd9dda6-da44-4f30-aec3-ab3285809ef8)]
interface flockIOpmlSubscribeListener : nsISupports {
    void onSubscribe(in flockIFeed feed, in nsISupports ctxt,
                     in unsigned long long progress,
                     in unsigned long long progressMax);
    void onFinish(in nsISupports ctxt);

    void onLoadError(in nsISupports ctxt, in flockIError error);
    void onError(in AUTF8String url, in nsISupports ctxt,
                 in flockIError error,
                 in unsigned long long progress,
                 in unsigned long long progressMax);

    void onGetFeed(in flockIFeed feed, in nsISupports ctxt);
};

[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);
};
