Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / toolkit / components / places / public / nsIBrowserHistory.idl
blob149b6b8fd59ef0cc4292784a5593061ea4e5890d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
39 * browser-specific interface to global history
42 #include "nsISupports.idl"
43 #include "nsIGlobalHistory2.idl"
45 [scriptable, uuid(96602bf3-de2a-42ed-812f-a83b130e6299)]
46 interface nsIBrowserHistory : nsIGlobalHistory2
48 /**
49 * addPageWithDetails
51 * Adds a page to history with specific time stamp information. This is used in
52 * the History migrator.
54 void addPageWithDetails(in nsIURI aURI, in wstring aTitle, in long long aLastVisited);
56 /**
57 * lastPageVisited
59 * The last page that was visited in a top-level window.
61 readonly attribute AUTF8String lastPageVisited;
63 /**
64 * count
66 * Indicate if there are entries in global history
67 * For performance reasons this does not return the real number of entries
69 readonly attribute PRUint32 count;
71 /**
72 * removePage
74 * Remove a page from history
76 void removePage(in nsIURI aURI);
78 /**
79 * removePages
81 * Remove a bunch of pages from history
82 * Notice that this does not call observers for performance reasons,
83 * instead setting aDoBatchNotify true will send Begin/EndUpdateBatch
85 void removePages([array, size_is(aLength)] in nsIURI aURIs,
86 in unsigned long aLength, in boolean aDoBatchNotify);
88 /**
89 * removePagesFromHost
91 * Remove all pages from the given host.
92 * If aEntireDomain is true, will assume aHost is a domain,
93 * and remove all pages from the entire domain.
94 * Notice that this does not call observers for single deleted uris,
95 * instead it will send Begin/EndUpdateBatch
97 void removePagesFromHost(in AUTF8String aHost, in boolean aEntireDomain);
99 /**
100 * removePagesByTimeframe
102 * Remove all pages for a given timeframe.
103 * Limits are included: aBeginTime <= timeframe <= aEndTime
104 * Notice that this does not call observers for single deleted uris,
105 * instead it will send Begin/EndUpdateBatch
107 void removePagesByTimeframe(in long long aBeginTime, in long long aEndTime);
110 * removeAllPages
112 * Remove all pages from global history
114 void removeAllPages();
117 * hidePage
119 * Hide the specified URL from being enumerated (and thus
120 * displayed in the UI)
121 * If the page hasn't been visited yet, then it will be added
122 * as if it was visited, and then marked as hidden
124 void hidePage(in nsIURI aURI);
127 * markPageAsTyped
129 * Designate the url as having been explicitly typed in by
130 * the user, so it's okay to be an autocomplete result.
132 void markPageAsTyped(in nsIURI aURI);