content/base/public/nsIDOMFile.idl

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 %{C++
michael@0 9 namespace mozilla {
michael@0 10 namespace dom {
michael@0 11 namespace indexedDB {
michael@0 12 class FileInfo;
michael@0 13 class FileManager;
michael@0 14 }
michael@0 15 }
michael@0 16 }
michael@0 17
michael@0 18 %}
michael@0 19
michael@0 20 [ptr] native FileInfo(mozilla::dom::indexedDB::FileInfo);
michael@0 21 [ptr] native FileManager(mozilla::dom::indexedDB::FileManager);
michael@0 22
michael@0 23 interface nsIDOMFileError;
michael@0 24 interface nsIInputStream;
michael@0 25 interface nsIURI;
michael@0 26 interface nsIPrincipal;
michael@0 27 interface nsIDOMBlob;
michael@0 28
michael@0 29 [scriptable, builtinclass, uuid(b1723fac-4814-4429-82cb-dc54ba0d46d6)]
michael@0 30 interface nsIDOMBlob : nsISupports
michael@0 31 {
michael@0 32 readonly attribute unsigned long long size;
michael@0 33 readonly attribute DOMString type;
michael@0 34
michael@0 35 [noscript] readonly attribute nsIInputStream internalStream;
michael@0 36 // The caller is responsible for releasing the internalUrl from the
michael@0 37 // blob: protocol handler
michael@0 38 [noscript] DOMString getInternalUrl(in nsIPrincipal principal);
michael@0 39
michael@0 40 [optional_argc] nsIDOMBlob slice([optional] in long long start,
michael@0 41 [optional] in long long end,
michael@0 42 [optional] in DOMString contentType);
michael@0 43
michael@0 44 // Get internal id of stored file. Returns -1 if it is not a stored file.
michael@0 45 // Intended only for testing. It can be called on any thread.
michael@0 46 [notxpcom] long long getFileId();
michael@0 47
michael@0 48 // Called when the blob was successfully stored in a database or when
michael@0 49 // the blob is initialized from a database. It can be called on any thread.
michael@0 50 [notxpcom] void addFileInfo(in FileInfo aFileInfo);
michael@0 51
michael@0 52 // Called before the blob is stored in a database to decide if it can be
michael@0 53 // shared or needs to be copied. It can be called on any thread.
michael@0 54 [notxpcom] FileInfo getFileInfo(in FileManager aFileManager);
michael@0 55
michael@0 56 // Return true if this blob is a memory file.
michael@0 57 [notxpcom] bool isMemoryFile();
michael@0 58 };
michael@0 59
michael@0 60 [scriptable, builtinclass, uuid(4e7d1a8b-e2d5-4304-a753-4affb731660c)]
michael@0 61 interface nsIDOMFile : nsIDOMBlob
michael@0 62 {
michael@0 63 readonly attribute DOMString name;
michael@0 64
michael@0 65 readonly attribute DOMString path;
michael@0 66
michael@0 67 [implicit_jscontext]
michael@0 68 readonly attribute jsval lastModifiedDate;
michael@0 69
michael@0 70 readonly attribute DOMString mozFullPath;
michael@0 71
michael@0 72 // This performs no security checks!
michael@0 73 [noscript] readonly attribute DOMString mozFullPathInternal;
michael@0 74
michael@0 75 [noscript] readonly attribute uint64_t mozLastModifiedDate;
michael@0 76 };

mercurial