libmtp.h | libmtp.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |||
* Boston, MA 02111-1307, USA. | * Boston, MA 02111-1307, USA. | |||
* | * | |||
* <code> | * <code> | |||
* #include <libmtp.h> | * #include <libmtp.h> | |||
* </code> | * </code> | |||
*/ | */ | |||
#ifndef LIBMTP_H_INCLUSION_GUARD | #ifndef LIBMTP_H_INCLUSION_GUARD | |||
#define LIBMTP_H_INCLUSION_GUARD | #define LIBMTP_H_INCLUSION_GUARD | |||
#define LIBMTP_VERSION 1.0.3 | #define LIBMTP_VERSION 1.0.5 | |||
#define LIBMTP_VERSION_STRING "1.0.3" | #define LIBMTP_VERSION_STRING "1.0.5" | |||
/* This handles MSVC pecularities */ | /* This handles MSVC pecularities */ | |||
#ifdef _MSC_VER | #ifdef _MSC_VER | |||
#include <windows.h> | #include <windows.h> | |||
#define __WIN32__ | #define __WIN32__ | |||
#define snprintf _snprintf | #define snprintf _snprintf | |||
#define ssize_t SSIZE_T | #define ssize_t SSIZE_T | |||
/* | /* | |||
* Types that do not exist in Windows | * Types that do not exist in Windows | |||
* sys/types.h, but they exist in mingw32 | * sys/types.h, but they exist in mingw32 | |||
skipping to change at line 417 | skipping to change at line 417 | |||
LIBMTP_ERROR_NONE, | LIBMTP_ERROR_NONE, | |||
LIBMTP_ERROR_GENERAL, | LIBMTP_ERROR_GENERAL, | |||
LIBMTP_ERROR_PTP_LAYER, | LIBMTP_ERROR_PTP_LAYER, | |||
LIBMTP_ERROR_USB_LAYER, | LIBMTP_ERROR_USB_LAYER, | |||
LIBMTP_ERROR_MEMORY_ALLOCATION, | LIBMTP_ERROR_MEMORY_ALLOCATION, | |||
LIBMTP_ERROR_NO_DEVICE_ATTACHED, | LIBMTP_ERROR_NO_DEVICE_ATTACHED, | |||
LIBMTP_ERROR_STORAGE_FULL, | LIBMTP_ERROR_STORAGE_FULL, | |||
LIBMTP_ERROR_CONNECTING, | LIBMTP_ERROR_CONNECTING, | |||
LIBMTP_ERROR_CANCELLED | LIBMTP_ERROR_CANCELLED | |||
} LIBMTP_error_number_t; | } LIBMTP_error_number_t; | |||
typedef struct LIBMTP_device_entry_struct LIBMTP_device_entry_t; /**< @see LIBMTP_device_entry_struct */ | typedef struct LIBMTP_device_entry_struct LIBMTP_device_entry_t; /**< @see LIBMTP_device_entry_struct */ | |||
typedef struct LIBMTP_raw_device_struct LIBMTP_raw_device_t; /**< @see LIBM TP_raw_device_struct */ | typedef struct LIBMTP_raw_device_struct LIBMTP_raw_device_t; /**< @see LIBM TP_raw_device_struct */ | |||
typedef struct LIBMTP_error_struct LIBMTP_error_t; /**< @see LIBMTP_error_s truct */ | typedef struct LIBMTP_error_struct LIBMTP_error_t; /**< @see LIBMTP_error_s truct */ | |||
typedef struct LIBMTP_allowed_values_struct LIBMTP_allowed_values_t; /**< @ see LIBMTP_allowed_values_struct */ | typedef struct LIBMTP_allowed_values_struct LIBMTP_allowed_values_t; /**< @ see LIBMTP_allowed_values_struct */ | |||
typedef struct LIBMTP_device_extension_struct LIBMTP_device_extension_t; /* * < @see LIBMTP_device_extension_struct */ | ||||
typedef struct LIBMTP_mtpdevice_struct LIBMTP_mtpdevice_t; /**< @see LIBMTP _mtpdevice_struct */ | typedef struct LIBMTP_mtpdevice_struct LIBMTP_mtpdevice_t; /**< @see LIBMTP _mtpdevice_struct */ | |||
typedef struct LIBMTP_file_struct LIBMTP_file_t; /**< @see LIBMTP_file_stru ct */ | typedef struct LIBMTP_file_struct LIBMTP_file_t; /**< @see LIBMTP_file_stru ct */ | |||
typedef struct LIBMTP_track_struct LIBMTP_track_t; /**< @see LIBMTP_track_s truct */ | typedef struct LIBMTP_track_struct LIBMTP_track_t; /**< @see LIBMTP_track_s truct */ | |||
typedef struct LIBMTP_playlist_struct LIBMTP_playlist_t; /**< @see LIBMTP_p laylist_struct */ | typedef struct LIBMTP_playlist_struct LIBMTP_playlist_t; /**< @see LIBMTP_p laylist_struct */ | |||
typedef struct LIBMTP_album_struct LIBMTP_album_t; /**< @see LIBMTP_album_s truct */ | typedef struct LIBMTP_album_struct LIBMTP_album_t; /**< @see LIBMTP_album_s truct */ | |||
typedef struct LIBMTP_folder_struct LIBMTP_folder_t; /**< @see LIBMTP_folde r_t */ | typedef struct LIBMTP_folder_struct LIBMTP_folder_t; /**< @see LIBMTP_folde r_t */ | |||
typedef struct LIBMTP_object_struct LIBMTP_object_t; /**< @see LIBMTP_objec t_t */ | typedef struct LIBMTP_object_struct LIBMTP_object_t; /**< @see LIBMTP_objec t_t */ | |||
typedef struct LIBMTP_filesampledata_struct LIBMTP_filesampledata_t; /**< @ see LIBMTP_filesample_t */ | typedef struct LIBMTP_filesampledata_struct LIBMTP_filesampledata_t; /**< @ see LIBMTP_filesample_t */ | |||
typedef struct LIBMTP_devicestorage_struct LIBMTP_devicestorage_t; /**< @se e LIBMTP_devicestorage_t */ | typedef struct LIBMTP_devicestorage_struct LIBMTP_devicestorage_t; /**< @se e LIBMTP_devicestorage_t */ | |||
skipping to change at line 568 | skipping to change at line 570 | |||
* The datatype specifying which of the above is used | * The datatype specifying which of the above is used | |||
*/ | */ | |||
LIBMTP_datatype_t datatype; | LIBMTP_datatype_t datatype; | |||
/** | /** | |||
* Non zero for range, 0 for enum | * Non zero for range, 0 for enum | |||
*/ | */ | |||
int is_range; | int is_range; | |||
}; | }; | |||
/** | /** | |||
* MTP device extension holder struct | ||||
*/ | ||||
struct LIBMTP_device_extension_struct { | ||||
/** | ||||
* Name of extension e.g. "foo.com" | ||||
*/ | ||||
char *name; | ||||
/** | ||||
* Major revision of extension | ||||
*/ | ||||
int major; | ||||
/** | ||||
* Minor revision of extension | ||||
*/ | ||||
int minor; | ||||
/** | ||||
* Pointer to the next extension or NULL if this is the | ||||
* last extension. | ||||
*/ | ||||
LIBMTP_device_extension_t *next; | ||||
}; | ||||
/** | ||||
* Main MTP device object struct | * Main MTP device object struct | |||
*/ | */ | |||
struct LIBMTP_mtpdevice_struct { | struct LIBMTP_mtpdevice_struct { | |||
/** | /** | |||
* Object bitsize, typically 32 or 64. | * Object bitsize, typically 32 or 64. | |||
*/ | */ | |||
uint8_t object_bitsize; | uint8_t object_bitsize; | |||
/** | /** | |||
* Parameters for this device, must be cast into | * Parameters for this device, must be cast into | |||
* \c (PTPParams*) before internal use. | * \c (PTPParams*) before internal use. | |||
skipping to change at line 617 | skipping to change at line 642 | |||
/** Default organizer folder */ | /** Default organizer folder */ | |||
uint32_t default_organizer_folder; | uint32_t default_organizer_folder; | |||
/** Default ZENcast folder (only Creative devices...) */ | /** Default ZENcast folder (only Creative devices...) */ | |||
uint32_t default_zencast_folder; | uint32_t default_zencast_folder; | |||
/** Default Album folder */ | /** Default Album folder */ | |||
uint32_t default_album_folder; | uint32_t default_album_folder; | |||
/** Default Text folder */ | /** Default Text folder */ | |||
uint32_t default_text_folder; | uint32_t default_text_folder; | |||
/** Per device iconv() converters, only used internally */ | /** Per device iconv() converters, only used internally */ | |||
void *cd; | void *cd; | |||
/** Extension list */ | ||||
LIBMTP_device_extension_t *extensions; | ||||
/** Pointer to next device in linked list; NULL if this is the last devic e */ | /** Pointer to next device in linked list; NULL if this is the last devic e */ | |||
LIBMTP_mtpdevice_t *next; | LIBMTP_mtpdevice_t *next; | |||
}; | }; | |||
/** | /** | |||
* MTP file struct | * MTP file struct | |||
*/ | */ | |||
struct LIBMTP_file_struct { | struct LIBMTP_file_struct { | |||
uint32_t item_id; /**< Unique item ID */ | uint32_t item_id; /**< Unique item ID */ | |||
skipping to change at line 757 | skipping to change at line 784 | |||
*/ | */ | |||
void LIBMTP_Set_Debug(int); | void LIBMTP_Set_Debug(int); | |||
void LIBMTP_Init(void); | void LIBMTP_Init(void); | |||
int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t ** const, int * const); | int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t ** const, int * const); | |||
/** | /** | |||
* @} | * @} | |||
* @defgroup basic The basic device management API. | * @defgroup basic The basic device management API. | |||
* @{ | * @{ | |||
*/ | */ | |||
LIBMTP_error_number_t LIBMTP_Detect_Raw_Devices(LIBMTP_raw_device_t **, int *); | LIBMTP_error_number_t LIBMTP_Detect_Raw_Devices(LIBMTP_raw_device_t **, int *); | |||
int LIBMTP_Check_Specific_Device(int busno, int devno); | ||||
LIBMTP_mtpdevice_t *LIBMTP_Open_Raw_Device(LIBMTP_raw_device_t *); | LIBMTP_mtpdevice_t *LIBMTP_Open_Raw_Device(LIBMTP_raw_device_t *); | |||
/* Begin old, legacy interface */ | /* Begin old, legacy interface */ | |||
LIBMTP_mtpdevice_t *LIBMTP_Get_First_Device(void); | LIBMTP_mtpdevice_t *LIBMTP_Get_First_Device(void); | |||
LIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **); | LIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **); | |||
uint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *); | uint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *); | |||
void LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t*); | void LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t*); | |||
/* End old, legacy interface */ | /* End old, legacy interface */ | |||
void LIBMTP_Release_Device(LIBMTP_mtpdevice_t*); | void LIBMTP_Release_Device(LIBMTP_mtpdevice_t*); | |||
void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t*); | void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t*); | |||
int LIBMTP_Reset_Device(LIBMTP_mtpdevice_t*); | int LIBMTP_Reset_Device(LIBMTP_mtpdevice_t*); | |||
End of changes. 6 change blocks. | ||||
2 lines changed or deleted | 30 lines changed or added | |||