1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/storage/public/mozIStorageBindingParams.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,76 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: sw=2 ts=2 sts=2 et 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIVariant; 1.13 + 1.14 +[scriptable, uuid(7d8763ad-79d9-4674-ada1-37fd702af68c)] 1.15 +interface mozIStorageBindingParams : nsISupports { 1.16 + /** 1.17 + * Binds aValue to the parameter with the name aName. 1.18 + * 1.19 + * @param aName 1.20 + * The name of the parameter to bind aValue to. 1.21 + * @param aValue 1.22 + * The value to bind. 1.23 + */ 1.24 + void bindByName(in AUTF8String aName, 1.25 + in nsIVariant aValue); 1.26 + [noscript] void bindUTF8StringByName(in AUTF8String aName, 1.27 + in AUTF8String aValue); 1.28 + [noscript] void bindStringByName(in AUTF8String aName, 1.29 + in AString aValue); 1.30 + [noscript] void bindDoubleByName(in AUTF8String aName, 1.31 + in double aValue); 1.32 + [noscript] void bindInt32ByName(in AUTF8String aName, 1.33 + in long aValue); 1.34 + [noscript] void bindInt64ByName(in AUTF8String aName, 1.35 + in long long aValue); 1.36 + [noscript] void bindNullByName(in AUTF8String aName); 1.37 + void bindBlobByName(in AUTF8String aName, 1.38 + [array, const, size_is(aValueSize)] in octet aValue, 1.39 + in unsigned long aValueSize); 1.40 + // The function adopts the storage for the provided blob. After calling 1.41 + // this function, mozStorage will ensure that NS_Free is called on the 1.42 + // underlying pointer. 1.43 + [noscript] 1.44 + void bindAdoptedBlobByName(in AUTF8String aName, 1.45 + [array, size_is(aValueSize)] in octet aValue, 1.46 + in unsigned long aValueSize); 1.47 + 1.48 + /** 1.49 + * Binds aValue to the parameter with the index aIndex. 1.50 + * 1.51 + * @param aIndex 1.52 + * The zero-based index of the parameter to bind aValue to. 1.53 + * @param aValue 1.54 + * The value to bind. 1.55 + */ 1.56 + void bindByIndex(in unsigned long aIndex, 1.57 + in nsIVariant aValue); 1.58 + [noscript] void bindUTF8StringByIndex(in unsigned long aIndex, 1.59 + in AUTF8String aValue); 1.60 + [noscript] void bindStringByIndex(in unsigned long aIndex, 1.61 + in AString aValue); 1.62 + [noscript] void bindDoubleByIndex(in unsigned long aIndex, 1.63 + in double aValue); 1.64 + [noscript] void bindInt32ByIndex(in unsigned long aIndex, 1.65 + in long aValue); 1.66 + [noscript] void bindInt64ByIndex(in unsigned long aIndex, 1.67 + in long long aValue); 1.68 + [noscript] void bindNullByIndex(in unsigned long aIndex); 1.69 + void bindBlobByIndex(in unsigned long aIndex, 1.70 + [array, const, size_is(aValueSize)] in octet aValue, 1.71 + in unsigned long aValueSize); 1.72 + // The function adopts the storage for the provided blob. After calling 1.73 + // this function, mozStorage will ensure that NS_Free is called on the 1.74 + // underlying pointer. 1.75 + [noscript] 1.76 + void bindAdoptedBlobByIndex(in unsigned long aIndex, 1.77 + [array, size_is(aValueSize)] in octet aValue, 1.78 + in unsigned long aValueSize); 1.79 +};