Stub OpenObjectStore

This commit is contained in:
Ben Turner 2010-05-03 15:25:04 -07:00
parent 93a7f24a9d
commit 070feca2e3

View File

@ -123,6 +123,24 @@ protected:
PRInt64 mId;
};
class OpenObjectStoreHelper : public CreateObjectStoreHelper
{
public:
OpenObjectStoreHelper(IDBDatabaseRequest* aDatabase,
nsIDOMEventTarget* aTarget,
const nsAString& aName,
PRUint16 aMode)
: CreateObjectStoreHelper(aDatabase, aTarget, aName, EmptyString(), false),
mMode(aMode)
{ }
PRUint16 DoDatabaseWork();
protected:
// In-params.
PRUint16 mMode;
};
/**
* Creates the needed tables and their indexes.
*
@ -452,10 +470,14 @@ IDBDatabaseRequest::OpenObjectStore(const nsAString& aName,
nsIIDBRequest** _retval)
{
nsRefPtr<IDBRequest> request = GenerateRequest();
/*
nsresult rv = mDatabase->OpenObjectStore(aName, aMode, request);
nsRefPtr<OpenObjectStoreHelper> helper =
new OpenObjectStoreHelper(this, request, aName, aMode);
nsresult rv = helper->Dispatch(mStorageThread);
NS_ENSURE_SUCCESS(rv, rv);
*/
IDBRequest* retval;
request.forget(&retval);
*_retval = retval;
@ -633,3 +655,10 @@ CreateObjectStoreHelper::GetSuccessResult(nsIWritableVariant* aResult)
aResult->SetAsISupports(result);
}
PRUint16
OpenObjectStoreHelper::DoDatabaseWork()
{
// mName and mMode are set, need to get mKeyPath and mAutoIncrement and mId.
return OK;
}