1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/places/nsIBrowserHistory.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,96 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/* 1.10 + * browser-specific interface to global history 1.11 + */ 1.12 + 1.13 +#include "nsISupports.idl" 1.14 +#include "nsIGlobalHistory2.idl" 1.15 + 1.16 +[scriptable, uuid(20d31479-38de-49f4-9300-566d6e834c66)] 1.17 +interface nsIBrowserHistory : nsISupports 1.18 +{ 1.19 + /** 1.20 + * Removes a page from global history. 1.21 + * 1.22 + * @note It is preferrable to use this one rather then RemovePages when 1.23 + * removing less than 10 pages, since it won't start a full batch 1.24 + * operation. 1.25 + */ 1.26 + void removePage(in nsIURI aURI); 1.27 + 1.28 + /** 1.29 + * Removes a list of pages from global history. 1.30 + * 1.31 + * @param aURIs 1.32 + * Array of URIs to be removed. 1.33 + * @param aLength 1.34 + * Length of the array. 1.35 + * 1.36 + * @note the removal happens in a batch. 1.37 + */ 1.38 + void removePages([array, size_is(aLength)] in nsIURI aURIs, 1.39 + in unsigned long aLength); 1.40 + 1.41 + /** 1.42 + * Removes all global history information about pages for a given host. 1.43 + * 1.44 + * @param aHost 1.45 + * Hostname to be removed. 1.46 + * An empty host name means local files and anything else with no 1.47 + * hostname. You can also pass in the localized "(local files)" 1.48 + * title given to you from a history query to remove all 1.49 + * history information from local files. 1.50 + * @param aEntireDomain 1.51 + * If true, will also delete pages from sub hosts (so if 1.52 + * passed in "microsoft.com" will delete "www.microsoft.com", 1.53 + * "msdn.microsoft.com", etc.). 1.54 + * 1.55 + * @note The removal happens in a batch. 1.56 + */ 1.57 + void removePagesFromHost(in AUTF8String aHost, 1.58 + in boolean aEntireDomain); 1.59 + 1.60 + /** 1.61 + * Removes all pages for a given timeframe. 1.62 + * Limits are included: aBeginTime <= timeframe <= aEndTime 1.63 + * 1.64 + * @param aBeginTime 1.65 + * Microseconds from epoch, representing the initial time. 1.66 + * @param aEndTime 1.67 + * Microseconds from epoch, representing the final time. 1.68 + * 1.69 + * @note The removal happens in a batch. 1.70 + */ 1.71 + void removePagesByTimeframe(in PRTime aBeginTime, 1.72 + in PRTime aEndTime); 1.73 + 1.74 + /** 1.75 + * Removes all visits in a given timeframe. 1.76 + * Limits are included: aBeginTime <= timeframe <= aEndTime. 1.77 + * Any pages that becomes unvisited as a result will also be deleted. 1.78 + * 1.79 + * @param aBeginTime 1.80 + * Microseconds from epoch, representing the initial time. 1.81 + * @param aEndTime 1.82 + * Microseconds from epoch, representing the final time. 1.83 + * 1.84 + * @note The removal happens in a batch. 1.85 + */ 1.86 + void removeVisitsByTimeframe(in PRTime aBeginTime, 1.87 + in PRTime aEndTime); 1.88 + 1.89 + /** 1.90 + * Removes all existing pages from global history. 1.91 + * Visits are removed synchronously, but pages are expired asynchronously 1.92 + * off the main-thread. 1.93 + * 1.94 + * @note The removal happens in a batch. Single removals are not notified, 1.95 + * instead an onClearHistory notification is sent to 1.96 + * nsINavHistoryObserver implementers. 1.97 + */ 1.98 + void removeAllPages(); 1.99 +};