13aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 23aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \file libmtp.h 33aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Interface to the Media Transfer Protocol library. 43aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 53aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Copyright (C) 2005-2008 Linus Walleij <triad@df.lth.se> 63aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Copyright (C) 2005-2008 Richard A. Low <richard@wentnet.com> 73aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Copyright (C) 2007 Ted Bullock <tbullock@canada.com> 83aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Copyright (C) 2008 Florent Mertens <flomertens@gmail.com> 93aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * This library is free software; you can redistribute it and/or 113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * modify it under the terms of the GNU Lesser General Public 123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * License as published by the Free Software Foundation; either 133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * version 2 of the License, or (at your option) any later version. 143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * This library is distributed in the hope that it will be useful, 163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * but WITHOUT ANY WARRANTY; without even the implied warranty of 173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Lesser General Public License for more details. 193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * You should have received a copy of the GNU Lesser General Public 213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * License along with this library; if not, write to the 223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Boston, MA 02111-1307, USA. 243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * <code> 263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * #include <libmtp.h> 273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * </code> 283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#ifndef LIBMTP_H_INCLUSION_GUARD 303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_H_INCLUSION_GUARD 313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_VERSION 1.0.1 333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_VERSION_STRING "1.0.1" 343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* This handles MSVC pecularities */ 363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#ifdef _MSC_VER 373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#include <windows.h> 383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define __WIN32__ 393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define snprintf _snprintf 403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define ssize_t SSIZE_T 413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* 423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Types that do not exist in Windows 433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * sys/types.h, but they exist in mingw32 443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * sys/types.h. 453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef char int8_t; 473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef unsigned char uint8_t; 483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef __int16 int16_t; 493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef unsigned __int16 uint16_t; 503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef __int32 int32_t; 513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef unsigned __int32 uint32_t; 523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef unsigned __int64 uint64_t; 533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#endif 543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#include <stdio.h> 563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#include <usb.h> 573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#include <stdint.h> 583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup types libmtp global type definitions 613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The filetypes defined here are the external types used 633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * by the libmtp library interface. The types used internally 643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * as PTP-defined enumerator types is something different. 653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef enum { 673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_FOLDER, 683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_WAV, 693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MP3, 703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_WMA, 713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_OGG, 723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_AUDIBLE, 733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MP4, 743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_UNDEF_AUDIO, 753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_WMV, 763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_AVI, 773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MPEG, 783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_ASF, 793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_QT, 803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_UNDEF_VIDEO, 813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_JPEG, 823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_JFIF, 833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_TIFF, 843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_BMP, 853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_GIF, 863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_PICT, 873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_PNG, 883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_VCALENDAR1, 893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_VCALENDAR2, 903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_VCARD2, 913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_VCARD3, 923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT, 933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_WINEXEC, 943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_TEXT, 953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_HTML, 963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_FIRMWARE, 973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_AAC, 983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MEDIACARD, 993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_FLAC, 1003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MP2, 1013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_M4A, 1023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_DOC, 1033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_XML, 1043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_XLS, 1053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_PPT, 1063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_MHT, 1073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_JP2, 1083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_JPX, 1093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_ALBUM, 1103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_PLAYLIST, 1113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_UNKNOWN 1123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev} LIBMTP_filetype_t; 1133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_AUDIO 1163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Audio filetype test. 1173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 1183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * For filetypes that can be either audio 1193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * or video, use LIBMTP_FILETYPE_IS_AUDIOVIDEO 1203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_AUDIO(a)\ 1223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_WAV ||\ 1233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_MP3 ||\ 1243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_MP2 ||\ 1253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_WMA ||\ 1263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_OGG ||\ 1273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_FLAC ||\ 1283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_AAC ||\ 1293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_M4A ||\ 1303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_AUDIBLE ||\ 1313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_UNDEF_AUDIO) 1323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_VIDEO 1353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Video filetype test. 1363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * 1373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * For filetypes that can be either audio 1383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * or video, use LIBMTP_FILETYPE_IS_AUDIOVIDEO 1393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_VIDEO(a)\ 1413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_WMV ||\ 1423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_AVI ||\ 1433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_MPEG ||\ 1443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_UNDEF_VIDEO) 1453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_AUDIOVIDEO 1483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Audio and&slash;or video filetype test. 1493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_AUDIOVIDEO(a)\ 1513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_MP4 ||\ 1523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_ASF ||\ 1533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev a == LIBMTP_FILETYPE_QT) 1543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_TRACK 1573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Test if filetype is a track. 1583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Use this to determine if the File API or Track API 1593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * should be used to upload or download an object. 1603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_TRACK(a)\ 1623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(LIBMTP_FILETYPE_IS_AUDIO(a) ||\ 1633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_IS_VIDEO(a) ||\ 1643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_FILETYPE_IS_AUDIOVIDEO(a)) 1653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_IMAGE 1683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Image filetype test 1693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_IMAGE(a)\ 1713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_JPEG ||\ 1723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_JFIF ||\ 1733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_TIFF ||\ 1743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_BMP ||\ 1753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_GIF ||\ 1763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_PICT ||\ 1773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_PNG ||\ 1783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_JP2 ||\ 1793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_JPX ||\ 1803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT) 1813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_ADDRESSBOOK 1843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Addressbook and Business card filetype test 1853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_ADDRESSBOOK(a)\ 1873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_VCARD2 ||\ 1883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_VCARD2) 1893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \def LIBMTP_FILETYPE_IS_CALENDAR 1923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Calendar and Appointment filetype test 1933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 1943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_FILETYPE_IS_CALENDAR(a)\ 1953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev(a == LIBMTP_FILETYPE_VCALENDAR1 ||\ 1963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulisheva == LIBMTP_FILETYPE_VCALENDAR2) 1973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 1983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 1993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The properties defined here are the external types used 2003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * by the libmtp library interface. 2013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 2023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef enum { 2033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_StorageID, 2043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ObjectFormat, 2053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ProtectionStatus, 2063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ObjectSize, 2073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AssociationType, 2083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AssociationDesc, 2093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ObjectFileName, 2103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DateCreated, 2113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DateModified, 2123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Keywords, 2133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ParentObject, 2143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AllowedFolderContents, 2153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Hidden, 2163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SystemObject, 2173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PersistantUniqueObjectIdentifier, 2183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SyncID, 2193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PropertyBag, 2203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Name, 2213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_CreatedBy, 2223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Artist, 2233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DateAuthored, 2243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Description, 2253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_URLReference, 2263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_LanguageLocale, 2273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_CopyrightInformation, 2283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Source, 2293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_OriginLocation, 2303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DateAdded, 2313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_NonConsumable, 2323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_CorruptOrUnplayable, 2333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ProducerSerialNumber, 2343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleFormat, 2353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleSize, 2363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleHeight, 2373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleWidth, 2383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleDuration, 2393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_RepresentativeSampleData, 2403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Width, 2413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Height, 2423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Duration, 2433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Rating, 2443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Track, 2453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Genre, 2463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Credits, 2473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Lyrics, 2483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SubscriptionContentID, 2493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ProducedBy, 2503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_UseCount, 2513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SkipCount, 2523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_LastAccessed, 2533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ParentalRating, 2543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MetaGenre, 2553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Composer, 2563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EffectiveRating, 2573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Subtitle, 2583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_OriginalReleaseDate, 2593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AlbumName, 2603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AlbumArtist, 2613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Mood, 2623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DRMStatus, 2633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SubDescription, 2643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_IsCropped, 2653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_IsColorCorrected, 2663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ImageBitDepth, 2673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Fnumber, 2683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ExposureTime, 2693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ExposureIndex, 2703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_DisplayName, 2713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_BodyText, 2723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Subject, 2733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Priority, 2743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_GivenName, 2753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MiddleNames, 2763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_FamilyName, 2773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Prefix, 2783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Suffix, 2793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneticGivenName, 2803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneticFamilyName, 2813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailPrimary, 2823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailPersonal1, 2833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailPersonal2, 2843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailBusiness1, 2853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailBusiness2, 2863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EmailOthers, 2873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberPrimary, 2883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberPersonal, 2893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberPersonal2, 2903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberBusiness, 2913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberBusiness2, 2923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberMobile, 2933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberMobile2, 2943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_FaxNumberPrimary, 2953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_FaxNumberPersonal, 2963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_FaxNumberBusiness, 2973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PagerNumber, 2983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneNumberOthers, 2993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PrimaryWebAddress, 3003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PersonalWebAddress, 3013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_BusinessWebAddress, 3023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_InstantMessengerAddress, 3033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_InstantMessengerAddress2, 3043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_InstantMessengerAddress3, 3053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFull, 3063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullLine1, 3073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullLine2, 3083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullCity, 3093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullRegion, 3103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullPostalCode, 3113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressPersonalFullCountry, 3123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessFull, 3133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessLine1, 3143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessLine2, 3153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessCity, 3163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessRegion, 3173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessPostalCode, 3183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressBusinessCountry, 3193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherFull, 3203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherLine1, 3213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherLine2, 3223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherCity, 3233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherRegion, 3243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherPostalCode, 3253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PostalAddressOtherCountry, 3263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_OrganizationName, 3273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_PhoneticOrganizationName, 3283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Role, 3293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Birthdate, 3303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageTo, 3313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageCC, 3323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageBCC, 3333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageRead, 3343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageReceivedTime, 3353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MessageSender, 3363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityBeginTime, 3373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityEndTime, 3383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityLocation, 3393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityRequiredAttendees, 3403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityOptionalAttendees, 3413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityResources, 3423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ActivityAccepted, 3433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Owner, 3443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Editor, 3453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_Webmaster, 3463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_URLSource, 3473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_URLDestination, 3483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_TimeBookmark, 3493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ObjectBookmark, 3503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ByteBookmark, 3513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_LastBuildDate, 3523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_TimetoLive, 3533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_MediaGUID, 3543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_TotalBitRate, 3553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_BitRateType, 3563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_SampleRate, 3573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_NumberOfChannels, 3583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AudioBitDepth, 3593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_ScanDepth, 3603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AudioWAVECodec, 3613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_AudioBitRate, 3623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_VideoFourCCCodec, 3633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_VideoBitRate, 3643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_FramesPerThousandSeconds, 3653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_KeyFrameDistance, 3663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_BufferSize, 3673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EncodingQuality, 3683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_EncodingProfile, 3693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_BuyFlag, 3703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_PROPERTY_UNKNOWN 3713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev} LIBMTP_property_t; 3723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 3733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 3743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * These are the data types 3753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 3763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef enum { 3773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_INT8, 3783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_UINT8, 3793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_INT16, 3803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_UINT16, 3813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_INT32, 3823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_UINT32, 3833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_INT64, 3843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_DATATYPE_UINT64, 3853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev} LIBMTP_datatype_t; 3863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 3873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 3883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * These are the numbered error codes. You can also 3893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * get string representations for errors. 3903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 3913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef enum { 3923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_NONE, 3933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_GENERAL, 3943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_PTP_LAYER, 3953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_USB_LAYER, 3963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_MEMORY_ALLOCATION, 3973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_NO_DEVICE_ATTACHED, 3983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_STORAGE_FULL, 3993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_CONNECTING, 4003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_ERROR_CANCELLED 4013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev} LIBMTP_error_number_t; 4023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_device_entry_struct LIBMTP_device_entry_t; /**< @see LIBMTP_device_entry_struct */ 4033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_raw_device_struct LIBMTP_raw_device_t; /**< @see LIBMTP_raw_device_struct */ 4043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_error_struct LIBMTP_error_t; /**< @see LIBMTP_error_struct */ 4053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_allowed_values_struct LIBMTP_allowed_values_t; /**< @see LIBMTP_allowed_values_struct */ 4063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_mtpdevice_struct LIBMTP_mtpdevice_t; /**< @see LIBMTP_mtpdevice_struct */ 4073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_file_struct LIBMTP_file_t; /**< @see LIBMTP_file_struct */ 4083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_track_struct LIBMTP_track_t; /**< @see LIBMTP_track_struct */ 4093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_playlist_struct LIBMTP_playlist_t; /**< @see LIBMTP_playlist_struct */ 4103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_album_struct LIBMTP_album_t; /**< @see LIBMTP_album_struct */ 4113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_folder_struct LIBMTP_folder_t; /**< @see LIBMTP_folder_t */ 4123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_object_struct LIBMTP_object_t; /**< @see LIBMTP_object_t */ 4133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_filesampledata_struct LIBMTP_filesampledata_t; /**< @see LIBMTP_filesample_t */ 4143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef struct LIBMTP_devicestorage_struct LIBMTP_devicestorage_t; /**< @see LIBMTP_devicestorage_t */ 4153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The callback type definition. Notice that a progress percentage ratio 4183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * is easy to calculate by dividing <code>sent</code> by 4193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * <code>total</code>. 4203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param sent the number of bytes sent so far 4213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param total the total number of bytes to send 4223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param data a user-defined dereferencable pointer 4233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @return if anything else than 0 is returned, the current transfer will be 4243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * interrupted / cancelled. 4253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef int (* LIBMTP_progressfunc_t) (uint64_t const sent, uint64_t const total, 4273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const data); 4283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Callback function for get by handler function 4313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param params the device parameters 4323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param priv a user-defined dereferencable pointer 4333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param wantlen the number of bytes wanted 4343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param data a buffer to write the data to 4353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param gotlen pointer to the number of bytes actually written 4363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * to data 4373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @return LIBMTP_HANDLER_RETURN_OK if successful, 4383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP_HANDLER_RETURN_ERROR on error or 4393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer 4403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef uint16_t (* MTPDataGetFunc) (void* params, void* priv, 4423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t wantlen, unsigned char *data, uint32_t *gotlen); 4433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Callback function for put by handler function 4463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param params the device parameters 4473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param priv a user-defined dereferencable pointer 4483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param sendlen the number of bytes available 4493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param data a buffer to read the data from 4503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @param putlen pointer to the number of bytes actually read 4513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * from data 4523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @return LIBMTP_HANDLER_RETURN_OK if successful, 4533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP_HANDLER_RETURN_ERROR on error or 4543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer 4553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevtypedef uint16_t (* MTPDataPutFunc) (void* params, void* priv, 4573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t sendlen, unsigned char *data, uint32_t *putlen); 4583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The return codes for the get/put functions 4613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_HANDLER_RETURN_OK 0 4633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_HANDLER_RETURN_ERROR 1 4643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_HANDLER_RETURN_CANCEL 2 4653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 4683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup structar libmtp data structures 4693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 4703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * A data structure to hold MTP device entries. 4743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_device_entry_struct { 4763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *vendor; /**< The vendor of this device */ 4773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t vendor_id; /**< Vendor ID for this device */ 4783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *product; /**< The product name of this device */ 4793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t product_id; /**< Product ID for this device */ 4803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t device_flags; /**< Bugs, device specifics etc */ 4813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 4823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * A data structure to hold a raw MTP device connected 4853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * to the bus. 4863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_raw_device_struct { 4883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_device_entry_t device_entry; /**< The device entry for this raw device */ 4893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t bus_location; /**< Location of the bus, if device available */ 4903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t devnum; /**< Device number on the bus, if device available */ 4913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 4923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 4933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 4943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * A data structure to hold errors from the library. 4953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 4963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_error_struct { 4973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_error_number_t errornumber; 4983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *error_text; 4993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_error_t *next; 5003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 5013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 5023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 5033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * A data structure to hold allowed ranges of values 5043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_allowed_values_struct { 5063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t u8max; 5073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t u8min; 5083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t u8step; 5093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t* u8vals; 5103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int8_t i8max; 5113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int8_t i8min; 5123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int8_t i8step; 5133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int8_t* i8vals; 5143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t u16max; 5153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t u16min; 5163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t u16step; 5173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t* u16vals; 5183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int16_t i16max; 5193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int16_t i16min; 5203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int16_t i16step; 5213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int16_t* i16vals; 5223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t u32max; 5233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t u32min; 5243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t u32step; 5253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t* u32vals; 5263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int32_t i32max; 5273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int32_t i32min; 5283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int32_t i32step; 5293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int32_t* i32vals; 5303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t u64max; 5313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t u64min; 5323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t u64step; 5333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t* u64vals; 5343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int64_t i64max; 5353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int64_t i64min; 5363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int64_t i64step; 5373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int64_t* i64vals; 5383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Number of entries in the vals array 5403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t num_entries; 5423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The datatype specifying which of the above is used 5443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_datatype_t datatype; 5463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Non zero for range, 0 for enum 5483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int is_range; 5503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 5513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 5523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 5533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Main MTP device object struct 5543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_mtpdevice_struct { 5563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Object bitsize, typically 32 or 64. 5583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t object_bitsize; 5603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Parameters for this device, must be cast into 5623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \c (PTPParams*) before internal use. 5633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void *params; 5653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * USB device for this device, must be cast into 5673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * \c (PTP_USB*) before internal use. 5683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void *usbinfo; 5703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The storage for this device, do not use strings in here without 5723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * copying them first, and beware that this list may be rebuilt at 5733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * any time. 5743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @see LIBMTP_Get_Storage() 5753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_devicestorage_t *storage; 5773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** 5783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * The error stack. This shall be handled using the error getting 5793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * and clearing functions, not by dereferencing this list. 5803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 5813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_error_t *errorstack; 5823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** The maximum battery level for this device */ 5833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t maximum_battery_level; 5843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default music folder */ 5853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_music_folder; 5863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default playlist folder */ 5873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_playlist_folder; 5883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default picture folder */ 5893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_picture_folder; 5903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default video folder */ 5913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_video_folder; 5923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default organizer folder */ 5933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_organizer_folder; 5943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default ZENcast folder (only Creative devices...) */ 5953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_zencast_folder; 5963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default Album folder */ 5973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_album_folder; 5983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Default Text folder */ 5993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t default_text_folder; 6003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Per device iconv() converters, only used internally */ 6013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void *cd; 6023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev /** Pointer to next device in linked list; NULL if this is the last device */ 6043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_mtpdevice_t *next; 6053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MTP file struct 6093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_file_struct { 6113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t item_id; /**< Unique item ID */ 6123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t parent_id; /**< ID of parent folder */ 6133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storage_id; /**< ID of storage holding this file */ 6143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *filename; /**< Filename of this file */ 6153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t filesize; /**< Size of file in bytes */ 6163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev time_t modificationdate; /**< Date of last alteration of the file */ 6173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t filetype; /**< Filetype used for the current file */ 6183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_file_t *next; /**< Next file in list or NULL if last file */ 6193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MTP track struct 6233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_track_struct { 6253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t item_id; /**< Unique item ID */ 6263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t parent_id; /**< ID of parent folder */ 6273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storage_id; /**< ID of storage holding this track */ 6283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *title; /**< Track title */ 6293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *artist; /**< Name of recording artist */ 6303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *composer; /**< Name of recording composer */ 6313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *genre; /**< Genre name for track */ 6323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *album; /**< Album name for track */ 6333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *date; /**< Date of original recording as a string */ 6343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *filename; /**< Original filename of this track */ 6353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t tracknumber; /**< Track number (in sequence on recording) */ 6363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t duration; /**< Duration in milliseconds */ 6373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t samplerate; /**< Sample rate of original file, min 0x1f80 max 0xbb80 */ 6383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t nochannels; /**< Number of channels in this recording 0 = unknown, 1 or 2 */ 6393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t wavecodec; /**< FourCC wave codec name */ 6403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t bitrate; /**< (Average) bitrate for this file min=1 max=0x16e360 */ 6413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t bitratetype; /**< 0 = unused, 1 = constant, 2 = VBR, 3 = free */ 6423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t rating; /**< User rating 0-100 (0x00-0x64) */ 6433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t usecount; /**< Number of times used/played */ 6443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t filesize; /**< Size of track file in bytes */ 6453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev time_t modificationdate; /**< Date of last alteration of the track */ 6463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t filetype; /**< Filetype used for the current track */ 6473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_track_t *next; /**< Next track in list or NULL if last track */ 6483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MTP Playlist structure 6523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_playlist_struct { 6543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t playlist_id; /**< Unique playlist ID */ 6553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t parent_id; /**< ID of parent folder */ 6563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storage_id; /**< ID of storage holding this playlist */ 6573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *name; /**< Name of playlist */ 6583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t *tracks; /**< The tracks in this playlist */ 6593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t no_tracks; /**< The number of tracks in this playlist */ 6603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_playlist_t *next; /**< Next playlist or NULL if last playlist */ 6613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MTP Album structure 6653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_album_struct { 6673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t album_id; /**< Unique playlist ID */ 6683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t parent_id; /**< ID of parent folder */ 6693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storage_id; /**< ID of storage holding this album */ 6703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *name; /**< Name of album */ 6713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *artist; /**< Name of album artist */ 6723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *composer; /**< Name of recording composer */ 6733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *genre; /**< Genre of album */ 6743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t *tracks; /**< The tracks in this album */ 6753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t no_tracks; /**< The number of tracks in this album */ 6763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_album_t *next; /**< Next album or NULL if last album */ 6773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * MTP Folder structure 6813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_folder_struct { 6833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t folder_id; /**< Unique folder ID */ 6843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t parent_id; /**< ID of parent folder */ 6853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storage_id; /**< ID of storage holding this folder */ 6863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *name; /**< Name of folder */ 6873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_folder_t *sibling; /**< Next folder at same level or NULL if no more */ 6883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_folder_t *child; /**< Child folder or NULL if no children */ 6893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 6903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 6913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 6923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP Object RepresentativeSampleData Structure 6933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 6943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_filesampledata_struct { 6953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t width; /**< Width of sample if it is an image */ 6963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t height; /**< Height of sample if it is an image */ 6973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t duration; /**< Duration in milliseconds if it is audio */ 6983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t filetype; /**< Filetype used for the sample */ 6993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t size; /**< Size of sample data in bytes */ 7003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *data; /**< Sample data */ 7013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 7023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 7043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * LIBMTP Device Storage structure 7053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 7063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevstruct LIBMTP_devicestorage_struct { 7073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t id; /**< Unique ID for this storage */ 7083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t StorageType; /**< Storage type */ 7093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t FilesystemType; /**< Filesystem type */ 7103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint16_t AccessCapability; /**< Access capability */ 7113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t MaxCapacity; /**< Maximum capability */ 7123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t FreeSpaceInBytes; /**< Free space in bytes */ 7133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint64_t FreeSpaceInObjects; /**< Free space in objects */ 7143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *StorageDescription; /**< A brief description of this storage */ 7153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char *VolumeIdentifier; /**< A volume identifier */ 7163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_devicestorage_t *next; /**< Next storage, follow this link until NULL */ 7173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_devicestorage_t *prev; /**< Previous storage */ 7183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev}; 7193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** @} */ 7223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* Make functions available for C++ */ 7243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#ifdef __cplusplus 7253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevextern "C" { 7263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#endif 7273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 7293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup internals The libmtp internals API. 7303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 7313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 7323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Init(void); 7333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t ** const, int * const); 7343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 7353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 7363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup basic The basic device management API. 7373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 7383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 7393aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_error_number_t LIBMTP_Detect_Raw_Devices(LIBMTP_raw_device_t **, int *); 7403aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_mtpdevice_t *LIBMTP_Open_Raw_Device(LIBMTP_raw_device_t *); 7413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* Begin old, legacy interface */ 7423aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_mtpdevice_t *LIBMTP_Get_First_Device(void); 7433aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **); 7443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *); 7453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t*); 7463aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* End old, legacy interface */ 7473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Release_Device(LIBMTP_mtpdevice_t*); 7483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t*); 7493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Reset_Device(LIBMTP_mtpdevice_t*); 7503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Manufacturername(LIBMTP_mtpdevice_t*); 7513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Modelname(LIBMTP_mtpdevice_t*); 7523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Serialnumber(LIBMTP_mtpdevice_t*); 7533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Deviceversion(LIBMTP_mtpdevice_t*); 7543aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Friendlyname(LIBMTP_mtpdevice_t*); 7553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Friendlyname(LIBMTP_mtpdevice_t*, char const * const); 7563aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_Syncpartner(LIBMTP_mtpdevice_t*); 7573aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Syncpartner(LIBMTP_mtpdevice_t*, char const * const); 7583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Batterylevel(LIBMTP_mtpdevice_t *, 7593aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t * const, 7603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint8_t * const); 7613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Secure_Time(LIBMTP_mtpdevice_t *, char ** const); 7623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Device_Certificate(LIBMTP_mtpdevice_t *, char ** const); 7633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Supported_Filetypes(LIBMTP_mtpdevice_t *, uint16_t ** const, uint16_t * const); 7643aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_error_t *LIBMTP_Get_Errorstack(LIBMTP_mtpdevice_t*); 7653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Clear_Errorstack(LIBMTP_mtpdevice_t*); 7663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Dump_Errorstack(LIBMTP_mtpdevice_t*); 7673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Set_Device_Timeout(LIBMTP_mtpdevice_t *device, int milliseconds); 7693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Get_Device_Timeout(LIBMTP_mtpdevice_t *device, int * milliseconds); 7703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_STORAGE_SORTBY_NOTSORTED 0 7723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_STORAGE_SORTBY_FREESPACE 1 7733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#define LIBMTP_STORAGE_SORTBY_MAXSPACE 2 7743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Storage(LIBMTP_mtpdevice_t *, int const); 7763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Format_Storage(LIBMTP_mtpdevice_t *, LIBMTP_devicestorage_t *); 7773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 7783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 7793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * Get/set arbitrary properties. These do not update the cache; should only be used on 7803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * properties not stored in structs 7813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 7823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar *LIBMTP_Get_String_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const); 7833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint64_t LIBMTP_Get_u64_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, 7843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint64_t const); 7853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint32_t LIBMTP_Get_u32_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, 7863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint32_t const); 7873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint16_t LIBMTP_Get_u16_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, 7883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint16_t const); 7893aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint8_t LIBMTP_Get_u8_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, 7903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint8_t const); 7913aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Object_String(LIBMTP_mtpdevice_t *, uint32_t const, 7923aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, char const * const); 7933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Object_u32(LIBMTP_mtpdevice_t *, uint32_t const, 7943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint32_t const); 7953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Object_u16(LIBMTP_mtpdevice_t *, uint32_t const, 7963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint16_t const); 7973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Object_u8(LIBMTP_mtpdevice_t *, uint32_t const, 7983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_property_t const, uint8_t const); 7993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar const * LIBMTP_Get_Property_Description(LIBMTP_property_t inproperty); 8003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Is_Property_Supported(LIBMTP_mtpdevice_t*, LIBMTP_property_t const, 8013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t const); 8023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Allowed_Property_Values(LIBMTP_mtpdevice_t*, LIBMTP_property_t const, 8033aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t const, LIBMTP_allowed_values_t*); 8043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_allowed_values_t(LIBMTP_allowed_values_t*); 8053aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8063aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 8073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 8083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup files The file management API. 8093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 8103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 8113aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_file_t *LIBMTP_new_file_t(void); 8123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_file_t(LIBMTP_file_t*); 8133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevchar const * LIBMTP_Get_Filetype_Description(LIBMTP_filetype_t); 8143aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_file_t *LIBMTP_Get_Filelisting(LIBMTP_mtpdevice_t *); 8153aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_file_t *LIBMTP_Get_Filelisting_With_Callback(LIBMTP_mtpdevice_t *, 8163aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8173aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_file_t *LIBMTP_Get_Filemetadata(LIBMTP_mtpdevice_t *, uint32_t const); 8183aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_File_To_File(LIBMTP_mtpdevice_t*, uint32_t, char const * const, 8193aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_File_To_File_Descriptor(LIBMTP_mtpdevice_t*, uint32_t const, int const, 8213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_File_To_Handler(LIBMTP_mtpdevice_t *, uint32_t const, MTPDataPutFunc, void *, 8233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_File_From_File(LIBMTP_mtpdevice_t *, char const * const, 8253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_file_t * const, LIBMTP_progressfunc_t const, 8263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const); 8273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_File_From_File_Descriptor(LIBMTP_mtpdevice_t *, int const, 8283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_file_t * const, LIBMTP_progressfunc_t const, 8293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const); 8303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_File_From_Handler(LIBMTP_mtpdevice_t *, MTPDataGetFunc, void *, 8313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_file_t * const, LIBMTP_progressfunc_t const, void const * const); 8323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_File_Name(LIBMTP_mtpdevice_t *, LIBMTP_file_t *, const char *); 8333aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_filesampledata_t *LIBMTP_new_filesampledata_t(void); 8343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *); 8353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *, 8363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filetype_t const, 8373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filesampledata_t **); 8383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, 8393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filesampledata_t *); 8403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, 8413aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_filesampledata_t *); 8423aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8433aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8443aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_Set_Load_Cache_On_Demand(int flag); 8453aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8463aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *device, 8473aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev uint32_t storageId, uint32_t parentId); 8483aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8493aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 8503aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 8513aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup tracks The track management API. 8523aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 8533aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 8543aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_track_t *LIBMTP_new_track_t(void); 8553aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_track_t(LIBMTP_track_t*); 8563aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_track_t *LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t*); 8573aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_track_t *LIBMTP_Get_Tracklisting_With_Callback(LIBMTP_mtpdevice_t*, 8583aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8593aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_track_t *LIBMTP_Get_Trackmetadata(LIBMTP_mtpdevice_t*, uint32_t const); 8603aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Track_To_File(LIBMTP_mtpdevice_t*, uint32_t, char const * const, 8613aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8623aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Track_To_File_Descriptor(LIBMTP_mtpdevice_t*, uint32_t const, int const, 8633aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, void const * const); 8643aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Get_Track_To_Handler(LIBMTP_mtpdevice_t *, uint32_t const, MTPDataPutFunc, 8653aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void *, LIBMTP_progressfunc_t const, void const * const); 8663aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_Track_From_File(LIBMTP_mtpdevice_t *, 8673aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev char const * const, LIBMTP_track_t * const, 8683aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, 8693aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const); 8703aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_Track_From_File_Descriptor(LIBMTP_mtpdevice_t *, 8713aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev int const, LIBMTP_track_t * const, 8723aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, 8733aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const); 8743aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Send_Track_From_Handler(LIBMTP_mtpdevice_t *, 8753aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev MTPDataGetFunc, void *, LIBMTP_track_t * const, 8763aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_progressfunc_t const, 8773aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev void const * const); 8783aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Update_Track_Metadata(LIBMTP_mtpdevice_t *, 8793aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev LIBMTP_track_t const * const); 8803aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Track_Exists(LIBMTP_mtpdevice_t *, uint32_t); 8813aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Track_Name(LIBMTP_mtpdevice_t *, LIBMTP_track_t *, const char *); 8823aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** @} */ 8833aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8843aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 8853aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 8863aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup folders The folder management API. 8873aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 8883aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 8893aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_folder_t *LIBMTP_new_folder_t(void); 8903aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_folder_t(LIBMTP_folder_t*); 8913aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_folder_t *LIBMTP_Get_Folder_List(LIBMTP_mtpdevice_t*); 8923aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_folder_t *LIBMTP_Find_Folder(LIBMTP_folder_t*, uint32_t const); 8933aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevuint32_t LIBMTP_Create_Folder(LIBMTP_mtpdevice_t*, char *, uint32_t, uint32_t); 8943aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Folder_Name(LIBMTP_mtpdevice_t *, LIBMTP_folder_t *, const char *); 8953aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** @} */ 8963aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8973aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 8983aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 8993aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 9003aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup playlists The audio/video playlist management API. 9013aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 9023aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 9033aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_playlist_t *LIBMTP_new_playlist_t(void); 9043aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_playlist_t(LIBMTP_playlist_t *); 9053aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_playlist_t *LIBMTP_Get_Playlist_List(LIBMTP_mtpdevice_t *); 9063aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_playlist_t *LIBMTP_Get_Playlist(LIBMTP_mtpdevice_t *, uint32_t const); 9073aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Create_New_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t * const); 9083aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Update_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t * const); 9093aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Playlist_Name(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *, const char *); 9103aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 9113aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 9123aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 9133aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup albums The audio/video album management API. 9143aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 9153aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 9163aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_album_t *LIBMTP_new_album_t(void); 9173aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevvoid LIBMTP_destroy_album_t(LIBMTP_album_t *); 9183aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_album_t *LIBMTP_Get_Album_List(LIBMTP_mtpdevice_t *); 9193aa430dc5437a98734b36f996f9b17081a589143Yavor GoulishevLIBMTP_album_t *LIBMTP_Get_Album(LIBMTP_mtpdevice_t *, uint32_t const); 9203aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Create_New_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t * const); 9213aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Update_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t const * const); 9223aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Album_Name(LIBMTP_mtpdevice_t *, LIBMTP_album_t *, const char *); 9233aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 9243aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** 9253aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @} 9263aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @defgroup objects The object management API. 9273aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev * @{ 9283aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev */ 9293aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t); 9303aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishevint LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t , char *); 9313aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 9323aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/** @} */ 9333aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 9343aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev/* End of C++ exports */ 9353aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#ifdef __cplusplus 9363aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev} 9373aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#endif 9383aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 9393aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev#endif /* LIBMTP_H_INCLUSION_GUARD */ 9403aa430dc5437a98734b36f996f9b17081a589143Yavor Goulishev 941