Your IP : 216.73.216.48


Current Path : /usr/X11R6/include/seamonkey-2.40/plugin/
Upload File :
Current File : //usr/X11R6/include/seamonkey-2.40/plugin/nsINetworkInterceptController.h

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

#ifndef __gen_nsINetworkInterceptController_h__
#define __gen_nsINetworkInterceptController_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 nsIChannel; /* forward declaration */

class nsIOutputStream; /* forward declaration */

class nsIURI; /* forward declaration */

namespace mozilla {
namespace dom {
class ChannelInfo;
}
}

/* starting interface:    nsIInterceptedChannel */
#define NS_IINTERCEPTEDCHANNEL_IID_STR "1062c96a-d73c-4ad5-beb7-6e803e414973"

#define NS_IINTERCEPTEDCHANNEL_IID \
  {0x1062c96a, 0xd73c, 0x4ad5, \
    { 0xbe, 0xb7, 0x6e, 0x80, 0x3e, 0x41, 0x49, 0x73 }}

class NS_NO_VTABLE nsIInterceptedChannel : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINTERCEPTEDCHANNEL_IID)

  /* void resetInterception (); */
  NS_IMETHOD ResetInterception(void) = 0;

  /* void synthesizeStatus (in uint16_t status, in ACString reason); */
  NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) = 0;

  /* void synthesizeHeader (in ACString name, in ACString value); */
  NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) = 0;

  /* void finishSynthesizedResponse (); */
  NS_IMETHOD FinishSynthesizedResponse(void) = 0;

  /* void cancel (in nsresult status); */
  NS_IMETHOD Cancel(nsresult status) = 0;

  /* readonly attribute nsIOutputStream responseBody; */
  NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) = 0;

  /* readonly attribute nsIChannel channel; */
  NS_IMETHOD GetChannel(nsIChannel * *aChannel) = 0;

  /* readonly attribute bool isNavigation; */
  NS_IMETHOD GetIsNavigation(bool *aIsNavigation) = 0;

  /* [noscript] void setChannelInfo (in ChannelInfo channelInfo); */
  NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIInterceptedChannel, NS_IINTERCEPTEDCHANNEL_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIINTERCEPTEDCHANNEL \
  NS_IMETHOD ResetInterception(void) override; \
  NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override; \
  NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override; \
  NS_IMETHOD FinishSynthesizedResponse(void) override; \
  NS_IMETHOD Cancel(nsresult status) override; \
  NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override; \
  NS_IMETHOD GetChannel(nsIChannel * *aChannel) override; \
  NS_IMETHOD GetIsNavigation(bool *aIsNavigation) override; \
  NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIINTERCEPTEDCHANNEL \
  NS_METHOD ResetInterception(void); \
  NS_METHOD SynthesizeStatus(uint16_t status, const nsACString & reason); \
  NS_METHOD SynthesizeHeader(const nsACString & name, const nsACString & value); \
  NS_METHOD FinishSynthesizedResponse(void); \
  NS_METHOD Cancel(nsresult status); \
  NS_METHOD GetResponseBody(nsIOutputStream * *aResponseBody); \
  NS_METHOD GetChannel(nsIChannel * *aChannel); \
  NS_METHOD GetIsNavigation(bool *aIsNavigation); \
  NS_METHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIINTERCEPTEDCHANNEL(_to) \
  NS_IMETHOD ResetInterception(void) override { return _to ResetInterception(); } \
  NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override { return _to SynthesizeStatus(status, reason); } \
  NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override { return _to SynthesizeHeader(name, value); } \
  NS_IMETHOD FinishSynthesizedResponse(void) override { return _to FinishSynthesizedResponse(); } \
  NS_IMETHOD Cancel(nsresult status) override { return _to Cancel(status); } \
  NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override { return _to GetResponseBody(aResponseBody); } \
  NS_IMETHOD GetChannel(nsIChannel * *aChannel) override { return _to GetChannel(aChannel); } \
  NS_IMETHOD GetIsNavigation(bool *aIsNavigation) override { return _to GetIsNavigation(aIsNavigation); } \
  NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override { return _to SetChannelInfo(channelInfo); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIINTERCEPTEDCHANNEL(_to) \
  NS_IMETHOD ResetInterception(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetInterception(); } \
  NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeStatus(status, reason); } \
  NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeHeader(name, value); } \
  NS_IMETHOD FinishSynthesizedResponse(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishSynthesizedResponse(); } \
  NS_IMETHOD Cancel(nsresult status) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(status); } \
  NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseBody(aResponseBody); } \
  NS_IMETHOD GetChannel(nsIChannel * *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChannel(aChannel); } \
  NS_IMETHOD GetIsNavigation(bool *aIsNavigation) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsNavigation(aIsNavigation); } \
  NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelInfo(channelInfo); } 

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

/* Header file */
class nsInterceptedChannel : public nsIInterceptedChannel
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIINTERCEPTEDCHANNEL

  nsInterceptedChannel();

private:
  ~nsInterceptedChannel();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsInterceptedChannel, nsIInterceptedChannel)

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

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

/* void resetInterception (); */
NS_IMETHODIMP nsInterceptedChannel::ResetInterception()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void synthesizeStatus (in uint16_t status, in ACString reason); */
NS_IMETHODIMP nsInterceptedChannel::SynthesizeStatus(uint16_t status, const nsACString & reason)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void synthesizeHeader (in ACString name, in ACString value); */
NS_IMETHODIMP nsInterceptedChannel::SynthesizeHeader(const nsACString & name, const nsACString & value)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void finishSynthesizedResponse (); */
NS_IMETHODIMP nsInterceptedChannel::FinishSynthesizedResponse()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void cancel (in nsresult status); */
NS_IMETHODIMP nsInterceptedChannel::Cancel(nsresult status)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIOutputStream responseBody; */
NS_IMETHODIMP nsInterceptedChannel::GetResponseBody(nsIOutputStream * *aResponseBody)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIChannel channel; */
NS_IMETHODIMP nsInterceptedChannel::GetChannel(nsIChannel * *aChannel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute bool isNavigation; */
NS_IMETHODIMP nsInterceptedChannel::GetIsNavigation(bool *aIsNavigation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void setChannelInfo (in ChannelInfo channelInfo); */
NS_IMETHODIMP nsInterceptedChannel::SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsINetworkInterceptController */
#define NS_INETWORKINTERCEPTCONTROLLER_IID_STR "69150b77-b561-43a2-bfba-7301dd5a35d0"

#define NS_INETWORKINTERCEPTCONTROLLER_IID \
  {0x69150b77, 0xb561, 0x43a2, \
    { 0xbf, 0xba, 0x73, 0x01, 0xdd, 0x5a, 0x35, 0xd0 }}

class NS_NO_VTABLE nsINetworkInterceptController : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_INETWORKINTERCEPTCONTROLLER_IID)

  /* bool shouldPrepareForIntercept (in nsIURI aURI, in bool aIsNavigate); */
  NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval) = 0;

  /* void channelIntercepted (in nsIInterceptedChannel aChannel); */
  NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsINetworkInterceptController, NS_INETWORKINTERCEPTCONTROLLER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINETWORKINTERCEPTCONTROLLER \
  NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval) override; \
  NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSINETWORKINTERCEPTCONTROLLER \
  NS_METHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval); \
  NS_METHOD ChannelIntercepted(nsIInterceptedChannel *aChannel); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINETWORKINTERCEPTCONTROLLER(_to) \
  NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval) override { return _to ShouldPrepareForIntercept(aURI, aIsNavigate, _retval); } \
  NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return _to ChannelIntercepted(aChannel); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINETWORKINTERCEPTCONTROLLER(_to) \
  NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShouldPrepareForIntercept(aURI, aIsNavigate, _retval); } \
  NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChannelIntercepted(aChannel); } 

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

/* Header file */
class nsNetworkInterceptController : public nsINetworkInterceptController
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSINETWORKINTERCEPTCONTROLLER

  nsNetworkInterceptController();

private:
  ~nsNetworkInterceptController();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsNetworkInterceptController, nsINetworkInterceptController)

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

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

/* bool shouldPrepareForIntercept (in nsIURI aURI, in bool aIsNavigate); */
NS_IMETHODIMP nsNetworkInterceptController::ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNavigate, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void channelIntercepted (in nsIInterceptedChannel aChannel); */
NS_IMETHODIMP nsNetworkInterceptController::ChannelIntercepted(nsIInterceptedChannel *aChannel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsINetworkInterceptController_h__ */