Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# ----------
# Data Model Definitions
# ----------
class LIBMTP_Error(ctypes.Structure):
"""
LIBMTP_Error
Contains the ctypes structure for LIBMTP_error_t
"""
def __repr__(self):
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),
# ----------
# ----------
# Data Model Definitions
# ----------
class LIBMTP_Error(ctypes.Structure):
"""
LIBMTP_Error
Contains the ctypes structure for LIBMTP_error_t
"""
def __repr__(self):
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),