dom/devicestorage/DeviceStorageRequestChild.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:f9d31800b535
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef mozilla_dom_devicestorage_DeviceStorageRequestChild_h
7 #define mozilla_dom_devicestorage_DeviceStorageRequestChild_h
8
9 #include "mozilla/dom/devicestorage/PDeviceStorageRequestChild.h"
10
11 class DeviceStorageFile;
12 struct DeviceStorageFileDescriptor;
13
14 namespace mozilla {
15 namespace dom {
16
17 class DOMRequest;
18
19 namespace devicestorage {
20
21 class DeviceStorageRequestChildCallback
22 {
23 public:
24 virtual void RequestComplete() = 0;
25 };
26
27 class DeviceStorageRequestChild : public PDeviceStorageRequestChild
28 {
29 public:
30 DeviceStorageRequestChild();
31 DeviceStorageRequestChild(DOMRequest* aRequest, DeviceStorageFile* aFile);
32 DeviceStorageRequestChild(DOMRequest* aRequest, DeviceStorageFile* aFile,
33 DeviceStorageFileDescriptor* aFileDescrptor);
34 ~DeviceStorageRequestChild();
35
36 void SetCallback(class DeviceStorageRequestChildCallback *aCallback);
37
38 virtual bool Recv__delete__(const DeviceStorageResponseValue& value);
39
40 private:
41 nsRefPtr<DOMRequest> mRequest;
42 nsRefPtr<DeviceStorageFile> mDSFile;
43 nsRefPtr<DeviceStorageFileDescriptor> mDSFileDescriptor;
44
45 DeviceStorageRequestChildCallback* mCallback;
46 };
47
48 } // namespace devicestorage
49 } // namespace dom
50 } // namespace mozilla
51
52 #endif

mercurial