views:

219

answers:

1

I've written an application that synchronizes calendar from Lotus Notes to the iphone (using MS Outlook as conduit) and I want to tell iTunes to push the changes onto the iphone.

I can do this just fine using the COM interface (IITIpodSource.UpdateIpod) but the problem is that this method return immediately when it starts the synchronization. Then iTunes will handle the rest. I want my application to be informed when iTunes has completed the sync so that I can update my GUI accordingly.

So, while iTunes is synchronizing the iphone correctly, my application is never told when it is done. A status flag that I can poll is just as OK as an event by the way...

I can't find anything of help in the documentation. Has anyone ever tried anything like this?

Edit: I tried polling the FreeSpace property but it seems that is updated before the syncing is done (may even be updated several times as far as I can tell)

+1  A: 

Try to do something else directly on the iPod (e.g. create a new playlist - ejection may be a little "too hard" unless you can reinsert the iPod programmatically). At least through the GUI you can only do that when the synch has completed.

IronGoofy
Good suggestion, but unfortunately it didn't work. I tried both creating a playlist and a folder but I get "source isn't modifiable" exception (even after sync is completed). I guess it has to do with whether you use manual or automatic sync of music on the iphone (i.e. "Manually manage music and videos")
Isak Savo
Hmm .. can you check for the existence of a playlist on the iPod? (Or as the interface to enumerate the existing playlists for you?)
IronGoofy
yes I can query and enumerate them. I can also enumerate the tracks in each playlist while the sync is in progress..
Isak Savo