toolkit/components/satchel/nsIFormHistory.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial