diff -r 000000000000 -r 6474c204b198 dom/devicestorage/DeviceStorageRequestChild.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/devicestorage/DeviceStorageRequestChild.h Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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_devicestorage_DeviceStorageRequestChild_h +#define mozilla_dom_devicestorage_DeviceStorageRequestChild_h + +#include "mozilla/dom/devicestorage/PDeviceStorageRequestChild.h" + +class DeviceStorageFile; +struct DeviceStorageFileDescriptor; + +namespace mozilla { +namespace dom { + +class DOMRequest; + +namespace devicestorage { + +class DeviceStorageRequestChildCallback +{ + public: + virtual void RequestComplete() = 0; +}; + +class DeviceStorageRequestChild : public PDeviceStorageRequestChild +{ +public: + DeviceStorageRequestChild(); + DeviceStorageRequestChild(DOMRequest* aRequest, DeviceStorageFile* aFile); + DeviceStorageRequestChild(DOMRequest* aRequest, DeviceStorageFile* aFile, + DeviceStorageFileDescriptor* aFileDescrptor); + ~DeviceStorageRequestChild(); + + void SetCallback(class DeviceStorageRequestChildCallback *aCallback); + + virtual bool Recv__delete__(const DeviceStorageResponseValue& value); + +private: + nsRefPtr mRequest; + nsRefPtr mDSFile; + nsRefPtr mDSFileDescriptor; + + DeviceStorageRequestChildCallback* mCallback; +}; + +} // namespace devicestorage +} // namespace dom +} // namespace mozilla + +#endif