|
|
| |
internal static void SendTrack (MtpDeviceHandle handle, string path, ref TrackStruct metadata, ProgressFunction callback, IntPtr data, uint parent) | internal static void SendTrack (MtpDeviceHandle handle, string path, ref TrackStruct metadata, ProgressFunction callback, IntPtr data, uint parent) |
{ | { |
if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data, parent) != 0) |
if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data) != 0) |
{ | { |
LibMtpException.CheckErrorStack (handle); | LibMtpException.CheckErrorStack (handle); |
throw new LibMtpException (ErrorCode.General, "Could not upload the track"); | throw new LibMtpException (ErrorCode.General, "Could not upload the track"); |
|
|
private static extern int LIBMTP_Get_Track_To_File (MtpDeviceHandle handle, uint trackId, string path, ProgressFunction callback, IntPtr data); | private static extern int LIBMTP_Get_Track_To_File (MtpDeviceHandle handle, uint trackId, string path, ProgressFunction callback, IntPtr data); |
| |
[DllImport("libmtp.dll")] | [DllImport("libmtp.dll")] |
private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data, uint parentHandle); |
private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data); |
| |
[DllImport("libmtp.dll")] | [DllImport("libmtp.dll")] |
private static extern int LIBMTP_Update_Track_Metadata (MtpDeviceHandle handle, ref TrackStruct metadata); | private static extern int LIBMTP_Update_Track_Metadata (MtpDeviceHandle handle, ref TrackStruct metadata); |
|
|
{ | { |
public uint item_id; | public uint item_id; |
public uint parent_id; | public uint parent_id; |
|
public uint storage_id; |
|
|
[MarshalAs(UnmanagedType.LPStr)] public string title; | [MarshalAs(UnmanagedType.LPStr)] public string title; |
[MarshalAs(UnmanagedType.LPStr)] public string artist; | [MarshalAs(UnmanagedType.LPStr)] public string artist; |
[MarshalAs(UnmanagedType.LPStr)] public string genre; | [MarshalAs(UnmanagedType.LPStr)] public string genre; |