nsIGlobalHistory.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/docshell/base/nsIGlobalHistory.idl
  3. */
  4. #ifndef __gen_nsIGlobalHistory_h__
  5. #define __gen_nsIGlobalHistory_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: nsIGlobalHistory */
  14. #define NS_IGLOBALHISTORY_IID_STR "9491c383-e3c4-11d2-bdbe-0050040a9b44"
  15. #define NS_IGLOBALHISTORY_IID \
  16. {0x9491c383, 0xe3c4, 0x11d2, \
  17. { 0xbd, 0xbe, 0x00, 0x50, 0x04, 0x0a, 0x9b, 0x44 }}
  18. class NS_NO_VTABLE nsIGlobalHistory : public nsISupports {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IGLOBALHISTORY_IID)
  21. /**
  22. * addPage
  23. * Add a page to the history
  24. *
  25. * @param aURL the url to the page
  26. */
  27. /* void addPage (in string aURL); */
  28. NS_IMETHOD AddPage(const char *aURL) = 0;
  29. /**
  30. * isVisited
  31. * Checks to see if the given page is in history
  32. *
  33. * @return true if a page has been passed into addPage().
  34. * @param aURL the url to the page
  35. */
  36. /* boolean isVisited (in string aURL); */
  37. NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) = 0;
  38. };
  39. /* Use this macro when declaring classes that implement this interface. */
  40. #define NS_DECL_NSIGLOBALHISTORY \
  41. NS_IMETHOD AddPage(const char *aURL); \
  42. NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval);
  43. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  44. #define NS_FORWARD_NSIGLOBALHISTORY(_to) \
  45. NS_IMETHOD AddPage(const char *aURL) { return _to AddPage(aURL); } \
  46. NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) { return _to IsVisited(aURL, _retval); }
  47. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  48. #define NS_FORWARD_SAFE_NSIGLOBALHISTORY(_to) \
  49. NS_IMETHOD AddPage(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddPage(aURL); } \
  50. NS_IMETHOD IsVisited(const char *aURL, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsVisited(aURL, _retval); }
  51. #if 0
  52. /* Use the code below as a template for the implementation class for this interface. */
  53. /* Header file */
  54. class nsGlobalHistory : public nsIGlobalHistory
  55. {
  56. public:
  57. NS_DECL_ISUPPORTS
  58. NS_DECL_NSIGLOBALHISTORY
  59. nsGlobalHistory();
  60. private:
  61. ~nsGlobalHistory();
  62. protected:
  63. /* additional members */
  64. };
  65. /* Implementation file */
  66. NS_IMPL_ISUPPORTS1(nsGlobalHistory, nsIGlobalHistory)
  67. nsGlobalHistory::nsGlobalHistory()
  68. {
  69. /* member initializers and constructor code */
  70. }
  71. nsGlobalHistory::~nsGlobalHistory()
  72. {
  73. /* destructor code */
  74. }
  75. /* void addPage (in string aURL); */
  76. NS_IMETHODIMP nsGlobalHistory::AddPage(const char *aURL)
  77. {
  78. return NS_ERROR_NOT_IMPLEMENTED;
  79. }
  80. /* boolean isVisited (in string aURL); */
  81. NS_IMETHODIMP nsGlobalHistory::IsVisited(const char *aURL, PRBool *_retval)
  82. {
  83. return NS_ERROR_NOT_IMPLEMENTED;
  84. }
  85. /* End of implementation class template. */
  86. #endif
  87. #define NS_GLOBALHISTORY_CONTRACTID \
  88. "@mozilla.org/browser/global-history;1"
  89. #endif /* __gen_nsIGlobalHistory_h__ */