18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 2dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block * Copyright (C) 2010 Google Inc. All rights reserved. 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met: 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1. Redistributions of source code must retain the above copyright 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer. 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2. Redistributions in binary form must reproduce the above copyright 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer in the 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * documentation and/or other materials provided with the distribution. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 255af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 26db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#ifndef IDBIndexBackendInterface_h 27db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#define IDBIndexBackendInterface_h 28db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block 29a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch#include "ExceptionCode.h" 30db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#include "PlatformString.h" 31db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#include <wtf/Forward.h> 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 33dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#if ENABLE(INDEXED_DATABASE) 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 3768513a70bcd92384395513322f1b801e7bf9c729Steve Blockclass IDBCallbacks; 3868513a70bcd92384395513322f1b801e7bf9c729Steve Blockclass IDBKey; 3968513a70bcd92384395513322f1b801e7bf9c729Steve Blockclass IDBKeyRange; 40a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochclass IDBTransactionBackendInterface; 4168513a70bcd92384395513322f1b801e7bf9c729Steve Block 422bde8e466a4451c7319e3a072d118917957d6554Steve Blockclass IDBIndexBackendInterface : public ThreadSafeRefCounted<IDBIndexBackendInterface> { 43db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Blockpublic: 44db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block virtual ~IDBIndexBackendInterface() { } 455af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 46db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block virtual String name() = 0; 4768513a70bcd92384395513322f1b801e7bf9c729Steve Block virtual String storeName() = 0; 48db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block virtual String keyPath() = 0; 49db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block virtual bool unique() = 0; 5068513a70bcd92384395513322f1b801e7bf9c729Steve Block 51a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0; 52a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual void openKeyCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0; 53a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0; 54a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch virtual void getKey(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0; 55db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block}; 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} // namespace WebCore 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 59db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#endif 60db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block 61db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#endif // IDBIndexBackendInterface_h 62