michaelogrant / macfusion

Automatically exported from code.google.com/p/macfusion
Other
1 stars 1 forks source link

Bonjour Support #204

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to have MacFusion to provide a small minibrowser to
discover SSH or other shares being advertised using Bonjour.

Original issue reported on code.google.com by andrejoh...@gmail.com on 20 Jun 2007 at 8:01

GoogleCodeExporter commented 8 years ago
This was meant to be marked as an 'enhancement', but I can't seem to to this.

Original comment by andrejoh...@gmail.com on 20 Jun 2007 at 8:02

GoogleCodeExporter commented 8 years ago
Thanks, agreed, Bonjour is definitely appealing. 

It has been discussed on various occasions, but we omitted to note it as a 
feature request. 

I guess that Michael will wish to set a milestone. 

Re <http://trac.adiumx.com/ticket/6799> (Bonjour in a different context) it 
occurs to me that _presence_ is not 
always equal to _full connectivity_ so for what it's worth, I shouldn't set too 
ambitious a milestone!

Original comment by grahampe...@gmail.com on 22 Jun 2007 at 4:13

GoogleCodeExporter commented 8 years ago
I've written a patch for bonjour support.

General Overview:
MFNetworkFS classes now have an NSArray of IANA registered service names they 
can use to communicate (for 
example, SSHFS has ssh and sftp, and FTPFS has ftp).

These IANA services are checked against /etc/services for the service name and 
protocol, and constructs a 
bonjour service type string (_ssh._tcp. for SSH over TCP, for example), and 
creates a bonjour listener for that 
service.

As services are resolved they are added to a discoveredServices NSMutableArray 
which is used to construct the 
Bonjour menu.  Selecting a service from the bonjour menu brings up a 
pre-populated EditController for the 
appropriate plugin.

Caveats:
I've added an fsNetServices method to MFNetworkFS which responds with an 
NSArray of IANA registered 
service names (if any).  Nearing the end of the implementation, I realized this 
should probably be part of the 
plugin .plist instead of the MFNetworkFS class.

Neither the Bonjour menu or the EditController use any values from favorites, 
nor do they reflect the current 
state of mount from the services listed.

The attached patch was based on Revision 281.

Original comment by jonho...@gmail.com on 3 Jul 2007 at 4:27

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by grahampe...@gmail.com on 3 Jul 2007 at 7:40

GoogleCodeExporter commented 8 years ago
I didn't like the idea of modifying the plugin code (as stated above), so I 
moved the IANA services applicable to 
each plugin to its info.plist and reverted the MFNetworkFS class and its 
subclasses back to their original 
revision 281 state.

This patch does the same thing as above, but queries the available services 
from the plugin's info.plist.  I've 
moved the protocol check into a loop (before it was hardcoded to check tcp then 
udp, now it loops through an 
array of, albeit hardcoded, protocols).

I've also added releases for the NSDictionaries, NSArray, and NSDomainBrowser 
allocated to support bonjour.

So, same functionality as the previous patch, but less obtrusive (hopefully).

This new patch is based on Revision 281.

I've attached screenshots showing the Bonjour menu, then starting mDNSResponder 
on a local box and 
showing the entries get added as well as opening the appropriate editor when 
you select an entry from the 
Bonjour menu.

Original comment by jonho...@gmail.com on 4 Jul 2007 at 4:53

Attachments:

GoogleCodeExporter commented 8 years ago
Another patch based on Revision 287 (same as the previous one).

I've anyone's interested in trying the Bonjour patch (but doesn't want to 
compile MacFusion), I've attached a DMG 
with a Debug build of 287 along with the patch.

Original comment by jonho...@gmail.com on 6 Jul 2007 at 2:13

Attachments: