[banshee] Add an additional parameter to LIBMTP_Create_Folder for libmtp >= 0.3.0
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Add an additional parameter to LIBMTP_Create_Folder for libmtp >= 0.3.0
- Date: Thu, 30 Apr 2009 12:03:36 -0400 (EDT)
commit 4c5bb917c0f3b4203283f5a3bfd18a950ccf01db
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Thu Apr 30 17:57:56 2009 +0200
Add an additional parameter to LIBMTP_Create_Folder for libmtp >= 0.3.0
---
src/Libraries/Mtp/Mtp/Folder.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/Libraries/Mtp/Mtp/Folder.cs b/src/Libraries/Mtp/Mtp/Folder.cs
index e7e69c8..792eb7c 100644
--- a/src/Libraries/Mtp/Mtp/Folder.cs
+++ b/src/Libraries/Mtp/Mtp/Folder.cs
@@ -135,7 +135,11 @@ namespace Mtp
internal static uint CreateFolder (MtpDeviceHandle handle, string name, uint parentId)
{
+#if LIBMTP8
+ uint result = LIBMTP_Create_Folder (handle, name, parentId, 0);
+#else
uint result = LIBMTP_Create_Folder (handle, name, parentId);
+#endif
if (result == 0)
{
LibMtpException.CheckErrorStack(handle);
@@ -174,8 +178,13 @@ namespace Mtp
[DllImport("libmtp.dll")]
private static extern IntPtr LIBMTP_Find_Folder (IntPtr folderList, uint folderId); // LIBMTP_folder_t*
+#if LIBMTP8
+ [DllImport("libmtp.dll")]
+ private static extern uint LIBMTP_Create_Folder (MtpDeviceHandle handle, string name, uint parentId, uint storageId);
+#else
[DllImport("libmtp.dll")]
private static extern uint LIBMTP_Create_Folder (MtpDeviceHandle handle, string name, uint parentId);
+#endif
}
internal class FolderHandle : SafeHandle
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]