~ubuntu-branches/ubuntu/raring/banshee/raring

« back to all changes in this revision

Viewing changes to src/Libraries/Mtp/Mtp/Playlist.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2012-01-23 23:16:49 UTC
  • mfrom: (6.3.22 experimental)
  • Revision ID: package-import@ubuntu.com-20120123231649-safm1f8eycltcgsf
Tags: 2.3.4.ds-1ubuntu1
* Merge from Debian Experimental, remaining changes:
  + Enable and recommend SoundMenu and Disable NotificationArea by default
  + Disable boo and karma extensions
  + Enable and suggest u1ms
  + Move desktop file for Meego UI to /usr/share/une/applications
  + Change the url for the Amazon store redirector
  + [08dea2c] Revert "Fix invalid cast causing ftbfs with libgpod"
* [b617fe0] Convert Ubuntu-specific patches to gbp-pq patches
* Also fixes Launchpad bugs:
  - Fixes race condition while starting (LP: #766303)

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
        protected override int Create ()
86
86
        {
87
 
            // TODO replace 0 w/ the folder id of the playlists folder?
88
 
#if LIBMTP8
89
87
            playlist.parent_id = Device.PlaylistFolder.FolderId;
90
88
            return LIBMTP_Create_New_Playlist (Device.Handle, ref playlist);
91
 
#else
92
 
            return LIBMTP_Create_New_Playlist (Device.Handle, ref playlist, Device.PlaylistFolder.FolderId);
93
 
#endif
94
89
        }
95
90
 
96
91
        protected override int Update ()
112
107
        private static extern IntPtr LIBMTP_Get_Playlist_List (MtpDeviceHandle handle); // LIBMTP_playlist_t*
113
108
 
114
109
        [DllImport("libmtp.dll")]
115
 
#if LIBMTP8
116
110
        private static extern int LIBMTP_Create_New_Playlist (MtpDeviceHandle handle, ref PlaylistStruct metadata);
117
 
#else
118
 
        private static extern int LIBMTP_Create_New_Playlist (MtpDeviceHandle handle, ref PlaylistStruct metadata, uint parentHandle);
119
 
#endif
120
111
 
121
112
        [DllImport("libmtp.dll")]
122
113
        private static extern int LIBMTP_Update_Playlist (MtpDeviceHandle handle, ref PlaylistStruct playlist);
126
117
    internal struct PlaylistStruct
127
118
    {
128
119
        public uint playlist_id;
129
 
#if LIBMTP8
130
120
        public uint parent_id;
131
121
        public uint storage_id;
132
 
#endif
133
122
 
134
123
        [MarshalAs(UnmanagedType.LPStr)]
135
124
        public string Name;