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