nsIHttpHeaderVisitor.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/protocol/http/public/nsIHttpHeaderVisitor.idl
  3. */
  4. #ifndef __gen_nsIHttpHeaderVisitor_h__
  5. #define __gen_nsIHttpHeaderVisitor_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIHttpHeaderVisitor */
  14. #define NS_IHTTPHEADERVISITOR_IID_STR "0cf40717-d7c1-4a94-8c1e-d6c9734101bb"
  15. #define NS_IHTTPHEADERVISITOR_IID \
  16. {0x0cf40717, 0xd7c1, 0x4a94, \
  17. { 0x8c, 0x1e, 0xd6, 0xc9, 0x73, 0x41, 0x01, 0xbb }}
  18. /**
  19. * Implement this interface to visit http headers.
  20. *
  21. * @status FROZEN
  22. */
  23. class NS_NO_VTABLE nsIHttpHeaderVisitor : public nsISupports {
  24. public:
  25. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPHEADERVISITOR_IID)
  26. /**
  27. * Called by the nsIHttpChannel implementation when visiting request and
  28. * response headers.
  29. *
  30. * @param aHeader
  31. * the header being visited.
  32. * @param aValue
  33. * the header value (possibly a comma delimited list).
  34. *
  35. * @throw any exception to terminate enumeration
  36. */
  37. /* void visitHeader (in ACString aHeader, in ACString aValue); */
  38. NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) = 0;
  39. };
  40. /* Use this macro when declaring classes that implement this interface. */
  41. #define NS_DECL_NSIHTTPHEADERVISITOR \
  42. NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue);
  43. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  44. #define NS_FORWARD_NSIHTTPHEADERVISITOR(_to) \
  45. NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) { return _to VisitHeader(aHeader, aValue); }
  46. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  47. #define NS_FORWARD_SAFE_NSIHTTPHEADERVISITOR(_to) \
  48. NS_IMETHOD VisitHeader(const nsACString & aHeader, const nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitHeader(aHeader, aValue); }
  49. #if 0
  50. /* Use the code below as a template for the implementation class for this interface. */
  51. /* Header file */
  52. class nsHttpHeaderVisitor : public nsIHttpHeaderVisitor
  53. {
  54. public:
  55. NS_DECL_ISUPPORTS
  56. NS_DECL_NSIHTTPHEADERVISITOR
  57. nsHttpHeaderVisitor();
  58. private:
  59. ~nsHttpHeaderVisitor();
  60. protected:
  61. /* additional members */
  62. };
  63. /* Implementation file */
  64. NS_IMPL_ISUPPORTS1(nsHttpHeaderVisitor, nsIHttpHeaderVisitor)
  65. nsHttpHeaderVisitor::nsHttpHeaderVisitor()
  66. {
  67. /* member initializers and constructor code */
  68. }
  69. nsHttpHeaderVisitor::~nsHttpHeaderVisitor()
  70. {
  71. /* destructor code */
  72. }
  73. /* void visitHeader (in ACString aHeader, in ACString aValue); */
  74. NS_IMETHODIMP nsHttpHeaderVisitor::VisitHeader(const nsACString & aHeader, const nsACString & aValue)
  75. {
  76. return NS_ERROR_NOT_IMPLEMENTED;
  77. }
  78. /* End of implementation class template. */
  79. #endif
  80. #endif /* __gen_nsIHttpHeaderVisitor_h__ */