Example #1
0
 def get_dataproviders(self, udi, **props):
     #Read information about the ipod, like if it supports
     #photos or not
     d = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(d, props[PROPS_KEY_MOUNT])
     supportsPhotos = gpod.itdb_device_supports_photo(d)
     gpod.itdb_device_free(d)
     if supportsPhotos:
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay, IPodPhotoSink]
     else:
         log.info("iPod does not report photo support")
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay]
Example #2
0
 def get_dataproviders(self, udi, **props):
     #Read information about the ipod, like if it supports
     #photos or not
     d = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(d, props[PROPS_KEY_MOUNT])
     supportsPhotos = gpod.itdb_device_supports_photo(d)
     gpod.itdb_device_free(d)
     if supportsPhotos:
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay, IPodPhotoSink]
     else:
         log.info("iPod does not report photo support")
         return [IPodMusicTwoWay, IPodVideoTwoWay, IPodNoteTwoWay, IPodContactsTwoWay, IPodCalendarTwoWay]
Example #3
0
def _supports_photos(db):
    if isinstance(p, gpod.PhotoDatabase) or isinstance(m, gpod.Database):
        return gpod.itdb_device_supports_photo(db._itdb.device)
    else:
        log.critical("could not determine if device supports photos")
        return False
Example #4
0
def _supports_photos(db):
    if isinstance(p, gpod.PhotoDatabase) or isinstance(m, gpod.Database):
        return gpod.itdb_device_supports_photo(db._itdb.device)
    else:
        log.critical("could not determine if device supports photos")
        return False