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

#ifndef __gen_nsIBrowserHistory_h__
#define __gen_nsIBrowserHistory_h__


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

#ifndef __gen_nsIGlobalHistory2_h__
#include "nsIGlobalHistory2.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIBrowserHistory */
#define NS_IBROWSERHISTORY_IID_STR "460947aa-7636-43b5-949a-415a7c59da97"

#define NS_IBROWSERHISTORY_IID \
  {0x460947aa, 0x7636, 0x43b5, \
    { 0x94, 0x9a, 0x41, 0x5a, 0x7c, 0x59, 0xda, 0x97 }}

class NS_NO_VTABLE nsIBrowserHistory : public nsIGlobalHistory2 {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBROWSERHISTORY_IID)

  /**
     * lastPageVisited
     * The last page that was visited in a top-level window.
     */
  /* readonly attribute AUTF8String lastPageVisited; */
  NS_IMETHOD GetLastPageVisited(nsACString & aLastPageVisited) = 0;

  /**
     * remove a page from history
     */
  /* void removePage (in string aURI); */
  NS_IMETHOD RemovePage(const char *aURI) = 0;

  /**
     * count
     * The number of entries in global history
     */
  /* readonly attribute unsigned long count; */
  NS_IMETHOD GetCount(PRUint32 *aCount) = 0;

  /**
     * removePagesFromHost
     * Remove all pages from the given host.
     * If aEntireDomain is true, will assume aHost is a domain,
     * and remove all pages from the entire domain.
     */
  /* void removePagesFromHost (in string aHost, in boolean aEntireDomain); */
  NS_IMETHOD RemovePagesFromHost(const char *aHost, PRBool aEntireDomain) = 0;

  /**
     * removeAllPages
     * Remove all pages from global history
     */
  /* void removeAllPages (); */
  NS_IMETHOD RemoveAllPages(void) = 0;

  /**
     * hidePage
     * Hide the specified URL from being enumerated (and thus
     * displayed in the UI)
     *
     * if the page hasn't been visited yet, then it will be added
     * as if it was visited, and then marked as hidden
     */
  /* void hidePage (in nsIURI url); */
  NS_IMETHOD HidePage(nsIURI *url) = 0;

  /**
     * markPageAsTyped
     * Designate the url as having been explicitly typed in by
     * the user, so it's okay to be an autocomplete result.
     */
  /* void markPageAsTyped (in string url); */
  NS_IMETHOD MarkPageAsTyped(const char *url) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBROWSERHISTORY \
  NS_IMETHOD GetLastPageVisited(nsACString & aLastPageVisited); \
  NS_IMETHOD RemovePage(const char *aURI); \
  NS_IMETHOD GetCount(PRUint32 *aCount); \
  NS_IMETHOD RemovePagesFromHost(const char *aHost, PRBool aEntireDomain); \
  NS_IMETHOD RemoveAllPages(void); \
  NS_IMETHOD HidePage(nsIURI *url); \
  NS_IMETHOD MarkPageAsTyped(const char *url); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBROWSERHISTORY(_to) \
  NS_IMETHOD GetLastPageVisited(nsACString & aLastPageVisited) { return _to GetLastPageVisited(aLastPageVisited); } \
  NS_IMETHOD RemovePage(const char *aURI) { return _to RemovePage(aURI); } \
  NS_IMETHOD GetCount(PRUint32 *aCount) { return _to GetCount(aCount); } \
  NS_IMETHOD RemovePagesFromHost(const char *aHost, PRBool aEntireDomain) { return _to RemovePagesFromHost(aHost, aEntireDomain); } \
  NS_IMETHOD RemoveAllPages(void) { return _to RemoveAllPages(); } \
  NS_IMETHOD HidePage(nsIURI *url) { return _to HidePage(url); } \
  NS_IMETHOD MarkPageAsTyped(const char *url) { return _to MarkPageAsTyped(url); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBROWSERHISTORY(_to) \
  NS_IMETHOD GetLastPageVisited(nsACString & aLastPageVisited) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastPageVisited(aLastPageVisited); } \
  NS_IMETHOD RemovePage(const char *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePage(aURI); } \
  NS_IMETHOD GetCount(PRUint32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \
  NS_IMETHOD RemovePagesFromHost(const char *aHost, PRBool aEntireDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePagesFromHost(aHost, aEntireDomain); } \
  NS_IMETHOD RemoveAllPages(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllPages(); } \
  NS_IMETHOD HidePage(nsIURI *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->HidePage(url); } \
  NS_IMETHOD MarkPageAsTyped(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkPageAsTyped(url); } 

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

/* Header file */
class nsBrowserHistory : public nsIBrowserHistory
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIBROWSERHISTORY

  nsBrowserHistory();

private:
  ~nsBrowserHistory();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsBrowserHistory, nsIBrowserHistory)

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

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

/* readonly attribute AUTF8String lastPageVisited; */
NS_IMETHODIMP nsBrowserHistory::GetLastPageVisited(nsACString & aLastPageVisited)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removePage (in string aURI); */
NS_IMETHODIMP nsBrowserHistory::RemovePage(const char *aURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long count; */
NS_IMETHODIMP nsBrowserHistory::GetCount(PRUint32 *aCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removePagesFromHost (in string aHost, in boolean aEntireDomain); */
NS_IMETHODIMP nsBrowserHistory::RemovePagesFromHost(const char *aHost, PRBool aEntireDomain)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeAllPages (); */
NS_IMETHODIMP nsBrowserHistory::RemoveAllPages()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void hidePage (in nsIURI url); */
NS_IMETHODIMP nsBrowserHistory::HidePage(nsIURI *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void markPageAsTyped (in string url); */
NS_IMETHODIMP nsBrowserHistory::MarkPageAsTyped(const char *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_GLOBALHISTORY_AUTOCOMPLETE_CONTRACTID \
    "@mozilla.org/autocompleteSession;1?type=history"

#endif /* __gen_nsIBrowserHistory_h__ */
