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

#ifndef __gen_nsILoadGroup_h__
#define __gen_nsILoadGroup_h__

#include "nsIRequest.h"

class nsIChannel; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIStreamObserver; /* forward declaration */

class nsIStreamListener; /* forward declaration */

class nsIInputStream; /* forward declaration */


/* starting interface:    nsILoadGroupListenerFactory */
#define NS_ILOADGROUPLISTENERFACTORY_IID_STR "60fdf550-5392-11d3-9a97-0080c7cb1080"

#define NS_ILOADGROUPLISTENERFACTORY_IID \
  {0x60fdf550, 0x5392, 0x11d3, \
    { 0x9a, 0x97, 0x00, 0x80, 0xc7, 0xcb, 0x10, 0x80 }}

class NS_NO_VTABLE nsILoadGroupListenerFactory : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOADGROUPLISTENERFACTORY_IID)

  /* nsIStreamListener createLoadGroupListener (in nsIStreamListener alistener); */
  NS_IMETHOD CreateLoadGroupListener(nsIStreamListener *alistener, nsIStreamListener **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILOADGROUPLISTENERFACTORY \
  NS_IMETHOD CreateLoadGroupListener(nsIStreamListener *alistener, nsIStreamListener **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILOADGROUPLISTENERFACTORY(_to) \
  NS_IMETHOD CreateLoadGroupListener(nsIStreamListener *alistener, nsIStreamListener **_retval) { return _to ## CreateLoadGroupListener(alistener, _retval); } 

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

/* Header file */
class nsLoadGroupListenerFactory : public nsILoadGroupListenerFactory
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILOADGROUPLISTENERFACTORY

  nsLoadGroupListenerFactory();
  virtual ~nsLoadGroupListenerFactory();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsLoadGroupListenerFactory, nsILoadGroupListenerFactory)

nsLoadGroupListenerFactory::nsLoadGroupListenerFactory()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* nsIStreamListener createLoadGroupListener (in nsIStreamListener alistener); */
NS_IMETHODIMP nsLoadGroupListenerFactory::CreateLoadGroupListener(nsIStreamListener *alistener, nsIStreamListener **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsILoadGroup */
#define NS_ILOADGROUP_IID_STR "19845248-29ab-11d3-8cce-0060b0fc14a3"

#define NS_ILOADGROUP_IID \
  {0x19845248, 0x29ab, 0x11d3, \
    { 0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}

/**
 * A load group maintains a collection of active URL requests. 
 */
class NS_NO_VTABLE nsILoadGroup : public nsIRequest {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOADGROUP_IID)

  /* void init (in nsIStreamObserver observer); */
  NS_IMETHOD Init(nsIStreamObserver *observer) = 0;

  /**
     * Accesses the default load attributes for the group, returned as
     * a flag word. Setting the default load attributes will cause them
     * to be applied to each new channel inserted into the group.
     */
  /* attribute unsigned long defaultLoadAttributes; */
  NS_IMETHOD GetDefaultLoadAttributes(PRUint32 *aDefaultLoadAttributes) = 0;
  NS_IMETHOD SetDefaultLoadAttributes(PRUint32 aDefaultLoadAttributes) = 0;

  /**
     * Accesses the default load channel for the group.  Each time a number
     * of channels are added to a group, the DefaultLoadChannel may be set
     * to indicate that all of the channels are related to a particular URL.
     */
  /* attribute nsIChannel defaultLoadChannel; */
  NS_IMETHOD GetDefaultLoadChannel(nsIChannel * *aDefaultLoadChannel) = 0;
  NS_IMETHOD SetDefaultLoadChannel(nsIChannel * aDefaultLoadChannel) = 0;

  /**
     * Adds a new channel to the group. This will cause the default load
     * attributes to be applied to that channel. If the channel added is 
     * the first channel in the group, the group's observer's OnStartRequest
     * method is called.
     */
  /* void addChannel (in nsIChannel channel, in nsISupports ctxt); */
  NS_IMETHOD AddChannel(nsIChannel *channel, nsISupports *ctxt) = 0;

  /**
     * Removes a channel from the group. If the channel removed is 
     * the last channel in the group, the group's observer's OnStopRequest
     * method is called.
     */
  /* void removeChannel (in nsIChannel channel, in nsISupports ctxt, in nsresult status, in wstring statusArg); */
  NS_IMETHOD RemoveChannel(nsIChannel *channel, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg) = 0;

  /**
     * Returns the channels contained directly in this group.
     * Enumerator element type: nsIChannel.
     */
  /* readonly attribute nsISimpleEnumerator channels; */
  NS_IMETHOD GetChannels(nsISimpleEnumerator * *aChannels) = 0;

  /* attribute nsIStreamObserver groupObserver; */
  NS_IMETHOD GetGroupObserver(nsIStreamObserver * *aGroupObserver) = 0;
  NS_IMETHOD SetGroupObserver(nsIStreamObserver * aGroupObserver) = 0;

  /* attribute nsILoadGroupListenerFactory groupListenerFactory; */
  NS_IMETHOD GetGroupListenerFactory(nsILoadGroupListenerFactory * *aGroupListenerFactory) = 0;
  NS_IMETHOD SetGroupListenerFactory(nsILoadGroupListenerFactory * aGroupListenerFactory) = 0;

  /* readonly attribute unsigned long activeCount; */
  NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILOADGROUP \
  NS_IMETHOD Init(nsIStreamObserver *observer); \
  NS_IMETHOD GetDefaultLoadAttributes(PRUint32 *aDefaultLoadAttributes); \
  NS_IMETHOD SetDefaultLoadAttributes(PRUint32 aDefaultLoadAttributes); \
  NS_IMETHOD GetDefaultLoadChannel(nsIChannel * *aDefaultLoadChannel); \
  NS_IMETHOD SetDefaultLoadChannel(nsIChannel * aDefaultLoadChannel); \
  NS_IMETHOD AddChannel(nsIChannel *channel, nsISupports *ctxt); \
  NS_IMETHOD RemoveChannel(nsIChannel *channel, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg); \
  NS_IMETHOD GetChannels(nsISimpleEnumerator * *aChannels); \
  NS_IMETHOD GetGroupObserver(nsIStreamObserver * *aGroupObserver); \
  NS_IMETHOD SetGroupObserver(nsIStreamObserver * aGroupObserver); \
  NS_IMETHOD GetGroupListenerFactory(nsILoadGroupListenerFactory * *aGroupListenerFactory); \
  NS_IMETHOD SetGroupListenerFactory(nsILoadGroupListenerFactory * aGroupListenerFactory); \
  NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILOADGROUP(_to) \
  NS_IMETHOD Init(nsIStreamObserver *observer) { return _to ## Init(observer); } \
  NS_IMETHOD GetDefaultLoadAttributes(PRUint32 *aDefaultLoadAttributes) { return _to ## GetDefaultLoadAttributes(aDefaultLoadAttributes); } \
  NS_IMETHOD SetDefaultLoadAttributes(PRUint32 aDefaultLoadAttributes) { return _to ## SetDefaultLoadAttributes(aDefaultLoadAttributes); } \
  NS_IMETHOD GetDefaultLoadChannel(nsIChannel * *aDefaultLoadChannel) { return _to ## GetDefaultLoadChannel(aDefaultLoadChannel); } \
  NS_IMETHOD SetDefaultLoadChannel(nsIChannel * aDefaultLoadChannel) { return _to ## SetDefaultLoadChannel(aDefaultLoadChannel); } \
  NS_IMETHOD AddChannel(nsIChannel *channel, nsISupports *ctxt) { return _to ## AddChannel(channel, ctxt); } \
  NS_IMETHOD RemoveChannel(nsIChannel *channel, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg) { return _to ## RemoveChannel(channel, ctxt, status, statusArg); } \
  NS_IMETHOD GetChannels(nsISimpleEnumerator * *aChannels) { return _to ## GetChannels(aChannels); } \
  NS_IMETHOD GetGroupObserver(nsIStreamObserver * *aGroupObserver) { return _to ## GetGroupObserver(aGroupObserver); } \
  NS_IMETHOD SetGroupObserver(nsIStreamObserver * aGroupObserver) { return _to ## SetGroupObserver(aGroupObserver); } \
  NS_IMETHOD GetGroupListenerFactory(nsILoadGroupListenerFactory * *aGroupListenerFactory) { return _to ## GetGroupListenerFactory(aGroupListenerFactory); } \
  NS_IMETHOD SetGroupListenerFactory(nsILoadGroupListenerFactory * aGroupListenerFactory) { return _to ## SetGroupListenerFactory(aGroupListenerFactory); } \
  NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return _to ## GetActiveCount(aActiveCount); } 

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

/* Header file */
class nsLoadGroup : public nsILoadGroup
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILOADGROUP

  nsLoadGroup();
  virtual ~nsLoadGroup();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsLoadGroup, nsILoadGroup)

nsLoadGroup::nsLoadGroup()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* void init (in nsIStreamObserver observer); */
NS_IMETHODIMP nsLoadGroup::Init(nsIStreamObserver *observer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long defaultLoadAttributes; */
NS_IMETHODIMP nsLoadGroup::GetDefaultLoadAttributes(PRUint32 *aDefaultLoadAttributes)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadGroup::SetDefaultLoadAttributes(PRUint32 aDefaultLoadAttributes)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIChannel defaultLoadChannel; */
NS_IMETHODIMP nsLoadGroup::GetDefaultLoadChannel(nsIChannel * *aDefaultLoadChannel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadGroup::SetDefaultLoadChannel(nsIChannel * aDefaultLoadChannel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addChannel (in nsIChannel channel, in nsISupports ctxt); */
NS_IMETHODIMP nsLoadGroup::AddChannel(nsIChannel *channel, nsISupports *ctxt)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeChannel (in nsIChannel channel, in nsISupports ctxt, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP nsLoadGroup::RemoveChannel(nsIChannel *channel, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsISimpleEnumerator channels; */
NS_IMETHODIMP nsLoadGroup::GetChannels(nsISimpleEnumerator * *aChannels)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIStreamObserver groupObserver; */
NS_IMETHODIMP nsLoadGroup::GetGroupObserver(nsIStreamObserver * *aGroupObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadGroup::SetGroupObserver(nsIStreamObserver * aGroupObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsILoadGroupListenerFactory groupListenerFactory; */
NS_IMETHODIMP nsLoadGroup::GetGroupListenerFactory(nsILoadGroupListenerFactory * *aGroupListenerFactory)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLoadGroup::SetGroupListenerFactory(nsILoadGroupListenerFactory * aGroupListenerFactory)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long activeCount; */
NS_IMETHODIMP nsLoadGroup::GetActiveCount(PRUint32 *aActiveCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_LOADGROUP_CID                             \
{ /* e1c61582-2a84-11d3-8cce-0060b0fc14a3 */         \
    0xe1c61582,                                      \
    0x2a84,                                          \
    0x11d3,                                          \
    {0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
}

#endif /* __gen_nsILoadGroup_h__ */
