toolkit/components/satchel/nsIFormHistory.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:bb499625d181
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #include "nsISupports.idl"
6 interface nsIFile;
7 interface mozIStorageConnection;
8
9 /**
10 * The nsIFormHistory object is a service which holds a set of name/value
11 * pairs. The names correspond to form field names, and the values correspond
12 * to values the user has submitted. So, several values may exist for a single
13 * name.
14 *
15 * Note: this interface provides no means to access stored values.
16 * Stored values are used by the FormFillController to generate
17 * autocomplete matches.
18 *
19 * @deprecated use FormHistory.jsm instead.
20 */
21
22 [scriptable, uuid(5d7d84d1-9798-4016-bf61-a32acf09b29d)]
23 interface nsIFormHistory2 : nsISupports
24 {
25 /**
26 * Returns true if the form history has any entries.
27 */
28 readonly attribute boolean hasEntries;
29
30 /**
31 * Adds a name and value pair to the form history.
32 */
33 void addEntry(in AString name, in AString value);
34
35 /**
36 * Removes a name and value pair from the form history.
37 */
38 void removeEntry(in AString name, in AString value);
39
40 /**
41 * Removes all entries that are paired with a name.
42 */
43 void removeEntriesForName(in AString name);
44
45 /**
46 * Removes all entries in the entire form history.
47 */
48 void removeAllEntries();
49
50 /**
51 * Returns true if there is no entry that is paired with a name.
52 */
53 boolean nameExists(in AString name);
54
55 /**
56 * Gets whether a name and value pair exists in the form history.
57 */
58 boolean entryExists(in AString name, in AString value);
59
60 /**
61 * Removes entries that were created between the specified times.
62 *
63 * @param aBeginTime
64 * The beginning of the timeframe, in microseconds
65 * @param aEndTime
66 * The end of the timeframe, in microseconds
67 */
68 void removeEntriesByTimeframe(in long long aBeginTime, in long long aEndTime);
69
70 /**
71 * Returns the underlying DB connection the form history module is using.
72 */
73 readonly attribute mozIStorageConnection DBConnection;
74 };

mercurial