/*
 * 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 "nsISimpleEnumerator.idl"
#include "nsIURL.idl"

#include "flockIFeedFolder.idl"
#include "flockIFeedContextObserver.idl"

interface flockIFeed;

[scriptable, uuid(4a6b65bb-0873-41a3-b87d-6be22234926c)]
interface flockIFeedContext : nsISupports {
    AString getName();

    flockIFeedFolder getRoot();

    flockIFeed getSubscription(in nsIURL url);
    nsISimpleEnumerator getSubscriptions();

    boolean existsSubscription(in nsIURL url);

    void refresh();

    PRInt64 getRefreshInterval();
    void setRefreshInterval(in PRInt64 minutes);

    PRInt64 getFeedItemCap();
    void setFeedItemCap(in PRInt64 maxItems);
    
    void addObserver(in flockIFeedContextObserver observer);
    void removeObserver(in flockIFeedContextObserver observer);
};
