Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / dom / datastore / DataStoreCallbacks.h
blob4f976a5fb861d7cca47f31d0d66020e2e8f5e470
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_DataStoreCallbacks_h
8 #define mozilla_dom_DataStoreCallbacks_h
10 #include "nsISupports.h"
12 namespace mozilla {
13 namespace dom {
15 class DataStoreDB;
17 class DataStoreDBCallback
19 public:
20 NS_IMETHOD_(MozExternalRefCountType) AddRef(void) = 0;
21 NS_IMETHOD_(MozExternalRefCountType) Release(void) = 0;
23 enum RunStatus {
24 Success,
25 CreatedSchema,
26 Error
29 virtual void Run(DataStoreDB* aDb, RunStatus aStatus) = 0;
31 protected:
32 virtual ~DataStoreDBCallback()
37 class DataStoreRevisionCallback
39 public:
40 NS_IMETHOD_(MozExternalRefCountType) AddRef(void) = 0;
41 NS_IMETHOD_(MozExternalRefCountType) Release(void) = 0;
43 virtual void Run(const nsAString& aRevisionID) = 0;
45 protected:
46 virtual ~DataStoreRevisionCallback()
51 } // dom namespace
52 } // mozilla namespace
54 #endif // mozilla_dom_DataStoreCallbacks_h