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"
11 [scriptable
, uuid(7d8763ad
-79d9
-4674-ada1
-37fd702af68c
)]
12 interface mozIStorageBindingParams
: nsISupports
{
14 * Binds aValue to the parameter with the name aName.
17 * The name of the parameter to bind aValue to.
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
,
27 [noscript
] void bindDoubleByName
(in AUTF8String aName
,
29 [noscript
] void bindInt32ByName
(in AUTF8String aName
,
31 [noscript
] void bindInt64ByName
(in AUTF8String aName
,
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.
41 void bindAdoptedBlobByName
(in AUTF8String aName
,
42 [array
, size_is(aValueSize
)] in octet aValue
,
43 in unsigned long aValueSize
);
46 * Binds aValue to the parameter with the index aIndex.
49 * The zero-based index of the parameter to bind aValue to.
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
,
59 [noscript
] void bindDoubleByIndex
(in unsigned long aIndex
,
61 [noscript
] void bindInt32ByIndex
(in unsigned long aIndex
,
63 [noscript
] void bindInt64ByIndex
(in unsigned long aIndex
,
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.
73 void bindAdoptedBlobByIndex
(in unsigned long aIndex
,
74 [array
, size_is(aValueSize
)] in octet aValue
,
75 in unsigned long aValueSize
);