/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM flockIStreamHousekeeping.idl
 */

#ifndef __gen_flockIStreamHousekeeping_h__
#define __gen_flockIStreamHousekeeping_h__


#ifndef __gen_flockIHousekeeping_h__
#include "flockIHousekeeping.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    flockIStreamHousekeeping */
#define FLOCKISTREAMHOUSEKEEPING_IID_STR "9e0efb6f-290d-46be-a2b9-2d4ac67042f0"

#define FLOCKISTREAMHOUSEKEEPING_IID \
  {0x9e0efb6f, 0x290d, 0x46be, \
    { 0xa2, 0xb9, 0x2d, 0x4a, 0xc6, 0x70, 0x42, 0xf0 }}

/**
 * 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.
 */
class NS_NO_VTABLE flockIStreamHousekeeping : public flockIHousekeeping {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKISTREAMHOUSEKEEPING_IID)

  /**
   * Prunes a stream to its maximum item cap.
   *
   * @param aURN (in) The ID of the stream to prune.
   */
  /* void capItemsForObject (in AString aURN); */
  NS_IMETHOD CapItemsForObject(const nsAString & aURN) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKISTREAMHOUSEKEEPING \
  NS_IMETHOD CapItemsForObject(const nsAString & aURN); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKISTREAMHOUSEKEEPING(_to) \
  NS_IMETHOD CapItemsForObject(const nsAString & aURN) { return _to CapItemsForObject(aURN); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKISTREAMHOUSEKEEPING(_to) \
  NS_IMETHOD CapItemsForObject(const nsAString & aURN) { return !_to ? NS_ERROR_NULL_POINTER : _to->CapItemsForObject(aURN); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public flockIStreamHousekeeping
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKISTREAMHOUSEKEEPING

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockIStreamHousekeeping)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* void capItemsForObject (in AString aURN); */
NS_IMETHODIMP _MYCLASS_::CapItemsForObject(const nsAString & aURN)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    flockIStreamOwner */
#define FLOCKISTREAMOWNER_IID_STR "2b331722-9b3e-47cc-b03d-170a12e93a49"

#define FLOCKISTREAMOWNER_IID \
  {0x2b331722, 0x9b3e, 0x47cc, \
    { 0xb0, 0x3d, 0x17, 0x0a, 0x12, 0xe9, 0x3a, 0x49 }}

/**
 * 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.
 */
class NS_NO_VTABLE flockIStreamOwner : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKISTREAMOWNER_IID)

  /**
   * Returns the maximum item count for a given stream.
   *
   * @param aURN The ID of the stream.
   */
  /* PRUint32 getMaxItemsForStream (in AString aURN); */
  NS_IMETHOD GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKISTREAMOWNER \
  NS_IMETHOD GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKISTREAMOWNER(_to) \
  NS_IMETHOD GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval) { return _to GetMaxItemsForStream(aURN, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKISTREAMOWNER(_to) \
  NS_IMETHOD GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxItemsForStream(aURN, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public flockIStreamOwner
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKISTREAMOWNER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockIStreamOwner)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* PRUint32 getMaxItemsForStream (in AString aURN); */
NS_IMETHODIMP _MYCLASS_::GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_flockIStreamHousekeeping_h__ */
