From c5d18ad8c1c3b56c2bc59d43b45f1dc676bedc93 Mon Sep 17 00:00:00 2001 From: "arougthopher%lizardland.net" Date: Thu, 21 Feb 2002 03:33:42 +0000 Subject: [PATCH] Fix for Bug#69707 BeOS implementation of nsLocalFile::Launch and nsLocalFile::Reveal r=cls (seawood@netscape.com) a=asa (asa@mozilla.org) on behalf of drivers git-svn-id: svn://10.0.0.236/trunk@115140 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileUnix.cpp | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 93bb22eee73..6dcd8770c59 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -25,6 +25,7 @@ * Stuart Parmenter * Brendan Eich * Pete Collins + * Paul Ashford */ /** @@ -46,6 +47,7 @@ #ifdef XP_BEOS #include #include + #include #endif #if defined(VMS) #include @@ -1510,6 +1512,36 @@ nsLocalFile::SetPersistentDescriptor(const char *aPersistentDescriptor) return InitWithPath(aPersistentDescriptor); } +#ifdef XP_BEOS +NS_IMETHODIMP +nsLocalFile::Reveal() +{ + nsXPIDLCString path; + GetPath(getter_Copies(path)); + BPath bPath(path); + bPath.GetParent(&bPath); + entry_ref ref; + get_ref_for_path(bPath.Path(),&ref); + BMessage message(B_REFS_RECEIVED); + message.AddRef("refs",&ref); + BMessenger messenger("application/x-vnd.Be-TRAK"); + messenger.SendMessage(&message); + return NS_OK; +} + +NS_IMETHODIMP +nsLocalFile::Launch() +{ + nsXPIDLCString path; + GetPath(getter_Copies(path)); + + entry_ref ref; + get_ref_for_path (path, &ref); + be_roster->Launch (&ref); + + return NS_OK; +} +#else NS_IMETHODIMP nsLocalFile::Reveal() { @@ -1521,6 +1553,7 @@ nsLocalFile::Launch() { return NS_ERROR_FAILURE; } +#endif nsresult NS_NewLocalFile(const char *path, PRBool followSymlinks, nsILocalFile **result)