WebIDBIndexImpl.cpp [plain text]
#include "config.h"
#include "WebIDBIndexImpl.h"
#if ENABLE(INDEXED_DATABASE)
#include "IDBCallbacksProxy.h"
#include "IDBIndex.h"
#include "IDBKeyRange.h"
#include "WebIDBCallbacks.h"
#include "WebIDBKey.h"
#include "WebIDBKeyRange.h"
using namespace WebCore;
namespace WebKit {
WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndexBackendInterface> backend)
: m_backend(backend)
{
}
WebIDBIndexImpl::~WebIDBIndexImpl()
{
}
WebString WebIDBIndexImpl::name() const
{
return m_backend->name();
}
WebString WebIDBIndexImpl::storeName() const
{
return m_backend->storeName();
}
WebIDBKeyPath WebIDBIndexImpl::keyPath() const
{
return WebIDBKeyPath(m_backend->keyPath());
}
WebString WebIDBIndexImpl::keyPathString() const
{
return m_backend->keyPath();
}
bool WebIDBIndexImpl::unique() const
{
return m_backend->unique();
}
bool WebIDBIndexImpl::multiEntry() const
{
return m_backend->multiEntry();
}
void WebIDBIndexImpl::openObjectCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->openCursor(keyRange, direction, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBIndexImpl::openKeyCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->openKeyCursor(keyRange, direction, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBIndexImpl::count(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->count(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBIndexImpl::getObject(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBIndexImpl::getKey(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_backend->getKey(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
}
#endif // ENABLE(INDEXED_DATABASE)