toolkit/components/places/nsIBrowserHistory.idl

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:5432b080e0ce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 /*
7 * browser-specific interface to global history
8 */
9
10 #include "nsISupports.idl"
11 #include "nsIGlobalHistory2.idl"
12
13 [scriptable, uuid(20d31479-38de-49f4-9300-566d6e834c66)]
14 interface nsIBrowserHistory : nsISupports
15 {
16 /**
17 * Removes a page from global history.
18 *
19 * @note It is preferrable to use this one rather then RemovePages when
20 * removing less than 10 pages, since it won't start a full batch
21 * operation.
22 */
23 void removePage(in nsIURI aURI);
24
25 /**
26 * Removes a list of pages from global history.
27 *
28 * @param aURIs
29 * Array of URIs to be removed.
30 * @param aLength
31 * Length of the array.
32 *
33 * @note the removal happens in a batch.
34 */
35 void removePages([array, size_is(aLength)] in nsIURI aURIs,
36 in unsigned long aLength);
37
38 /**
39 * Removes all global history information about pages for a given host.
40 *
41 * @param aHost
42 * Hostname to be removed.
43 * An empty host name means local files and anything else with no
44 * hostname. You can also pass in the localized "(local files)"
45 * title given to you from a history query to remove all
46 * history information from local files.
47 * @param aEntireDomain
48 * If true, will also delete pages from sub hosts (so if
49 * passed in "microsoft.com" will delete "www.microsoft.com",
50 * "msdn.microsoft.com", etc.).
51 *
52 * @note The removal happens in a batch.
53 */
54 void removePagesFromHost(in AUTF8String aHost,
55 in boolean aEntireDomain);
56
57 /**
58 * Removes all pages for a given timeframe.
59 * Limits are included: aBeginTime <= timeframe <= aEndTime
60 *
61 * @param aBeginTime
62 * Microseconds from epoch, representing the initial time.
63 * @param aEndTime
64 * Microseconds from epoch, representing the final time.
65 *
66 * @note The removal happens in a batch.
67 */
68 void removePagesByTimeframe(in PRTime aBeginTime,
69 in PRTime aEndTime);
70
71 /**
72 * Removes all visits in a given timeframe.
73 * Limits are included: aBeginTime <= timeframe <= aEndTime.
74 * Any pages that becomes unvisited as a result will also be deleted.
75 *
76 * @param aBeginTime
77 * Microseconds from epoch, representing the initial time.
78 * @param aEndTime
79 * Microseconds from epoch, representing the final time.
80 *
81 * @note The removal happens in a batch.
82 */
83 void removeVisitsByTimeframe(in PRTime aBeginTime,
84 in PRTime aEndTime);
85
86 /**
87 * Removes all existing pages from global history.
88 * Visits are removed synchronously, but pages are expired asynchronously
89 * off the main-thread.
90 *
91 * @note The removal happens in a batch. Single removals are not notified,
92 * instead an onClearHistory notification is sent to
93 * nsINavHistoryObserver implementers.
94 */
95 void removeAllPages();
96 };

mercurial