|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsPluginDirServiceProvider_h_ |
|
7 #define nsPluginDirServiceProvider_h_ |
|
8 |
|
9 #include "nsIDirectoryService.h" |
|
10 |
|
11 #if defined (XP_WIN) |
|
12 #include "nsCOMArray.h" |
|
13 #endif |
|
14 |
|
15 class nsISimpleEnumerator; |
|
16 |
|
17 // Note: Our directory service provider scan keys are prefs which are check |
|
18 // for minimum versions compatibility |
|
19 #define NS_WIN_ACROBAT_SCAN_KEY "plugin.scan.Acrobat" |
|
20 #define NS_WIN_QUICKTIME_SCAN_KEY "plugin.scan.Quicktime" |
|
21 #define NS_WIN_WMP_SCAN_KEY "plugin.scan.WindowsMediaPlayer" |
|
22 |
|
23 //***************************************************************************** |
|
24 // class nsPluginDirServiceProvider |
|
25 //***************************************************************************** |
|
26 |
|
27 class nsPluginDirServiceProvider : public nsIDirectoryServiceProvider |
|
28 { |
|
29 public: |
|
30 nsPluginDirServiceProvider(); |
|
31 |
|
32 NS_DECL_THREADSAFE_ISUPPORTS |
|
33 NS_DECL_NSIDIRECTORYSERVICEPROVIDER |
|
34 |
|
35 #ifdef XP_WIN |
|
36 static nsresult GetPLIDDirectories(nsISimpleEnumerator **aEnumerator); |
|
37 private: |
|
38 static nsresult GetPLIDDirectoriesWithRootKey(uint32_t aKey, |
|
39 nsCOMArray<nsIFile> &aDirs); |
|
40 #endif |
|
41 |
|
42 protected: |
|
43 virtual ~nsPluginDirServiceProvider(); |
|
44 }; |
|
45 |
|
46 #endif // nsPluginDirServiceProvider_h_ |