storage/src/IStorageBindingParamsInternal.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/storage/src/IStorageBindingParamsInternal.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + * vim: sw=2 ts=2 sts=2 expandtab
     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 +#ifndef mozilla_storage_IStorageBindingParamsInternal_h_
    1.11 +#define mozilla_storage_IStorageBindingParamsInternal_h_
    1.12 +
    1.13 +#include "nsISupports.h"
    1.14 +
    1.15 +struct sqlite3_stmt;
    1.16 +class mozIStorageError;
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace storage {
    1.20 +
    1.21 +#define ISTORAGEBINDINGPARAMSINTERNAL_IID \
    1.22 +  {0x4c43d33a, 0xc620, 0x41b8, {0xba, 0x1d, 0x50, 0xc5, 0xb1, 0xe9, 0x1a, 0x04}}
    1.23 +
    1.24 +/**
    1.25 + * Implementation-only interface for mozIStorageBindingParams.  This defines the
    1.26 + * set of methods required by the asynchronous execution code in order to
    1.27 + * consume the contents stored in mozIStorageBindingParams instances.
    1.28 + */
    1.29 +class IStorageBindingParamsInternal : public nsISupports
    1.30 +{
    1.31 +public:
    1.32 +  NS_DECLARE_STATIC_IID_ACCESSOR(ISTORAGEBINDINGPARAMSINTERNAL_IID)
    1.33 +
    1.34 +  /**
    1.35 +   * Binds our stored data to the statement.
    1.36 +   *
    1.37 +   * @param aStatement
    1.38 +   *        The statement to bind our data to.
    1.39 +   * @return nullptr on success, or a mozIStorageError object if an error
    1.40 +   *         occurred.
    1.41 +   */
    1.42 +  virtual already_AddRefed<mozIStorageError> bind(sqlite3_stmt *aStatement) = 0;
    1.43 +};
    1.44 +
    1.45 +NS_DEFINE_STATIC_IID_ACCESSOR(IStorageBindingParamsInternal,
    1.46 +                              ISTORAGEBINDINGPARAMSINTERNAL_IID)
    1.47 +
    1.48 +#define NS_DECL_ISTORAGEBINDINGPARAMSINTERNAL \
    1.49 +  already_AddRefed<mozIStorageError> bind(sqlite3_stmt *aStatement);
    1.50 +
    1.51 +} // storage
    1.52 +} // mozilla
    1.53 +
    1.54 +#endif // mozilla_storage_IStorageBindingParamsInternal_h_

mercurial