/*
 * 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
class nsIRDFResource; /* forward declaration */


/* starting interface:    flockIStreamHousekeeping */
#define FLOCKISTREAMHOUSEKEEPING_IID_STR "220ef36f-291d-46be-a2b9-2d4198a04250"

#define FLOCKISTREAMHOUSEKEEPING_IID \
  {0x220ef36f, 0x291d, 0x46be, \
    { 0xa2, 0xb9, 0x2d, 0x41, 0x98, 0xa0, 0x42, 0x50 }}

/**
 * Stream Housekeeping caps any streams that have a maximum item cap. 
 * You can also call it explicitly on a stream.
 */
class NS_NO_VTABLE NS_SCRIPTABLE flockIStreamHousekeeping : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKISTREAMHOUSEKEEPING_IID)

  /* void capAllStreams (); */
  NS_SCRIPTABLE NS_IMETHOD CapAllStreams(void) = 0;

  /**
   * Prunes a stream to its maximum item cap.
   *
   * @param aStreamResource (in) The resource of the stream to prune.
   */
  /* void capItemsforStream (in nsIRDFResource aStreamResource); */
  NS_SCRIPTABLE NS_IMETHOD CapItemsforStream(nsIRDFResource *aStreamResource) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIStreamHousekeeping, FLOCKISTREAMHOUSEKEEPING_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKISTREAMHOUSEKEEPING \
  NS_SCRIPTABLE NS_IMETHOD CapAllStreams(void); \
  NS_SCRIPTABLE NS_IMETHOD CapItemsforStream(nsIRDFResource *aStreamResource); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKISTREAMHOUSEKEEPING(_to) \
  NS_SCRIPTABLE NS_IMETHOD CapAllStreams(void) { return _to CapAllStreams(); } \
  NS_SCRIPTABLE NS_IMETHOD CapItemsforStream(nsIRDFResource *aStreamResource) { return _to CapItemsforStream(aStreamResource); } 

/* 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_SCRIPTABLE NS_IMETHOD CapAllStreams(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CapAllStreams(); } \
  NS_SCRIPTABLE NS_IMETHOD CapItemsforStream(nsIRDFResource *aStreamResource) { return !_to ? NS_ERROR_NULL_POINTER : _to->CapItemsforStream(aStreamResource); } 

#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 capAllStreams (); */
NS_IMETHODIMP _MYCLASS_::CapAllStreams()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void capItemsforStream (in nsIRDFResource aStreamResource); */
NS_IMETHODIMP _MYCLASS_::CapItemsforStream(nsIRDFResource *aStreamResource)
{
    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 NS_SCRIPTABLE flockIStreamOwner : public nsISupports {
 public: 

  NS_DECLARE_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_SCRIPTABLE NS_IMETHOD GetMaxItemsForStream(const nsAString & aURN, PRUint32 *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIStreamOwner, FLOCKISTREAMOWNER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKISTREAMOWNER \
  NS_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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__ */
