Re: Notification when network volume disappears
Re: Notification when network volume disappears
- Subject: Re: Notification when network volume disappears
- From: mm w <email@hidden>
- Date: Mon, 14 Jun 2010 09:41:48 -0700
I don't know which kind of connection you want to observe, but
basically SCNetwork and SCNetworkReachability are your friends.
then control these (and get the right conf) using two callback handlers
use NSWorkspace to get your entry and your exit (if this case happens)
NSWorkspaceDidMountNotification
NSWorkspaceWillUnmountNotification
you could add a third observer on a custom object trying to connect to
the network you want, for instance every 10 seconds
(a timer)
now when you launch your app you need to perform a lookup to know the
status. (I think the most annoying part)
Best,
On Mon, Jun 14, 2010 at 2:52 AM, Boris Prohaska <email@hidden> wrote:
> Hi guys,
>
> i was just wondering, is there any way to determine when for example a network cable is plugged off while copying data to a network share? The Finder has a pretty long timeout...
>
> Is there a way in the FS API or ANY other way to get notified, when a volume isn't available for writing anymore?
>
> Thanks,
> Boris
> --
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden