IDBObjectStoreBackendInterface.h [plain text]
#ifndef IDBObjectStoreBackendInterface_h
#define IDBObjectStoreBackendInterface_h
#include "ExceptionCode.h"
#include "PlatformString.h"
#include <wtf/Threading.h>
#if ENABLE(INDEXED_DATABASE)
namespace WebCore {
class DOMStringList;
class IDBCallbacks;
class IDBIndexBackendInterface;
class IDBKey;
class IDBKeyRange;
class IDBTransactionBackendInterface;
class SerializedScriptValue;
class IDBObjectStoreBackendInterface : public ThreadSafeRefCounted<IDBObjectStoreBackendInterface> {
public:
virtual ~IDBObjectStoreBackendInterface() { }
virtual String name() const = 0;
virtual String keyPath() const = 0;
virtual PassRefPtr<DOMStringList> indexNames() const = 0;
virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
enum PutMode {
AddOrUpdate,
AddOnly,
CursorUpdate
};
virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
virtual void deleteFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
virtual void clear(PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
virtual PassRefPtr<IDBIndexBackendInterface> createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
virtual PassRefPtr<IDBIndexBackendInterface> index(const String& name, ExceptionCode&) = 0;
virtual void deleteIndex(const String& name, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&) = 0;
};
}
#endif
#endif // IDBObjectStoreBackendInterface_h