'Get free space available on the mountpoints:
1. Main memory
2. Card A
3. Card B
@return: A 3 element list with free space in bytes of (1, 2, 3). If a
particular device doesn\'t have any of these locations it should return -1.
In Windows, a sync-in-progress blocks this call until sync is complete'

def free_space(self, end_session=True):

    if self.verbose:
        logger().info(('%s.free_space()' % self.__class__.__name__))
    free_space = 0
    if isosx:
        if ('iPod' in self.sources):
            connected_device = self.sources['iPod']
            free_space = self.iTunes.sources[connected_device].free_space()
    elif iswindows:
        if ('iPod' in self.sources):
            import pythoncom, win32com.client
            while True:
                try:
                    try:
                        pythoncom.CoInitialize()
                        self.iTunes = win32com.client.Dispatch('iTunes.Application')
                        connected_device = self.sources['iPod']
                        free_space = self.iTunes.sources.ItemByName(connected_device).FreeSpace
                    finally:
                        pythoncom.CoUninitialize()
                        break
                except:
                    logger().error('    waiting    for    free_space()    call    to    go    through')
    return (free_space, (-1), (-1))
