Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; 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 "nsIDOMEventTarget.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIDOMEventListener; |
michael@0 | 9 | interface nsIDOMBlob; |
michael@0 | 10 | |
michael@0 | 11 | [scriptable, builtinclass, uuid(39ea2c73-7711-4cea-9f73-3166c24dfa69)] |
michael@0 | 12 | interface nsIDOMFileReader : nsIDOMEventTarget |
michael@0 | 13 | { |
michael@0 | 14 | [implicit_jscontext] |
michael@0 | 15 | void readAsArrayBuffer(in nsIDOMBlob filedata); |
michael@0 | 16 | void readAsBinaryString(in nsIDOMBlob filedata); |
michael@0 | 17 | void readAsText(in nsIDOMBlob filedata, [optional] in DOMString encoding); |
michael@0 | 18 | void readAsDataURL(in nsIDOMBlob file); |
michael@0 | 19 | |
michael@0 | 20 | void abort(); |
michael@0 | 21 | |
michael@0 | 22 | const unsigned short EMPTY = 0; |
michael@0 | 23 | const unsigned short LOADING = 1; |
michael@0 | 24 | const unsigned short DONE = 2; |
michael@0 | 25 | readonly attribute unsigned short readyState; |
michael@0 | 26 | |
michael@0 | 27 | [implicit_jscontext] |
michael@0 | 28 | readonly attribute jsval result; |
michael@0 | 29 | |
michael@0 | 30 | // This is a DOMError |
michael@0 | 31 | readonly attribute nsISupports error; |
michael@0 | 32 | |
michael@0 | 33 | [implicit_jscontext] attribute jsval onloadstart; |
michael@0 | 34 | [implicit_jscontext] attribute jsval onprogress; |
michael@0 | 35 | [implicit_jscontext] attribute jsval onload; |
michael@0 | 36 | [implicit_jscontext] attribute jsval onabort; |
michael@0 | 37 | [implicit_jscontext] attribute jsval onerror; |
michael@0 | 38 | [implicit_jscontext] attribute jsval onloadend; |
michael@0 | 39 | }; |
michael@0 | 40 | |
michael@0 | 41 | %{ C++ |
michael@0 | 42 | #define NS_FILEREADER_CID \ |
michael@0 | 43 | {0x06aa7c21, 0xfe05, 0x4cf2, \ |
michael@0 | 44 | {0xb1, 0xc4, 0x0c, 0x71, 0x26, 0xa4, 0xf7, 0x13}} |
michael@0 | 45 | #define NS_FILEREADER_CONTRACTID \ |
michael@0 | 46 | "@mozilla.org/files/filereader;1" |
michael@0 | 47 | %} |