diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/storage/IDBObjectStore.h | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/storage/IDBObjectStore.h')
-rw-r--r-- | WebCore/storage/IDBObjectStore.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/WebCore/storage/IDBObjectStore.h b/WebCore/storage/IDBObjectStore.h index df5b3f7..dc92233 100644 --- a/WebCore/storage/IDBObjectStore.h +++ b/WebCore/storage/IDBObjectStore.h @@ -27,10 +27,13 @@ #define IDBObjectStore_h #include "IDBCursor.h" +#include "IDBIndex.h" +#include "IDBKey.h" #include "IDBKeyRange.h" #include "IDBObjectStoreBackendInterface.h" #include "IDBRequest.h" #include "PlatformString.h" +#include "SerializedScriptValue.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> @@ -41,10 +44,7 @@ namespace WebCore { class DOMStringList; class IDBAny; -class IDBIndexRequest; -class IDBKey; class IDBTransactionBackendInterface; -class SerializedScriptValue; class IDBObjectStore : public RefCounted<IDBObjectStore> { public: @@ -58,16 +58,23 @@ public: String keyPath() const; PassRefPtr<DOMStringList> indexNames() const; - PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKey> key); - PassRefPtr<IDBRequest> add(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key = 0); - PassRefPtr<IDBRequest> put(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key = 0); - PassRefPtr<IDBRequest> remove(ScriptExecutionContext*, PassRefPtr<IDBKey> key); + // FIXME: Try to modify the code generator so this is unneeded. + PassRefPtr<IDBRequest> add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return add(context, value, 0, ec); } + PassRefPtr<IDBRequest> put(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return put(context, value, 0, ec); } + PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, ExceptionCode& ec) { return createIndex(name, keyPath, false, ec); } + PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, 0, ec); } + PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::NEXT, ec); } - PassRefPtr<IDBRequest> createIndex(ScriptExecutionContext*, const String& name, const String& keyPath, bool unique = false); - PassRefPtr<IDBIndex> index(const String& name); - PassRefPtr<IDBRequest> removeIndex(ScriptExecutionContext*, const String& name); + PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKey>, ExceptionCode&); + PassRefPtr<IDBRequest> add(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, ExceptionCode&); + PassRefPtr<IDBRequest> put(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, ExceptionCode&); + PassRefPtr<IDBRequest> remove(ScriptExecutionContext*, PassRefPtr<IDBKey> key, ExceptionCode&); - PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange> = 0, unsigned short direction = IDBCursor::NEXT); + PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, bool unique, ExceptionCode&); + PassRefPtr<IDBIndex> index(const String& name, ExceptionCode&); + void removeIndex(const String& name, ExceptionCode&); + + PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, unsigned short direction, ExceptionCode&); private: IDBObjectStore(PassRefPtr<IDBObjectStoreBackendInterface>, IDBTransactionBackendInterface* transaction); |