How to use the pymtp.LIBMTP_DeviceStorage function in PyMTP

To help you get started, we’ve selected a few PyMTP examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emdete / python-mtp / pymtp.py View on Github external
return self.errornumber

LIBMTP_Error._fields_ = [("errornumber", ctypes.c_int),
                         ("error_text", ctypes.c_char_p),
                         ("next", ctypes.POINTER(LIBMTP_Error))]

class LIBMTP_DeviceStorage(ctypes.Structure):
	"""
		LIBMTP_DeviceStorage
		Contains the ctypes structure for LIBMTP_devicestorage_t
	"""

	def __repr__(self):
		return self.id

LIBMTP_DeviceStorage._fields_ = [("id", ctypes.c_uint32),
                                 ("StorageType", ctypes.c_uint16),
                                 ("FilesystemType", ctypes.c_uint16),
                                 ("AccessCapability", ctypes.c_uint16),
                                 ("MaxCapacity", ctypes.c_uint64),
                                 ("FreeSpaceInBytes", ctypes.c_uint64),
                                 ("FreeSpaceInObjects", ctypes.c_uint64),
                                 ("StorageDescription", ctypes.c_char_p),
                                 ("VolumeIdentifier", ctypes.c_char_p),
                                 ("next", ctypes.POINTER(LIBMTP_DeviceStorage)),
                                 ("prev", ctypes.POINTER(LIBMTP_DeviceStorage))]

class LIBMTP_MTPDevice(ctypes.Structure):
	"""
		LIBMTP_MTPDevice
		Contains the ctypes structure for LIBMTP_mtpdevice_t
	"""
github emdete / python-mtp / pymtp.py View on Github external
("next", ctypes.POINTER(LIBMTP_DeviceStorage)),
                                 ("prev", ctypes.POINTER(LIBMTP_DeviceStorage))]

class LIBMTP_MTPDevice(ctypes.Structure):
	"""
		LIBMTP_MTPDevice
		Contains the ctypes structure for LIBMTP_mtpdevice_t
	"""

	def __repr__(self):
		return self.interface_number

LIBMTP_MTPDevice._fields_ = [("interface_number", ctypes.c_uint8),
                             ("params", ctypes.c_void_p),
                             ("usbinfo", ctypes.c_void_p),
                             ("storage", ctypes.POINTER(LIBMTP_DeviceStorage)),
                             ("errorstack", ctypes.POINTER(LIBMTP_Error)),
                             ("maximum_battery_level", ctypes.c_uint8),
                             ("default_music_folder", ctypes.c_uint32),
                             ("default_playlist_folder", ctypes.c_uint32),
                             ("default_picture_folder", ctypes.c_uint32),
                             ("default_video_folder", ctypes.c_uint32),
                             ("default_organizer_folder", ctypes.c_uint32),
                             ("default_zencast_folder", ctypes.c_uint32),
                             ("default_album_folder", ctypes.c_uint32),
                             ("default_text_folder", ctypes.c_uint32),
                             ("cd", ctypes.c_void_p),
                             ("next", ctypes.POINTER(LIBMTP_MTPDevice))]

class LIBMTP_File(ctypes.Structure):
	"""
		LIBMTP_File