/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/tinderbox/XR-Trunk/WINNT_5.2_Depend/mozilla/content/base/public/nsISyncLoadDOMService.idl
 */

#ifndef __gen_nsISyncLoadDOMService_h__
#define __gen_nsISyncLoadDOMService_h__


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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIURI; /* forward declaration */

class nsIDOMDocument; /* forward declaration */

class nsIChannel; /* forward declaration */


/* starting interface:    nsISyncLoadDOMService */
#define NS_ISYNCLOADDOMSERVICE_IID_STR "2ae03836-0704-45c9-a545-4169548c0669"

#define NS_ISYNCLOADDOMSERVICE_IID \
  {0x2ae03836, 0x0704, 0x45c9, \
    { 0xa5, 0x45, 0x41, 0x69, 0x54, 0x8c, 0x06, 0x69 }}

/*************************************************************************
 *                                                                       *
 *                          **** NOTICE ****                             *
 *                                                                       *
 *    nsISyncLoadDOMService defines synchronous methods to download      *
 *    data from the network.  Any delays from the server will            *
 *    appear as a hang in the mozilla UI.  Therefore, this interface     *
 *    should be avoided as much as possible.                             *
 *                                                                       *
 *    Don't make me come over there!!                                    *
 *                                                                       *
 *                                                                       *
 ************************************************************************/
/**
 * The nsISyncDOMLoadService interface can be used to synchronously load
 * a document.
 */
class NS_NO_VTABLE nsISyncLoadDOMService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISYNCLOADDOMSERVICE_IID)

  /**
     * Synchronously load the document from the specified channel.
     *
     * @param aChannel   The channel to load the document from.
     * @param aLoaderURI URI of loading document. For security checks
     *                   null if no securitychecks should be done
     *
     * @returns The document loaded from the URI.
     */
  /* nsIDOMDocument loadDocument (in nsIChannel aChannel, in nsIURI aLoaderURI); */
  NS_IMETHOD LoadDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) = 0;

  /* nsIDOMDocument loadDocumentAsXML (in nsIChannel aChannel, in nsIURI aLoaderURI); */
  NS_IMETHOD LoadDocumentAsXML(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) = 0;

  /**
     * Synchronously load an XML document from the specified
     * channel. The channel must be possible to open synchronously.
     *
     * @param aChannel   The channel to load the document from.
     * @param aLoaderURI URI of loading document. For security checks
     *                   null if no securitychecks should be done
     *
     * @returns The document loaded from the URI.
     */
  /* nsIDOMDocument loadLocalDocument (in nsIChannel aChannel, in nsIURI aLoaderURI); */
  NS_IMETHOD LoadLocalDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISyncLoadDOMService, NS_ISYNCLOADDOMSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISYNCLOADDOMSERVICE \
  NS_IMETHOD LoadDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval); \
  NS_IMETHOD LoadDocumentAsXML(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval); \
  NS_IMETHOD LoadLocalDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISYNCLOADDOMSERVICE(_to) \
  NS_IMETHOD LoadDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return _to LoadDocument(aChannel, aLoaderURI, _retval); } \
  NS_IMETHOD LoadDocumentAsXML(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return _to LoadDocumentAsXML(aChannel, aLoaderURI, _retval); } \
  NS_IMETHOD LoadLocalDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return _to LoadLocalDocument(aChannel, aLoaderURI, _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_NSISYNCLOADDOMSERVICE(_to) \
  NS_IMETHOD LoadDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadDocument(aChannel, aLoaderURI, _retval); } \
  NS_IMETHOD LoadDocumentAsXML(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadDocumentAsXML(aChannel, aLoaderURI, _retval); } \
  NS_IMETHOD LoadLocalDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadLocalDocument(aChannel, aLoaderURI, _retval); } 

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

/* Header file */
class nsSyncLoadDOMService : public nsISyncLoadDOMService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISYNCLOADDOMSERVICE

  nsSyncLoadDOMService();

private:
  ~nsSyncLoadDOMService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSyncLoadDOMService, nsISyncLoadDOMService)

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

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

/* nsIDOMDocument loadDocument (in nsIChannel aChannel, in nsIURI aLoaderURI); */
NS_IMETHODIMP nsSyncLoadDOMService::LoadDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMDocument loadDocumentAsXML (in nsIChannel aChannel, in nsIURI aLoaderURI); */
NS_IMETHODIMP nsSyncLoadDOMService::LoadDocumentAsXML(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMDocument loadLocalDocument (in nsIChannel aChannel, in nsIURI aLoaderURI); */
NS_IMETHODIMP nsSyncLoadDOMService::LoadLocalDocument(nsIChannel *aChannel, nsIURI *aLoaderURI, nsIDOMDocument **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsISyncLoadDOMService_h__ */
