content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorStorage.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,65 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsXULTemplateQueryProcessorStorage_h__
    1.10 +#define nsXULTemplateQueryProcessorStorage_h__
    1.11 +
    1.12 +#include "nsIXULTemplateBuilder.h"
    1.13 +#include "nsIXULTemplateQueryProcessor.h"
    1.14 +
    1.15 +#include "nsISimpleEnumerator.h"
    1.16 +#include "nsCOMArray.h"
    1.17 +#include "nsIVariant.h"
    1.18 +
    1.19 +#include "mozIStorageValueArray.h"
    1.20 +#include "mozIStorageStatement.h"
    1.21 +#include "mozIStorageConnection.h"
    1.22 +#include "mozilla/Attributes.h"
    1.23 +
    1.24 +class nsXULTemplateQueryProcessorStorage;
    1.25 +
    1.26 +class nsXULTemplateResultSetStorage MOZ_FINAL : public nsISimpleEnumerator
    1.27 +{
    1.28 +private:
    1.29 +
    1.30 +    nsCOMPtr<mozIStorageStatement> mStatement;
    1.31 +
    1.32 +    nsCOMArray<nsIAtom> mColumnNames;
    1.33 +
    1.34 +public:
    1.35 +
    1.36 +    // nsISupports interface
    1.37 +    NS_DECL_ISUPPORTS
    1.38 +
    1.39 +    // nsISimpleEnumerator interface
    1.40 +    NS_DECL_NSISIMPLEENUMERATOR
    1.41 +
    1.42 +    nsXULTemplateResultSetStorage(mozIStorageStatement* aStatement);
    1.43 +
    1.44 +    int32_t GetColumnIndex(nsIAtom* aColumnName);
    1.45 +
    1.46 +    void FillColumnValues(nsCOMArray<nsIVariant>& aArray);
    1.47 +
    1.48 +};
    1.49 +
    1.50 +class nsXULTemplateQueryProcessorStorage MOZ_FINAL : public nsIXULTemplateQueryProcessor
    1.51 +{
    1.52 +public:
    1.53 +
    1.54 +    nsXULTemplateQueryProcessorStorage();
    1.55 +
    1.56 +    // nsISupports interface
    1.57 +    NS_DECL_ISUPPORTS
    1.58 +
    1.59 +    // nsIXULTemplateQueryProcessor interface
    1.60 +    NS_DECL_NSIXULTEMPLATEQUERYPROCESSOR
    1.61 +
    1.62 +private:
    1.63 +
    1.64 +    nsCOMPtr<mozIStorageConnection> mStorageConnection;
    1.65 +    bool mGenerationStarted;
    1.66 +};
    1.67 +
    1.68 +#endif // nsXULTemplateQueryProcessorStorage_h__

mercurial