2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-06-03 18:36:46 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_DataStoreRevision_h
|
|
|
|
#define mozilla_dom_DataStoreRevision_h
|
|
|
|
|
2014-06-03 18:36:46 +04:00
|
|
|
#include "jsapi.h"
|
2014-06-03 18:36:46 +04:00
|
|
|
#include "nsAutoPtr.h"
|
2014-06-03 18:36:46 +04:00
|
|
|
#include "nsIDOMEventListener.h"
|
2014-06-03 18:36:46 +04:00
|
|
|
#include "nsString.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
namespace indexedDB {
|
|
|
|
class IDBObjectStore;
|
|
|
|
class IDBRequest;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace indexedDB
|
2014-06-03 18:36:46 +04:00
|
|
|
|
|
|
|
class DataStoreRevisionCallback;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class DataStoreRevision final : public nsIDOMEventListener
|
2014-06-03 18:36:46 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
enum RevisionType {
|
|
|
|
RevisionVoid
|
|
|
|
};
|
|
|
|
|
|
|
|
nsresult AddRevision(JSContext* aCx,
|
|
|
|
indexedDB::IDBObjectStore* aStore,
|
|
|
|
uint32_t aObjectId,
|
|
|
|
RevisionType aRevisionType,
|
|
|
|
DataStoreRevisionCallback* aCallback);
|
|
|
|
|
|
|
|
// nsIDOMEventListener
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) override;
|
2014-06-03 18:36:46 +04:00
|
|
|
|
|
|
|
private:
|
2014-06-23 23:56:07 +04:00
|
|
|
~DataStoreRevision() {}
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<DataStoreRevisionCallback> mCallback;
|
|
|
|
RefPtr<indexedDB::IDBRequest> mRequest;
|
2014-06-03 18:36:46 +04:00
|
|
|
nsString mRevisionID;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_DataStoreRevision_h
|