2007-11-13 13:42:03 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-11-13 13:42:03 +03:00
|
|
|
|
|
|
|
#ifndef nsXULTemplateQueryProcessorStorage_h__
|
|
|
|
#define nsXULTemplateQueryProcessorStorage_h__
|
|
|
|
|
|
|
|
#include "nsIXULTemplateBuilder.h"
|
|
|
|
#include "nsIXULTemplateQueryProcessor.h"
|
|
|
|
|
|
|
|
#include "nsISimpleEnumerator.h"
|
|
|
|
#include "nsCOMArray.h"
|
|
|
|
#include "nsIVariant.h"
|
|
|
|
|
|
|
|
#include "mozIStorageValueArray.h"
|
|
|
|
#include "mozIStorageStatement.h"
|
|
|
|
#include "mozIStorageConnection.h"
|
2012-06-19 06:30:09 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-11-13 13:42:03 +03:00
|
|
|
|
|
|
|
class nsXULTemplateQueryProcessorStorage;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsXULTemplateResultSetStorage final : public nsISimpleEnumerator
|
2007-11-13 13:42:03 +03:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
nsCOMPtr<mozIStorageStatement> mStatement;
|
|
|
|
|
|
|
|
nsCOMArray<nsIAtom> mColumnNames;
|
|
|
|
|
2014-06-25 06:09:15 +04:00
|
|
|
~nsXULTemplateResultSetStorage() {}
|
|
|
|
|
2007-11-13 13:42:03 +03:00
|
|
|
public:
|
|
|
|
|
|
|
|
// nsISupports interface
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// nsISimpleEnumerator interface
|
|
|
|
NS_DECL_NSISIMPLEENUMERATOR
|
|
|
|
|
2014-09-02 04:49:25 +04:00
|
|
|
explicit nsXULTemplateResultSetStorage(mozIStorageStatement* aStatement);
|
2007-11-13 13:42:03 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t GetColumnIndex(nsIAtom* aColumnName);
|
2007-11-13 13:42:03 +03:00
|
|
|
|
|
|
|
void FillColumnValues(nsCOMArray<nsIVariant>& aArray);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsXULTemplateQueryProcessorStorage final : public nsIXULTemplateQueryProcessor
|
2007-11-13 13:42:03 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
nsXULTemplateQueryProcessorStorage();
|
|
|
|
|
|
|
|
// nsISupports interface
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// nsIXULTemplateQueryProcessor interface
|
|
|
|
NS_DECL_NSIXULTEMPLATEQUERYPROCESSOR
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2014-06-25 06:09:15 +04:00
|
|
|
~nsXULTemplateQueryProcessorStorage() {}
|
|
|
|
|
2007-11-13 13:42:03 +03:00
|
|
|
nsCOMPtr<mozIStorageConnection> mStorageConnection;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mGenerationStarted;
|
2007-11-13 13:42:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsXULTemplateQueryProcessorStorage_h__
|