• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Notification when network volume disappears
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Notification when network volume disappears (From: "Boris Prohaska" <email@hidden>)

  • Prev by Date: CalendarStore updating without iCal?
  • Next by Date: Re: Notification when network volume disappears
  • Previous by thread: Re: Notification when network volume disappears
  • Next by thread: "draggedImage" and "draggedImageLocation:"
  • Index(es):
    • Date
    • Thread