michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * browser-specific interface to global history michael@0: */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIGlobalHistory2.idl" michael@0: michael@0: [scriptable, uuid(20d31479-38de-49f4-9300-566d6e834c66)] michael@0: interface nsIBrowserHistory : nsISupports michael@0: { michael@0: /** michael@0: * Removes a page from global history. michael@0: * michael@0: * @note It is preferrable to use this one rather then RemovePages when michael@0: * removing less than 10 pages, since it won't start a full batch michael@0: * operation. michael@0: */ michael@0: void removePage(in nsIURI aURI); michael@0: michael@0: /** michael@0: * Removes a list of pages from global history. michael@0: * michael@0: * @param aURIs michael@0: * Array of URIs to be removed. michael@0: * @param aLength michael@0: * Length of the array. michael@0: * michael@0: * @note the removal happens in a batch. michael@0: */ michael@0: void removePages([array, size_is(aLength)] in nsIURI aURIs, michael@0: in unsigned long aLength); michael@0: michael@0: /** michael@0: * Removes all global history information about pages for a given host. michael@0: * michael@0: * @param aHost michael@0: * Hostname to be removed. michael@0: * An empty host name means local files and anything else with no michael@0: * hostname. You can also pass in the localized "(local files)" michael@0: * title given to you from a history query to remove all michael@0: * history information from local files. michael@0: * @param aEntireDomain michael@0: * If true, will also delete pages from sub hosts (so if michael@0: * passed in "microsoft.com" will delete "www.microsoft.com", michael@0: * "msdn.microsoft.com", etc.). michael@0: * michael@0: * @note The removal happens in a batch. michael@0: */ michael@0: void removePagesFromHost(in AUTF8String aHost, michael@0: in boolean aEntireDomain); michael@0: michael@0: /** michael@0: * Removes all pages for a given timeframe. michael@0: * Limits are included: aBeginTime <= timeframe <= aEndTime michael@0: * michael@0: * @param aBeginTime michael@0: * Microseconds from epoch, representing the initial time. michael@0: * @param aEndTime michael@0: * Microseconds from epoch, representing the final time. michael@0: * michael@0: * @note The removal happens in a batch. michael@0: */ michael@0: void removePagesByTimeframe(in PRTime aBeginTime, michael@0: in PRTime aEndTime); michael@0: michael@0: /** michael@0: * Removes all visits in a given timeframe. michael@0: * Limits are included: aBeginTime <= timeframe <= aEndTime. michael@0: * Any pages that becomes unvisited as a result will also be deleted. michael@0: * michael@0: * @param aBeginTime michael@0: * Microseconds from epoch, representing the initial time. michael@0: * @param aEndTime michael@0: * Microseconds from epoch, representing the final time. michael@0: * michael@0: * @note The removal happens in a batch. michael@0: */ michael@0: void removeVisitsByTimeframe(in PRTime aBeginTime, michael@0: in PRTime aEndTime); michael@0: michael@0: /** michael@0: * Removes all existing pages from global history. michael@0: * Visits are removed synchronously, but pages are expired asynchronously michael@0: * off the main-thread. michael@0: * michael@0: * @note The removal happens in a batch. Single removals are not notified, michael@0: * instead an onClearHistory notification is sent to michael@0: * nsINavHistoryObserver implementers. michael@0: */ michael@0: void removeAllPages(); michael@0: };