storage/public/mozIStorageBindingParams.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial