1pub type time_t = libc::time_t;
4pub type timeval = libc::timeval;
5
6pub const LIBMTP_VERSION_STRING: &[u8; 7usize] = b"1.1.17\0";
7pub const LIBMTP_DEBUG_NONE: u32 = 0;
8pub const LIBMTP_DEBUG_PTP: u32 = 1;
9pub const LIBMTP_DEBUG_PLST: u32 = 2;
10pub const LIBMTP_DEBUG_USB: u32 = 4;
11pub const LIBMTP_DEBUG_DATA: u32 = 8;
12pub const LIBMTP_DEBUG_ALL: u32 = 255;
13pub const LIBMTP_HANDLER_RETURN_OK: u32 = 0;
14pub const LIBMTP_HANDLER_RETURN_ERROR: u32 = 1;
15pub const LIBMTP_HANDLER_RETURN_CANCEL: u32 = 2;
16pub const LIBMTP_STORAGE_SORTBY_NOTSORTED: u32 = 0;
17pub const LIBMTP_STORAGE_SORTBY_FREESPACE: u32 = 1;
18pub const LIBMTP_STORAGE_SORTBY_MAXSPACE: u32 = 2;
19pub const LIBMTP_FILES_AND_FOLDERS_ROOT: u32 = 4294967295;
20pub const PTP_ST_Undefined: u32 = 0;
21pub const PTP_ST_FixedROM: u32 = 1;
22pub const PTP_ST_RemovableROM: u32 = 2;
23pub const PTP_ST_FixedRAM: u32 = 3;
24pub const PTP_ST_RemovableRAM: u32 = 4;
25pub const PTP_FST_Undefined: u32 = 0;
26pub const PTP_FST_GenericFlat: u32 = 1;
27pub const PTP_FST_GenericHierarchical: u32 = 2;
28pub const PTP_FST_DCF: u32 = 3;
29pub const PTP_AC_ReadWrite: u32 = 0;
30pub const PTP_AC_ReadOnly: u32 = 1;
31pub const PTP_AC_ReadOnly_with_Object_Deletion: u32 = 2;
32pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_FOLDER: LIBMTP_filetype_t = 0;
33pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_WAV: LIBMTP_filetype_t = 1;
34pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MP3: LIBMTP_filetype_t = 2;
35pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_WMA: LIBMTP_filetype_t = 3;
36pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_OGG: LIBMTP_filetype_t = 4;
37pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_AUDIBLE: LIBMTP_filetype_t = 5;
38pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MP4: LIBMTP_filetype_t = 6;
39pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_UNDEF_AUDIO: LIBMTP_filetype_t = 7;
40pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_WMV: LIBMTP_filetype_t = 8;
41pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_AVI: LIBMTP_filetype_t = 9;
42pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MPEG: LIBMTP_filetype_t = 10;
43pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_ASF: LIBMTP_filetype_t = 11;
44pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_QT: LIBMTP_filetype_t = 12;
45pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_UNDEF_VIDEO: LIBMTP_filetype_t = 13;
46pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_JPEG: LIBMTP_filetype_t = 14;
47pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_JFIF: LIBMTP_filetype_t = 15;
48pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_TIFF: LIBMTP_filetype_t = 16;
49pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_BMP: LIBMTP_filetype_t = 17;
50pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_GIF: LIBMTP_filetype_t = 18;
51pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_PICT: LIBMTP_filetype_t = 19;
52pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_PNG: LIBMTP_filetype_t = 20;
53pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_VCALENDAR1: LIBMTP_filetype_t = 21;
54pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_VCALENDAR2: LIBMTP_filetype_t = 22;
55pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_VCARD2: LIBMTP_filetype_t = 23;
56pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_VCARD3: LIBMTP_filetype_t = 24;
57pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT: LIBMTP_filetype_t = 25;
58pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_WINEXEC: LIBMTP_filetype_t = 26;
59pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_TEXT: LIBMTP_filetype_t = 27;
60pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_HTML: LIBMTP_filetype_t = 28;
61pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_FIRMWARE: LIBMTP_filetype_t = 29;
62pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_AAC: LIBMTP_filetype_t = 30;
63pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MEDIACARD: LIBMTP_filetype_t = 31;
64pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_FLAC: LIBMTP_filetype_t = 32;
65pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MP2: LIBMTP_filetype_t = 33;
66pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_M4A: LIBMTP_filetype_t = 34;
67pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_DOC: LIBMTP_filetype_t = 35;
68pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_XML: LIBMTP_filetype_t = 36;
69pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_XLS: LIBMTP_filetype_t = 37;
70pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_PPT: LIBMTP_filetype_t = 38;
71pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_MHT: LIBMTP_filetype_t = 39;
72pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_JP2: LIBMTP_filetype_t = 40;
73pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_JPX: LIBMTP_filetype_t = 41;
74pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_ALBUM: LIBMTP_filetype_t = 42;
75pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_PLAYLIST: LIBMTP_filetype_t = 43;
76pub const LIBMTP_filetype_t_LIBMTP_FILETYPE_UNKNOWN: LIBMTP_filetype_t = 44;
77#[doc = " The filetypes defined here are the external types used"]
78#[doc = " by the libmtp library interface. The types used internally"]
79#[doc = " as PTP-defined enumerator types is something different."]
80pub type LIBMTP_filetype_t = ::std::os::raw::c_uint;
81pub const LIBMTP_property_t_LIBMTP_PROPERTY_StorageID: LIBMTP_property_t = 0;
82pub const LIBMTP_property_t_LIBMTP_PROPERTY_ObjectFormat: LIBMTP_property_t = 1;
83pub const LIBMTP_property_t_LIBMTP_PROPERTY_ProtectionStatus: LIBMTP_property_t = 2;
84pub const LIBMTP_property_t_LIBMTP_PROPERTY_ObjectSize: LIBMTP_property_t = 3;
85pub const LIBMTP_property_t_LIBMTP_PROPERTY_AssociationType: LIBMTP_property_t = 4;
86pub const LIBMTP_property_t_LIBMTP_PROPERTY_AssociationDesc: LIBMTP_property_t = 5;
87pub const LIBMTP_property_t_LIBMTP_PROPERTY_ObjectFileName: LIBMTP_property_t = 6;
88pub const LIBMTP_property_t_LIBMTP_PROPERTY_DateCreated: LIBMTP_property_t = 7;
89pub const LIBMTP_property_t_LIBMTP_PROPERTY_DateModified: LIBMTP_property_t = 8;
90pub const LIBMTP_property_t_LIBMTP_PROPERTY_Keywords: LIBMTP_property_t = 9;
91pub const LIBMTP_property_t_LIBMTP_PROPERTY_ParentObject: LIBMTP_property_t = 10;
92pub const LIBMTP_property_t_LIBMTP_PROPERTY_AllowedFolderContents: LIBMTP_property_t = 11;
93pub const LIBMTP_property_t_LIBMTP_PROPERTY_Hidden: LIBMTP_property_t = 12;
94pub const LIBMTP_property_t_LIBMTP_PROPERTY_SystemObject: LIBMTP_property_t = 13;
95pub const LIBMTP_property_t_LIBMTP_PROPERTY_PersistantUniqueObjectIdentifier: LIBMTP_property_t =
96 14;
97pub const LIBMTP_property_t_LIBMTP_PROPERTY_SyncID: LIBMTP_property_t = 15;
98pub const LIBMTP_property_t_LIBMTP_PROPERTY_PropertyBag: LIBMTP_property_t = 16;
99pub const LIBMTP_property_t_LIBMTP_PROPERTY_Name: LIBMTP_property_t = 17;
100pub const LIBMTP_property_t_LIBMTP_PROPERTY_CreatedBy: LIBMTP_property_t = 18;
101pub const LIBMTP_property_t_LIBMTP_PROPERTY_Artist: LIBMTP_property_t = 19;
102pub const LIBMTP_property_t_LIBMTP_PROPERTY_DateAuthored: LIBMTP_property_t = 20;
103pub const LIBMTP_property_t_LIBMTP_PROPERTY_Description: LIBMTP_property_t = 21;
104pub const LIBMTP_property_t_LIBMTP_PROPERTY_URLReference: LIBMTP_property_t = 22;
105pub const LIBMTP_property_t_LIBMTP_PROPERTY_LanguageLocale: LIBMTP_property_t = 23;
106pub const LIBMTP_property_t_LIBMTP_PROPERTY_CopyrightInformation: LIBMTP_property_t = 24;
107pub const LIBMTP_property_t_LIBMTP_PROPERTY_Source: LIBMTP_property_t = 25;
108pub const LIBMTP_property_t_LIBMTP_PROPERTY_OriginLocation: LIBMTP_property_t = 26;
109pub const LIBMTP_property_t_LIBMTP_PROPERTY_DateAdded: LIBMTP_property_t = 27;
110pub const LIBMTP_property_t_LIBMTP_PROPERTY_NonConsumable: LIBMTP_property_t = 28;
111pub const LIBMTP_property_t_LIBMTP_PROPERTY_CorruptOrUnplayable: LIBMTP_property_t = 29;
112pub const LIBMTP_property_t_LIBMTP_PROPERTY_ProducerSerialNumber: LIBMTP_property_t = 30;
113pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleFormat: LIBMTP_property_t = 31;
114pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleSize: LIBMTP_property_t = 32;
115pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleHeight: LIBMTP_property_t = 33;
116pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleWidth: LIBMTP_property_t = 34;
117pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleDuration: LIBMTP_property_t = 35;
118pub const LIBMTP_property_t_LIBMTP_PROPERTY_RepresentativeSampleData: LIBMTP_property_t = 36;
119pub const LIBMTP_property_t_LIBMTP_PROPERTY_Width: LIBMTP_property_t = 37;
120pub const LIBMTP_property_t_LIBMTP_PROPERTY_Height: LIBMTP_property_t = 38;
121pub const LIBMTP_property_t_LIBMTP_PROPERTY_Duration: LIBMTP_property_t = 39;
122pub const LIBMTP_property_t_LIBMTP_PROPERTY_Rating: LIBMTP_property_t = 40;
123pub const LIBMTP_property_t_LIBMTP_PROPERTY_Track: LIBMTP_property_t = 41;
124pub const LIBMTP_property_t_LIBMTP_PROPERTY_Genre: LIBMTP_property_t = 42;
125pub const LIBMTP_property_t_LIBMTP_PROPERTY_Credits: LIBMTP_property_t = 43;
126pub const LIBMTP_property_t_LIBMTP_PROPERTY_Lyrics: LIBMTP_property_t = 44;
127pub const LIBMTP_property_t_LIBMTP_PROPERTY_SubscriptionContentID: LIBMTP_property_t = 45;
128pub const LIBMTP_property_t_LIBMTP_PROPERTY_ProducedBy: LIBMTP_property_t = 46;
129pub const LIBMTP_property_t_LIBMTP_PROPERTY_UseCount: LIBMTP_property_t = 47;
130pub const LIBMTP_property_t_LIBMTP_PROPERTY_SkipCount: LIBMTP_property_t = 48;
131pub const LIBMTP_property_t_LIBMTP_PROPERTY_LastAccessed: LIBMTP_property_t = 49;
132pub const LIBMTP_property_t_LIBMTP_PROPERTY_ParentalRating: LIBMTP_property_t = 50;
133pub const LIBMTP_property_t_LIBMTP_PROPERTY_MetaGenre: LIBMTP_property_t = 51;
134pub const LIBMTP_property_t_LIBMTP_PROPERTY_Composer: LIBMTP_property_t = 52;
135pub const LIBMTP_property_t_LIBMTP_PROPERTY_EffectiveRating: LIBMTP_property_t = 53;
136pub const LIBMTP_property_t_LIBMTP_PROPERTY_Subtitle: LIBMTP_property_t = 54;
137pub const LIBMTP_property_t_LIBMTP_PROPERTY_OriginalReleaseDate: LIBMTP_property_t = 55;
138pub const LIBMTP_property_t_LIBMTP_PROPERTY_AlbumName: LIBMTP_property_t = 56;
139pub const LIBMTP_property_t_LIBMTP_PROPERTY_AlbumArtist: LIBMTP_property_t = 57;
140pub const LIBMTP_property_t_LIBMTP_PROPERTY_Mood: LIBMTP_property_t = 58;
141pub const LIBMTP_property_t_LIBMTP_PROPERTY_DRMStatus: LIBMTP_property_t = 59;
142pub const LIBMTP_property_t_LIBMTP_PROPERTY_SubDescription: LIBMTP_property_t = 60;
143pub const LIBMTP_property_t_LIBMTP_PROPERTY_IsCropped: LIBMTP_property_t = 61;
144pub const LIBMTP_property_t_LIBMTP_PROPERTY_IsColorCorrected: LIBMTP_property_t = 62;
145pub const LIBMTP_property_t_LIBMTP_PROPERTY_ImageBitDepth: LIBMTP_property_t = 63;
146pub const LIBMTP_property_t_LIBMTP_PROPERTY_Fnumber: LIBMTP_property_t = 64;
147pub const LIBMTP_property_t_LIBMTP_PROPERTY_ExposureTime: LIBMTP_property_t = 65;
148pub const LIBMTP_property_t_LIBMTP_PROPERTY_ExposureIndex: LIBMTP_property_t = 66;
149pub const LIBMTP_property_t_LIBMTP_PROPERTY_DisplayName: LIBMTP_property_t = 67;
150pub const LIBMTP_property_t_LIBMTP_PROPERTY_BodyText: LIBMTP_property_t = 68;
151pub const LIBMTP_property_t_LIBMTP_PROPERTY_Subject: LIBMTP_property_t = 69;
152pub const LIBMTP_property_t_LIBMTP_PROPERTY_Priority: LIBMTP_property_t = 70;
153pub const LIBMTP_property_t_LIBMTP_PROPERTY_GivenName: LIBMTP_property_t = 71;
154pub const LIBMTP_property_t_LIBMTP_PROPERTY_MiddleNames: LIBMTP_property_t = 72;
155pub const LIBMTP_property_t_LIBMTP_PROPERTY_FamilyName: LIBMTP_property_t = 73;
156pub const LIBMTP_property_t_LIBMTP_PROPERTY_Prefix: LIBMTP_property_t = 74;
157pub const LIBMTP_property_t_LIBMTP_PROPERTY_Suffix: LIBMTP_property_t = 75;
158pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneticGivenName: LIBMTP_property_t = 76;
159pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneticFamilyName: LIBMTP_property_t = 77;
160pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailPrimary: LIBMTP_property_t = 78;
161pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailPersonal1: LIBMTP_property_t = 79;
162pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailPersonal2: LIBMTP_property_t = 80;
163pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailBusiness1: LIBMTP_property_t = 81;
164pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailBusiness2: LIBMTP_property_t = 82;
165pub const LIBMTP_property_t_LIBMTP_PROPERTY_EmailOthers: LIBMTP_property_t = 83;
166pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberPrimary: LIBMTP_property_t = 84;
167pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberPersonal: LIBMTP_property_t = 85;
168pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberPersonal2: LIBMTP_property_t = 86;
169pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberBusiness: LIBMTP_property_t = 87;
170pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberBusiness2: LIBMTP_property_t = 88;
171pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberMobile: LIBMTP_property_t = 89;
172pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberMobile2: LIBMTP_property_t = 90;
173pub const LIBMTP_property_t_LIBMTP_PROPERTY_FaxNumberPrimary: LIBMTP_property_t = 91;
174pub const LIBMTP_property_t_LIBMTP_PROPERTY_FaxNumberPersonal: LIBMTP_property_t = 92;
175pub const LIBMTP_property_t_LIBMTP_PROPERTY_FaxNumberBusiness: LIBMTP_property_t = 93;
176pub const LIBMTP_property_t_LIBMTP_PROPERTY_PagerNumber: LIBMTP_property_t = 94;
177pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneNumberOthers: LIBMTP_property_t = 95;
178pub const LIBMTP_property_t_LIBMTP_PROPERTY_PrimaryWebAddress: LIBMTP_property_t = 96;
179pub const LIBMTP_property_t_LIBMTP_PROPERTY_PersonalWebAddress: LIBMTP_property_t = 97;
180pub const LIBMTP_property_t_LIBMTP_PROPERTY_BusinessWebAddress: LIBMTP_property_t = 98;
181pub const LIBMTP_property_t_LIBMTP_PROPERTY_InstantMessengerAddress: LIBMTP_property_t = 99;
182pub const LIBMTP_property_t_LIBMTP_PROPERTY_InstantMessengerAddress2: LIBMTP_property_t = 100;
183pub const LIBMTP_property_t_LIBMTP_PROPERTY_InstantMessengerAddress3: LIBMTP_property_t = 101;
184pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFull: LIBMTP_property_t = 102;
185pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullLine1: LIBMTP_property_t = 103;
186pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullLine2: LIBMTP_property_t = 104;
187pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullCity: LIBMTP_property_t = 105;
188pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullRegion: LIBMTP_property_t =
189 106;
190pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullPostalCode: LIBMTP_property_t =
191 107;
192pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressPersonalFullCountry: LIBMTP_property_t =
193 108;
194pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessFull: LIBMTP_property_t = 109;
195pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessLine1: LIBMTP_property_t = 110;
196pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessLine2: LIBMTP_property_t = 111;
197pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessCity: LIBMTP_property_t = 112;
198pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessRegion: LIBMTP_property_t = 113;
199pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessPostalCode: LIBMTP_property_t =
200 114;
201pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressBusinessCountry: LIBMTP_property_t = 115;
202pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherFull: LIBMTP_property_t = 116;
203pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherLine1: LIBMTP_property_t = 117;
204pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherLine2: LIBMTP_property_t = 118;
205pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherCity: LIBMTP_property_t = 119;
206pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherRegion: LIBMTP_property_t = 120;
207pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherPostalCode: LIBMTP_property_t = 121;
208pub const LIBMTP_property_t_LIBMTP_PROPERTY_PostalAddressOtherCountry: LIBMTP_property_t = 122;
209pub const LIBMTP_property_t_LIBMTP_PROPERTY_OrganizationName: LIBMTP_property_t = 123;
210pub const LIBMTP_property_t_LIBMTP_PROPERTY_PhoneticOrganizationName: LIBMTP_property_t = 124;
211pub const LIBMTP_property_t_LIBMTP_PROPERTY_Role: LIBMTP_property_t = 125;
212pub const LIBMTP_property_t_LIBMTP_PROPERTY_Birthdate: LIBMTP_property_t = 126;
213pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageTo: LIBMTP_property_t = 127;
214pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageCC: LIBMTP_property_t = 128;
215pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageBCC: LIBMTP_property_t = 129;
216pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageRead: LIBMTP_property_t = 130;
217pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageReceivedTime: LIBMTP_property_t = 131;
218pub const LIBMTP_property_t_LIBMTP_PROPERTY_MessageSender: LIBMTP_property_t = 132;
219pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityBeginTime: LIBMTP_property_t = 133;
220pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityEndTime: LIBMTP_property_t = 134;
221pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityLocation: LIBMTP_property_t = 135;
222pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityRequiredAttendees: LIBMTP_property_t = 136;
223pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityOptionalAttendees: LIBMTP_property_t = 137;
224pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityResources: LIBMTP_property_t = 138;
225pub const LIBMTP_property_t_LIBMTP_PROPERTY_ActivityAccepted: LIBMTP_property_t = 139;
226pub const LIBMTP_property_t_LIBMTP_PROPERTY_Owner: LIBMTP_property_t = 140;
227pub const LIBMTP_property_t_LIBMTP_PROPERTY_Editor: LIBMTP_property_t = 141;
228pub const LIBMTP_property_t_LIBMTP_PROPERTY_Webmaster: LIBMTP_property_t = 142;
229pub const LIBMTP_property_t_LIBMTP_PROPERTY_URLSource: LIBMTP_property_t = 143;
230pub const LIBMTP_property_t_LIBMTP_PROPERTY_URLDestination: LIBMTP_property_t = 144;
231pub const LIBMTP_property_t_LIBMTP_PROPERTY_TimeBookmark: LIBMTP_property_t = 145;
232pub const LIBMTP_property_t_LIBMTP_PROPERTY_ObjectBookmark: LIBMTP_property_t = 146;
233pub const LIBMTP_property_t_LIBMTP_PROPERTY_ByteBookmark: LIBMTP_property_t = 147;
234pub const LIBMTP_property_t_LIBMTP_PROPERTY_LastBuildDate: LIBMTP_property_t = 148;
235pub const LIBMTP_property_t_LIBMTP_PROPERTY_TimetoLive: LIBMTP_property_t = 149;
236pub const LIBMTP_property_t_LIBMTP_PROPERTY_MediaGUID: LIBMTP_property_t = 150;
237pub const LIBMTP_property_t_LIBMTP_PROPERTY_TotalBitRate: LIBMTP_property_t = 151;
238pub const LIBMTP_property_t_LIBMTP_PROPERTY_BitRateType: LIBMTP_property_t = 152;
239pub const LIBMTP_property_t_LIBMTP_PROPERTY_SampleRate: LIBMTP_property_t = 153;
240pub const LIBMTP_property_t_LIBMTP_PROPERTY_NumberOfChannels: LIBMTP_property_t = 154;
241pub const LIBMTP_property_t_LIBMTP_PROPERTY_AudioBitDepth: LIBMTP_property_t = 155;
242pub const LIBMTP_property_t_LIBMTP_PROPERTY_ScanDepth: LIBMTP_property_t = 156;
243pub const LIBMTP_property_t_LIBMTP_PROPERTY_AudioWAVECodec: LIBMTP_property_t = 157;
244pub const LIBMTP_property_t_LIBMTP_PROPERTY_AudioBitRate: LIBMTP_property_t = 158;
245pub const LIBMTP_property_t_LIBMTP_PROPERTY_VideoFourCCCodec: LIBMTP_property_t = 159;
246pub const LIBMTP_property_t_LIBMTP_PROPERTY_VideoBitRate: LIBMTP_property_t = 160;
247pub const LIBMTP_property_t_LIBMTP_PROPERTY_FramesPerThousandSeconds: LIBMTP_property_t = 161;
248pub const LIBMTP_property_t_LIBMTP_PROPERTY_KeyFrameDistance: LIBMTP_property_t = 162;
249pub const LIBMTP_property_t_LIBMTP_PROPERTY_BufferSize: LIBMTP_property_t = 163;
250pub const LIBMTP_property_t_LIBMTP_PROPERTY_EncodingQuality: LIBMTP_property_t = 164;
251pub const LIBMTP_property_t_LIBMTP_PROPERTY_EncodingProfile: LIBMTP_property_t = 165;
252pub const LIBMTP_property_t_LIBMTP_PROPERTY_BuyFlag: LIBMTP_property_t = 166;
253pub const LIBMTP_property_t_LIBMTP_PROPERTY_UNKNOWN: LIBMTP_property_t = 167;
254#[doc = " The properties defined here are the external types used"]
255#[doc = " by the libmtp library interface."]
256pub type LIBMTP_property_t = ::std::os::raw::c_uint;
257pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_INT8: LIBMTP_datatype_t = 0;
258pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_UINT8: LIBMTP_datatype_t = 1;
259pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_INT16: LIBMTP_datatype_t = 2;
260pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_UINT16: LIBMTP_datatype_t = 3;
261pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_INT32: LIBMTP_datatype_t = 4;
262pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_UINT32: LIBMTP_datatype_t = 5;
263pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_INT64: LIBMTP_datatype_t = 6;
264pub const LIBMTP_datatype_t_LIBMTP_DATATYPE_UINT64: LIBMTP_datatype_t = 7;
265#[doc = " These are the data types"]
266pub type LIBMTP_datatype_t = ::std::os::raw::c_uint;
267#[doc = " This capability tells whether you can call the function getting"]
268#[doc = " partial objects, @see LIBMTP_GetPartialObject()"]
269pub const LIBMTP_devicecap_t_LIBMTP_DEVICECAP_GetPartialObject: LIBMTP_devicecap_t = 0;
270#[doc = " This capability tells whether you can call the function sending"]
271#[doc = " partial objects. @see LIBMTP_SendPartialObject()"]
272pub const LIBMTP_devicecap_t_LIBMTP_DEVICECAP_SendPartialObject: LIBMTP_devicecap_t = 1;
273#[doc = " This capability tells whether you can call the functions editing"]
274#[doc = " objects in-place on a device."]
275#[doc = " @see LIBMTP_BeginEditObject()"]
276#[doc = " @see LIBMTP_EndEditObject()"]
277#[doc = " @see LIBMTP_TruncateObject()"]
278pub const LIBMTP_devicecap_t_LIBMTP_DEVICECAP_EditObjects: LIBMTP_devicecap_t = 2;
279#[doc = " This capability tells whether you can call the function to"]
280#[doc = " move an object, @see LIBMTP_MoveObject()"]
281pub const LIBMTP_devicecap_t_LIBMTP_DEVICECAP_MoveObject: LIBMTP_devicecap_t = 3;
282#[doc = " This capability tells whether you can call the function to"]
283#[doc = " copy an object, @see LIBMTP_CopyObject()"]
284pub const LIBMTP_devicecap_t_LIBMTP_DEVICECAP_CopyObject: LIBMTP_devicecap_t = 4;
285#[doc = " These are device capabilities"]
286pub type LIBMTP_devicecap_t = ::std::os::raw::c_uint;
287pub const LIBMTP_error_number_t_LIBMTP_ERROR_NONE: LIBMTP_error_number_t = 0;
288pub const LIBMTP_error_number_t_LIBMTP_ERROR_GENERAL: LIBMTP_error_number_t = 1;
289pub const LIBMTP_error_number_t_LIBMTP_ERROR_PTP_LAYER: LIBMTP_error_number_t = 2;
290pub const LIBMTP_error_number_t_LIBMTP_ERROR_USB_LAYER: LIBMTP_error_number_t = 3;
291pub const LIBMTP_error_number_t_LIBMTP_ERROR_MEMORY_ALLOCATION: LIBMTP_error_number_t = 4;
292pub const LIBMTP_error_number_t_LIBMTP_ERROR_NO_DEVICE_ATTACHED: LIBMTP_error_number_t = 5;
293pub const LIBMTP_error_number_t_LIBMTP_ERROR_STORAGE_FULL: LIBMTP_error_number_t = 6;
294pub const LIBMTP_error_number_t_LIBMTP_ERROR_CONNECTING: LIBMTP_error_number_t = 7;
295pub const LIBMTP_error_number_t_LIBMTP_ERROR_CANCELLED: LIBMTP_error_number_t = 8;
296#[doc = " These are the numbered error codes. You can also"]
297#[doc = " get string representations for errors."]
298pub type LIBMTP_error_number_t = ::std::os::raw::c_uint;
299pub type LIBMTP_device_entry_t = LIBMTP_device_entry_struct;
300pub type LIBMTP_raw_device_t = LIBMTP_raw_device_struct;
301pub type LIBMTP_error_t = LIBMTP_error_struct;
302pub type LIBMTP_allowed_values_t = LIBMTP_allowed_values_struct;
303pub type LIBMTP_device_extension_t = LIBMTP_device_extension_struct;
304#[doc = " < @see LIBMTP_device_extension_struct"]
305pub type LIBMTP_mtpdevice_t = LIBMTP_mtpdevice_struct;
306pub type LIBMTP_file_t = LIBMTP_file_struct;
307pub type LIBMTP_track_t = LIBMTP_track_struct;
308pub type LIBMTP_playlist_t = LIBMTP_playlist_struct;
309pub type LIBMTP_album_t = LIBMTP_album_struct;
310pub type LIBMTP_folder_t = LIBMTP_folder_struct;
311#[repr(C)]
312#[derive(Debug, Copy, Clone)]
313pub struct LIBMTP_object_struct {
314 _unused: [u8; 0],
315}
316pub type LIBMTP_object_t = LIBMTP_object_struct;
317pub type LIBMTP_filesampledata_t = LIBMTP_filesampledata_struct;
318pub type LIBMTP_devicestorage_t = LIBMTP_devicestorage_struct;
319#[doc = " The callback type definition. Notice that a progress percentage ratio"]
320#[doc = " is easy to calculate by dividing <code>sent</code> by"]
321#[doc = " <code>total</code>."]
322#[doc = " @param sent the number of bytes sent so far"]
323#[doc = " @param total the total number of bytes to send"]
324#[doc = " @param data a user-defined dereferencable pointer"]
325#[doc = " @return if anything else than 0 is returned, the current transfer will be"]
326#[doc = " interrupted / cancelled."]
327pub type LIBMTP_progressfunc_t = ::std::option::Option<
328 unsafe extern "C" fn(
329 sent: u64,
330 total: u64,
331 data: *const ::std::os::raw::c_void,
332 ) -> ::std::os::raw::c_int,
333>;
334#[doc = " Callback function for get by handler function"]
335#[doc = " @param params the device parameters"]
336#[doc = " @param priv a user-defined dereferencable pointer"]
337#[doc = " @param wantlen the number of bytes wanted"]
338#[doc = " @param data a buffer to write the data to"]
339#[doc = " @param gotlen pointer to the number of bytes actually written"]
340#[doc = " to data"]
341#[doc = " @return LIBMTP_HANDLER_RETURN_OK if successful,"]
342#[doc = " LIBMTP_HANDLER_RETURN_ERROR on error or"]
343#[doc = " LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer"]
344pub type MTPDataGetFunc = ::std::option::Option<
345 unsafe extern "C" fn(
346 params: *mut ::std::os::raw::c_void,
347 priv_: *mut ::std::os::raw::c_void,
348 wantlen: u32,
349 data: *mut ::std::os::raw::c_uchar,
350 gotlen: *mut u32,
351 ) -> u16,
352>;
353#[doc = " Callback function for put by handler function"]
354#[doc = " @param params the device parameters"]
355#[doc = " @param priv a user-defined dereferencable pointer"]
356#[doc = " @param sendlen the number of bytes available"]
357#[doc = " @param data a buffer to read the data from"]
358#[doc = " @param putlen pointer to the number of bytes actually read"]
359#[doc = " from data"]
360#[doc = " @return LIBMTP_HANDLER_RETURN_OK if successful,"]
361#[doc = " LIBMTP_HANDLER_RETURN_ERROR on error or"]
362#[doc = " LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer"]
363pub type MTPDataPutFunc = ::std::option::Option<
364 unsafe extern "C" fn(
365 params: *mut ::std::os::raw::c_void,
366 priv_: *mut ::std::os::raw::c_void,
367 sendlen: u32,
368 data: *mut ::std::os::raw::c_uchar,
369 putlen: *mut u32,
370 ) -> u16,
371>;
372#[doc = " A data structure to hold MTP device entries."]
373#[repr(C)]
374pub struct LIBMTP_device_entry_struct {
375 #[doc = "< The vendor of this device"]
376 pub vendor: *mut ::std::os::raw::c_char,
377 #[doc = "< Vendor ID for this device"]
378 pub vendor_id: u16,
379 #[doc = "< The product name of this device"]
380 pub product: *mut ::std::os::raw::c_char,
381 #[doc = "< Product ID for this device"]
382 pub product_id: u16,
383 #[doc = "< Bugs, device specifics etc"]
384 pub device_flags: u32,
385}
386#[test]
387fn bindgen_test_layout_LIBMTP_device_entry_struct() {
388 assert_eq!(
389 ::std::mem::size_of::<LIBMTP_device_entry_struct>(),
390 32usize,
391 concat!("Size of: ", stringify!(LIBMTP_device_entry_struct))
392 );
393 assert_eq!(
394 ::std::mem::align_of::<LIBMTP_device_entry_struct>(),
395 8usize,
396 concat!("Alignment of ", stringify!(LIBMTP_device_entry_struct))
397 );
398 assert_eq!(
399 unsafe {
400 &(*(::std::ptr::null::<LIBMTP_device_entry_struct>())).vendor as *const _ as usize
401 },
402 0usize,
403 concat!(
404 "Offset of field: ",
405 stringify!(LIBMTP_device_entry_struct),
406 "::",
407 stringify!(vendor)
408 )
409 );
410 assert_eq!(
411 unsafe {
412 &(*(::std::ptr::null::<LIBMTP_device_entry_struct>())).vendor_id as *const _ as usize
413 },
414 8usize,
415 concat!(
416 "Offset of field: ",
417 stringify!(LIBMTP_device_entry_struct),
418 "::",
419 stringify!(vendor_id)
420 )
421 );
422 assert_eq!(
423 unsafe {
424 &(*(::std::ptr::null::<LIBMTP_device_entry_struct>())).product as *const _ as usize
425 },
426 16usize,
427 concat!(
428 "Offset of field: ",
429 stringify!(LIBMTP_device_entry_struct),
430 "::",
431 stringify!(product)
432 )
433 );
434 assert_eq!(
435 unsafe {
436 &(*(::std::ptr::null::<LIBMTP_device_entry_struct>())).product_id as *const _ as usize
437 },
438 24usize,
439 concat!(
440 "Offset of field: ",
441 stringify!(LIBMTP_device_entry_struct),
442 "::",
443 stringify!(product_id)
444 )
445 );
446 assert_eq!(
447 unsafe {
448 &(*(::std::ptr::null::<LIBMTP_device_entry_struct>())).device_flags as *const _ as usize
449 },
450 28usize,
451 concat!(
452 "Offset of field: ",
453 stringify!(LIBMTP_device_entry_struct),
454 "::",
455 stringify!(device_flags)
456 )
457 );
458}
459#[doc = " A data structure to hold a raw MTP device connected"]
460#[doc = " to the bus."]
461#[repr(C)]
462pub struct LIBMTP_raw_device_struct {
463 #[doc = "< The device entry for this raw device"]
464 pub device_entry: LIBMTP_device_entry_t,
465 #[doc = "< Location of the bus, if device available"]
466 pub bus_location: u32,
467 #[doc = "< Device number on the bus, if device available"]
468 pub devnum: u8,
469}
470#[test]
471fn bindgen_test_layout_LIBMTP_raw_device_struct() {
472 assert_eq!(
473 ::std::mem::size_of::<LIBMTP_raw_device_struct>(),
474 40usize,
475 concat!("Size of: ", stringify!(LIBMTP_raw_device_struct))
476 );
477 assert_eq!(
478 ::std::mem::align_of::<LIBMTP_raw_device_struct>(),
479 8usize,
480 concat!("Alignment of ", stringify!(LIBMTP_raw_device_struct))
481 );
482 assert_eq!(
483 unsafe {
484 &(*(::std::ptr::null::<LIBMTP_raw_device_struct>())).device_entry as *const _ as usize
485 },
486 0usize,
487 concat!(
488 "Offset of field: ",
489 stringify!(LIBMTP_raw_device_struct),
490 "::",
491 stringify!(device_entry)
492 )
493 );
494 assert_eq!(
495 unsafe {
496 &(*(::std::ptr::null::<LIBMTP_raw_device_struct>())).bus_location as *const _ as usize
497 },
498 32usize,
499 concat!(
500 "Offset of field: ",
501 stringify!(LIBMTP_raw_device_struct),
502 "::",
503 stringify!(bus_location)
504 )
505 );
506 assert_eq!(
507 unsafe { &(*(::std::ptr::null::<LIBMTP_raw_device_struct>())).devnum as *const _ as usize },
508 36usize,
509 concat!(
510 "Offset of field: ",
511 stringify!(LIBMTP_raw_device_struct),
512 "::",
513 stringify!(devnum)
514 )
515 );
516}
517#[doc = " A data structure to hold errors from the library."]
518#[repr(C)]
519#[derive(Debug, Copy, Clone)]
520pub struct LIBMTP_error_struct {
521 pub errornumber: LIBMTP_error_number_t,
522 pub error_text: *mut ::std::os::raw::c_char,
523 pub next: *mut LIBMTP_error_t,
524}
525#[test]
526fn bindgen_test_layout_LIBMTP_error_struct() {
527 assert_eq!(
528 ::std::mem::size_of::<LIBMTP_error_struct>(),
529 24usize,
530 concat!("Size of: ", stringify!(LIBMTP_error_struct))
531 );
532 assert_eq!(
533 ::std::mem::align_of::<LIBMTP_error_struct>(),
534 8usize,
535 concat!("Alignment of ", stringify!(LIBMTP_error_struct))
536 );
537 assert_eq!(
538 unsafe { &(*(::std::ptr::null::<LIBMTP_error_struct>())).errornumber as *const _ as usize },
539 0usize,
540 concat!(
541 "Offset of field: ",
542 stringify!(LIBMTP_error_struct),
543 "::",
544 stringify!(errornumber)
545 )
546 );
547 assert_eq!(
548 unsafe { &(*(::std::ptr::null::<LIBMTP_error_struct>())).error_text as *const _ as usize },
549 8usize,
550 concat!(
551 "Offset of field: ",
552 stringify!(LIBMTP_error_struct),
553 "::",
554 stringify!(error_text)
555 )
556 );
557 assert_eq!(
558 unsafe { &(*(::std::ptr::null::<LIBMTP_error_struct>())).next as *const _ as usize },
559 16usize,
560 concat!(
561 "Offset of field: ",
562 stringify!(LIBMTP_error_struct),
563 "::",
564 stringify!(next)
565 )
566 );
567}
568#[doc = " A data structure to hold allowed ranges of values"]
569#[repr(C)]
570pub struct LIBMTP_allowed_values_struct {
571 pub u8max: u8,
572 pub u8min: u8,
573 pub u8step: u8,
574 pub u8vals: *mut u8,
575 pub i8max: i8,
576 pub i8min: i8,
577 pub i8step: i8,
578 pub i8vals: *mut i8,
579 pub u16max: u16,
580 pub u16min: u16,
581 pub u16step: u16,
582 pub u16vals: *mut u16,
583 pub i16max: i16,
584 pub i16min: i16,
585 pub i16step: i16,
586 pub i16vals: *mut i16,
587 pub u32max: u32,
588 pub u32min: u32,
589 pub u32step: u32,
590 pub u32vals: *mut u32,
591 pub i32max: i32,
592 pub i32min: i32,
593 pub i32step: i32,
594 pub i32vals: *mut i32,
595 pub u64max: u64,
596 pub u64min: u64,
597 pub u64step: u64,
598 pub u64vals: *mut u64,
599 pub i64max: i64,
600 pub i64min: i64,
601 pub i64step: i64,
602 pub i64vals: *mut i64,
603 #[doc = " Number of entries in the vals array"]
604 pub num_entries: u16,
605 #[doc = " The datatype specifying which of the above is used"]
606 pub datatype: LIBMTP_datatype_t,
607 #[doc = " Non zero for range, 0 for enum"]
608 pub is_range: ::std::os::raw::c_int,
609}
610#[test]
611fn bindgen_test_layout_LIBMTP_allowed_values_struct() {
612 assert_eq!(
613 ::std::mem::size_of::<LIBMTP_allowed_values_struct>(),
614 192usize,
615 concat!("Size of: ", stringify!(LIBMTP_allowed_values_struct))
616 );
617 assert_eq!(
618 ::std::mem::align_of::<LIBMTP_allowed_values_struct>(),
619 8usize,
620 concat!("Alignment of ", stringify!(LIBMTP_allowed_values_struct))
621 );
622 assert_eq!(
623 unsafe {
624 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u8max as *const _ as usize
625 },
626 0usize,
627 concat!(
628 "Offset of field: ",
629 stringify!(LIBMTP_allowed_values_struct),
630 "::",
631 stringify!(u8max)
632 )
633 );
634 assert_eq!(
635 unsafe {
636 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u8min as *const _ as usize
637 },
638 1usize,
639 concat!(
640 "Offset of field: ",
641 stringify!(LIBMTP_allowed_values_struct),
642 "::",
643 stringify!(u8min)
644 )
645 );
646 assert_eq!(
647 unsafe {
648 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u8step as *const _ as usize
649 },
650 2usize,
651 concat!(
652 "Offset of field: ",
653 stringify!(LIBMTP_allowed_values_struct),
654 "::",
655 stringify!(u8step)
656 )
657 );
658 assert_eq!(
659 unsafe {
660 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u8vals as *const _ as usize
661 },
662 8usize,
663 concat!(
664 "Offset of field: ",
665 stringify!(LIBMTP_allowed_values_struct),
666 "::",
667 stringify!(u8vals)
668 )
669 );
670 assert_eq!(
671 unsafe {
672 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i8max as *const _ as usize
673 },
674 16usize,
675 concat!(
676 "Offset of field: ",
677 stringify!(LIBMTP_allowed_values_struct),
678 "::",
679 stringify!(i8max)
680 )
681 );
682 assert_eq!(
683 unsafe {
684 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i8min as *const _ as usize
685 },
686 17usize,
687 concat!(
688 "Offset of field: ",
689 stringify!(LIBMTP_allowed_values_struct),
690 "::",
691 stringify!(i8min)
692 )
693 );
694 assert_eq!(
695 unsafe {
696 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i8step as *const _ as usize
697 },
698 18usize,
699 concat!(
700 "Offset of field: ",
701 stringify!(LIBMTP_allowed_values_struct),
702 "::",
703 stringify!(i8step)
704 )
705 );
706 assert_eq!(
707 unsafe {
708 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i8vals as *const _ as usize
709 },
710 24usize,
711 concat!(
712 "Offset of field: ",
713 stringify!(LIBMTP_allowed_values_struct),
714 "::",
715 stringify!(i8vals)
716 )
717 );
718 assert_eq!(
719 unsafe {
720 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u16max as *const _ as usize
721 },
722 32usize,
723 concat!(
724 "Offset of field: ",
725 stringify!(LIBMTP_allowed_values_struct),
726 "::",
727 stringify!(u16max)
728 )
729 );
730 assert_eq!(
731 unsafe {
732 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u16min as *const _ as usize
733 },
734 34usize,
735 concat!(
736 "Offset of field: ",
737 stringify!(LIBMTP_allowed_values_struct),
738 "::",
739 stringify!(u16min)
740 )
741 );
742 assert_eq!(
743 unsafe {
744 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u16step as *const _ as usize
745 },
746 36usize,
747 concat!(
748 "Offset of field: ",
749 stringify!(LIBMTP_allowed_values_struct),
750 "::",
751 stringify!(u16step)
752 )
753 );
754 assert_eq!(
755 unsafe {
756 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u16vals as *const _ as usize
757 },
758 40usize,
759 concat!(
760 "Offset of field: ",
761 stringify!(LIBMTP_allowed_values_struct),
762 "::",
763 stringify!(u16vals)
764 )
765 );
766 assert_eq!(
767 unsafe {
768 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i16max as *const _ as usize
769 },
770 48usize,
771 concat!(
772 "Offset of field: ",
773 stringify!(LIBMTP_allowed_values_struct),
774 "::",
775 stringify!(i16max)
776 )
777 );
778 assert_eq!(
779 unsafe {
780 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i16min as *const _ as usize
781 },
782 50usize,
783 concat!(
784 "Offset of field: ",
785 stringify!(LIBMTP_allowed_values_struct),
786 "::",
787 stringify!(i16min)
788 )
789 );
790 assert_eq!(
791 unsafe {
792 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i16step as *const _ as usize
793 },
794 52usize,
795 concat!(
796 "Offset of field: ",
797 stringify!(LIBMTP_allowed_values_struct),
798 "::",
799 stringify!(i16step)
800 )
801 );
802 assert_eq!(
803 unsafe {
804 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i16vals as *const _ as usize
805 },
806 56usize,
807 concat!(
808 "Offset of field: ",
809 stringify!(LIBMTP_allowed_values_struct),
810 "::",
811 stringify!(i16vals)
812 )
813 );
814 assert_eq!(
815 unsafe {
816 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u32max as *const _ as usize
817 },
818 64usize,
819 concat!(
820 "Offset of field: ",
821 stringify!(LIBMTP_allowed_values_struct),
822 "::",
823 stringify!(u32max)
824 )
825 );
826 assert_eq!(
827 unsafe {
828 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u32min as *const _ as usize
829 },
830 68usize,
831 concat!(
832 "Offset of field: ",
833 stringify!(LIBMTP_allowed_values_struct),
834 "::",
835 stringify!(u32min)
836 )
837 );
838 assert_eq!(
839 unsafe {
840 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u32step as *const _ as usize
841 },
842 72usize,
843 concat!(
844 "Offset of field: ",
845 stringify!(LIBMTP_allowed_values_struct),
846 "::",
847 stringify!(u32step)
848 )
849 );
850 assert_eq!(
851 unsafe {
852 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u32vals as *const _ as usize
853 },
854 80usize,
855 concat!(
856 "Offset of field: ",
857 stringify!(LIBMTP_allowed_values_struct),
858 "::",
859 stringify!(u32vals)
860 )
861 );
862 assert_eq!(
863 unsafe {
864 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i32max as *const _ as usize
865 },
866 88usize,
867 concat!(
868 "Offset of field: ",
869 stringify!(LIBMTP_allowed_values_struct),
870 "::",
871 stringify!(i32max)
872 )
873 );
874 assert_eq!(
875 unsafe {
876 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i32min as *const _ as usize
877 },
878 92usize,
879 concat!(
880 "Offset of field: ",
881 stringify!(LIBMTP_allowed_values_struct),
882 "::",
883 stringify!(i32min)
884 )
885 );
886 assert_eq!(
887 unsafe {
888 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i32step as *const _ as usize
889 },
890 96usize,
891 concat!(
892 "Offset of field: ",
893 stringify!(LIBMTP_allowed_values_struct),
894 "::",
895 stringify!(i32step)
896 )
897 );
898 assert_eq!(
899 unsafe {
900 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i32vals as *const _ as usize
901 },
902 104usize,
903 concat!(
904 "Offset of field: ",
905 stringify!(LIBMTP_allowed_values_struct),
906 "::",
907 stringify!(i32vals)
908 )
909 );
910 assert_eq!(
911 unsafe {
912 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u64max as *const _ as usize
913 },
914 112usize,
915 concat!(
916 "Offset of field: ",
917 stringify!(LIBMTP_allowed_values_struct),
918 "::",
919 stringify!(u64max)
920 )
921 );
922 assert_eq!(
923 unsafe {
924 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u64min as *const _ as usize
925 },
926 120usize,
927 concat!(
928 "Offset of field: ",
929 stringify!(LIBMTP_allowed_values_struct),
930 "::",
931 stringify!(u64min)
932 )
933 );
934 assert_eq!(
935 unsafe {
936 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u64step as *const _ as usize
937 },
938 128usize,
939 concat!(
940 "Offset of field: ",
941 stringify!(LIBMTP_allowed_values_struct),
942 "::",
943 stringify!(u64step)
944 )
945 );
946 assert_eq!(
947 unsafe {
948 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).u64vals as *const _ as usize
949 },
950 136usize,
951 concat!(
952 "Offset of field: ",
953 stringify!(LIBMTP_allowed_values_struct),
954 "::",
955 stringify!(u64vals)
956 )
957 );
958 assert_eq!(
959 unsafe {
960 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i64max as *const _ as usize
961 },
962 144usize,
963 concat!(
964 "Offset of field: ",
965 stringify!(LIBMTP_allowed_values_struct),
966 "::",
967 stringify!(i64max)
968 )
969 );
970 assert_eq!(
971 unsafe {
972 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i64min as *const _ as usize
973 },
974 152usize,
975 concat!(
976 "Offset of field: ",
977 stringify!(LIBMTP_allowed_values_struct),
978 "::",
979 stringify!(i64min)
980 )
981 );
982 assert_eq!(
983 unsafe {
984 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i64step as *const _ as usize
985 },
986 160usize,
987 concat!(
988 "Offset of field: ",
989 stringify!(LIBMTP_allowed_values_struct),
990 "::",
991 stringify!(i64step)
992 )
993 );
994 assert_eq!(
995 unsafe {
996 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).i64vals as *const _ as usize
997 },
998 168usize,
999 concat!(
1000 "Offset of field: ",
1001 stringify!(LIBMTP_allowed_values_struct),
1002 "::",
1003 stringify!(i64vals)
1004 )
1005 );
1006 assert_eq!(
1007 unsafe {
1008 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).num_entries as *const _
1009 as usize
1010 },
1011 176usize,
1012 concat!(
1013 "Offset of field: ",
1014 stringify!(LIBMTP_allowed_values_struct),
1015 "::",
1016 stringify!(num_entries)
1017 )
1018 );
1019 assert_eq!(
1020 unsafe {
1021 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).datatype as *const _ as usize
1022 },
1023 180usize,
1024 concat!(
1025 "Offset of field: ",
1026 stringify!(LIBMTP_allowed_values_struct),
1027 "::",
1028 stringify!(datatype)
1029 )
1030 );
1031 assert_eq!(
1032 unsafe {
1033 &(*(::std::ptr::null::<LIBMTP_allowed_values_struct>())).is_range as *const _ as usize
1034 },
1035 184usize,
1036 concat!(
1037 "Offset of field: ",
1038 stringify!(LIBMTP_allowed_values_struct),
1039 "::",
1040 stringify!(is_range)
1041 )
1042 );
1043}
1044#[doc = " MTP device extension holder struct"]
1045#[repr(C)]
1046#[derive(Debug, Copy, Clone)]
1047pub struct LIBMTP_device_extension_struct {
1048 #[doc = " Name of extension e.g. \"foo.com\""]
1049 pub name: *mut ::std::os::raw::c_char,
1050 #[doc = " Major revision of extension"]
1051 pub major: ::std::os::raw::c_int,
1052 #[doc = " Minor revision of extension"]
1053 pub minor: ::std::os::raw::c_int,
1054 #[doc = " Pointer to the next extension or NULL if this is the"]
1055 #[doc = " last extension."]
1056 pub next: *mut LIBMTP_device_extension_t,
1057}
1058#[test]
1059fn bindgen_test_layout_LIBMTP_device_extension_struct() {
1060 assert_eq!(
1061 ::std::mem::size_of::<LIBMTP_device_extension_struct>(),
1062 24usize,
1063 concat!("Size of: ", stringify!(LIBMTP_device_extension_struct))
1064 );
1065 assert_eq!(
1066 ::std::mem::align_of::<LIBMTP_device_extension_struct>(),
1067 8usize,
1068 concat!("Alignment of ", stringify!(LIBMTP_device_extension_struct))
1069 );
1070 assert_eq!(
1071 unsafe {
1072 &(*(::std::ptr::null::<LIBMTP_device_extension_struct>())).name as *const _ as usize
1073 },
1074 0usize,
1075 concat!(
1076 "Offset of field: ",
1077 stringify!(LIBMTP_device_extension_struct),
1078 "::",
1079 stringify!(name)
1080 )
1081 );
1082 assert_eq!(
1083 unsafe {
1084 &(*(::std::ptr::null::<LIBMTP_device_extension_struct>())).major as *const _ as usize
1085 },
1086 8usize,
1087 concat!(
1088 "Offset of field: ",
1089 stringify!(LIBMTP_device_extension_struct),
1090 "::",
1091 stringify!(major)
1092 )
1093 );
1094 assert_eq!(
1095 unsafe {
1096 &(*(::std::ptr::null::<LIBMTP_device_extension_struct>())).minor as *const _ as usize
1097 },
1098 12usize,
1099 concat!(
1100 "Offset of field: ",
1101 stringify!(LIBMTP_device_extension_struct),
1102 "::",
1103 stringify!(minor)
1104 )
1105 );
1106 assert_eq!(
1107 unsafe {
1108 &(*(::std::ptr::null::<LIBMTP_device_extension_struct>())).next as *const _ as usize
1109 },
1110 16usize,
1111 concat!(
1112 "Offset of field: ",
1113 stringify!(LIBMTP_device_extension_struct),
1114 "::",
1115 stringify!(next)
1116 )
1117 );
1118}
1119#[doc = " Main MTP device object struct"]
1120#[repr(C)]
1121pub struct LIBMTP_mtpdevice_struct {
1122 #[doc = " Object bitsize, typically 32 or 64."]
1123 pub object_bitsize: u8,
1124 #[doc = " Parameters for this device, must be cast into"]
1125 #[doc = " \\c (PTPParams*) before internal use."]
1126 pub params: *mut ::std::os::raw::c_void,
1127 #[doc = " USB device for this device, must be cast into"]
1128 #[doc = " \\c (PTP_USB*) before internal use."]
1129 pub usbinfo: *mut ::std::os::raw::c_void,
1130 #[doc = " The storage for this device, do not use strings in here without"]
1131 #[doc = " copying them first, and beware that this list may be rebuilt at"]
1132 #[doc = " any time."]
1133 #[doc = " @see LIBMTP_Get_Storage()"]
1134 pub storage: *mut LIBMTP_devicestorage_t,
1135 #[doc = " The error stack. This shall be handled using the error getting"]
1136 #[doc = " and clearing functions, not by dereferencing this list."]
1137 pub errorstack: *mut LIBMTP_error_t,
1138 #[doc = " The maximum battery level for this device"]
1139 pub maximum_battery_level: u8,
1140 #[doc = " Default music folder"]
1141 pub default_music_folder: u32,
1142 #[doc = " Default playlist folder"]
1143 pub default_playlist_folder: u32,
1144 #[doc = " Default picture folder"]
1145 pub default_picture_folder: u32,
1146 #[doc = " Default video folder"]
1147 pub default_video_folder: u32,
1148 #[doc = " Default organizer folder"]
1149 pub default_organizer_folder: u32,
1150 #[doc = " Default ZENcast folder (only Creative devices...)"]
1151 pub default_zencast_folder: u32,
1152 #[doc = " Default Album folder"]
1153 pub default_album_folder: u32,
1154 #[doc = " Default Text folder"]
1155 pub default_text_folder: u32,
1156 #[doc = " Per device iconv() converters, only used internally"]
1157 pub cd: *mut ::std::os::raw::c_void,
1158 #[doc = " Extension list"]
1159 pub extensions: *mut LIBMTP_device_extension_t,
1160 #[doc = " Whether the device uses caching, only used internally"]
1161 pub cached: ::std::os::raw::c_int,
1162 #[doc = " Pointer to next device in linked list; NULL if this is the last device"]
1163 pub next: *mut LIBMTP_mtpdevice_t,
1164}
1165#[test]
1166fn bindgen_test_layout_LIBMTP_mtpdevice_struct() {
1167 assert_eq!(
1168 ::std::mem::size_of::<LIBMTP_mtpdevice_struct>(),
1169 112usize,
1170 concat!("Size of: ", stringify!(LIBMTP_mtpdevice_struct))
1171 );
1172 assert_eq!(
1173 ::std::mem::align_of::<LIBMTP_mtpdevice_struct>(),
1174 8usize,
1175 concat!("Alignment of ", stringify!(LIBMTP_mtpdevice_struct))
1176 );
1177 assert_eq!(
1178 unsafe {
1179 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).object_bitsize as *const _ as usize
1180 },
1181 0usize,
1182 concat!(
1183 "Offset of field: ",
1184 stringify!(LIBMTP_mtpdevice_struct),
1185 "::",
1186 stringify!(object_bitsize)
1187 )
1188 );
1189 assert_eq!(
1190 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).params as *const _ as usize },
1191 8usize,
1192 concat!(
1193 "Offset of field: ",
1194 stringify!(LIBMTP_mtpdevice_struct),
1195 "::",
1196 stringify!(params)
1197 )
1198 );
1199 assert_eq!(
1200 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).usbinfo as *const _ as usize },
1201 16usize,
1202 concat!(
1203 "Offset of field: ",
1204 stringify!(LIBMTP_mtpdevice_struct),
1205 "::",
1206 stringify!(usbinfo)
1207 )
1208 );
1209 assert_eq!(
1210 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).storage as *const _ as usize },
1211 24usize,
1212 concat!(
1213 "Offset of field: ",
1214 stringify!(LIBMTP_mtpdevice_struct),
1215 "::",
1216 stringify!(storage)
1217 )
1218 );
1219 assert_eq!(
1220 unsafe {
1221 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).errorstack as *const _ as usize
1222 },
1223 32usize,
1224 concat!(
1225 "Offset of field: ",
1226 stringify!(LIBMTP_mtpdevice_struct),
1227 "::",
1228 stringify!(errorstack)
1229 )
1230 );
1231 assert_eq!(
1232 unsafe {
1233 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).maximum_battery_level as *const _
1234 as usize
1235 },
1236 40usize,
1237 concat!(
1238 "Offset of field: ",
1239 stringify!(LIBMTP_mtpdevice_struct),
1240 "::",
1241 stringify!(maximum_battery_level)
1242 )
1243 );
1244 assert_eq!(
1245 unsafe {
1246 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_music_folder as *const _
1247 as usize
1248 },
1249 44usize,
1250 concat!(
1251 "Offset of field: ",
1252 stringify!(LIBMTP_mtpdevice_struct),
1253 "::",
1254 stringify!(default_music_folder)
1255 )
1256 );
1257 assert_eq!(
1258 unsafe {
1259 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_playlist_folder as *const _
1260 as usize
1261 },
1262 48usize,
1263 concat!(
1264 "Offset of field: ",
1265 stringify!(LIBMTP_mtpdevice_struct),
1266 "::",
1267 stringify!(default_playlist_folder)
1268 )
1269 );
1270 assert_eq!(
1271 unsafe {
1272 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_picture_folder as *const _
1273 as usize
1274 },
1275 52usize,
1276 concat!(
1277 "Offset of field: ",
1278 stringify!(LIBMTP_mtpdevice_struct),
1279 "::",
1280 stringify!(default_picture_folder)
1281 )
1282 );
1283 assert_eq!(
1284 unsafe {
1285 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_video_folder as *const _
1286 as usize
1287 },
1288 56usize,
1289 concat!(
1290 "Offset of field: ",
1291 stringify!(LIBMTP_mtpdevice_struct),
1292 "::",
1293 stringify!(default_video_folder)
1294 )
1295 );
1296 assert_eq!(
1297 unsafe {
1298 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_organizer_folder as *const _
1299 as usize
1300 },
1301 60usize,
1302 concat!(
1303 "Offset of field: ",
1304 stringify!(LIBMTP_mtpdevice_struct),
1305 "::",
1306 stringify!(default_organizer_folder)
1307 )
1308 );
1309 assert_eq!(
1310 unsafe {
1311 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_zencast_folder as *const _
1312 as usize
1313 },
1314 64usize,
1315 concat!(
1316 "Offset of field: ",
1317 stringify!(LIBMTP_mtpdevice_struct),
1318 "::",
1319 stringify!(default_zencast_folder)
1320 )
1321 );
1322 assert_eq!(
1323 unsafe {
1324 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_album_folder as *const _
1325 as usize
1326 },
1327 68usize,
1328 concat!(
1329 "Offset of field: ",
1330 stringify!(LIBMTP_mtpdevice_struct),
1331 "::",
1332 stringify!(default_album_folder)
1333 )
1334 );
1335 assert_eq!(
1336 unsafe {
1337 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).default_text_folder as *const _
1338 as usize
1339 },
1340 72usize,
1341 concat!(
1342 "Offset of field: ",
1343 stringify!(LIBMTP_mtpdevice_struct),
1344 "::",
1345 stringify!(default_text_folder)
1346 )
1347 );
1348 assert_eq!(
1349 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).cd as *const _ as usize },
1350 80usize,
1351 concat!(
1352 "Offset of field: ",
1353 stringify!(LIBMTP_mtpdevice_struct),
1354 "::",
1355 stringify!(cd)
1356 )
1357 );
1358 assert_eq!(
1359 unsafe {
1360 &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).extensions as *const _ as usize
1361 },
1362 88usize,
1363 concat!(
1364 "Offset of field: ",
1365 stringify!(LIBMTP_mtpdevice_struct),
1366 "::",
1367 stringify!(extensions)
1368 )
1369 );
1370 assert_eq!(
1371 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).cached as *const _ as usize },
1372 96usize,
1373 concat!(
1374 "Offset of field: ",
1375 stringify!(LIBMTP_mtpdevice_struct),
1376 "::",
1377 stringify!(cached)
1378 )
1379 );
1380 assert_eq!(
1381 unsafe { &(*(::std::ptr::null::<LIBMTP_mtpdevice_struct>())).next as *const _ as usize },
1382 104usize,
1383 concat!(
1384 "Offset of field: ",
1385 stringify!(LIBMTP_mtpdevice_struct),
1386 "::",
1387 stringify!(next)
1388 )
1389 );
1390}
1391#[doc = " MTP file struct"]
1392#[repr(C)]
1393pub struct LIBMTP_file_struct {
1394 #[doc = "< Unique item ID"]
1395 pub item_id: u32,
1396 #[doc = "< ID of parent folder"]
1397 pub parent_id: u32,
1398 #[doc = "< ID of storage holding this file"]
1399 pub storage_id: u32,
1400 #[doc = "< Filename of this file"]
1401 pub filename: *mut ::std::os::raw::c_char,
1402 #[doc = "< Size of file in bytes"]
1403 pub filesize: u64,
1404 #[doc = "< Date of last alteration of the file"]
1405 pub modificationdate: time_t,
1406 #[doc = "< Filetype used for the current file"]
1407 pub filetype: LIBMTP_filetype_t,
1408 #[doc = "< Next file in list or NULL if last file"]
1409 pub next: *mut LIBMTP_file_t,
1410}
1411#[test]
1412fn bindgen_test_layout_LIBMTP_file_struct() {
1413 assert_eq!(
1414 ::std::mem::size_of::<LIBMTP_file_struct>(),
1415 56usize,
1416 concat!("Size of: ", stringify!(LIBMTP_file_struct))
1417 );
1418 assert_eq!(
1419 ::std::mem::align_of::<LIBMTP_file_struct>(),
1420 8usize,
1421 concat!("Alignment of ", stringify!(LIBMTP_file_struct))
1422 );
1423 assert_eq!(
1424 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).item_id as *const _ as usize },
1425 0usize,
1426 concat!(
1427 "Offset of field: ",
1428 stringify!(LIBMTP_file_struct),
1429 "::",
1430 stringify!(item_id)
1431 )
1432 );
1433 assert_eq!(
1434 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).parent_id as *const _ as usize },
1435 4usize,
1436 concat!(
1437 "Offset of field: ",
1438 stringify!(LIBMTP_file_struct),
1439 "::",
1440 stringify!(parent_id)
1441 )
1442 );
1443 assert_eq!(
1444 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).storage_id as *const _ as usize },
1445 8usize,
1446 concat!(
1447 "Offset of field: ",
1448 stringify!(LIBMTP_file_struct),
1449 "::",
1450 stringify!(storage_id)
1451 )
1452 );
1453 assert_eq!(
1454 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).filename as *const _ as usize },
1455 16usize,
1456 concat!(
1457 "Offset of field: ",
1458 stringify!(LIBMTP_file_struct),
1459 "::",
1460 stringify!(filename)
1461 )
1462 );
1463 assert_eq!(
1464 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).filesize as *const _ as usize },
1465 24usize,
1466 concat!(
1467 "Offset of field: ",
1468 stringify!(LIBMTP_file_struct),
1469 "::",
1470 stringify!(filesize)
1471 )
1472 );
1473 assert_eq!(
1474 unsafe {
1475 &(*(::std::ptr::null::<LIBMTP_file_struct>())).modificationdate as *const _ as usize
1476 },
1477 32usize,
1478 concat!(
1479 "Offset of field: ",
1480 stringify!(LIBMTP_file_struct),
1481 "::",
1482 stringify!(modificationdate)
1483 )
1484 );
1485 assert_eq!(
1486 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).filetype as *const _ as usize },
1487 40usize,
1488 concat!(
1489 "Offset of field: ",
1490 stringify!(LIBMTP_file_struct),
1491 "::",
1492 stringify!(filetype)
1493 )
1494 );
1495 assert_eq!(
1496 unsafe { &(*(::std::ptr::null::<LIBMTP_file_struct>())).next as *const _ as usize },
1497 48usize,
1498 concat!(
1499 "Offset of field: ",
1500 stringify!(LIBMTP_file_struct),
1501 "::",
1502 stringify!(next)
1503 )
1504 );
1505}
1506#[doc = " MTP track struct"]
1507#[repr(C)]
1508pub struct LIBMTP_track_struct {
1509 #[doc = "< Unique item ID"]
1510 pub item_id: u32,
1511 #[doc = "< ID of parent folder"]
1512 pub parent_id: u32,
1513 #[doc = "< ID of storage holding this track"]
1514 pub storage_id: u32,
1515 #[doc = "< Track title"]
1516 pub title: *mut ::std::os::raw::c_char,
1517 #[doc = "< Name of recording artist"]
1518 pub artist: *mut ::std::os::raw::c_char,
1519 #[doc = "< Name of recording composer"]
1520 pub composer: *mut ::std::os::raw::c_char,
1521 #[doc = "< Genre name for track"]
1522 pub genre: *mut ::std::os::raw::c_char,
1523 #[doc = "< Album name for track"]
1524 pub album: *mut ::std::os::raw::c_char,
1525 #[doc = "< Date of original recording as a string"]
1526 pub date: *mut ::std::os::raw::c_char,
1527 #[doc = "< Original filename of this track"]
1528 pub filename: *mut ::std::os::raw::c_char,
1529 #[doc = "< Track number (in sequence on recording)"]
1530 pub tracknumber: u16,
1531 #[doc = "< Duration in milliseconds"]
1532 pub duration: u32,
1533 #[doc = "< Sample rate of original file, min 0x1f80 max 0xbb80"]
1534 pub samplerate: u32,
1535 #[doc = "< Number of channels in this recording 0 = unknown, 1 or 2"]
1536 pub nochannels: u16,
1537 #[doc = "< FourCC wave codec name"]
1538 pub wavecodec: u32,
1539 #[doc = "< (Average) bitrate for this file min=1 max=0x16e360"]
1540 pub bitrate: u32,
1541 #[doc = "< 0 = unused, 1 = constant, 2 = VBR, 3 = free"]
1542 pub bitratetype: u16,
1543 #[doc = "< User rating 0-100 (0x00-0x64)"]
1544 pub rating: u16,
1545 #[doc = "< Number of times used/played"]
1546 pub usecount: u32,
1547 #[doc = "< Size of track file in bytes"]
1548 pub filesize: u64,
1549 #[doc = "< Date of last alteration of the track"]
1550 pub modificationdate: time_t,
1551 #[doc = "< Filetype used for the current track"]
1552 pub filetype: LIBMTP_filetype_t,
1553 #[doc = "< Next track in list or NULL if last track"]
1554 pub next: *mut LIBMTP_track_t,
1555}
1556#[test]
1557fn bindgen_test_layout_LIBMTP_track_struct() {
1558 assert_eq!(
1559 ::std::mem::size_of::<LIBMTP_track_struct>(),
1560 136usize,
1561 concat!("Size of: ", stringify!(LIBMTP_track_struct))
1562 );
1563 assert_eq!(
1564 ::std::mem::align_of::<LIBMTP_track_struct>(),
1565 8usize,
1566 concat!("Alignment of ", stringify!(LIBMTP_track_struct))
1567 );
1568 assert_eq!(
1569 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).item_id as *const _ as usize },
1570 0usize,
1571 concat!(
1572 "Offset of field: ",
1573 stringify!(LIBMTP_track_struct),
1574 "::",
1575 stringify!(item_id)
1576 )
1577 );
1578 assert_eq!(
1579 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).parent_id as *const _ as usize },
1580 4usize,
1581 concat!(
1582 "Offset of field: ",
1583 stringify!(LIBMTP_track_struct),
1584 "::",
1585 stringify!(parent_id)
1586 )
1587 );
1588 assert_eq!(
1589 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).storage_id as *const _ as usize },
1590 8usize,
1591 concat!(
1592 "Offset of field: ",
1593 stringify!(LIBMTP_track_struct),
1594 "::",
1595 stringify!(storage_id)
1596 )
1597 );
1598 assert_eq!(
1599 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).title as *const _ as usize },
1600 16usize,
1601 concat!(
1602 "Offset of field: ",
1603 stringify!(LIBMTP_track_struct),
1604 "::",
1605 stringify!(title)
1606 )
1607 );
1608 assert_eq!(
1609 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).artist as *const _ as usize },
1610 24usize,
1611 concat!(
1612 "Offset of field: ",
1613 stringify!(LIBMTP_track_struct),
1614 "::",
1615 stringify!(artist)
1616 )
1617 );
1618 assert_eq!(
1619 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).composer as *const _ as usize },
1620 32usize,
1621 concat!(
1622 "Offset of field: ",
1623 stringify!(LIBMTP_track_struct),
1624 "::",
1625 stringify!(composer)
1626 )
1627 );
1628 assert_eq!(
1629 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).genre as *const _ as usize },
1630 40usize,
1631 concat!(
1632 "Offset of field: ",
1633 stringify!(LIBMTP_track_struct),
1634 "::",
1635 stringify!(genre)
1636 )
1637 );
1638 assert_eq!(
1639 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).album as *const _ as usize },
1640 48usize,
1641 concat!(
1642 "Offset of field: ",
1643 stringify!(LIBMTP_track_struct),
1644 "::",
1645 stringify!(album)
1646 )
1647 );
1648 assert_eq!(
1649 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).date as *const _ as usize },
1650 56usize,
1651 concat!(
1652 "Offset of field: ",
1653 stringify!(LIBMTP_track_struct),
1654 "::",
1655 stringify!(date)
1656 )
1657 );
1658 assert_eq!(
1659 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).filename as *const _ as usize },
1660 64usize,
1661 concat!(
1662 "Offset of field: ",
1663 stringify!(LIBMTP_track_struct),
1664 "::",
1665 stringify!(filename)
1666 )
1667 );
1668 assert_eq!(
1669 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).tracknumber as *const _ as usize },
1670 72usize,
1671 concat!(
1672 "Offset of field: ",
1673 stringify!(LIBMTP_track_struct),
1674 "::",
1675 stringify!(tracknumber)
1676 )
1677 );
1678 assert_eq!(
1679 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).duration as *const _ as usize },
1680 76usize,
1681 concat!(
1682 "Offset of field: ",
1683 stringify!(LIBMTP_track_struct),
1684 "::",
1685 stringify!(duration)
1686 )
1687 );
1688 assert_eq!(
1689 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).samplerate as *const _ as usize },
1690 80usize,
1691 concat!(
1692 "Offset of field: ",
1693 stringify!(LIBMTP_track_struct),
1694 "::",
1695 stringify!(samplerate)
1696 )
1697 );
1698 assert_eq!(
1699 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).nochannels as *const _ as usize },
1700 84usize,
1701 concat!(
1702 "Offset of field: ",
1703 stringify!(LIBMTP_track_struct),
1704 "::",
1705 stringify!(nochannels)
1706 )
1707 );
1708 assert_eq!(
1709 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).wavecodec as *const _ as usize },
1710 88usize,
1711 concat!(
1712 "Offset of field: ",
1713 stringify!(LIBMTP_track_struct),
1714 "::",
1715 stringify!(wavecodec)
1716 )
1717 );
1718 assert_eq!(
1719 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).bitrate as *const _ as usize },
1720 92usize,
1721 concat!(
1722 "Offset of field: ",
1723 stringify!(LIBMTP_track_struct),
1724 "::",
1725 stringify!(bitrate)
1726 )
1727 );
1728 assert_eq!(
1729 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).bitratetype as *const _ as usize },
1730 96usize,
1731 concat!(
1732 "Offset of field: ",
1733 stringify!(LIBMTP_track_struct),
1734 "::",
1735 stringify!(bitratetype)
1736 )
1737 );
1738 assert_eq!(
1739 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).rating as *const _ as usize },
1740 98usize,
1741 concat!(
1742 "Offset of field: ",
1743 stringify!(LIBMTP_track_struct),
1744 "::",
1745 stringify!(rating)
1746 )
1747 );
1748 assert_eq!(
1749 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).usecount as *const _ as usize },
1750 100usize,
1751 concat!(
1752 "Offset of field: ",
1753 stringify!(LIBMTP_track_struct),
1754 "::",
1755 stringify!(usecount)
1756 )
1757 );
1758 assert_eq!(
1759 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).filesize as *const _ as usize },
1760 104usize,
1761 concat!(
1762 "Offset of field: ",
1763 stringify!(LIBMTP_track_struct),
1764 "::",
1765 stringify!(filesize)
1766 )
1767 );
1768 assert_eq!(
1769 unsafe {
1770 &(*(::std::ptr::null::<LIBMTP_track_struct>())).modificationdate as *const _ as usize
1771 },
1772 112usize,
1773 concat!(
1774 "Offset of field: ",
1775 stringify!(LIBMTP_track_struct),
1776 "::",
1777 stringify!(modificationdate)
1778 )
1779 );
1780 assert_eq!(
1781 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).filetype as *const _ as usize },
1782 120usize,
1783 concat!(
1784 "Offset of field: ",
1785 stringify!(LIBMTP_track_struct),
1786 "::",
1787 stringify!(filetype)
1788 )
1789 );
1790 assert_eq!(
1791 unsafe { &(*(::std::ptr::null::<LIBMTP_track_struct>())).next as *const _ as usize },
1792 128usize,
1793 concat!(
1794 "Offset of field: ",
1795 stringify!(LIBMTP_track_struct),
1796 "::",
1797 stringify!(next)
1798 )
1799 );
1800}
1801#[doc = " MTP Playlist structure"]
1802#[repr(C)]
1803pub struct LIBMTP_playlist_struct {
1804 #[doc = "< Unique playlist ID"]
1805 pub playlist_id: u32,
1806 #[doc = "< ID of parent folder"]
1807 pub parent_id: u32,
1808 #[doc = "< ID of storage holding this playlist"]
1809 pub storage_id: u32,
1810 #[doc = "< Name of playlist"]
1811 pub name: *mut ::std::os::raw::c_char,
1812 #[doc = "< The tracks in this playlist"]
1813 pub tracks: *mut u32,
1814 #[doc = "< The number of tracks in this playlist"]
1815 pub no_tracks: u32,
1816 #[doc = "< Next playlist or NULL if last playlist"]
1817 pub next: *mut LIBMTP_playlist_t,
1818}
1819#[test]
1820fn bindgen_test_layout_LIBMTP_playlist_struct() {
1821 assert_eq!(
1822 ::std::mem::size_of::<LIBMTP_playlist_struct>(),
1823 48usize,
1824 concat!("Size of: ", stringify!(LIBMTP_playlist_struct))
1825 );
1826 assert_eq!(
1827 ::std::mem::align_of::<LIBMTP_playlist_struct>(),
1828 8usize,
1829 concat!("Alignment of ", stringify!(LIBMTP_playlist_struct))
1830 );
1831 assert_eq!(
1832 unsafe {
1833 &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).playlist_id as *const _ as usize
1834 },
1835 0usize,
1836 concat!(
1837 "Offset of field: ",
1838 stringify!(LIBMTP_playlist_struct),
1839 "::",
1840 stringify!(playlist_id)
1841 )
1842 );
1843 assert_eq!(
1844 unsafe {
1845 &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).parent_id as *const _ as usize
1846 },
1847 4usize,
1848 concat!(
1849 "Offset of field: ",
1850 stringify!(LIBMTP_playlist_struct),
1851 "::",
1852 stringify!(parent_id)
1853 )
1854 );
1855 assert_eq!(
1856 unsafe {
1857 &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).storage_id as *const _ as usize
1858 },
1859 8usize,
1860 concat!(
1861 "Offset of field: ",
1862 stringify!(LIBMTP_playlist_struct),
1863 "::",
1864 stringify!(storage_id)
1865 )
1866 );
1867 assert_eq!(
1868 unsafe { &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).name as *const _ as usize },
1869 16usize,
1870 concat!(
1871 "Offset of field: ",
1872 stringify!(LIBMTP_playlist_struct),
1873 "::",
1874 stringify!(name)
1875 )
1876 );
1877 assert_eq!(
1878 unsafe { &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).tracks as *const _ as usize },
1879 24usize,
1880 concat!(
1881 "Offset of field: ",
1882 stringify!(LIBMTP_playlist_struct),
1883 "::",
1884 stringify!(tracks)
1885 )
1886 );
1887 assert_eq!(
1888 unsafe {
1889 &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).no_tracks as *const _ as usize
1890 },
1891 32usize,
1892 concat!(
1893 "Offset of field: ",
1894 stringify!(LIBMTP_playlist_struct),
1895 "::",
1896 stringify!(no_tracks)
1897 )
1898 );
1899 assert_eq!(
1900 unsafe { &(*(::std::ptr::null::<LIBMTP_playlist_struct>())).next as *const _ as usize },
1901 40usize,
1902 concat!(
1903 "Offset of field: ",
1904 stringify!(LIBMTP_playlist_struct),
1905 "::",
1906 stringify!(next)
1907 )
1908 );
1909}
1910#[doc = " MTP Album structure"]
1911#[repr(C)]
1912pub struct LIBMTP_album_struct {
1913 #[doc = "< Unique playlist ID"]
1914 pub album_id: u32,
1915 #[doc = "< ID of parent folder"]
1916 pub parent_id: u32,
1917 #[doc = "< ID of storage holding this album"]
1918 pub storage_id: u32,
1919 #[doc = "< Name of album"]
1920 pub name: *mut ::std::os::raw::c_char,
1921 #[doc = "< Name of album artist"]
1922 pub artist: *mut ::std::os::raw::c_char,
1923 #[doc = "< Name of recording composer"]
1924 pub composer: *mut ::std::os::raw::c_char,
1925 #[doc = "< Genre of album"]
1926 pub genre: *mut ::std::os::raw::c_char,
1927 #[doc = "< The tracks in this album"]
1928 pub tracks: *mut u32,
1929 #[doc = "< The number of tracks in this album"]
1930 pub no_tracks: u32,
1931 #[doc = "< Next album or NULL if last album"]
1932 pub next: *mut LIBMTP_album_t,
1933}
1934#[test]
1935fn bindgen_test_layout_LIBMTP_album_struct() {
1936 assert_eq!(
1937 ::std::mem::size_of::<LIBMTP_album_struct>(),
1938 72usize,
1939 concat!("Size of: ", stringify!(LIBMTP_album_struct))
1940 );
1941 assert_eq!(
1942 ::std::mem::align_of::<LIBMTP_album_struct>(),
1943 8usize,
1944 concat!("Alignment of ", stringify!(LIBMTP_album_struct))
1945 );
1946 assert_eq!(
1947 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).album_id as *const _ as usize },
1948 0usize,
1949 concat!(
1950 "Offset of field: ",
1951 stringify!(LIBMTP_album_struct),
1952 "::",
1953 stringify!(album_id)
1954 )
1955 );
1956 assert_eq!(
1957 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).parent_id as *const _ as usize },
1958 4usize,
1959 concat!(
1960 "Offset of field: ",
1961 stringify!(LIBMTP_album_struct),
1962 "::",
1963 stringify!(parent_id)
1964 )
1965 );
1966 assert_eq!(
1967 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).storage_id as *const _ as usize },
1968 8usize,
1969 concat!(
1970 "Offset of field: ",
1971 stringify!(LIBMTP_album_struct),
1972 "::",
1973 stringify!(storage_id)
1974 )
1975 );
1976 assert_eq!(
1977 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).name as *const _ as usize },
1978 16usize,
1979 concat!(
1980 "Offset of field: ",
1981 stringify!(LIBMTP_album_struct),
1982 "::",
1983 stringify!(name)
1984 )
1985 );
1986 assert_eq!(
1987 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).artist as *const _ as usize },
1988 24usize,
1989 concat!(
1990 "Offset of field: ",
1991 stringify!(LIBMTP_album_struct),
1992 "::",
1993 stringify!(artist)
1994 )
1995 );
1996 assert_eq!(
1997 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).composer as *const _ as usize },
1998 32usize,
1999 concat!(
2000 "Offset of field: ",
2001 stringify!(LIBMTP_album_struct),
2002 "::",
2003 stringify!(composer)
2004 )
2005 );
2006 assert_eq!(
2007 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).genre as *const _ as usize },
2008 40usize,
2009 concat!(
2010 "Offset of field: ",
2011 stringify!(LIBMTP_album_struct),
2012 "::",
2013 stringify!(genre)
2014 )
2015 );
2016 assert_eq!(
2017 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).tracks as *const _ as usize },
2018 48usize,
2019 concat!(
2020 "Offset of field: ",
2021 stringify!(LIBMTP_album_struct),
2022 "::",
2023 stringify!(tracks)
2024 )
2025 );
2026 assert_eq!(
2027 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).no_tracks as *const _ as usize },
2028 56usize,
2029 concat!(
2030 "Offset of field: ",
2031 stringify!(LIBMTP_album_struct),
2032 "::",
2033 stringify!(no_tracks)
2034 )
2035 );
2036 assert_eq!(
2037 unsafe { &(*(::std::ptr::null::<LIBMTP_album_struct>())).next as *const _ as usize },
2038 64usize,
2039 concat!(
2040 "Offset of field: ",
2041 stringify!(LIBMTP_album_struct),
2042 "::",
2043 stringify!(next)
2044 )
2045 );
2046}
2047#[doc = " MTP Folder structure"]
2048#[repr(C)]
2049pub struct LIBMTP_folder_struct {
2050 #[doc = "< Unique folder ID"]
2051 pub folder_id: u32,
2052 #[doc = "< ID of parent folder"]
2053 pub parent_id: u32,
2054 #[doc = "< ID of storage holding this folder"]
2055 pub storage_id: u32,
2056 #[doc = "< Name of folder"]
2057 pub name: *mut ::std::os::raw::c_char,
2058 #[doc = "< Next folder at same level or NULL if no more"]
2059 pub sibling: *mut LIBMTP_folder_t,
2060 #[doc = "< Child folder or NULL if no children"]
2061 pub child: *mut LIBMTP_folder_t,
2062}
2063#[test]
2064fn bindgen_test_layout_LIBMTP_folder_struct() {
2065 assert_eq!(
2066 ::std::mem::size_of::<LIBMTP_folder_struct>(),
2067 40usize,
2068 concat!("Size of: ", stringify!(LIBMTP_folder_struct))
2069 );
2070 assert_eq!(
2071 ::std::mem::align_of::<LIBMTP_folder_struct>(),
2072 8usize,
2073 concat!("Alignment of ", stringify!(LIBMTP_folder_struct))
2074 );
2075 assert_eq!(
2076 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).folder_id as *const _ as usize },
2077 0usize,
2078 concat!(
2079 "Offset of field: ",
2080 stringify!(LIBMTP_folder_struct),
2081 "::",
2082 stringify!(folder_id)
2083 )
2084 );
2085 assert_eq!(
2086 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).parent_id as *const _ as usize },
2087 4usize,
2088 concat!(
2089 "Offset of field: ",
2090 stringify!(LIBMTP_folder_struct),
2091 "::",
2092 stringify!(parent_id)
2093 )
2094 );
2095 assert_eq!(
2096 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).storage_id as *const _ as usize },
2097 8usize,
2098 concat!(
2099 "Offset of field: ",
2100 stringify!(LIBMTP_folder_struct),
2101 "::",
2102 stringify!(storage_id)
2103 )
2104 );
2105 assert_eq!(
2106 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).name as *const _ as usize },
2107 16usize,
2108 concat!(
2109 "Offset of field: ",
2110 stringify!(LIBMTP_folder_struct),
2111 "::",
2112 stringify!(name)
2113 )
2114 );
2115 assert_eq!(
2116 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).sibling as *const _ as usize },
2117 24usize,
2118 concat!(
2119 "Offset of field: ",
2120 stringify!(LIBMTP_folder_struct),
2121 "::",
2122 stringify!(sibling)
2123 )
2124 );
2125 assert_eq!(
2126 unsafe { &(*(::std::ptr::null::<LIBMTP_folder_struct>())).child as *const _ as usize },
2127 32usize,
2128 concat!(
2129 "Offset of field: ",
2130 stringify!(LIBMTP_folder_struct),
2131 "::",
2132 stringify!(child)
2133 )
2134 );
2135}
2136#[doc = " LIBMTP Object RepresentativeSampleData Structure"]
2137#[repr(C)]
2138pub struct LIBMTP_filesampledata_struct {
2139 #[doc = "< Width of sample if it is an image"]
2140 pub width: u32,
2141 #[doc = "< Height of sample if it is an image"]
2142 pub height: u32,
2143 #[doc = "< Duration in milliseconds if it is audio"]
2144 pub duration: u32,
2145 #[doc = "< Filetype used for the sample"]
2146 pub filetype: LIBMTP_filetype_t,
2147 #[doc = "< Size of sample data in bytes"]
2148 pub size: u64,
2149 #[doc = "< Sample data"]
2150 pub data: *mut ::std::os::raw::c_char,
2151}
2152#[test]
2153fn bindgen_test_layout_LIBMTP_filesampledata_struct() {
2154 assert_eq!(
2155 ::std::mem::size_of::<LIBMTP_filesampledata_struct>(),
2156 32usize,
2157 concat!("Size of: ", stringify!(LIBMTP_filesampledata_struct))
2158 );
2159 assert_eq!(
2160 ::std::mem::align_of::<LIBMTP_filesampledata_struct>(),
2161 8usize,
2162 concat!("Alignment of ", stringify!(LIBMTP_filesampledata_struct))
2163 );
2164 assert_eq!(
2165 unsafe {
2166 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).width as *const _ as usize
2167 },
2168 0usize,
2169 concat!(
2170 "Offset of field: ",
2171 stringify!(LIBMTP_filesampledata_struct),
2172 "::",
2173 stringify!(width)
2174 )
2175 );
2176 assert_eq!(
2177 unsafe {
2178 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).height as *const _ as usize
2179 },
2180 4usize,
2181 concat!(
2182 "Offset of field: ",
2183 stringify!(LIBMTP_filesampledata_struct),
2184 "::",
2185 stringify!(height)
2186 )
2187 );
2188 assert_eq!(
2189 unsafe {
2190 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).duration as *const _ as usize
2191 },
2192 8usize,
2193 concat!(
2194 "Offset of field: ",
2195 stringify!(LIBMTP_filesampledata_struct),
2196 "::",
2197 stringify!(duration)
2198 )
2199 );
2200 assert_eq!(
2201 unsafe {
2202 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).filetype as *const _ as usize
2203 },
2204 12usize,
2205 concat!(
2206 "Offset of field: ",
2207 stringify!(LIBMTP_filesampledata_struct),
2208 "::",
2209 stringify!(filetype)
2210 )
2211 );
2212 assert_eq!(
2213 unsafe {
2214 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).size as *const _ as usize
2215 },
2216 16usize,
2217 concat!(
2218 "Offset of field: ",
2219 stringify!(LIBMTP_filesampledata_struct),
2220 "::",
2221 stringify!(size)
2222 )
2223 );
2224 assert_eq!(
2225 unsafe {
2226 &(*(::std::ptr::null::<LIBMTP_filesampledata_struct>())).data as *const _ as usize
2227 },
2228 24usize,
2229 concat!(
2230 "Offset of field: ",
2231 stringify!(LIBMTP_filesampledata_struct),
2232 "::",
2233 stringify!(data)
2234 )
2235 );
2236}
2237#[doc = " LIBMTP Device Storage structure"]
2238#[repr(C)]
2239pub struct LIBMTP_devicestorage_struct {
2240 #[doc = "< Unique ID for this storage"]
2241 pub id: u32,
2242 #[doc = "< Storage type"]
2243 pub StorageType: u16,
2244 #[doc = "< Filesystem type"]
2245 pub FilesystemType: u16,
2246 #[doc = "< Access capability"]
2247 pub AccessCapability: u16,
2248 #[doc = "< Maximum capability"]
2249 pub MaxCapacity: u64,
2250 #[doc = "< Free space in bytes"]
2251 pub FreeSpaceInBytes: u64,
2252 #[doc = "< Free space in objects"]
2253 pub FreeSpaceInObjects: u64,
2254 #[doc = "< A brief description of this storage"]
2255 pub StorageDescription: *mut ::std::os::raw::c_char,
2256 #[doc = "< A volume identifier"]
2257 pub VolumeIdentifier: *mut ::std::os::raw::c_char,
2258 #[doc = "< Next storage, follow this link until NULL"]
2259 pub next: *mut LIBMTP_devicestorage_t,
2260 #[doc = "< Previous storage"]
2261 pub prev: *mut LIBMTP_devicestorage_t,
2262}
2263#[test]
2264fn bindgen_test_layout_LIBMTP_devicestorage_struct() {
2265 assert_eq!(
2266 ::std::mem::size_of::<LIBMTP_devicestorage_struct>(),
2267 72usize,
2268 concat!("Size of: ", stringify!(LIBMTP_devicestorage_struct))
2269 );
2270 assert_eq!(
2271 ::std::mem::align_of::<LIBMTP_devicestorage_struct>(),
2272 8usize,
2273 concat!("Alignment of ", stringify!(LIBMTP_devicestorage_struct))
2274 );
2275 assert_eq!(
2276 unsafe { &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).id as *const _ as usize },
2277 0usize,
2278 concat!(
2279 "Offset of field: ",
2280 stringify!(LIBMTP_devicestorage_struct),
2281 "::",
2282 stringify!(id)
2283 )
2284 );
2285 assert_eq!(
2286 unsafe {
2287 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).StorageType as *const _ as usize
2288 },
2289 4usize,
2290 concat!(
2291 "Offset of field: ",
2292 stringify!(LIBMTP_devicestorage_struct),
2293 "::",
2294 stringify!(StorageType)
2295 )
2296 );
2297 assert_eq!(
2298 unsafe {
2299 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).FilesystemType as *const _
2300 as usize
2301 },
2302 6usize,
2303 concat!(
2304 "Offset of field: ",
2305 stringify!(LIBMTP_devicestorage_struct),
2306 "::",
2307 stringify!(FilesystemType)
2308 )
2309 );
2310 assert_eq!(
2311 unsafe {
2312 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).AccessCapability as *const _
2313 as usize
2314 },
2315 8usize,
2316 concat!(
2317 "Offset of field: ",
2318 stringify!(LIBMTP_devicestorage_struct),
2319 "::",
2320 stringify!(AccessCapability)
2321 )
2322 );
2323 assert_eq!(
2324 unsafe {
2325 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).MaxCapacity as *const _ as usize
2326 },
2327 16usize,
2328 concat!(
2329 "Offset of field: ",
2330 stringify!(LIBMTP_devicestorage_struct),
2331 "::",
2332 stringify!(MaxCapacity)
2333 )
2334 );
2335 assert_eq!(
2336 unsafe {
2337 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).FreeSpaceInBytes as *const _
2338 as usize
2339 },
2340 24usize,
2341 concat!(
2342 "Offset of field: ",
2343 stringify!(LIBMTP_devicestorage_struct),
2344 "::",
2345 stringify!(FreeSpaceInBytes)
2346 )
2347 );
2348 assert_eq!(
2349 unsafe {
2350 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).FreeSpaceInObjects as *const _
2351 as usize
2352 },
2353 32usize,
2354 concat!(
2355 "Offset of field: ",
2356 stringify!(LIBMTP_devicestorage_struct),
2357 "::",
2358 stringify!(FreeSpaceInObjects)
2359 )
2360 );
2361 assert_eq!(
2362 unsafe {
2363 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).StorageDescription as *const _
2364 as usize
2365 },
2366 40usize,
2367 concat!(
2368 "Offset of field: ",
2369 stringify!(LIBMTP_devicestorage_struct),
2370 "::",
2371 stringify!(StorageDescription)
2372 )
2373 );
2374 assert_eq!(
2375 unsafe {
2376 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).VolumeIdentifier as *const _
2377 as usize
2378 },
2379 48usize,
2380 concat!(
2381 "Offset of field: ",
2382 stringify!(LIBMTP_devicestorage_struct),
2383 "::",
2384 stringify!(VolumeIdentifier)
2385 )
2386 );
2387 assert_eq!(
2388 unsafe {
2389 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).next as *const _ as usize
2390 },
2391 56usize,
2392 concat!(
2393 "Offset of field: ",
2394 stringify!(LIBMTP_devicestorage_struct),
2395 "::",
2396 stringify!(next)
2397 )
2398 );
2399 assert_eq!(
2400 unsafe {
2401 &(*(::std::ptr::null::<LIBMTP_devicestorage_struct>())).prev as *const _ as usize
2402 },
2403 64usize,
2404 concat!(
2405 "Offset of field: ",
2406 stringify!(LIBMTP_devicestorage_struct),
2407 "::",
2408 stringify!(prev)
2409 )
2410 );
2411}
2412pub const LIBMTP_event_enum_LIBMTP_EVENT_NONE: LIBMTP_event_enum = 0;
2413pub const LIBMTP_event_enum_LIBMTP_EVENT_STORE_ADDED: LIBMTP_event_enum = 1;
2414pub const LIBMTP_event_enum_LIBMTP_EVENT_STORE_REMOVED: LIBMTP_event_enum = 2;
2415pub const LIBMTP_event_enum_LIBMTP_EVENT_OBJECT_ADDED: LIBMTP_event_enum = 3;
2416pub const LIBMTP_event_enum_LIBMTP_EVENT_OBJECT_REMOVED: LIBMTP_event_enum = 4;
2417pub const LIBMTP_event_enum_LIBMTP_EVENT_DEVICE_PROPERTY_CHANGED: LIBMTP_event_enum = 5;
2418#[doc = " LIBMTP Event structure"]
2419#[doc = " TODO: add all externally visible events here"]
2420pub type LIBMTP_event_enum = ::std::os::raw::c_uint;
2421pub use self::LIBMTP_event_enum as LIBMTP_event_t;
2422extern "C" {
2423 pub static mut LIBMTP_debug: ::std::os::raw::c_int;
2424}
2425extern "C" {
2426 #[doc = " @defgroup internals The libmtp internals API."]
2427 #[doc = " @{"]
2428 pub fn LIBMTP_Set_Debug(arg1: ::std::os::raw::c_int);
2429}
2430extern "C" {
2431 pub fn LIBMTP_Init();
2432}
2433extern "C" {
2434 pub fn LIBMTP_Get_Supported_Devices_List(
2435 arg1: *mut *mut LIBMTP_device_entry_t,
2436 arg2: *mut ::std::os::raw::c_int,
2437 ) -> ::std::os::raw::c_int;
2438}
2439extern "C" {
2440 #[doc = " @}"]
2441 #[doc = " @defgroup basic The basic device management API."]
2442 #[doc = " @{"]
2443 pub fn LIBMTP_Detect_Raw_Devices(
2444 arg1: *mut *mut LIBMTP_raw_device_t,
2445 arg2: *mut ::std::os::raw::c_int,
2446 ) -> LIBMTP_error_number_t;
2447}
2448extern "C" {
2449 pub fn LIBMTP_Check_Specific_Device(
2450 busno: ::std::os::raw::c_int,
2451 devno: ::std::os::raw::c_int,
2452 ) -> ::std::os::raw::c_int;
2453}
2454extern "C" {
2455 pub fn LIBMTP_Open_Raw_Device(arg1: *mut LIBMTP_raw_device_t) -> *mut LIBMTP_mtpdevice_t;
2456}
2457extern "C" {
2458 pub fn LIBMTP_Open_Raw_Device_Uncached(
2459 arg1: *mut LIBMTP_raw_device_t,
2460 ) -> *mut LIBMTP_mtpdevice_t;
2461}
2462extern "C" {
2463 pub fn LIBMTP_Get_First_Device() -> *mut LIBMTP_mtpdevice_t;
2464}
2465extern "C" {
2466 pub fn LIBMTP_Get_Connected_Devices(
2467 arg1: *mut *mut LIBMTP_mtpdevice_t,
2468 ) -> LIBMTP_error_number_t;
2469}
2470extern "C" {
2471 pub fn LIBMTP_Number_Devices_In_List(arg1: *mut LIBMTP_mtpdevice_t) -> u32;
2472}
2473extern "C" {
2474 pub fn LIBMTP_Release_Device_List(arg1: *mut LIBMTP_mtpdevice_t);
2475}
2476extern "C" {
2477 pub fn LIBMTP_Release_Device(arg1: *mut LIBMTP_mtpdevice_t);
2478}
2479extern "C" {
2480 pub fn LIBMTP_Dump_Device_Info(arg1: *mut LIBMTP_mtpdevice_t);
2481}
2482extern "C" {
2483 pub fn LIBMTP_Reset_Device(arg1: *mut LIBMTP_mtpdevice_t) -> ::std::os::raw::c_int;
2484}
2485extern "C" {
2486 pub fn LIBMTP_Get_Manufacturername(
2487 arg1: *mut LIBMTP_mtpdevice_t,
2488 ) -> *mut ::std::os::raw::c_char;
2489}
2490extern "C" {
2491 pub fn LIBMTP_Get_Modelname(arg1: *mut LIBMTP_mtpdevice_t) -> *mut ::std::os::raw::c_char;
2492}
2493extern "C" {
2494 pub fn LIBMTP_Get_Serialnumber(arg1: *mut LIBMTP_mtpdevice_t) -> *mut ::std::os::raw::c_char;
2495}
2496extern "C" {
2497 pub fn LIBMTP_Get_Deviceversion(arg1: *mut LIBMTP_mtpdevice_t) -> *mut ::std::os::raw::c_char;
2498}
2499extern "C" {
2500 pub fn LIBMTP_Get_Friendlyname(arg1: *mut LIBMTP_mtpdevice_t) -> *mut ::std::os::raw::c_char;
2501}
2502extern "C" {
2503 pub fn LIBMTP_Set_Friendlyname(
2504 arg1: *mut LIBMTP_mtpdevice_t,
2505 arg2: *const ::std::os::raw::c_char,
2506 ) -> ::std::os::raw::c_int;
2507}
2508extern "C" {
2509 pub fn LIBMTP_Get_Syncpartner(arg1: *mut LIBMTP_mtpdevice_t) -> *mut ::std::os::raw::c_char;
2510}
2511extern "C" {
2512 pub fn LIBMTP_Set_Syncpartner(
2513 arg1: *mut LIBMTP_mtpdevice_t,
2514 arg2: *const ::std::os::raw::c_char,
2515 ) -> ::std::os::raw::c_int;
2516}
2517extern "C" {
2518 pub fn LIBMTP_Get_Batterylevel(
2519 arg1: *mut LIBMTP_mtpdevice_t,
2520 arg2: *mut u8,
2521 arg3: *mut u8,
2522 ) -> ::std::os::raw::c_int;
2523}
2524extern "C" {
2525 pub fn LIBMTP_Get_Secure_Time(
2526 arg1: *mut LIBMTP_mtpdevice_t,
2527 arg2: *mut *mut ::std::os::raw::c_char,
2528 ) -> ::std::os::raw::c_int;
2529}
2530extern "C" {
2531 pub fn LIBMTP_Get_Device_Certificate(
2532 arg1: *mut LIBMTP_mtpdevice_t,
2533 arg2: *mut *mut ::std::os::raw::c_char,
2534 ) -> ::std::os::raw::c_int;
2535}
2536extern "C" {
2537 pub fn LIBMTP_Get_Supported_Filetypes(
2538 arg1: *mut LIBMTP_mtpdevice_t,
2539 arg2: *mut *mut u16,
2540 arg3: *mut u16,
2541 ) -> ::std::os::raw::c_int;
2542}
2543extern "C" {
2544 pub fn LIBMTP_Check_Capability(
2545 arg1: *mut LIBMTP_mtpdevice_t,
2546 arg2: LIBMTP_devicecap_t,
2547 ) -> ::std::os::raw::c_int;
2548}
2549extern "C" {
2550 pub fn LIBMTP_Get_Errorstack(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_error_t;
2551}
2552extern "C" {
2553 pub fn LIBMTP_Clear_Errorstack(arg1: *mut LIBMTP_mtpdevice_t);
2554}
2555extern "C" {
2556 pub fn LIBMTP_Dump_Errorstack(arg1: *mut LIBMTP_mtpdevice_t);
2557}
2558extern "C" {
2559 pub fn LIBMTP_Get_Storage(
2560 arg1: *mut LIBMTP_mtpdevice_t,
2561 arg2: ::std::os::raw::c_int,
2562 ) -> ::std::os::raw::c_int;
2563}
2564extern "C" {
2565 pub fn LIBMTP_Format_Storage(
2566 arg1: *mut LIBMTP_mtpdevice_t,
2567 arg2: *mut LIBMTP_devicestorage_t,
2568 ) -> ::std::os::raw::c_int;
2569}
2570extern "C" {
2571 #[doc = " Get/set arbitrary properties. These do not update the cache; should only be used on"]
2572 #[doc = " properties not stored in structs"]
2573 pub fn LIBMTP_Get_String_From_Object(
2574 arg1: *mut LIBMTP_mtpdevice_t,
2575 arg2: u32,
2576 arg3: LIBMTP_property_t,
2577 ) -> *mut ::std::os::raw::c_char;
2578}
2579extern "C" {
2580 pub fn LIBMTP_Get_u64_From_Object(
2581 arg1: *mut LIBMTP_mtpdevice_t,
2582 arg2: u32,
2583 arg3: LIBMTP_property_t,
2584 arg4: u64,
2585 ) -> u64;
2586}
2587extern "C" {
2588 pub fn LIBMTP_Get_u32_From_Object(
2589 arg1: *mut LIBMTP_mtpdevice_t,
2590 arg2: u32,
2591 arg3: LIBMTP_property_t,
2592 arg4: u32,
2593 ) -> u32;
2594}
2595extern "C" {
2596 pub fn LIBMTP_Get_u16_From_Object(
2597 arg1: *mut LIBMTP_mtpdevice_t,
2598 arg2: u32,
2599 arg3: LIBMTP_property_t,
2600 arg4: u16,
2601 ) -> u16;
2602}
2603extern "C" {
2604 pub fn LIBMTP_Get_u8_From_Object(
2605 arg1: *mut LIBMTP_mtpdevice_t,
2606 arg2: u32,
2607 arg3: LIBMTP_property_t,
2608 arg4: u8,
2609 ) -> u8;
2610}
2611extern "C" {
2612 pub fn LIBMTP_Set_Object_String(
2613 arg1: *mut LIBMTP_mtpdevice_t,
2614 arg2: u32,
2615 arg3: LIBMTP_property_t,
2616 arg4: *const ::std::os::raw::c_char,
2617 ) -> ::std::os::raw::c_int;
2618}
2619extern "C" {
2620 pub fn LIBMTP_Set_Object_u32(
2621 arg1: *mut LIBMTP_mtpdevice_t,
2622 arg2: u32,
2623 arg3: LIBMTP_property_t,
2624 arg4: u32,
2625 ) -> ::std::os::raw::c_int;
2626}
2627extern "C" {
2628 pub fn LIBMTP_Set_Object_u16(
2629 arg1: *mut LIBMTP_mtpdevice_t,
2630 arg2: u32,
2631 arg3: LIBMTP_property_t,
2632 arg4: u16,
2633 ) -> ::std::os::raw::c_int;
2634}
2635extern "C" {
2636 pub fn LIBMTP_Set_Object_u8(
2637 arg1: *mut LIBMTP_mtpdevice_t,
2638 arg2: u32,
2639 arg3: LIBMTP_property_t,
2640 arg4: u8,
2641 ) -> ::std::os::raw::c_int;
2642}
2643extern "C" {
2644 pub fn LIBMTP_Get_Property_Description(
2645 inproperty: LIBMTP_property_t,
2646 ) -> *const ::std::os::raw::c_char;
2647}
2648extern "C" {
2649 pub fn LIBMTP_Is_Property_Supported(
2650 arg1: *mut LIBMTP_mtpdevice_t,
2651 arg2: LIBMTP_property_t,
2652 arg3: LIBMTP_filetype_t,
2653 ) -> ::std::os::raw::c_int;
2654}
2655extern "C" {
2656 pub fn LIBMTP_Get_Allowed_Property_Values(
2657 arg1: *mut LIBMTP_mtpdevice_t,
2658 arg2: LIBMTP_property_t,
2659 arg3: LIBMTP_filetype_t,
2660 arg4: *mut LIBMTP_allowed_values_t,
2661 ) -> ::std::os::raw::c_int;
2662}
2663extern "C" {
2664 pub fn LIBMTP_destroy_allowed_values_t(arg1: *mut LIBMTP_allowed_values_t);
2665}
2666extern "C" {
2667 #[doc = " @}"]
2668 #[doc = " @defgroup files The file management API."]
2669 #[doc = " @{"]
2670 pub fn LIBMTP_new_file_t() -> *mut LIBMTP_file_t;
2671}
2672extern "C" {
2673 pub fn LIBMTP_destroy_file_t(arg1: *mut LIBMTP_file_t);
2674}
2675extern "C" {
2676 pub fn LIBMTP_Get_Filetype_Description(
2677 arg1: LIBMTP_filetype_t,
2678 ) -> *const ::std::os::raw::c_char;
2679}
2680extern "C" {
2681 pub fn LIBMTP_Get_Filelisting(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_file_t;
2682}
2683extern "C" {
2684 pub fn LIBMTP_Get_Filelisting_With_Callback(
2685 arg1: *mut LIBMTP_mtpdevice_t,
2686 arg2: LIBMTP_progressfunc_t,
2687 arg3: *const ::std::os::raw::c_void,
2688 ) -> *mut LIBMTP_file_t;
2689}
2690extern "C" {
2691 pub fn LIBMTP_Get_Files_And_Folders(
2692 arg1: *mut LIBMTP_mtpdevice_t,
2693 arg2: u32,
2694 arg3: u32,
2695 ) -> *mut LIBMTP_file_t;
2696}
2697extern "C" {
2698 pub fn LIBMTP_Get_Filemetadata(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> *mut LIBMTP_file_t;
2699}
2700extern "C" {
2701 pub fn LIBMTP_Get_File_To_File(
2702 arg1: *mut LIBMTP_mtpdevice_t,
2703 arg2: u32,
2704 arg3: *const ::std::os::raw::c_char,
2705 arg4: LIBMTP_progressfunc_t,
2706 arg5: *const ::std::os::raw::c_void,
2707 ) -> ::std::os::raw::c_int;
2708}
2709extern "C" {
2710 pub fn LIBMTP_Get_File_To_File_Descriptor(
2711 arg1: *mut LIBMTP_mtpdevice_t,
2712 arg2: u32,
2713 arg3: ::std::os::raw::c_int,
2714 arg4: LIBMTP_progressfunc_t,
2715 arg5: *const ::std::os::raw::c_void,
2716 ) -> ::std::os::raw::c_int;
2717}
2718extern "C" {
2719 pub fn LIBMTP_Get_File_To_Handler(
2720 arg1: *mut LIBMTP_mtpdevice_t,
2721 arg2: u32,
2722 arg3: MTPDataPutFunc,
2723 arg4: *mut ::std::os::raw::c_void,
2724 arg5: LIBMTP_progressfunc_t,
2725 arg6: *const ::std::os::raw::c_void,
2726 ) -> ::std::os::raw::c_int;
2727}
2728extern "C" {
2729 pub fn LIBMTP_Send_File_From_File(
2730 arg1: *mut LIBMTP_mtpdevice_t,
2731 arg2: *const ::std::os::raw::c_char,
2732 arg3: *mut LIBMTP_file_t,
2733 arg4: LIBMTP_progressfunc_t,
2734 arg5: *const ::std::os::raw::c_void,
2735 ) -> ::std::os::raw::c_int;
2736}
2737extern "C" {
2738 pub fn LIBMTP_Send_File_From_File_Descriptor(
2739 arg1: *mut LIBMTP_mtpdevice_t,
2740 arg2: ::std::os::raw::c_int,
2741 arg3: *mut LIBMTP_file_t,
2742 arg4: LIBMTP_progressfunc_t,
2743 arg5: *const ::std::os::raw::c_void,
2744 ) -> ::std::os::raw::c_int;
2745}
2746extern "C" {
2747 pub fn LIBMTP_Send_File_From_Handler(
2748 arg1: *mut LIBMTP_mtpdevice_t,
2749 arg2: MTPDataGetFunc,
2750 arg3: *mut ::std::os::raw::c_void,
2751 arg4: *mut LIBMTP_file_t,
2752 arg5: LIBMTP_progressfunc_t,
2753 arg6: *const ::std::os::raw::c_void,
2754 ) -> ::std::os::raw::c_int;
2755}
2756extern "C" {
2757 pub fn LIBMTP_Set_File_Name(
2758 arg1: *mut LIBMTP_mtpdevice_t,
2759 arg2: *mut LIBMTP_file_t,
2760 arg3: *const ::std::os::raw::c_char,
2761 ) -> ::std::os::raw::c_int;
2762}
2763extern "C" {
2764 pub fn LIBMTP_new_filesampledata_t() -> *mut LIBMTP_filesampledata_t;
2765}
2766extern "C" {
2767 pub fn LIBMTP_destroy_filesampledata_t(arg1: *mut LIBMTP_filesampledata_t);
2768}
2769extern "C" {
2770 pub fn LIBMTP_Get_Representative_Sample_Format(
2771 arg1: *mut LIBMTP_mtpdevice_t,
2772 arg2: LIBMTP_filetype_t,
2773 arg3: *mut *mut LIBMTP_filesampledata_t,
2774 ) -> ::std::os::raw::c_int;
2775}
2776extern "C" {
2777 pub fn LIBMTP_Send_Representative_Sample(
2778 arg1: *mut LIBMTP_mtpdevice_t,
2779 arg2: u32,
2780 arg3: *mut LIBMTP_filesampledata_t,
2781 ) -> ::std::os::raw::c_int;
2782}
2783extern "C" {
2784 pub fn LIBMTP_Get_Representative_Sample(
2785 arg1: *mut LIBMTP_mtpdevice_t,
2786 arg2: u32,
2787 arg3: *mut LIBMTP_filesampledata_t,
2788 ) -> ::std::os::raw::c_int;
2789}
2790extern "C" {
2791 pub fn LIBMTP_Get_Thumbnail(
2792 arg1: *mut LIBMTP_mtpdevice_t,
2793 arg2: u32,
2794 data: *mut *mut ::std::os::raw::c_uchar,
2795 size: *mut ::std::os::raw::c_uint,
2796 ) -> ::std::os::raw::c_int;
2797}
2798extern "C" {
2799 #[doc = " @}"]
2800 #[doc = " @defgroup tracks The track management API."]
2801 #[doc = " @{"]
2802 pub fn LIBMTP_new_track_t() -> *mut LIBMTP_track_t;
2803}
2804extern "C" {
2805 pub fn LIBMTP_destroy_track_t(arg1: *mut LIBMTP_track_t);
2806}
2807extern "C" {
2808 pub fn LIBMTP_Get_Tracklisting(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_track_t;
2809}
2810extern "C" {
2811 pub fn LIBMTP_Get_Tracklisting_With_Callback(
2812 arg1: *mut LIBMTP_mtpdevice_t,
2813 arg2: LIBMTP_progressfunc_t,
2814 arg3: *const ::std::os::raw::c_void,
2815 ) -> *mut LIBMTP_track_t;
2816}
2817extern "C" {
2818 pub fn LIBMTP_Get_Tracklisting_With_Callback_For_Storage(
2819 arg1: *mut LIBMTP_mtpdevice_t,
2820 arg2: u32,
2821 arg3: LIBMTP_progressfunc_t,
2822 arg4: *const ::std::os::raw::c_void,
2823 ) -> *mut LIBMTP_track_t;
2824}
2825extern "C" {
2826 pub fn LIBMTP_Get_Trackmetadata(
2827 arg1: *mut LIBMTP_mtpdevice_t,
2828 arg2: u32,
2829 ) -> *mut LIBMTP_track_t;
2830}
2831extern "C" {
2832 pub fn LIBMTP_Get_Track_To_File(
2833 arg1: *mut LIBMTP_mtpdevice_t,
2834 arg2: u32,
2835 arg3: *const ::std::os::raw::c_char,
2836 arg4: LIBMTP_progressfunc_t,
2837 arg5: *const ::std::os::raw::c_void,
2838 ) -> ::std::os::raw::c_int;
2839}
2840extern "C" {
2841 pub fn LIBMTP_Get_Track_To_File_Descriptor(
2842 arg1: *mut LIBMTP_mtpdevice_t,
2843 arg2: u32,
2844 arg3: ::std::os::raw::c_int,
2845 arg4: LIBMTP_progressfunc_t,
2846 arg5: *const ::std::os::raw::c_void,
2847 ) -> ::std::os::raw::c_int;
2848}
2849extern "C" {
2850 pub fn LIBMTP_Get_Track_To_Handler(
2851 arg1: *mut LIBMTP_mtpdevice_t,
2852 arg2: u32,
2853 arg3: MTPDataPutFunc,
2854 arg4: *mut ::std::os::raw::c_void,
2855 arg5: LIBMTP_progressfunc_t,
2856 arg6: *const ::std::os::raw::c_void,
2857 ) -> ::std::os::raw::c_int;
2858}
2859extern "C" {
2860 pub fn LIBMTP_Send_Track_From_File(
2861 arg1: *mut LIBMTP_mtpdevice_t,
2862 arg2: *const ::std::os::raw::c_char,
2863 arg3: *mut LIBMTP_track_t,
2864 arg4: LIBMTP_progressfunc_t,
2865 arg5: *const ::std::os::raw::c_void,
2866 ) -> ::std::os::raw::c_int;
2867}
2868extern "C" {
2869 pub fn LIBMTP_Send_Track_From_File_Descriptor(
2870 arg1: *mut LIBMTP_mtpdevice_t,
2871 arg2: ::std::os::raw::c_int,
2872 arg3: *mut LIBMTP_track_t,
2873 arg4: LIBMTP_progressfunc_t,
2874 arg5: *const ::std::os::raw::c_void,
2875 ) -> ::std::os::raw::c_int;
2876}
2877extern "C" {
2878 pub fn LIBMTP_Send_Track_From_Handler(
2879 arg1: *mut LIBMTP_mtpdevice_t,
2880 arg2: MTPDataGetFunc,
2881 arg3: *mut ::std::os::raw::c_void,
2882 arg4: *mut LIBMTP_track_t,
2883 arg5: LIBMTP_progressfunc_t,
2884 arg6: *const ::std::os::raw::c_void,
2885 ) -> ::std::os::raw::c_int;
2886}
2887extern "C" {
2888 pub fn LIBMTP_Update_Track_Metadata(
2889 arg1: *mut LIBMTP_mtpdevice_t,
2890 arg2: *const LIBMTP_track_t,
2891 ) -> ::std::os::raw::c_int;
2892}
2893extern "C" {
2894 pub fn LIBMTP_Track_Exists(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> ::std::os::raw::c_int;
2895}
2896extern "C" {
2897 pub fn LIBMTP_Set_Track_Name(
2898 arg1: *mut LIBMTP_mtpdevice_t,
2899 arg2: *mut LIBMTP_track_t,
2900 arg3: *const ::std::os::raw::c_char,
2901 ) -> ::std::os::raw::c_int;
2902}
2903extern "C" {
2904 #[doc = " @}"]
2905 #[doc = " @defgroup folders The folder management API."]
2906 #[doc = " @{"]
2907 pub fn LIBMTP_new_folder_t() -> *mut LIBMTP_folder_t;
2908}
2909extern "C" {
2910 pub fn LIBMTP_destroy_folder_t(arg1: *mut LIBMTP_folder_t);
2911}
2912extern "C" {
2913 pub fn LIBMTP_Get_Folder_List(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_folder_t;
2914}
2915extern "C" {
2916 pub fn LIBMTP_Get_Folder_List_For_Storage(
2917 arg1: *mut LIBMTP_mtpdevice_t,
2918 arg2: u32,
2919 ) -> *mut LIBMTP_folder_t;
2920}
2921extern "C" {
2922 pub fn LIBMTP_Find_Folder(arg1: *mut LIBMTP_folder_t, arg2: u32) -> *mut LIBMTP_folder_t;
2923}
2924extern "C" {
2925 pub fn LIBMTP_Create_Folder(
2926 arg1: *mut LIBMTP_mtpdevice_t,
2927 arg2: *mut ::std::os::raw::c_char,
2928 arg3: u32,
2929 arg4: u32,
2930 ) -> u32;
2931}
2932extern "C" {
2933 pub fn LIBMTP_Set_Folder_Name(
2934 arg1: *mut LIBMTP_mtpdevice_t,
2935 arg2: *mut LIBMTP_folder_t,
2936 arg3: *const ::std::os::raw::c_char,
2937 ) -> ::std::os::raw::c_int;
2938}
2939extern "C" {
2940 #[doc = " @}"]
2941 #[doc = " @defgroup playlists The audio/video playlist management API."]
2942 #[doc = " @{"]
2943 pub fn LIBMTP_new_playlist_t() -> *mut LIBMTP_playlist_t;
2944}
2945extern "C" {
2946 pub fn LIBMTP_destroy_playlist_t(arg1: *mut LIBMTP_playlist_t);
2947}
2948extern "C" {
2949 pub fn LIBMTP_Get_Playlist_List(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_playlist_t;
2950}
2951extern "C" {
2952 pub fn LIBMTP_Get_Playlist(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> *mut LIBMTP_playlist_t;
2953}
2954extern "C" {
2955 pub fn LIBMTP_Create_New_Playlist(
2956 arg1: *mut LIBMTP_mtpdevice_t,
2957 arg2: *mut LIBMTP_playlist_t,
2958 ) -> ::std::os::raw::c_int;
2959}
2960extern "C" {
2961 pub fn LIBMTP_Update_Playlist(
2962 arg1: *mut LIBMTP_mtpdevice_t,
2963 arg2: *mut LIBMTP_playlist_t,
2964 ) -> ::std::os::raw::c_int;
2965}
2966extern "C" {
2967 pub fn LIBMTP_Set_Playlist_Name(
2968 arg1: *mut LIBMTP_mtpdevice_t,
2969 arg2: *mut LIBMTP_playlist_t,
2970 arg3: *const ::std::os::raw::c_char,
2971 ) -> ::std::os::raw::c_int;
2972}
2973extern "C" {
2974 #[doc = " @}"]
2975 #[doc = " @defgroup albums The audio/video album management API."]
2976 #[doc = " @{"]
2977 pub fn LIBMTP_new_album_t() -> *mut LIBMTP_album_t;
2978}
2979extern "C" {
2980 pub fn LIBMTP_destroy_album_t(arg1: *mut LIBMTP_album_t);
2981}
2982extern "C" {
2983 pub fn LIBMTP_Get_Album_List(arg1: *mut LIBMTP_mtpdevice_t) -> *mut LIBMTP_album_t;
2984}
2985extern "C" {
2986 pub fn LIBMTP_Get_Album_List_For_Storage(
2987 arg1: *mut LIBMTP_mtpdevice_t,
2988 arg2: u32,
2989 ) -> *mut LIBMTP_album_t;
2990}
2991extern "C" {
2992 pub fn LIBMTP_Get_Album(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> *mut LIBMTP_album_t;
2993}
2994extern "C" {
2995 pub fn LIBMTP_Create_New_Album(
2996 arg1: *mut LIBMTP_mtpdevice_t,
2997 arg2: *mut LIBMTP_album_t,
2998 ) -> ::std::os::raw::c_int;
2999}
3000extern "C" {
3001 pub fn LIBMTP_Update_Album(
3002 arg1: *mut LIBMTP_mtpdevice_t,
3003 arg2: *const LIBMTP_album_t,
3004 ) -> ::std::os::raw::c_int;
3005}
3006extern "C" {
3007 pub fn LIBMTP_Set_Album_Name(
3008 arg1: *mut LIBMTP_mtpdevice_t,
3009 arg2: *mut LIBMTP_album_t,
3010 arg3: *const ::std::os::raw::c_char,
3011 ) -> ::std::os::raw::c_int;
3012}
3013extern "C" {
3014 #[doc = " @}"]
3015 #[doc = " @defgroup objects The object management API."]
3016 #[doc = " @{"]
3017 pub fn LIBMTP_Delete_Object(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> ::std::os::raw::c_int;
3018}
3019extern "C" {
3020 pub fn LIBMTP_Move_Object(
3021 arg1: *mut LIBMTP_mtpdevice_t,
3022 arg2: u32,
3023 arg3: u32,
3024 arg4: u32,
3025 ) -> ::std::os::raw::c_int;
3026}
3027extern "C" {
3028 pub fn LIBMTP_Copy_Object(
3029 arg1: *mut LIBMTP_mtpdevice_t,
3030 arg2: u32,
3031 arg3: u32,
3032 arg4: u32,
3033 ) -> ::std::os::raw::c_int;
3034}
3035extern "C" {
3036 pub fn LIBMTP_Set_Object_Filename(
3037 arg1: *mut LIBMTP_mtpdevice_t,
3038 arg2: u32,
3039 arg3: *mut ::std::os::raw::c_char,
3040 ) -> ::std::os::raw::c_int;
3041}
3042extern "C" {
3043 pub fn LIBMTP_GetPartialObject(
3044 arg1: *mut LIBMTP_mtpdevice_t,
3045 arg2: u32,
3046 arg3: u64,
3047 arg4: u32,
3048 arg5: *mut *mut ::std::os::raw::c_uchar,
3049 arg6: *mut ::std::os::raw::c_uint,
3050 ) -> ::std::os::raw::c_int;
3051}
3052extern "C" {
3053 pub fn LIBMTP_SendPartialObject(
3054 arg1: *mut LIBMTP_mtpdevice_t,
3055 arg2: u32,
3056 arg3: u64,
3057 arg4: *mut ::std::os::raw::c_uchar,
3058 arg5: ::std::os::raw::c_uint,
3059 ) -> ::std::os::raw::c_int;
3060}
3061extern "C" {
3062 pub fn LIBMTP_BeginEditObject(
3063 arg1: *mut LIBMTP_mtpdevice_t,
3064 arg2: u32,
3065 ) -> ::std::os::raw::c_int;
3066}
3067extern "C" {
3068 pub fn LIBMTP_EndEditObject(arg1: *mut LIBMTP_mtpdevice_t, arg2: u32) -> ::std::os::raw::c_int;
3069}
3070extern "C" {
3071 pub fn LIBMTP_TruncateObject(
3072 arg1: *mut LIBMTP_mtpdevice_t,
3073 arg2: u32,
3074 arg3: u64,
3075 ) -> ::std::os::raw::c_int;
3076}
3077#[doc = " @}"]
3078#[doc = " @defgroup files The events API."]
3079#[doc = " @{"]
3080pub type LIBMTP_event_cb_fn = ::std::option::Option<
3081 unsafe extern "C" fn(
3082 arg1: ::std::os::raw::c_int,
3083 arg2: LIBMTP_event_t,
3084 arg3: u32,
3085 arg4: *mut ::std::os::raw::c_void,
3086 ),
3087>;
3088extern "C" {
3089 pub fn LIBMTP_Read_Event(
3090 arg1: *mut LIBMTP_mtpdevice_t,
3091 arg2: *mut LIBMTP_event_t,
3092 arg3: *mut u32,
3093 ) -> ::std::os::raw::c_int;
3094}
3095extern "C" {
3096 pub fn LIBMTP_Read_Event_Async(
3097 arg1: *mut LIBMTP_mtpdevice_t,
3098 arg2: LIBMTP_event_cb_fn,
3099 arg3: *mut ::std::os::raw::c_void,
3100 ) -> ::std::os::raw::c_int;
3101}
3102extern "C" {
3103 pub fn LIBMTP_Handle_Events_Timeout_Completed(
3104 arg1: *mut timeval,
3105 arg2: *mut ::std::os::raw::c_int,
3106 ) -> ::std::os::raw::c_int;
3107}
3108extern "C" {
3109 #[doc = " @}"]
3110 #[doc = " @defgroup custom Custom operations API."]
3111 #[doc = " @{"]
3112 pub fn LIBMTP_Custom_Operation(
3113 arg1: *mut LIBMTP_mtpdevice_t,
3114 arg2: u16,
3115 arg3: ::std::os::raw::c_int,
3116 ...
3117 ) -> ::std::os::raw::c_int;
3118}