OLD | NEW |
1 /** | 1 /** |
2 * \file libmtp.h | 2 * \file libmtp.h |
3 * Interface to the Media Transfer Protocol library. | 3 * Interface to the Media Transfer Protocol library. |
4 * | 4 * |
5 * Copyright (C) 2005-2012 Linus Walleij <triad@df.lth.se> | 5 * Copyright (C) 2005-2012 Linus Walleij <triad@df.lth.se> |
6 * Copyright (C) 2005-2008 Richard A. Low <richard@wentnet.com> | 6 * Copyright (C) 2005-2008 Richard A. Low <richard@wentnet.com> |
7 * Copyright (C) 2007 Ted Bullock <tbullock@canada.com> | 7 * Copyright (C) 2007 Ted Bullock <tbullock@canada.com> |
8 * Copyright (C) 2008 Florent Mertens <flomertens@gmail.com> | 8 * Copyright (C) 2008 Florent Mertens <flomertens@gmail.com> |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 11 matching lines...) Expand all Loading... |
22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23 * Boston, MA 02111-1307, USA. | 23 * Boston, MA 02111-1307, USA. |
24 * | 24 * |
25 * <code> | 25 * <code> |
26 * #include <libmtp.h> | 26 * #include <libmtp.h> |
27 * </code> | 27 * </code> |
28 */ | 28 */ |
29 #ifndef LIBMTP_H_INCLUSION_GUARD | 29 #ifndef LIBMTP_H_INCLUSION_GUARD |
30 #define LIBMTP_H_INCLUSION_GUARD | 30 #define LIBMTP_H_INCLUSION_GUARD |
31 | 31 |
32 #define LIBMTP_VERSION 1.1.4 | 32 #define LIBMTP_VERSION 1.1.5 |
33 #define LIBMTP_VERSION_STRING "1.1.4" | 33 #define LIBMTP_VERSION_STRING "1.1.5" |
34 | 34 |
35 /* This handles MSVC pecularities */ | 35 /* This handles MSVC pecularities */ |
36 #ifdef _MSC_VER | 36 #ifdef _MSC_VER |
37 #include <windows.h> | 37 #include <windows.h> |
38 #define __WIN32__ | 38 #define __WIN32__ |
39 #define snprintf _snprintf | 39 #define snprintf _snprintf |
40 #define ssize_t SSIZE_T | 40 #define ssize_t SSIZE_T |
41 /* | 41 /* |
42 * Types that do not exist in Windows | 42 * Types that do not exist in Windows |
43 * sys/types.h, but they exist in mingw32 | 43 * sys/types.h, but they exist in mingw32 |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 LIBMTP_devicestorage_t *next; /**< Next storage, follow this link until NULL *
/ | 763 LIBMTP_devicestorage_t *next; /**< Next storage, follow this link until NULL *
/ |
764 LIBMTP_devicestorage_t *prev; /**< Previous storage */ | 764 LIBMTP_devicestorage_t *prev; /**< Previous storage */ |
765 }; | 765 }; |
766 | 766 |
767 /** | 767 /** |
768 * LIBMTP Event structure | 768 * LIBMTP Event structure |
769 * TODO: add all externally visible events here | 769 * TODO: add all externally visible events here |
770 */ | 770 */ |
771 enum LIBMTP_event_enum { | 771 enum LIBMTP_event_enum { |
772 LIBMTP_EVENT_NONE, | 772 LIBMTP_EVENT_NONE, |
| 773 LIBMTP_EVENT_STORE_ADDED, |
773 }; | 774 }; |
774 typedef enum LIBMTP_event_enum LIBMTP_event_t; | 775 typedef enum LIBMTP_event_enum LIBMTP_event_t; |
775 | 776 |
776 /** @} */ | 777 /** @} */ |
777 | 778 |
778 /* Make functions available for C++ */ | 779 /* Make functions available for C++ */ |
779 #ifdef __cplusplus | 780 #ifdef __cplusplus |
780 extern "C" { | 781 extern "C" { |
781 #endif | 782 #endif |
782 | 783 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 const char *); | 909 const char *); |
909 LIBMTP_filesampledata_t *LIBMTP_new_filesampledata_t(void); | 910 LIBMTP_filesampledata_t *LIBMTP_new_filesampledata_t(void); |
910 void LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *); | 911 void LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *); |
911 int LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *, | 912 int LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *, |
912 LIBMTP_filetype_t const, | 913 LIBMTP_filetype_t const, |
913 LIBMTP_filesampledata_t **); | 914 LIBMTP_filesampledata_t **); |
914 int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, | 915 int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, |
915 LIBMTP_filesampledata_t *); | 916 LIBMTP_filesampledata_t *); |
916 int LIBMTP_Get_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, | 917 int LIBMTP_Get_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, |
917 LIBMTP_filesampledata_t *); | 918 LIBMTP_filesampledata_t *); |
| 919 int LIBMTP_Get_Thumbnail(LIBMTP_mtpdevice_t *, uint32_t const, |
| 920 unsigned char **data, unsigned int *size); |
918 | 921 |
919 /** | 922 /** |
920 * @} | 923 * @} |
921 * @defgroup tracks The track management API. | 924 * @defgroup tracks The track management API. |
922 * @{ | 925 * @{ |
923 */ | 926 */ |
924 LIBMTP_track_t *LIBMTP_new_track_t(void); | 927 LIBMTP_track_t *LIBMTP_new_track_t(void); |
925 void LIBMTP_destroy_track_t(LIBMTP_track_t*); | 928 void LIBMTP_destroy_track_t(LIBMTP_track_t*); |
926 LIBMTP_track_t *LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t*); | 929 LIBMTP_track_t *LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t*); |
927 LIBMTP_track_t *LIBMTP_Get_Tracklisting_With_Callback(LIBMTP_mtpdevice_t*, | 930 LIBMTP_track_t *LIBMTP_Get_Tracklisting_With_Callback(LIBMTP_mtpdevice_t*, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 * @{ | 1006 * @{ |
1004 */ | 1007 */ |
1005 int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t); | 1008 int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t); |
1006 int LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t , char *); | 1009 int LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t , char *); |
1007 | 1010 |
1008 /** | 1011 /** |
1009 * @} | 1012 * @} |
1010 * @defgroup files The events API. | 1013 * @defgroup files The events API. |
1011 * @{ | 1014 * @{ |
1012 */ | 1015 */ |
1013 int LIBMTP_Read_Event(LIBMTP_mtpdevice_t *, LIBMTP_event_t *); | 1016 int LIBMTP_Read_Event(LIBMTP_mtpdevice_t *, LIBMTP_event_t *, uint32_t *); |
1014 | 1017 |
1015 | 1018 |
1016 /** @} */ | 1019 /** @} */ |
1017 | 1020 |
1018 /* End of C++ exports */ | 1021 /* End of C++ exports */ |
1019 #ifdef __cplusplus | 1022 #ifdef __cplusplus |
1020 } | 1023 } |
1021 #endif | 1024 #endif |
1022 | 1025 |
1023 #endif /* LIBMTP_H_INCLUSION_GUARD */ | 1026 #endif /* LIBMTP_H_INCLUSION_GUARD */ |
OLD | NEW |