/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/mozilla-central-win32-xulrunner/build/xpcom/components/nsIManifestLoader.idl
 */

#ifndef __gen_nsIManifestLoader_h__
#define __gen_nsIManifestLoader_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsILocalFile_h__
#include "nsILocalFile.h"
#endif

#ifndef __gen_nsIInputStream_h__
#include "nsIInputStream.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:    nsIManifestLoaderSink */
#define NS_IMANIFESTLOADERSINK_IID_STR "6e48c500-8682-4730-add6-7db693b9e7ba"

#define NS_IMANIFESTLOADERSINK_IID \
  {0x6e48c500, 0x8682, 0x4730, \
    { 0xad, 0xd6, 0x7d, 0xb6, 0x93, 0xb9, 0xe7, 0xba }}

/**
 * Implement nsIXPTLoaderSink if you want to enumerate the entries in
 * an XPT archive of some kind
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIManifestLoaderSink : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMANIFESTLOADERSINK_IID)

  /**
     * Called by the loader for each components / *.manifest and
     * chrome / *.manifest in the archive.
     * @param itemName the name of this particular item in the archive
     * @param index the index of the item inthe archive
     * @param stream contains the contents of the xpt file
     */
  /* void foundEntry (in string itemName, in long index, in nsIInputStream xptData); */
  NS_SCRIPTABLE NS_IMETHOD FoundEntry(const char *itemName, PRInt32 index, nsIInputStream *xptData) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIManifestLoaderSink, NS_IMANIFESTLOADERSINK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMANIFESTLOADERSINK \
  NS_SCRIPTABLE NS_IMETHOD FoundEntry(const char *itemName, PRInt32 index, nsIInputStream *xptData); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMANIFESTLOADERSINK(_to) \
  NS_SCRIPTABLE NS_IMETHOD FoundEntry(const char *itemName, PRInt32 index, nsIInputStream *xptData) { return _to FoundEntry(itemName, index, xptData); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMANIFESTLOADERSINK(_to) \
  NS_SCRIPTABLE NS_IMETHOD FoundEntry(const char *itemName, PRInt32 index, nsIInputStream *xptData) { return !_to ? NS_ERROR_NULL_POINTER : _to->FoundEntry(itemName, index, xptData); } 

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

/* Header file */
class nsManifestLoaderSink : public nsIManifestLoaderSink
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMANIFESTLOADERSINK

  nsManifestLoaderSink();

private:
  ~nsManifestLoaderSink();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsManifestLoaderSink, nsIManifestLoaderSink)

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

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

/* void foundEntry (in string itemName, in long index, in nsIInputStream xptData); */
NS_IMETHODIMP nsManifestLoaderSink::FoundEntry(const char *itemName, PRInt32 index, nsIInputStream *xptData)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIManifestLoader */
#define NS_IMANIFESTLOADER_IID_STR "368a15d9-17a9-4c2b-ac3d-a35b3a22b876"

#define NS_IMANIFESTLOADER_IID \
  {0x368a15d9, 0x17a9, 0x4c2b, \
    { 0xac, 0x3d, 0xa3, 0x5b, 0x3a, 0x22, 0xb8, 0x76 }}

/**
 * The XPT loader interface: implemented by a loader to grab an input
 * stream which will be consumed by the interface loader.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIManifestLoader : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMANIFESTLOADER_IID)

  /**
     * enumerate entries in the given archive
     * for each entry found, the loader will call the sink's
     * foundEntry() method with the appropriate information and a
     * stream that the consumer can read from
     * @param file the file to read from
     * @param sink an object which will be called with each file found
     *             in the file
     */
  /* void enumerateEntries (in nsILocalFile file, in nsIManifestLoaderSink sink); */
  NS_SCRIPTABLE NS_IMETHOD EnumerateEntries(nsILocalFile *file, nsIManifestLoaderSink *sink) = 0;

  /**
     * Load a specific entry from the archive
     * @param file the file to read from
     * @param name the name of the xpt within the file
     * @return an input stream that will read the raw xpt data from
     *         the file
     */
  /* nsIInputStream loadEntry (in nsILocalFile file, in string name); */
  NS_SCRIPTABLE NS_IMETHOD LoadEntry(nsILocalFile *file, const char *name, nsIInputStream **_retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIManifestLoader, NS_IMANIFESTLOADER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMANIFESTLOADER \
  NS_SCRIPTABLE NS_IMETHOD EnumerateEntries(nsILocalFile *file, nsIManifestLoaderSink *sink); \
  NS_SCRIPTABLE NS_IMETHOD LoadEntry(nsILocalFile *file, const char *name, nsIInputStream **_retval NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMANIFESTLOADER(_to) \
  NS_SCRIPTABLE NS_IMETHOD EnumerateEntries(nsILocalFile *file, nsIManifestLoaderSink *sink) { return _to EnumerateEntries(file, sink); } \
  NS_SCRIPTABLE NS_IMETHOD LoadEntry(nsILocalFile *file, const char *name, nsIInputStream **_retval NS_OUTPARAM) { return _to LoadEntry(file, name, _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_NSIMANIFESTLOADER(_to) \
  NS_SCRIPTABLE NS_IMETHOD EnumerateEntries(nsILocalFile *file, nsIManifestLoaderSink *sink) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateEntries(file, sink); } \
  NS_SCRIPTABLE NS_IMETHOD LoadEntry(nsILocalFile *file, const char *name, nsIInputStream **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadEntry(file, name, _retval); } 

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

/* Header file */
class nsManifestLoader : public nsIManifestLoader
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMANIFESTLOADER

  nsManifestLoader();

private:
  ~nsManifestLoader();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsManifestLoader, nsIManifestLoader)

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

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

/* void enumerateEntries (in nsILocalFile file, in nsIManifestLoaderSink sink); */
NS_IMETHODIMP nsManifestLoader::EnumerateEntries(nsILocalFile *file, nsIManifestLoaderSink *sink)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIInputStream loadEntry (in nsILocalFile file, in string name); */
NS_IMETHODIMP nsManifestLoader::LoadEntry(nsILocalFile *file, const char *name, nsIInputStream **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIManifestLoader_h__ */
