2007-06-21 12:55:24 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2007-06-21 12:55:33 -07:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2007-06-21 12:55:24 -07:00
|
|
|
*
|
2007-06-21 12:55:33 -07:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2007-06-21 12:55:24 -07:00
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2007-06-21 12:55:33 -07:00
|
|
|
* The Initial Developer of the Original Code is
|
2007-06-21 12:55:24 -07:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2007-06-21 12:55:33 -07:00
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
2007-06-21 12:55:24 -07:00
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2007-06-21 12:55:33 -07:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2007-06-21 12:55:24 -07:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2007-06-21 12:55:33 -07:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2007-06-21 12:55:24 -07:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* browser-specific interface to global history
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2007-06-21 12:55:28 -07:00
|
|
|
#include "nsIGlobalHistory2.idl"
|
2007-06-21 12:55:24 -07:00
|
|
|
|
2007-06-21 12:55:32 -07:00
|
|
|
[scriptable, uuid(c43079c3-3d8d-4b7c-af14-0e30ab46865f)]
|
2007-06-21 12:55:28 -07:00
|
|
|
interface nsIBrowserHistory : nsIGlobalHistory2
|
2007-06-21 12:55:24 -07:00
|
|
|
{
|
2007-06-21 12:55:29 -07:00
|
|
|
/**
|
|
|
|
* addPageWithDetails
|
|
|
|
* Adds a page to history with specific time stamp information. This is used in
|
|
|
|
* the History migrator.
|
|
|
|
*/
|
2007-06-21 12:55:32 -07:00
|
|
|
void addPageWithDetails(in nsIURI aURI, in wstring aTitle, in long long aLastVisited);
|
2007-06-21 12:55:29 -07:00
|
|
|
|
2007-06-21 12:55:24 -07:00
|
|
|
/**
|
2007-06-21 12:55:28 -07:00
|
|
|
* lastPageVisited
|
|
|
|
* The last page that was visited in a top-level window.
|
2007-06-21 12:55:24 -07:00
|
|
|
*/
|
2007-06-21 12:55:30 -07:00
|
|
|
readonly attribute AUTF8String lastPageVisited;
|
2007-06-21 12:55:24 -07:00
|
|
|
|
|
|
|
/**
|
2007-06-21 12:55:28 -07:00
|
|
|
* count
|
|
|
|
* The number of entries in global history
|
2007-06-21 12:55:24 -07:00
|
|
|
*/
|
2007-06-21 12:55:28 -07:00
|
|
|
readonly attribute PRUint32 count;
|
2007-06-21 12:55:24 -07:00
|
|
|
|
2007-06-21 12:55:31 -07:00
|
|
|
/**
|
|
|
|
* remove a page from history
|
|
|
|
*/
|
2007-06-21 12:55:32 -07:00
|
|
|
void removePage(in nsIURI aURI);
|
2007-06-21 12:55:31 -07:00
|
|
|
|
2007-06-21 12:55:24 -07:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2007-06-21 12:55:32 -07:00
|
|
|
void removePagesFromHost(in AUTF8String aHost, in boolean aEntireDomain);
|
2007-06-21 12:55:24 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* removeAllPages
|
|
|
|
* Remove all pages from global history
|
|
|
|
*/
|
|
|
|
void removeAllPages();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2007-06-21 12:55:28 -07:00
|
|
|
void hidePage(in nsIURI aURI);
|
2007-06-21 12:55:24 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* markPageAsTyped
|
|
|
|
* Designate the url as having been explicitly typed in by
|
|
|
|
* the user, so it's okay to be an autocomplete result.
|
|
|
|
*/
|
2007-06-21 12:55:32 -07:00
|
|
|
void markPageAsTyped(in nsIURI aURI);
|
2007-06-21 12:55:24 -07:00
|
|
|
};
|