/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/docshell/shistory/nsISHistory.idl
 */

#ifndef __gen_nsISHistory_h__
#define __gen_nsISHistory_h__


#include "nsISupports.h"

#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"

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

class nsISHEntry; /* forward declaration */

class nsISHistoryListener; /* forward declaration */

class nsIURI; /* forward declaration */

namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla

// %{C++:14-21
#include "nsTArrayForwardDeclare.h"
#include "mozilla/Maybe.h"
struct EntriesAndBrowsingContextData;
namespace mozilla {
namespace dom {
class SHEntrySharedParentState;
} // namespace dom
} // namespace mozilla
// %}

/* starting interface:    nsISHistory */
#define NS_ISHISTORY_IID_STR "7b807041-e60a-4384-935f-af3061d8b815"

#define NS_ISHISTORY_IID \
  {0x7b807041, 0xe60a, 0x4384, \
    { 0x93, 0x5f, 0xaf, 0x30, 0x61, 0xd8, 0xb8, 0x15 }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsISHistory) nsISHistory : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_ISHISTORY_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsISHistory;

  /* [infallible] readonly attribute long count; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_count)
  NS_IMETHOD GetCount(int32_t *aCount) = 0;
  inline int32_t  GetCount()
  {
    int32_t result;
    mozilla::DebugOnly<nsresult> rv = GetCount(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* attribute long index; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_index)
  NS_IMETHOD GetIndex(int32_t *aIndex) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsISHistory_index)
  NS_IMETHOD SetIndex(int32_t aIndex) = 0;

  /* [infallible] readonly attribute long requestedIndex; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_requestedIndex)
  NS_IMETHOD GetRequestedIndex(int32_t *aRequestedIndex) = 0;
  inline int32_t  GetRequestedIndex()
  {
    int32_t result;
    mozilla::DebugOnly<nsresult> rv = GetRequestedIndex(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [noscript,notxpcom] void internalSetRequestedIndex (in long aRequestedIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_internalSetRequestedIndex)
  NS_IMETHOD_(void) InternalSetRequestedIndex(int32_t aRequestedIndex) = 0;

  /* nsISHEntry getEntryAtIndex (in long aIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_getEntryAtIndex)
  NS_IMETHOD GetEntryAtIndex(int32_t aIndex, nsISHEntry **_retval) = 0;

  /* void purgeHistory (in long aNumEntries); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_purgeHistory)
  NS_IMETHOD PurgeHistory(int32_t aNumEntries) = 0;

  /* void addSHistoryListener (in nsISHistoryListener aListener); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addSHistoryListener)
  NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) = 0;

  /* void removeSHistoryListener (in nsISHistoryListener aListener); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_removeSHistoryListener)
  NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) = 0;

  /* [can_run_script] void reloadCurrentEntry (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_reloadCurrentEntry)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD ReloadCurrentEntry(void) = 0;

  /* [can_run_script,noscript] void gotoIndex (in long aIndex, in boolean aUserActivation); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_gotoIndex)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD GotoIndex(int32_t aIndex, bool aUserActivation) = 0;

  /* [noscript,notxpcom] boolean hasUserInteractionAtIndex (in long aIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_hasUserInteractionAtIndex)
  NS_IMETHOD_(bool) HasUserInteractionAtIndex(int32_t aIndex) = 0;

  /* [noscript,notxpcom] long getIndexOfEntry (in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_getIndexOfEntry)
  NS_IMETHOD_(int32_t) GetIndexOfEntry(nsISHEntry *aEntry) = 0;

  /* void addEntry (in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addEntry)
  NS_IMETHOD AddEntry(nsISHEntry *aEntry) = 0;

  /* void updateIndex (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_updateIndex)
  NS_IMETHOD UpdateIndex(void) = 0;

  /* void replaceEntry (in long aIndex, in nsISHEntry aReplaceEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_replaceEntry)
  NS_IMETHOD ReplaceEntry(int32_t aIndex, nsISHEntry *aReplaceEntry) = 0;

  /* boolean notifyOnHistoryReload (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnHistoryReload)
  NS_IMETHOD NotifyOnHistoryReload(bool *_retval) = 0;

  /* void notifyOnHistoryCommit (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnHistoryCommit)
  NS_IMETHOD NotifyOnHistoryCommit(void) = 0;

  /* void notifyOnEntryUpdated (in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnEntryUpdated)
  NS_IMETHOD NotifyOnEntryUpdated(nsISHEntry *aEntry) = 0;

  /* void evictOutOfRangeDocumentViewers (in long aIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictOutOfRangeDocumentViewers)
  NS_IMETHOD EvictOutOfRangeDocumentViewers(int32_t aIndex) = 0;

  /* [noscript,notxpcom] void evictExpiredDocumentViewerForEntry (in SHEntrySharedParentStatePtr aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictExpiredDocumentViewerForEntry)
  NS_IMETHOD_(void) EvictExpiredDocumentViewerForEntry(mozilla::dom::SHEntrySharedParentState * aEntry) = 0;

  /* void evictAllDocumentViewers (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictAllDocumentViewers)
  NS_IMETHOD EvictAllDocumentViewers(void) = 0;

  /* [noscript,notxpcom] void addToExpirationTracker (in SHEntrySharedParentStatePtr aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addToExpirationTracker)
  NS_IMETHOD_(void) AddToExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) = 0;

  /* [noscript,notxpcom] void removeFromExpirationTracker (in SHEntrySharedParentStatePtr aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_removeFromExpirationTracker)
  NS_IMETHOD_(void) RemoveFromExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) = 0;

  /* [noscript,notxpcom] void RemoveDynEntries (in long aIndex, in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveDynEntries)
  NS_IMETHOD_(void) RemoveDynEntries(int32_t aIndex, nsISHEntry *aEntry) = 0;

  /* [noscript,notxpcom] void RemoveEntries (in nsDocshellIDArray aIDs, in long aStartIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveEntries)
  NS_IMETHOD_(void) RemoveEntries(nsTArray<nsID> & aIDs, int32_t aStartIndex) = 0;

  /* [noscript,notxpcom] void RemoveFrameEntries (in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveFrameEntries)
  NS_IMETHOD_(void) RemoveFrameEntries(nsISHEntry *aEntry) = 0;

  /* [noscript,notxpcom] unsigned long PrepareReloadEntry (in nsISHEntry aEntry, in unsigned long aReloadFlags); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_PrepareReloadEntry)
  NS_IMETHOD_(uint32_t) PrepareReloadEntry(nsISHEntry *aEntry, uint32_t aReloadFlags) = 0;

  /* [can_run_script] void reload (in unsigned long aReloadFlags); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_reload)
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Reload(uint32_t aReloadFlags) = 0;

  /* [notxpcom] void EnsureCorrectEntryAtCurrIndex (in nsISHEntry aEntry); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_EnsureCorrectEntryAtCurrIndex)
  NS_IMETHOD_(void) EnsureCorrectEntryAtCurrIndex(nsISHEntry *aEntry) = 0;

  /* [notxpcom] void EvictDocumentViewersOrReplaceEntry (in nsISHEntry aNewSHEntry, in boolean aReplace); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_EvictDocumentViewersOrReplaceEntry)
  NS_IMETHOD_(void) EvictDocumentViewersOrReplaceEntry(nsISHEntry *aNewSHEntry, bool aReplace) = 0;

  /* nsISHEntry createEntry (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_createEntry)
  NS_IMETHOD CreateEntry(nsISHEntry **_retval) = 0;

  /* [noscript] void AddToRootSessionHistory (in boolean aCloneChildren, in nsISHEntry aOSHE, in BrowsingContext aRootBC, in nsISHEntry aEntry, in unsigned long aLoadType, out MaybeInt32 aPreviousEntryIndex, out MaybeInt32 aLoadedEntryIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_AddToRootSessionHistory)
  NS_IMETHOD AddToRootSessionHistory(bool aCloneChildren, nsISHEntry *aOSHE, mozilla::dom::BrowsingContext *aRootBC, nsISHEntry *aEntry, uint32_t aLoadType, mozilla::Maybe<int32_t> * aPreviousEntryIndex, mozilla::Maybe<int32_t> * aLoadedEntryIndex) = 0;

  /* [noscript] void AddNestedSHEntry (in nsISHEntry aOldEntry, in nsISHEntry aNewEntry, in BrowsingContext aRootBC, in boolean aCloneChildren); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_AddNestedSHEntry)
  NS_IMETHOD AddNestedSHEntry(nsISHEntry *aOldEntry, nsISHEntry *aNewEntry, mozilla::dom::BrowsingContext *aRootBC, bool aCloneChildren) = 0;

  /* boolean canGoBackFromEntryAtIndex (in long aIndex); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_canGoBackFromEntryAtIndex)
  NS_IMETHOD CanGoBackFromEntryAtIndex(int32_t aIndex, bool *_retval) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISHISTORY \
  using nsISHistory::GetCount; \
  NS_IMETHOD GetCount(int32_t *aCount) override; \
  NS_IMETHOD GetIndex(int32_t *aIndex) override; \
  NS_IMETHOD SetIndex(int32_t aIndex) override; \
  using nsISHistory::GetRequestedIndex; \
  NS_IMETHOD GetRequestedIndex(int32_t *aRequestedIndex) override; \
  NS_IMETHOD_(void) InternalSetRequestedIndex(int32_t aRequestedIndex) override; \
  NS_IMETHOD GetEntryAtIndex(int32_t aIndex, nsISHEntry **_retval) override; \
  NS_IMETHOD PurgeHistory(int32_t aNumEntries) override; \
  NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) override; \
  NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD ReloadCurrentEntry(void) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD GotoIndex(int32_t aIndex, bool aUserActivation) override; \
  NS_IMETHOD_(bool) HasUserInteractionAtIndex(int32_t aIndex) override; \
  NS_IMETHOD_(int32_t) GetIndexOfEntry(nsISHEntry *aEntry) override; \
  NS_IMETHOD AddEntry(nsISHEntry *aEntry) override; \
  NS_IMETHOD UpdateIndex(void) override; \
  NS_IMETHOD ReplaceEntry(int32_t aIndex, nsISHEntry *aReplaceEntry) override; \
  NS_IMETHOD NotifyOnHistoryReload(bool *_retval) override; \
  NS_IMETHOD NotifyOnHistoryCommit(void) override; \
  NS_IMETHOD NotifyOnEntryUpdated(nsISHEntry *aEntry) override; \
  NS_IMETHOD EvictOutOfRangeDocumentViewers(int32_t aIndex) override; \
  NS_IMETHOD_(void) EvictExpiredDocumentViewerForEntry(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD EvictAllDocumentViewers(void) override; \
  NS_IMETHOD_(void) AddToExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD_(void) RemoveFromExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD_(void) RemoveDynEntries(int32_t aIndex, nsISHEntry *aEntry) override; \
  NS_IMETHOD_(void) RemoveEntries(nsTArray<nsID> & aIDs, int32_t aStartIndex) override; \
  NS_IMETHOD_(void) RemoveFrameEntries(nsISHEntry *aEntry) override; \
  NS_IMETHOD_(uint32_t) PrepareReloadEntry(nsISHEntry *aEntry, uint32_t aReloadFlags) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Reload(uint32_t aReloadFlags) override; \
  NS_IMETHOD_(void) EnsureCorrectEntryAtCurrIndex(nsISHEntry *aEntry) override; \
  NS_IMETHOD_(void) EvictDocumentViewersOrReplaceEntry(nsISHEntry *aNewSHEntry, bool aReplace) override; \
  NS_IMETHOD CreateEntry(nsISHEntry **_retval) override; \
  NS_IMETHOD AddToRootSessionHistory(bool aCloneChildren, nsISHEntry *aOSHE, mozilla::dom::BrowsingContext *aRootBC, nsISHEntry *aEntry, uint32_t aLoadType, mozilla::Maybe<int32_t> * aPreviousEntryIndex, mozilla::Maybe<int32_t> * aLoadedEntryIndex) override; \
  NS_IMETHOD AddNestedSHEntry(nsISHEntry *aOldEntry, nsISHEntry *aNewEntry, mozilla::dom::BrowsingContext *aRootBC, bool aCloneChildren) override; \
  NS_IMETHOD CanGoBackFromEntryAtIndex(int32_t aIndex, bool *_retval) 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_NSISHISTORY \
  using nsISHistory::GetCount; \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_count)\
  nsresult GetCount(int32_t *aCount); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_index)\
  nsresult GetIndex(int32_t *aIndex); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsISHistory_index)\
  nsresult SetIndex(int32_t aIndex); \
  using nsISHistory::GetRequestedIndex; \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsISHistory_requestedIndex)\
  nsresult GetRequestedIndex(int32_t *aRequestedIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_internalSetRequestedIndex)\
  nsresult_(void) InternalSetRequestedIndex(int32_t aRequestedIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_getEntryAtIndex)\
  nsresult GetEntryAtIndex(int32_t aIndex, nsISHEntry **_retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_purgeHistory)\
  nsresult PurgeHistory(int32_t aNumEntries); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addSHistoryListener)\
  nsresult AddSHistoryListener(nsISHistoryListener *aListener); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_removeSHistoryListener)\
  nsresult RemoveSHistoryListener(nsISHistoryListener *aListener); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_reloadCurrentEntry)\
  MOZ_CAN_RUN_SCRIPT nsresult ReloadCurrentEntry(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_gotoIndex)\
  MOZ_CAN_RUN_SCRIPT nsresult GotoIndex(int32_t aIndex, bool aUserActivation); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_hasUserInteractionAtIndex)\
  nsresult_(bool) HasUserInteractionAtIndex(int32_t aIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_getIndexOfEntry)\
  nsresult_(int32_t) GetIndexOfEntry(nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addEntry)\
  nsresult AddEntry(nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_updateIndex)\
  nsresult UpdateIndex(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_replaceEntry)\
  nsresult ReplaceEntry(int32_t aIndex, nsISHEntry *aReplaceEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnHistoryReload)\
  nsresult NotifyOnHistoryReload(bool *_retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnHistoryCommit)\
  nsresult NotifyOnHistoryCommit(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_notifyOnEntryUpdated)\
  nsresult NotifyOnEntryUpdated(nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictOutOfRangeDocumentViewers)\
  nsresult EvictOutOfRangeDocumentViewers(int32_t aIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictExpiredDocumentViewerForEntry)\
  nsresult_(void) EvictExpiredDocumentViewerForEntry(mozilla::dom::SHEntrySharedParentState * aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_evictAllDocumentViewers)\
  nsresult EvictAllDocumentViewers(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_addToExpirationTracker)\
  nsresult_(void) AddToExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_removeFromExpirationTracker)\
  nsresult_(void) RemoveFromExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveDynEntries)\
  nsresult_(void) RemoveDynEntries(int32_t aIndex, nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveEntries)\
  nsresult_(void) RemoveEntries(nsTArray<nsID> & aIDs, int32_t aStartIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_RemoveFrameEntries)\
  nsresult_(void) RemoveFrameEntries(nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_PrepareReloadEntry)\
  nsresult_(uint32_t) PrepareReloadEntry(nsISHEntry *aEntry, uint32_t aReloadFlags); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_reload)\
  MOZ_CAN_RUN_SCRIPT nsresult Reload(uint32_t aReloadFlags); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_EnsureCorrectEntryAtCurrIndex)\
  nsresult_(void) EnsureCorrectEntryAtCurrIndex(nsISHEntry *aEntry); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_EvictDocumentViewersOrReplaceEntry)\
  nsresult_(void) EvictDocumentViewersOrReplaceEntry(nsISHEntry *aNewSHEntry, bool aReplace); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_createEntry)\
  nsresult CreateEntry(nsISHEntry **_retval); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_AddToRootSessionHistory)\
  nsresult AddToRootSessionHistory(bool aCloneChildren, nsISHEntry *aOSHE, mozilla::dom::BrowsingContext *aRootBC, nsISHEntry *aEntry, uint32_t aLoadType, mozilla::Maybe<int32_t> * aPreviousEntryIndex, mozilla::Maybe<int32_t> * aLoadedEntryIndex); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_AddNestedSHEntry)\
  nsresult AddNestedSHEntry(nsISHEntry *aOldEntry, nsISHEntry *aNewEntry, mozilla::dom::BrowsingContext *aRootBC, bool aCloneChildren); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsISHistory_canGoBackFromEntryAtIndex)\
  nsresult CanGoBackFromEntryAtIndex(int32_t aIndex, bool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISHISTORY(_to) \
  using nsISHistory::GetCount; \
  NS_IMETHOD GetCount(int32_t *aCount) override { return _to GetCount(aCount); } \
  NS_IMETHOD GetIndex(int32_t *aIndex) override { return _to GetIndex(aIndex); } \
  NS_IMETHOD SetIndex(int32_t aIndex) override { return _to SetIndex(aIndex); } \
  using nsISHistory::GetRequestedIndex; \
  NS_IMETHOD GetRequestedIndex(int32_t *aRequestedIndex) override { return _to GetRequestedIndex(aRequestedIndex); } \
  NS_IMETHOD_(void) InternalSetRequestedIndex(int32_t aRequestedIndex) override { return _to InternalSetRequestedIndex(aRequestedIndex); } \
  NS_IMETHOD GetEntryAtIndex(int32_t aIndex, nsISHEntry **_retval) override { return _to GetEntryAtIndex(aIndex, _retval); } \
  NS_IMETHOD PurgeHistory(int32_t aNumEntries) override { return _to PurgeHistory(aNumEntries); } \
  NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) override { return _to AddSHistoryListener(aListener); } \
  NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) override { return _to RemoveSHistoryListener(aListener); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD ReloadCurrentEntry(void) override { return _to ReloadCurrentEntry(); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD GotoIndex(int32_t aIndex, bool aUserActivation) override { return _to GotoIndex(aIndex, aUserActivation); } \
  NS_IMETHOD_(bool) HasUserInteractionAtIndex(int32_t aIndex) override { return _to HasUserInteractionAtIndex(aIndex); } \
  NS_IMETHOD_(int32_t) GetIndexOfEntry(nsISHEntry *aEntry) override { return _to GetIndexOfEntry(aEntry); } \
  NS_IMETHOD AddEntry(nsISHEntry *aEntry) override { return _to AddEntry(aEntry); } \
  NS_IMETHOD UpdateIndex(void) override { return _to UpdateIndex(); } \
  NS_IMETHOD ReplaceEntry(int32_t aIndex, nsISHEntry *aReplaceEntry) override { return _to ReplaceEntry(aIndex, aReplaceEntry); } \
  NS_IMETHOD NotifyOnHistoryReload(bool *_retval) override { return _to NotifyOnHistoryReload(_retval); } \
  NS_IMETHOD NotifyOnHistoryCommit(void) override { return _to NotifyOnHistoryCommit(); } \
  NS_IMETHOD NotifyOnEntryUpdated(nsISHEntry *aEntry) override { return _to NotifyOnEntryUpdated(aEntry); } \
  NS_IMETHOD EvictOutOfRangeDocumentViewers(int32_t aIndex) override { return _to EvictOutOfRangeDocumentViewers(aIndex); } \
  NS_IMETHOD_(void) EvictExpiredDocumentViewerForEntry(mozilla::dom::SHEntrySharedParentState * aEntry) override { return _to EvictExpiredDocumentViewerForEntry(aEntry); } \
  NS_IMETHOD EvictAllDocumentViewers(void) override { return _to EvictAllDocumentViewers(); } \
  NS_IMETHOD_(void) AddToExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override { return _to AddToExpirationTracker(aEntry); } \
  NS_IMETHOD_(void) RemoveFromExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override { return _to RemoveFromExpirationTracker(aEntry); } \
  NS_IMETHOD_(void) RemoveDynEntries(int32_t aIndex, nsISHEntry *aEntry) override { return _to RemoveDynEntries(aIndex, aEntry); } \
  NS_IMETHOD_(void) RemoveEntries(nsTArray<nsID> & aIDs, int32_t aStartIndex) override { return _to RemoveEntries(aIDs, aStartIndex); } \
  NS_IMETHOD_(void) RemoveFrameEntries(nsISHEntry *aEntry) override { return _to RemoveFrameEntries(aEntry); } \
  NS_IMETHOD_(uint32_t) PrepareReloadEntry(nsISHEntry *aEntry, uint32_t aReloadFlags) override { return _to PrepareReloadEntry(aEntry, aReloadFlags); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Reload(uint32_t aReloadFlags) override { return _to Reload(aReloadFlags); } \
  NS_IMETHOD_(void) EnsureCorrectEntryAtCurrIndex(nsISHEntry *aEntry) override { return _to EnsureCorrectEntryAtCurrIndex(aEntry); } \
  NS_IMETHOD_(void) EvictDocumentViewersOrReplaceEntry(nsISHEntry *aNewSHEntry, bool aReplace) override { return _to EvictDocumentViewersOrReplaceEntry(aNewSHEntry, aReplace); } \
  NS_IMETHOD CreateEntry(nsISHEntry **_retval) override { return _to CreateEntry(_retval); } \
  NS_IMETHOD AddToRootSessionHistory(bool aCloneChildren, nsISHEntry *aOSHE, mozilla::dom::BrowsingContext *aRootBC, nsISHEntry *aEntry, uint32_t aLoadType, mozilla::Maybe<int32_t> * aPreviousEntryIndex, mozilla::Maybe<int32_t> * aLoadedEntryIndex) override { return _to AddToRootSessionHistory(aCloneChildren, aOSHE, aRootBC, aEntry, aLoadType, aPreviousEntryIndex, aLoadedEntryIndex); } \
  NS_IMETHOD AddNestedSHEntry(nsISHEntry *aOldEntry, nsISHEntry *aNewEntry, mozilla::dom::BrowsingContext *aRootBC, bool aCloneChildren) override { return _to AddNestedSHEntry(aOldEntry, aNewEntry, aRootBC, aCloneChildren); } \
  NS_IMETHOD CanGoBackFromEntryAtIndex(int32_t aIndex, bool *_retval) override { return _to CanGoBackFromEntryAtIndex(aIndex, _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_NSISHISTORY(_to) \
  NS_IMETHOD GetCount(int32_t *aCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \
  NS_IMETHOD GetIndex(int32_t *aIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndex(aIndex); } \
  NS_IMETHOD SetIndex(int32_t aIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIndex(aIndex); } \
  NS_IMETHOD GetRequestedIndex(int32_t *aRequestedIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestedIndex(aRequestedIndex); } \
  NS_IMETHOD_(void) InternalSetRequestedIndex(int32_t aRequestedIndex) override; \
  NS_IMETHOD GetEntryAtIndex(int32_t aIndex, nsISHEntry **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntryAtIndex(aIndex, _retval); } \
  NS_IMETHOD PurgeHistory(int32_t aNumEntries) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PurgeHistory(aNumEntries); } \
  NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSHistoryListener(aListener); } \
  NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveSHistoryListener(aListener); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD ReloadCurrentEntry(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReloadCurrentEntry(); } \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD GotoIndex(int32_t aIndex, bool aUserActivation) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GotoIndex(aIndex, aUserActivation); } \
  NS_IMETHOD_(bool) HasUserInteractionAtIndex(int32_t aIndex) override; \
  NS_IMETHOD_(int32_t) GetIndexOfEntry(nsISHEntry *aEntry) override; \
  NS_IMETHOD AddEntry(nsISHEntry *aEntry) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEntry(aEntry); } \
  NS_IMETHOD UpdateIndex(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateIndex(); } \
  NS_IMETHOD ReplaceEntry(int32_t aIndex, nsISHEntry *aReplaceEntry) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceEntry(aIndex, aReplaceEntry); } \
  NS_IMETHOD NotifyOnHistoryReload(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyOnHistoryReload(_retval); } \
  NS_IMETHOD NotifyOnHistoryCommit(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyOnHistoryCommit(); } \
  NS_IMETHOD NotifyOnEntryUpdated(nsISHEntry *aEntry) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyOnEntryUpdated(aEntry); } \
  NS_IMETHOD EvictOutOfRangeDocumentViewers(int32_t aIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EvictOutOfRangeDocumentViewers(aIndex); } \
  NS_IMETHOD_(void) EvictExpiredDocumentViewerForEntry(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD EvictAllDocumentViewers(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EvictAllDocumentViewers(); } \
  NS_IMETHOD_(void) AddToExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD_(void) RemoveFromExpirationTracker(mozilla::dom::SHEntrySharedParentState * aEntry) override; \
  NS_IMETHOD_(void) RemoveDynEntries(int32_t aIndex, nsISHEntry *aEntry) override; \
  NS_IMETHOD_(void) RemoveEntries(nsTArray<nsID> & aIDs, int32_t aStartIndex) override; \
  NS_IMETHOD_(void) RemoveFrameEntries(nsISHEntry *aEntry) override; \
  NS_IMETHOD_(uint32_t) PrepareReloadEntry(nsISHEntry *aEntry, uint32_t aReloadFlags) override; \
  MOZ_CAN_RUN_SCRIPT NS_IMETHOD Reload(uint32_t aReloadFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reload(aReloadFlags); } \
  NS_IMETHOD_(void) EnsureCorrectEntryAtCurrIndex(nsISHEntry *aEntry) override; \
  NS_IMETHOD_(void) EvictDocumentViewersOrReplaceEntry(nsISHEntry *aNewSHEntry, bool aReplace) override; \
  NS_IMETHOD CreateEntry(nsISHEntry **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEntry(_retval); } \
  NS_IMETHOD AddToRootSessionHistory(bool aCloneChildren, nsISHEntry *aOSHE, mozilla::dom::BrowsingContext *aRootBC, nsISHEntry *aEntry, uint32_t aLoadType, mozilla::Maybe<int32_t> * aPreviousEntryIndex, mozilla::Maybe<int32_t> * aLoadedEntryIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToRootSessionHistory(aCloneChildren, aOSHE, aRootBC, aEntry, aLoadType, aPreviousEntryIndex, aLoadedEntryIndex); } \
  NS_IMETHOD AddNestedSHEntry(nsISHEntry *aOldEntry, nsISHEntry *aNewEntry, mozilla::dom::BrowsingContext *aRootBC, bool aCloneChildren) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNestedSHEntry(aOldEntry, aNewEntry, aRootBC, aCloneChildren); } \
  NS_IMETHOD CanGoBackFromEntryAtIndex(int32_t aIndex, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanGoBackFromEntryAtIndex(aIndex, _retval); } 


#endif /* __gen_nsISHistory_h__ */
