michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=2 sts=2 et michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIVariant; michael@0: michael@0: [scriptable, uuid(7d8763ad-79d9-4674-ada1-37fd702af68c)] michael@0: interface mozIStorageBindingParams : nsISupports { michael@0: /** michael@0: * Binds aValue to the parameter with the name aName. michael@0: * michael@0: * @param aName michael@0: * The name of the parameter to bind aValue to. michael@0: * @param aValue michael@0: * The value to bind. michael@0: */ michael@0: void bindByName(in AUTF8String aName, michael@0: in nsIVariant aValue); michael@0: [noscript] void bindUTF8StringByName(in AUTF8String aName, michael@0: in AUTF8String aValue); michael@0: [noscript] void bindStringByName(in AUTF8String aName, michael@0: in AString aValue); michael@0: [noscript] void bindDoubleByName(in AUTF8String aName, michael@0: in double aValue); michael@0: [noscript] void bindInt32ByName(in AUTF8String aName, michael@0: in long aValue); michael@0: [noscript] void bindInt64ByName(in AUTF8String aName, michael@0: in long long aValue); michael@0: [noscript] void bindNullByName(in AUTF8String aName); michael@0: void bindBlobByName(in AUTF8String aName, michael@0: [array, const, size_is(aValueSize)] in octet aValue, michael@0: in unsigned long aValueSize); michael@0: // The function adopts the storage for the provided blob. After calling michael@0: // this function, mozStorage will ensure that NS_Free is called on the michael@0: // underlying pointer. michael@0: [noscript] michael@0: void bindAdoptedBlobByName(in AUTF8String aName, michael@0: [array, size_is(aValueSize)] in octet aValue, michael@0: in unsigned long aValueSize); michael@0: michael@0: /** michael@0: * Binds aValue to the parameter with the index aIndex. michael@0: * michael@0: * @param aIndex michael@0: * The zero-based index of the parameter to bind aValue to. michael@0: * @param aValue michael@0: * The value to bind. michael@0: */ michael@0: void bindByIndex(in unsigned long aIndex, michael@0: in nsIVariant aValue); michael@0: [noscript] void bindUTF8StringByIndex(in unsigned long aIndex, michael@0: in AUTF8String aValue); michael@0: [noscript] void bindStringByIndex(in unsigned long aIndex, michael@0: in AString aValue); michael@0: [noscript] void bindDoubleByIndex(in unsigned long aIndex, michael@0: in double aValue); michael@0: [noscript] void bindInt32ByIndex(in unsigned long aIndex, michael@0: in long aValue); michael@0: [noscript] void bindInt64ByIndex(in unsigned long aIndex, michael@0: in long long aValue); michael@0: [noscript] void bindNullByIndex(in unsigned long aIndex); michael@0: void bindBlobByIndex(in unsigned long aIndex, michael@0: [array, const, size_is(aValueSize)] in octet aValue, michael@0: in unsigned long aValueSize); michael@0: // The function adopts the storage for the provided blob. After calling michael@0: // this function, mozStorage will ensure that NS_Free is called on the michael@0: // underlying pointer. michael@0: [noscript] michael@0: void bindAdoptedBlobByIndex(in unsigned long aIndex, michael@0: [array, size_is(aValueSize)] in octet aValue, michael@0: in unsigned long aValueSize); michael@0: };