Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef nsBaseFilePicker_h__ |
michael@0 | 8 | #define nsBaseFilePicker_h__ |
michael@0 | 9 | |
michael@0 | 10 | #include "nsISupports.h" |
michael@0 | 11 | #include "nsIFilePicker.h" |
michael@0 | 12 | #include "nsISimpleEnumerator.h" |
michael@0 | 13 | #include "nsArrayEnumerator.h" |
michael@0 | 14 | #include "nsCOMPtr.h" |
michael@0 | 15 | |
michael@0 | 16 | class nsIWidget; |
michael@0 | 17 | |
michael@0 | 18 | class nsBaseFilePicker : public nsIFilePicker |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | nsBaseFilePicker(); |
michael@0 | 22 | virtual ~nsBaseFilePicker(); |
michael@0 | 23 | |
michael@0 | 24 | NS_IMETHOD Init(nsIDOMWindow *aParent, |
michael@0 | 25 | const nsAString& aTitle, |
michael@0 | 26 | int16_t aMode); |
michael@0 | 27 | |
michael@0 | 28 | NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback); |
michael@0 | 29 | NS_IMETHOD AppendFilters(int32_t filterMask); |
michael@0 | 30 | NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex); |
michael@0 | 31 | NS_IMETHOD SetFilterIndex(int32_t aFilterIndex); |
michael@0 | 32 | NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles); |
michael@0 | 33 | NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory); |
michael@0 | 34 | NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory); |
michael@0 | 35 | NS_IMETHOD GetAddToRecentDocs(bool *aFlag); |
michael@0 | 36 | NS_IMETHOD SetAddToRecentDocs(bool aFlag); |
michael@0 | 37 | NS_IMETHOD GetMode(int16_t *aMode); |
michael@0 | 38 | |
michael@0 | 39 | NS_IMETHOD GetDomfile(nsIDOMFile** aDomfile); |
michael@0 | 40 | NS_IMETHOD GetDomfiles(nsISimpleEnumerator** aDomfiles); |
michael@0 | 41 | |
michael@0 | 42 | protected: |
michael@0 | 43 | |
michael@0 | 44 | virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) = 0; |
michael@0 | 45 | |
michael@0 | 46 | bool mAddToRecentDocs; |
michael@0 | 47 | nsCOMPtr<nsIFile> mDisplayDirectory; |
michael@0 | 48 | int16_t mMode; |
michael@0 | 49 | }; |
michael@0 | 50 | |
michael@0 | 51 | #endif // nsBaseFilePicker_h__ |