storage/public/mozIStorageBindingParams.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  * vim: sw=2 ts=2 sts=2 et
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 interface nsIVariant;
    11 [scriptable, uuid(7d8763ad-79d9-4674-ada1-37fd702af68c)]
    12 interface mozIStorageBindingParams : nsISupports {
    13   /**
    14    * Binds aValue to the parameter with the name aName.
    15    *
    16    * @param aName
    17    *        The name of the parameter to bind aValue to.
    18    * @param aValue
    19    *        The value to bind.
    20    */
    21    void bindByName(in AUTF8String aName,
    22                    in nsIVariant aValue);
    23    [noscript] void bindUTF8StringByName(in AUTF8String aName,
    24                                         in AUTF8String aValue);
    25    [noscript] void bindStringByName(in AUTF8String aName,
    26                                     in AString aValue);
    27    [noscript] void bindDoubleByName(in AUTF8String aName,
    28                                     in double aValue);
    29    [noscript] void bindInt32ByName(in AUTF8String aName,
    30                                    in long aValue);
    31    [noscript] void bindInt64ByName(in AUTF8String aName,
    32                                    in long long aValue);
    33    [noscript] void bindNullByName(in AUTF8String aName);
    34    void bindBlobByName(in AUTF8String aName,
    35                        [array, const, size_is(aValueSize)] in octet aValue,
    36                        in unsigned long aValueSize);
    37    // The function adopts the storage for the provided blob.  After calling
    38    // this function, mozStorage will ensure that NS_Free is called on the
    39    // underlying pointer.
    40    [noscript]
    41    void bindAdoptedBlobByName(in AUTF8String aName,
    42                               [array, size_is(aValueSize)] in octet aValue,
    43                               in unsigned long aValueSize);
    45    /**
    46     * Binds aValue to the parameter with the index aIndex.
    47     *
    48     * @param aIndex
    49     *        The zero-based index of the parameter to bind aValue to.
    50     * @param aValue
    51     *        The value to bind.
    52     */
    53    void bindByIndex(in unsigned long aIndex,
    54                     in nsIVariant aValue);
    55    [noscript] void bindUTF8StringByIndex(in unsigned long aIndex,
    56                                          in AUTF8String aValue);
    57    [noscript] void bindStringByIndex(in unsigned long aIndex,
    58                                      in AString aValue);
    59    [noscript] void bindDoubleByIndex(in unsigned long aIndex,
    60                                      in double aValue);
    61    [noscript] void bindInt32ByIndex(in unsigned long aIndex,
    62                                     in long aValue);
    63    [noscript] void bindInt64ByIndex(in unsigned long aIndex,
    64                                     in long long aValue);
    65    [noscript] void bindNullByIndex(in unsigned long aIndex);
    66    void bindBlobByIndex(in unsigned long aIndex,
    67                         [array, const, size_is(aValueSize)] in octet aValue,
    68                         in unsigned long aValueSize);
    69    // The function adopts the storage for the provided blob.  After calling
    70    // this function, mozStorage will ensure that NS_Free is called on the
    71    // underlying pointer.
    72    [noscript]
    73    void bindAdoptedBlobByIndex(in unsigned long aIndex,
    74                                [array, size_is(aValueSize)] in octet aValue,
    75                                in unsigned long aValueSize);
    76 };

mercurial