toolkit/components/satchel/nsIFormHistory.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     5 #include "nsISupports.idl"
     6 interface nsIFile;
     7 interface mozIStorageConnection;
     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  */
    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;
    30   /**
    31    * Adds a name and value pair to the form history.
    32    */
    33   void addEntry(in AString name, in AString value);
    35   /**
    36    * Removes a name and value pair from the form history.
    37    */
    38   void removeEntry(in AString name, in AString value);
    40   /**
    41    * Removes all entries that are paired with a name.
    42    */
    43   void removeEntriesForName(in AString name);
    45   /**
    46    * Removes all entries in the entire form history.
    47    */
    48   void removeAllEntries();
    50   /**
    51    * Returns true if there is no entry that is paired with a name.
    52    */
    53   boolean nameExists(in AString name);
    55   /**
    56    * Gets whether a name and value pair exists in the form history.
    57    */
    58   boolean entryExists(in AString name, in AString value);
    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);
    70   /**
    71    * Returns the underlying DB connection the form history module is using.
    72    */
    73   readonly attribute mozIStorageConnection DBConnection;
    74 };

mercurial