michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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: #ifndef nsXULTemplateQueryProcessorStorage_h__ michael@0: #define nsXULTemplateQueryProcessorStorage_h__ michael@0: michael@0: #include "nsIXULTemplateBuilder.h" michael@0: #include "nsIXULTemplateQueryProcessor.h" michael@0: michael@0: #include "nsISimpleEnumerator.h" michael@0: #include "nsCOMArray.h" michael@0: #include "nsIVariant.h" michael@0: michael@0: #include "mozIStorageValueArray.h" michael@0: #include "mozIStorageStatement.h" michael@0: #include "mozIStorageConnection.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: class nsXULTemplateQueryProcessorStorage; michael@0: michael@0: class nsXULTemplateResultSetStorage MOZ_FINAL : public nsISimpleEnumerator michael@0: { michael@0: private: michael@0: michael@0: nsCOMPtr mStatement; michael@0: michael@0: nsCOMArray mColumnNames; michael@0: michael@0: public: michael@0: michael@0: // nsISupports interface michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: // nsISimpleEnumerator interface michael@0: NS_DECL_NSISIMPLEENUMERATOR michael@0: michael@0: nsXULTemplateResultSetStorage(mozIStorageStatement* aStatement); michael@0: michael@0: int32_t GetColumnIndex(nsIAtom* aColumnName); michael@0: michael@0: void FillColumnValues(nsCOMArray& aArray); michael@0: michael@0: }; michael@0: michael@0: class nsXULTemplateQueryProcessorStorage MOZ_FINAL : public nsIXULTemplateQueryProcessor michael@0: { michael@0: public: michael@0: michael@0: nsXULTemplateQueryProcessorStorage(); michael@0: michael@0: // nsISupports interface michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: // nsIXULTemplateQueryProcessor interface michael@0: NS_DECL_NSIXULTEMPLATEQUERYPROCESSOR michael@0: michael@0: private: michael@0: michael@0: nsCOMPtr mStorageConnection; michael@0: bool mGenerationStarted; michael@0: }; michael@0: michael@0: #endif // nsXULTemplateQueryProcessorStorage_h__