bug 700693 - OCSP stapling PSM changes r=bsmith
[gecko.git] / dom / indexedDB / IDBFileHandle.h
blob114116f15d359901641198be73002fa2e50b3e2f
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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_indexeddb_idbfilehandle_h__
8 #define mozilla_dom_indexeddb_idbfilehandle_h__
10 #include "IndexedDatabase.h"
12 #include "nsIIDBFileHandle.h"
14 #include "mozilla/dom/file/FileHandle.h"
15 #include "mozilla/dom/indexedDB/FileInfo.h"
17 BEGIN_INDEXEDDB_NAMESPACE
19 class IDBFileHandle : public mozilla::dom::file::FileHandle,
20 public nsIIDBFileHandle
22 public:
23 NS_DECL_ISUPPORTS_INHERITED
24 NS_DECL_NSIIDBFILEHANDLE
26 NS_IMETHOD_(int64_t)
27 GetFileId()
29 return mFileInfo->Id();
32 NS_IMETHOD_(FileInfo*)
33 GetFileInfo()
35 return mFileInfo;
38 static already_AddRefed<IDBFileHandle>
39 Create(IDBDatabase* aDatabase, const nsAString& aName,
40 const nsAString& aType, already_AddRefed<FileInfo> aFileInfo);
42 virtual already_AddRefed<nsISupports>
43 CreateStream(nsIFile* aFile, bool aReadOnly);
45 virtual already_AddRefed<nsIDOMFile>
46 CreateFileObject(mozilla::dom::file::LockedFile* aLockedFile,
47 uint32_t aFileSize);
49 private:
50 IDBFileHandle()
51 { }
53 ~IDBFileHandle()
54 { }
56 nsRefPtr<FileInfo> mFileInfo;
59 END_INDEXEDDB_NAMESPACE
61 #endif // mozilla_dom_indexeddb_idbfilehandle_h__