/*
 * 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 "flockIHousekeeping.idl"

/**
 * Stream Housekeeping runs periodically in the background, looking for
 * any streams that have a maximum item cap. You can also call it explictly
 * on a stream, or a set of streams.
 */
[scriptable, uuid(9e0efb6f-290d-46be-a2b9-2d4ac67042f0)]
interface flockIStreamHousekeeping : flockIHousekeeping {
  /**
   * Prunes a stream to its maximum item cap.
   *
   * @param aURN (in) The ID of the stream to prune.
   */
  void capItemsForObject(in AString aURN);
};

/**
 * Implement this if your service wants to dynamically determine the
 * maximum item count for a given stream that it owns instead of
 * having StreamHousekeeping look at static properties.
 */
[scriptable, uuid(2b331722-9b3e-47cc-b03d-170a12e93a49)]
interface flockIStreamOwner : nsISupports {
  /**
   * Returns the maximum item count for a given stream.
   *
   * @param aURN The ID of the stream.
   */
  PRUint32 getMaxItemsForStream(in AString aURN);
};
