Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: gecko-sdk/include/nsISHistory.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsIRequestObserver.h ('k') | gecko-sdk/include/nsISHistoryListener.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/xpfe/components/shistory/public/nsISHistory.id l
3 */
4
5 #ifndef __gen_nsISHistory_h__
6 #define __gen_nsISHistory_h__
7
8
9 #ifndef __gen_nsISupports_h__
10 #include "nsISupports.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17 class nsIHistoryEntry; /* forward declaration */
18
19 class nsISHistoryListener; /* forward declaration */
20
21 class nsISimpleEnumerator; /* forward declaration */
22
23 #define NS_SHISTORY_CID \
24 {0x7294fe9c, 0x14d8, 0x11d5, {0x98, 0x82, 0x00, 0xC0, 0x4f, 0xa0, 0x2f, 0x40}}
25 #define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1"
26
27 /* starting interface: nsISHistory */
28 #define NS_ISHISTORY_IID_STR "7294fe9b-14d8-11d5-9882-00c04fa02f40"
29
30 #define NS_ISHISTORY_IID \
31 {0x7294fe9b, 0x14d8, 0x11d5, \
32 { 0x98, 0x82, 0x00, 0xc0, 0x4f, 0xa0, 0x2f, 0x40 }}
33
34 /**
35 * An interface to the primary properties of the Session History
36 * component. In an embedded browser environment, the nsIWebBrowser
37 * object creates an instance of session history for each open window.
38 * A handle to the session history object can be obtained from
39 * nsIWebNavigation. In a non-embedded situation, the owner of the
40 * session history component must create a instance of it and set
41 * it in the nsIWebNavigation object.
42 * This interface is accessible from javascript.
43 *
44 * @status FROZEN
45 */
46 class NS_NO_VTABLE nsISHistory : public nsISupports {
47 public:
48
49 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISHISTORY_IID)
50
51 /**
52 * A readonly property of the interface that returns
53 * the number of toplevel documents currently available
54 * in session history.
55 */
56 /* readonly attribute long count; */
57 NS_IMETHOD GetCount(PRInt32 *aCount) = 0;
58
59 /**
60 * A readonly property of the interface that returns
61 * the index of the current document in session history.
62 */
63 /* readonly attribute long index; */
64 NS_IMETHOD GetIndex(PRInt32 *aIndex) = 0;
65
66 /**
67 * A read/write property of the interface, used to Get/Set
68 * the maximum number of toplevel documents, session history
69 * can hold for each instance.
70 */
71 /* attribute long maxLength; */
72 NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) = 0;
73 NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) = 0;
74
75 /**
76 * Called to obtain handle to the history entry at a
77 * given index.
78 *
79 * @param index The index value whose entry is requested.
80 * @param modifyIndex A boolean flag that indicates if the current
81 * index of session history should be modified
82 * to the parameter index.
83 *
84 * @return <code>NS_OK</code> history entry for
85 * the index is obtained successfully.
86 * <code>NS_ERROR_FAILURE</code> Error in obtaining
87 * history entry for the given index.
88 */
89 /* nsIHistoryEntry getEntryAtIndex (in long index, in boolean modifyIndex); */
90 NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) = 0;
91
92 /**
93 * Called to purge older documents from history.
94 * Documents can be removed from session history for various
95 * reasons. For example to control memory usage of the browser, to
96 * prevent users from loading documents from history, to erase evidence of
97 * prior page loads etc...
98 *
99 * @param numEntries The number of toplevel documents to be
100 * purged from history. During purge operation,
101 * the latest documents are maintained and older
102 * 'numEntries' documents are removed from history.
103 * @throws <code>NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA</code> Purge was vetod.
104 * @throws <code>NS_ERROR_FAILURE</code> numEntries is
105 * invalid or out of bounds with the size of history.
106 *
107 */
108 /* void PurgeHistory (in long numEntries); */
109 NS_IMETHOD PurgeHistory(PRInt32 numEntries) = 0;
110
111 /**
112 * Called to register a listener for the session history component.
113 * Listeners are notified when pages are loaded or purged from history.
114 *
115 * @param aListener Listener object to be notified for all
116 * page loads that initiate in session history.
117 *
118 * @note A listener object must implement
119 * nsISHistoryListener and nsSupportsWeakReference
120 *
121 * @see nsISHistoryListener
122 * @see nsSupportsWeakReference
123 */
124 /* void addSHistoryListener (in nsISHistoryListener aListener); */
125 NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) = 0;
126
127 /**
128 * Called to remove a listener for the session history component.
129 * Listeners are notified when pages are loaded from history.
130 *
131 * @param aListener Listener object to be removed from
132 * session history.
133 *
134 * @note A listener object must implement
135 * nsISHistoryListener and nsSupportsWeakReference
136 * @see nsISHistoryListener
137 * @see nsSupportsWeakReference
138 */
139 /* void removeSHistoryListener (in nsISHistoryListener aListener); */
140 NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) = 0;
141
142 /**
143 * Called to obtain a enumerator for all the documents stored in
144 * session history. The enumerator object thus returned by this method
145 * can be traversed using nsISimpleEnumerator.
146 *
147 * @note To access individual history entries of the enumerator, perform the
148 * following steps:
149 * 1) Call nsISHistory->GetSHistoryEnumerator() to obtain handle
150 * the nsISimpleEnumerator object.
151 * 2) Use nsISimpleEnumerator->GetNext() on the object returned
152 * by step #1 to obtain handle to the next object in the list.
153 * The object returned by this step is of type nsISupports.
154 * 3) Perform a QueryInterface on the object returned by step #2
155 * to nsIHistoryEntry.
156 * 4) Use nsIHistoryEntry to access properties of each history entry.
157 *
158 * @see nsISimpleEnumerator
159 * @see nsIHistoryEntry
160 * @see QueryInterface()
161 * @see do_QueryInterface()
162 */
163 /* readonly attribute nsISimpleEnumerator SHistoryEnumerator; */
164 NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) = 0;
165
166 };
167
168 /* Use this macro when declaring classes that implement this interface. */
169 #define NS_DECL_NSISHISTORY \
170 NS_IMETHOD GetCount(PRInt32 *aCount); \
171 NS_IMETHOD GetIndex(PRInt32 *aIndex); \
172 NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength); \
173 NS_IMETHOD SetMaxLength(PRInt32 aMaxLength); \
174 NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval); \
175 NS_IMETHOD PurgeHistory(PRInt32 numEntries); \
176 NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener); \
177 NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener); \
178 NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator);
179
180 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
181 #define NS_FORWARD_NSISHISTORY(_to) \
182 NS_IMETHOD GetCount(PRInt32 *aCount) { return _to GetCount(aCount); } \
183 NS_IMETHOD GetIndex(PRInt32 *aIndex) { return _to GetIndex(aIndex); } \
184 NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return _to GetMaxLength(aMaxLen gth); } \
185 NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return _to SetMaxLength(aMaxLeng th); } \
186 NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) { return _to GetEntryAtIndex(index, modifyIndex, _retval); } \
187 NS_IMETHOD PurgeHistory(PRInt32 numEntries) { return _to PurgeHistory(numEntri es); } \
188 NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) { return _to Ad dSHistoryListener(aListener); } \
189 NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) { return _to RemoveSHistoryListener(aListener); } \
190 NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) { return _to GetSHistoryEnumerator(aSHistoryEnumerator); }
191
192 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
193 #define NS_FORWARD_SAFE_NSISHISTORY(_to) \
194 NS_IMETHOD GetCount(PRInt32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _ to->GetCount(aCount); } \
195 NS_IMETHOD GetIndex(PRInt32 *aIndex) { return !_to ? NS_ERROR_NULL_POINTER : _ to->GetIndex(aIndex); } \
196 NS_IMETHOD GetMaxLength(PRInt32 *aMaxLength) { return !_to ? NS_ERROR_NULL_POI NTER : _to->GetMaxLength(aMaxLength); } \
197 NS_IMETHOD SetMaxLength(PRInt32 aMaxLength) { return !_to ? NS_ERROR_NULL_POIN TER : _to->SetMaxLength(aMaxLength); } \
198 NS_IMETHOD GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsIHistoryEntry **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntryAtIndex(index, m odifyIndex, _retval); } \
199 NS_IMETHOD PurgeHistory(PRInt32 numEntries) { return !_to ? NS_ERROR_NULL_POIN TER : _to->PurgeHistory(numEntries); } \
200 NS_IMETHOD AddSHistoryListener(nsISHistoryListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSHistoryListener(aListener); } \
201 NS_IMETHOD RemoveSHistoryListener(nsISHistoryListener *aListener) { return !_t o ? NS_ERROR_NULL_POINTER : _to->RemoveSHistoryListener(aListener); } \
202 NS_IMETHOD GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistoryEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSHistoryEnumerator(aSHistoryEnume rator); }
203
204 #if 0
205 /* Use the code below as a template for the implementation class for this interf ace. */
206
207 /* Header file */
208 class nsSHistory : public nsISHistory
209 {
210 public:
211 NS_DECL_ISUPPORTS
212 NS_DECL_NSISHISTORY
213
214 nsSHistory();
215
216 private:
217 ~nsSHistory();
218
219 protected:
220 /* additional members */
221 };
222
223 /* Implementation file */
224 NS_IMPL_ISUPPORTS1(nsSHistory, nsISHistory)
225
226 nsSHistory::nsSHistory()
227 {
228 /* member initializers and constructor code */
229 }
230
231 nsSHistory::~nsSHistory()
232 {
233 /* destructor code */
234 }
235
236 /* readonly attribute long count; */
237 NS_IMETHODIMP nsSHistory::GetCount(PRInt32 *aCount)
238 {
239 return NS_ERROR_NOT_IMPLEMENTED;
240 }
241
242 /* readonly attribute long index; */
243 NS_IMETHODIMP nsSHistory::GetIndex(PRInt32 *aIndex)
244 {
245 return NS_ERROR_NOT_IMPLEMENTED;
246 }
247
248 /* attribute long maxLength; */
249 NS_IMETHODIMP nsSHistory::GetMaxLength(PRInt32 *aMaxLength)
250 {
251 return NS_ERROR_NOT_IMPLEMENTED;
252 }
253 NS_IMETHODIMP nsSHistory::SetMaxLength(PRInt32 aMaxLength)
254 {
255 return NS_ERROR_NOT_IMPLEMENTED;
256 }
257
258 /* nsIHistoryEntry getEntryAtIndex (in long index, in boolean modifyIndex); */
259 NS_IMETHODIMP nsSHistory::GetEntryAtIndex(PRInt32 index, PRBool modifyIndex, nsI HistoryEntry **_retval)
260 {
261 return NS_ERROR_NOT_IMPLEMENTED;
262 }
263
264 /* void PurgeHistory (in long numEntries); */
265 NS_IMETHODIMP nsSHistory::PurgeHistory(PRInt32 numEntries)
266 {
267 return NS_ERROR_NOT_IMPLEMENTED;
268 }
269
270 /* void addSHistoryListener (in nsISHistoryListener aListener); */
271 NS_IMETHODIMP nsSHistory::AddSHistoryListener(nsISHistoryListener *aListener)
272 {
273 return NS_ERROR_NOT_IMPLEMENTED;
274 }
275
276 /* void removeSHistoryListener (in nsISHistoryListener aListener); */
277 NS_IMETHODIMP nsSHistory::RemoveSHistoryListener(nsISHistoryListener *aListener)
278 {
279 return NS_ERROR_NOT_IMPLEMENTED;
280 }
281
282 /* readonly attribute nsISimpleEnumerator SHistoryEnumerator; */
283 NS_IMETHODIMP nsSHistory::GetSHistoryEnumerator(nsISimpleEnumerator * *aSHistory Enumerator)
284 {
285 return NS_ERROR_NOT_IMPLEMENTED;
286 }
287
288 /* End of implementation class template. */
289 #endif
290
291
292 #endif /* __gen_nsISHistory_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIRequestObserver.h ('k') | gecko-sdk/include/nsISHistoryListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698