michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: interface nsIFile; michael@0: interface mozIStorageConnection; michael@0: michael@0: /** michael@0: * The nsIFormHistory object is a service which holds a set of name/value michael@0: * pairs. The names correspond to form field names, and the values correspond michael@0: * to values the user has submitted. So, several values may exist for a single michael@0: * name. michael@0: * michael@0: * Note: this interface provides no means to access stored values. michael@0: * Stored values are used by the FormFillController to generate michael@0: * autocomplete matches. michael@0: * michael@0: * @deprecated use FormHistory.jsm instead. michael@0: */ michael@0: michael@0: [scriptable, uuid(5d7d84d1-9798-4016-bf61-a32acf09b29d)] michael@0: interface nsIFormHistory2 : nsISupports michael@0: { michael@0: /** michael@0: * Returns true if the form history has any entries. michael@0: */ michael@0: readonly attribute boolean hasEntries; michael@0: michael@0: /** michael@0: * Adds a name and value pair to the form history. michael@0: */ michael@0: void addEntry(in AString name, in AString value); michael@0: michael@0: /** michael@0: * Removes a name and value pair from the form history. michael@0: */ michael@0: void removeEntry(in AString name, in AString value); michael@0: michael@0: /** michael@0: * Removes all entries that are paired with a name. michael@0: */ michael@0: void removeEntriesForName(in AString name); michael@0: michael@0: /** michael@0: * Removes all entries in the entire form history. michael@0: */ michael@0: void removeAllEntries(); michael@0: michael@0: /** michael@0: * Returns true if there is no entry that is paired with a name. michael@0: */ michael@0: boolean nameExists(in AString name); michael@0: michael@0: /** michael@0: * Gets whether a name and value pair exists in the form history. michael@0: */ michael@0: boolean entryExists(in AString name, in AString value); michael@0: michael@0: /** michael@0: * Removes entries that were created between the specified times. michael@0: * michael@0: * @param aBeginTime michael@0: * The beginning of the timeframe, in microseconds michael@0: * @param aEndTime michael@0: * The end of the timeframe, in microseconds michael@0: */ michael@0: void removeEntriesByTimeframe(in long long aBeginTime, in long long aEndTime); michael@0: michael@0: /** michael@0: * Returns the underlying DB connection the form history module is using. michael@0: */ michael@0: readonly attribute mozIStorageConnection DBConnection; michael@0: };