summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/IDBObjectStore.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage/IDBObjectStore.h')
-rw-r--r--WebCore/storage/IDBObjectStore.h31
1 files changed, 8 insertions, 23 deletions
diff --git a/WebCore/storage/IDBObjectStore.h b/WebCore/storage/IDBObjectStore.h
index c1ce129..837b65a 100644
--- a/WebCore/storage/IDBObjectStore.h
+++ b/WebCore/storage/IDBObjectStore.h
@@ -27,8 +27,6 @@
#define IDBObjectStore_h
#include "PlatformString.h"
-#include "StringHash.h"
-#include <wtf/HashMap.h>
#include <wtf/Threading.h>
#if ENABLE(INDEXED_DATABASE)
@@ -36,33 +34,20 @@
namespace WebCore {
class DOMStringList;
-class IDBIndex;
class IDBCallbacks;
+class IDBIndex;
-// FIXME: This needs to be split into an interface and Impl classes.
class IDBObjectStore : public ThreadSafeShared<IDBObjectStore> {
public:
- static PassRefPtr<IDBObjectStore> create()
- {
- return adoptRef(new IDBObjectStore());
- }
- virtual ~IDBObjectStore();
-
- String name() const { return m_name; }
- String keyPath() const { return m_keyPath; }
- PassRefPtr<DOMStringList> indexNames() const;
-
- void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>);
- PassRefPtr<IDBIndex> index(const String& name);
- void removeIndex(const String& name, PassRefPtr<IDBCallbacks>);
+ virtual ~IDBObjectStore() { }
-private:
- IDBObjectStore();
+ virtual String name() const = 0;
+ virtual String keyPath() const = 0;
+ virtual PassRefPtr<DOMStringList> indexNames() const = 0;
- String m_name;
- String m_keyPath;
- typedef HashMap<String, RefPtr<IDBIndex> > IndexMap;
- IndexMap m_indexes;
+ virtual void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>) = 0;
+ virtual PassRefPtr<IDBIndex> index(const String& name) = 0;
+ virtual void removeIndex(const String& name, PassRefPtr<IDBCallbacks>) = 0;
};
} // namespace WebCore