Mercurial > projects > dwt-linux
comparison dwt/browser/AppFileLocProvider.d @ 348:9a4d7706df52
Test Update to fix linux XPCOM interface issues
author | John Reimer <terminal.node@gmail.com> |
---|---|
date | Fri, 31 Oct 2008 21:46:44 -0700 |
parents | 2e591eb01162 |
children |
comparison
equal
deleted
inserted
replaced
347:ff6dd48f5248 | 348:9a4d7706df52 |
---|---|
56 | 56 |
57 this (String path) { | 57 this (String path) { |
58 mozillaPath = path ~ SEPARATOR_OS; | 58 mozillaPath = path ~ SEPARATOR_OS; |
59 } | 59 } |
60 | 60 |
61 extern(System) | |
61 nsrefcnt AddRef () { | 62 nsrefcnt AddRef () { |
62 refCount++; | 63 refCount++; |
63 return refCount; | 64 return refCount; |
64 } | 65 } |
65 | 66 |
67 extern(System) | |
66 nsresult QueryInterface (nsID* riid, void** ppvObject) { | 68 nsresult QueryInterface (nsID* riid, void** ppvObject) { |
67 if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; | 69 if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE; |
68 | 70 |
69 if (*riid == nsISupports.IID) { | 71 if (*riid == nsISupports.IID) { |
70 *ppvObject = cast(void*)cast(nsISupports)this; | 72 *ppvObject = cast(void*)cast(nsISupports)this; |
84 | 86 |
85 *ppvObject = null; | 87 *ppvObject = null; |
86 return XPCOM.NS_ERROR_NO_INTERFACE; | 88 return XPCOM.NS_ERROR_NO_INTERFACE; |
87 } | 89 } |
88 | 90 |
91 extern(System) | |
89 nsrefcnt Release () { | 92 nsrefcnt Release () { |
90 refCount--; | 93 refCount--; |
91 if (refCount is 0) return 0; | 94 if (refCount is 0) return 0; |
92 return refCount; | 95 return refCount; |
93 } | 96 } |
106 file.Release (); | 109 file.Release (); |
107 } | 110 } |
108 } | 111 } |
109 | 112 |
110 /* nsIDirectoryServiceProvider2 */ | 113 /* nsIDirectoryServiceProvider2 */ |
111 | 114 extern(System) |
112 nsresult GetFiles (char* prop, nsISimpleEnumerator* _retval) { | 115 nsresult GetFiles (char* prop, nsISimpleEnumerator* _retval) { |
113 String propertyName = fromStringz(prop); | 116 String propertyName = fromStringz(prop); |
114 String[] propertyValues = null; | 117 String[] propertyValues = null; |
115 | 118 |
116 if (propertyName == XPCOM.NS_APP_PLUGINS_DIR_LIST) { | 119 if (propertyName == XPCOM.NS_APP_PLUGINS_DIR_LIST) { |
175 | 178 |
176 return XPCOM.NS_ERROR_FAILURE; | 179 return XPCOM.NS_ERROR_FAILURE; |
177 } | 180 } |
178 | 181 |
179 /* nsIDirectoryServiceProvider implementation */ | 182 /* nsIDirectoryServiceProvider implementation */ |
180 | 183 extern(System) |
181 nsresult GetFile(char* prop, PRBool* persistent, nsIFile* _retval) { | 184 nsresult GetFile(char* prop, PRBool* persistent, nsIFile* _retval) { |
182 String propertyName = tango.stdc.stringz.fromStringz( prop ); | 185 String propertyName = tango.stdc.stringz.fromStringz( prop ); |
183 String propertyValue = null; | 186 String propertyValue = null; |
184 | 187 |
185 if (propertyName == (XPCOM.NS_APP_HISTORY_50_FILE)) { | 188 if (propertyName == (XPCOM.NS_APP_HISTORY_50_FILE)) { |