Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron
[gecko.git] / dom / datastore / DataStoreRevision.h
blob359137249190d20ec944ba7b02ba7333896df71f
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_DataStoreRevision_h
8 #define mozilla_dom_DataStoreRevision_h
10 #include "jsapi.h"
11 #include "nsAutoPtr.h"
12 #include "nsIDOMEventListener.h"
13 #include "nsString.h"
15 namespace mozilla {
16 namespace dom {
18 namespace indexedDB {
19 class IDBObjectStore;
20 class IDBRequest;
23 class DataStoreRevisionCallback;
25 class DataStoreRevision MOZ_FINAL : public nsIDOMEventListener
27 public:
28 NS_DECL_ISUPPORTS
30 enum RevisionType {
31 RevisionVoid
34 nsresult AddRevision(JSContext* aCx,
35 indexedDB::IDBObjectStore* aStore,
36 uint32_t aObjectId,
37 RevisionType aRevisionType,
38 DataStoreRevisionCallback* aCallback);
40 // nsIDOMEventListener
41 NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
43 private:
44 ~DataStoreRevision() {}
45 nsRefPtr<DataStoreRevisionCallback> mCallback;
46 nsRefPtr<indexedDB::IDBRequest> mRequest;
47 nsString mRevisionID;
50 } // namespace dom
51 } // namespace mozilla
53 #endif // mozilla_dom_DataStoreRevision_h