Bug 574740 - Rename nsIIndexedDatabaseRequest to nsIIDBFactory

Update interface names per specification.
r=bent

--HG--
rename : dom/indexedDB/IndexedDatabaseRequest.cpp => dom/indexedDB/IDBFactory.cpp
rename : dom/indexedDB/IndexedDatabaseRequest.h => dom/indexedDB/IDBFactory.h
rename : dom/indexedDB/nsIIndexedDatabaseRequest.idl => dom/indexedDB/nsIIDBFactory.idl
This commit is contained in:
Shawn Wilsher 2010-06-28 09:44:30 -07:00
Родитель 875cf25bd9
Коммит 3405a47131
14 изменённых файлов: 63 добавлений и 63 удалений

Просмотреть файл

@ -479,7 +479,7 @@
using namespace mozilla::dom;
#include "mozilla/dom/indexedDB/IndexedDatabaseRequest.h"
#include "mozilla/dom/indexedDB/IDBFactory.h"
#include "mozilla/dom/indexedDB/IDBRequest.h"
#include "mozilla/dom/indexedDB/IDBDatabaseRequest.h"
#include "mozilla/dom/indexedDB/IDBEvents.h"
@ -1418,7 +1418,7 @@ static nsDOMClassInfoData sClassInfoData[] = {
NS_DEFINE_CLASSINFO_DATA(CloseEvent, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(IndexedDatabaseRequest, nsDOMGenericSH,
NS_DEFINE_CLASSINFO_DATA(IDBFactory, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(IDBRequest, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
@ -3923,8 +3923,8 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_EVENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(IndexedDatabaseRequest, nsIIndexedDatabaseRequest)
DOM_CLASSINFO_MAP_ENTRY(nsIIndexedDatabaseRequest)
DOM_CLASSINFO_MAP_BEGIN(IDBFactory, nsIIDBFactory)
DOM_CLASSINFO_MAP_ENTRY(nsIIDBFactory)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(IDBRequest, nsIIDBRequest)

Просмотреть файл

@ -480,7 +480,7 @@ DOMCI_CLASS(FormData)
DOMCI_CLASS(WebSocket)
DOMCI_CLASS(CloseEvent)
DOMCI_CLASS(IndexedDatabaseRequest)
DOMCI_CLASS(IDBFactory)
DOMCI_CLASS(IDBRequest)
DOMCI_CLASS(IDBDatabaseRequest)
DOMCI_CLASS(IDBErrorEvent)

Просмотреть файл

@ -215,7 +215,7 @@
#endif
#include "prlog.h"
#include "mozilla/dom/indexedDB/IndexedDatabaseRequest.h"
#include "mozilla/dom/indexedDB/IDBFactory.h"
#ifdef PR_LOGGING
static PRLogModuleInfo* gDOMLeakPRLog;
@ -7596,14 +7596,14 @@ nsGlobalWindow::GetLocalStorage(nsIDOMStorage ** aLocalStorage)
}
NS_IMETHODIMP
nsGlobalWindow::GetMoz_indexedDB(nsIIndexedDatabaseRequest** _retval)
nsGlobalWindow::GetMoz_indexedDB(nsIIDBFactory** _retval)
{
if (!mIndexedDB) {
mIndexedDB = mozilla::dom::indexedDB::IndexedDatabaseRequest::Create();
mIndexedDB = mozilla::dom::indexedDB::IDBFactory::Create();
NS_ENSURE_TRUE(mIndexedDB, NS_ERROR_FAILURE);
}
nsCOMPtr<nsIIndexedDatabaseRequest> request(mIndexedDB);
nsCOMPtr<nsIIDBFactory> request(mIndexedDB);
request.forget(_retval);
return NS_OK;
}

Просмотреть файл

@ -101,7 +101,7 @@
#include "nsPIDOMEventTarget.h"
#include "nsIArray.h"
#include "nsIContent.h"
#include "nsIIndexedDatabaseRequest.h"
#include "nsIIDBFactory.h"
#include "nsFrameMessageManager.h"
#define DEFAULT_HOME_PAGE "www.mozilla.org"
@ -830,7 +830,7 @@ protected:
nsCOMPtr<nsIDocument> mSuspendedDoc;
nsCOMPtr<nsIIndexedDatabaseRequest> mIndexedDB;
nsCOMPtr<nsIIDBFactory> mIndexedDB;
// A unique (as long as our 64-bit counter doesn't roll over) id for
// this window.

Просмотреть файл

@ -52,7 +52,7 @@
#include "IDBEvents.h"
#include "IDBObjectStoreRequest.h"
#include "IDBTransactionRequest.h"
#include "IndexedDatabaseRequest.h"
#include "IDBFactory.h"
#include "LazyIdleThread.h"
USING_INDEXEDDB_NAMESPACE
@ -268,7 +268,7 @@ IDBDatabaseRequest::GetOrCreateConnection(mozIStorageConnection** aResult)
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
if (!mConnection) {
mConnection = IndexedDatabaseRequest::GetConnection(mFilePath);
mConnection = IDBFactory::GetConnection(mFilePath);
NS_ENSURE_TRUE(mConnection, NS_ERROR_FAILURE);
}

Просмотреть файл

@ -37,7 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "IndexedDatabaseRequest.h"
#include "IDBFactory.h"
#include "nsIIDBDatabaseException.h"
#include "nsILocalFile.h"
@ -451,17 +451,17 @@ ValidateVariantForKey(nsIVariant* aVariant)
} // anonyomous namespace
// static
already_AddRefed<nsIIndexedDatabaseRequest>
IndexedDatabaseRequest::Create()
already_AddRefed<nsIIDBFactory>
IDBFactory::Create()
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
nsCOMPtr<nsIIndexedDatabaseRequest> request(new IndexedDatabaseRequest());
nsCOMPtr<nsIIDBFactory> request(new IDBFactory());
return request.forget();
}
// static
already_AddRefed<mozIStorageConnection>
IndexedDatabaseRequest::GetConnection(const nsAString& aDatabaseFilePath)
IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
{
NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")),
"Bad file path!");
@ -504,21 +504,21 @@ IndexedDatabaseRequest::GetConnection(const nsAString& aDatabaseFilePath)
return connection.forget();
}
NS_IMPL_ADDREF(IndexedDatabaseRequest)
NS_IMPL_RELEASE(IndexedDatabaseRequest)
NS_IMPL_ADDREF(IDBFactory)
NS_IMPL_RELEASE(IDBFactory)
NS_INTERFACE_MAP_BEGIN(IndexedDatabaseRequest)
NS_INTERFACE_MAP_BEGIN(IDBFactory)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, IDBRequest::Generator)
NS_INTERFACE_MAP_ENTRY(nsIIndexedDatabaseRequest)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IndexedDatabaseRequest)
NS_INTERFACE_MAP_ENTRY(nsIIDBFactory)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBFactory)
NS_INTERFACE_MAP_END
DOMCI_DATA(IndexedDatabaseRequest, IndexedDatabaseRequest)
DOMCI_DATA(IDBFactory, IDBFactory)
NS_IMETHODIMP
IndexedDatabaseRequest::Open(const nsAString& aName,
const nsAString& aDescription,
nsIIDBRequest** _retval)
IDBFactory::Open(const nsAString& aName,
const nsAString& aDescription,
nsIIDBRequest** _retval)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@ -555,8 +555,8 @@ IndexedDatabaseRequest::Open(const nsAString& aName,
}
NS_IMETHODIMP
IndexedDatabaseRequest::MakeSingleKeyRange(nsIVariant* aValue,
nsIIDBKeyRange** _retval)
IDBFactory::MakeSingleKeyRange(nsIVariant* aValue,
nsIIDBKeyRange** _retval)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@ -575,9 +575,9 @@ IndexedDatabaseRequest::MakeSingleKeyRange(nsIVariant* aValue,
}
NS_IMETHODIMP
IndexedDatabaseRequest::MakeLeftBoundKeyRange(nsIVariant* aBound,
PRBool aOpen,
nsIIDBKeyRange** _retval)
IDBFactory::MakeLeftBoundKeyRange(nsIVariant* aBound,
PRBool aOpen,
nsIIDBKeyRange** _retval)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@ -598,9 +598,9 @@ IndexedDatabaseRequest::MakeLeftBoundKeyRange(nsIVariant* aBound,
}
NS_IMETHODIMP
IndexedDatabaseRequest::MakeRightBoundKeyRange(nsIVariant* aBound,
PRBool aOpen,
nsIIDBKeyRange** _retval)
IDBFactory::MakeRightBoundKeyRange(nsIVariant* aBound,
PRBool aOpen,
nsIIDBKeyRange** _retval)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
@ -621,11 +621,11 @@ IndexedDatabaseRequest::MakeRightBoundKeyRange(nsIVariant* aBound,
}
NS_IMETHODIMP
IndexedDatabaseRequest::MakeBoundKeyRange(nsIVariant* aLeft,
nsIVariant* aRight,
PRBool aOpenLeft,
PRBool aOpenRight,
nsIIDBKeyRange **_retval)
IDBFactory::MakeBoundKeyRange(nsIVariant* aLeft,
nsIVariant* aRight,
PRBool aOpenLeft,
PRBool aOpenRight,
nsIIDBKeyRange **_retval)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");

Просмотреть файл

@ -37,25 +37,25 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef mozilla_dom_indexeddb_indexeddatabaserequest_h__
#define mozilla_dom_indexeddb_indexeddatabaserequest_h__
#ifndef mozilla_dom_indexeddb_idbfactory_h__
#define mozilla_dom_indexeddb_idbfactory_h__
#include "mozilla/dom/indexedDB/IDBRequest.h"
#include "mozIStorageConnection.h"
#include "nsIIndexedDatabaseRequest.h"
#include "nsIIDBFactory.h"
BEGIN_INDEXEDDB_NAMESPACE
class IndexedDatabaseRequest : public IDBRequest::Generator,
public nsIIndexedDatabaseRequest
class IDBFactory : public IDBRequest::Generator,
public nsIIDBFactory
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIINDEXEDDATABASEREQUEST
NS_DECL_NSIIDBFACTORY
static
already_AddRefed<nsIIndexedDatabaseRequest>
already_AddRefed<nsIIDBFactory>
Create();
static
@ -64,9 +64,9 @@ public:
protected:
// Only called by Create().
IndexedDatabaseRequest() { }
IDBFactory() { }
};
END_INDEXEDDB_NAMESPACE
#endif // mozilla_dom_indexeddb_indexeddatabaserequest_h__
#endif // mozilla_dom_indexeddb_idbfactory_h__

Просмотреть файл

@ -47,11 +47,11 @@
BEGIN_INDEXEDDB_NAMESPACE
class IndexedDatabaseRequest;
class IDBFactory;
class IDBKeyRange : public nsIIDBKeyRange
{
friend class IndexedDatabaseRequest;
friend class IDBFactory;
public:
NS_DECL_ISUPPORTS

Просмотреть файл

@ -52,7 +52,7 @@
BEGIN_INDEXEDDB_NAMESPACE
class AsyncConnectionHelper;
class IndexedDatabaseRequest;
class IDBFactory;
class IDBDatabaseRequest;
class IDBRequest : public nsDOMEventTargetHelper,

Просмотреть файл

@ -47,7 +47,7 @@
#include "IDBEvents.h"
#include "IDBCursorRequest.h"
#include "IDBObjectStoreRequest.h"
#include "IndexedDatabaseRequest.h"
#include "IDBFactory.h"
#include "DatabaseInfo.h"
#include "TransactionThreadPool.h"
@ -238,7 +238,7 @@ IDBTransactionRequest::GetOrCreateConnection(mozIStorageConnection** aResult)
if (!mConnection) {
nsCOMPtr<mozIStorageConnection> connection =
IndexedDatabaseRequest::GetConnection(mDatabase->FilePath());
IDBFactory::GetConnection(mDatabase->FilePath());
NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE);
connection.swap(mConnection);

Просмотреть файл

@ -62,7 +62,7 @@ CPPSRCS = \
IDBObjectStoreRequest.cpp \
IDBRequest.cpp \
IDBTransactionRequest.cpp \
IndexedDatabaseRequest.cpp \
IDBFactory.cpp \
LazyIdleThread.cpp \
TransactionThreadPool.cpp \
$(NULL)
@ -77,7 +77,7 @@ EXPORTS_mozilla/dom/indexedDB = \
IDBRequest.h \
IDBTransactionRequest.h \
IndexedDatabase.h \
IndexedDatabaseRequest.h \
IDBFactory.h \
LazyIdleThread.h \
$(NULL)
@ -109,7 +109,7 @@ XPIDLSRCS = \
nsIIDBTransaction.idl \
nsIIDBTransactionEvent.idl \
nsIIDBTransactionRequest.idl \
nsIIndexedDatabaseRequest.idl \
nsIIDBFactory.idl \
$(NULL)
ifdef ENABLE_TESTS

Просмотреть файл

@ -46,11 +46,11 @@ interface nsIVariant;
/**
* Interface that defines the indexedDB property on a window. See
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IndexedDatabaseRequest
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
* for more information.
*/
[scriptable, uuid(043161e0-93b8-43b4-94d8-f34046d679b4)]
interface nsIIndexedDatabaseRequest : nsISupports
[scriptable, uuid(a1e1dbd1-53a7-490a-ab6f-aa55809dd867)]
interface nsIIDBFactory : nsISupports
{
nsIIDBRequest
open(in AString name,

Просмотреть файл

@ -48,7 +48,7 @@
interface nsIDOMStorageObsolete;
interface nsIDOMStorage;
interface nsIDOMStorageList;
interface nsIIndexedDatabaseRequest;
interface nsIIDBFactory;
[scriptable, uuid(b6f6efd8-1bdc-43af-b8ef-6685d6260931)]
interface nsIDOMStorageWindow : nsISupports
@ -71,5 +71,5 @@ interface nsIDOMStorageWindow : nsISupports
/**
* Indexed Databases for the current browsing context.
*/
readonly attribute nsIIndexedDatabaseRequest moz_indexedDB;
readonly attribute nsIIDBFactory moz_indexedDB;
};

Просмотреть файл

@ -478,7 +478,7 @@ members = [
'nsIIDBTransaction.*',
'nsIIDBTransactionEvent.*',
'nsIIDBTransactionRequest.*',
'nsIIndexedDatabaseRequest.*',
'nsIIDBFactory.*',
# Remove once XPIDL can handle jsvals
'-nsIIDBObjectStoreRequest.add',
'-nsIIDBObjectStoreRequest.modify',