Windows and .url files and nsILocalFileWin
Christian Biesinger <[email protected]> Wed, 19 Nov 2003 21:42:37 +0000
| Newsgroups | gmane.comp.mozilla.devel.netlib,gmane.comp.mozilla.devel.xpcom |
|---|---|
| Message-ID | <[email protected]> |
Hello,
so I'm working on http://bugzilla.mozilla.org/show_bug.cgi?id=69114
That requires code to get from a .url file to the URL it links to.
Currently, such code exists in both xpfe/components/bookmarks and
widget/src/windows. (function ResolveShortcut)
That bug would require adding similar code to netwerk/protocol/file/src.
Now, I don't like copying this code into another file.
Darin suggested creating a new interface nsILocalFileWin for this purpose.
The function on that interface would look something like this:
/**
* Checks if the file is an internet shortcut (.url file) and
* returns the url pointed to if so.
* Returns NS_ERROR_NOT_AVAILABLE otherwise
*/
string resolveShortcut();
(nsILocalFile would be QIable to nsILocalFileWin then, on windows
platforms.)
string instead of nsIURI because this is xpcom (=> no necko), and
because the current callers want a string.
So. this is my proposal. Any comments on this?
-biesi