Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / storage / public / mozIStorageBindingParams.idl
blob3e98a996c7f04b452fff7d2379545dc7fb02dbd9
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.
16 * @param aName
17 * The name of the parameter to bind aValue to.
18 * @param aValue
19 * The value to bind.
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.
48 * @param aIndex
49 * The zero-based index of the parameter to bind aValue to.
50 * @param aValue
51 * The value to bind.
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);