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

« back to all changes in this revision

Viewing changes to src/Libraries/Mtp/Mtp/Album.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:
75
75
 
76
76
        public string Composer {
77
77
            get {
78
 
#if LIBMTP8
79
78
                return album.composer;
80
 
#else
81
 
                return null;
82
 
#endif
83
79
            }
84
80
            set {
85
 
#if LIBMTP8
86
81
                album.composer = value;
87
 
#endif
88
82
            }
89
83
        }
90
84
 
145
139
 
146
140
        protected override int Create ()
147
141
        {
148
 
#if LIBMTP8
149
142
            return LIBMTP_Create_New_Album (Device.Handle, ref album);
150
 
#else
151
 
            return LIBMTP_Create_New_Album (Device.Handle, ref album, 0);
152
 
#endif
153
143
        }
154
144
 
155
145
        protected override int Update ()
194
184
        [DllImport("libmtp.dll")]
195
185
        static extern IntPtr LIBMTP_Get_Album (MtpDeviceHandle handle, uint albumId); // LIBMTP_album_t*
196
186
 
197
 
#if LIBMTP8
198
187
        [DllImport("libmtp.dll")]
199
188
        internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album);
200
 
#else
201
 
        [DllImport("libmtp.dll")]
202
 
        internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album, uint parentId);
203
 
#endif
204
189
 
205
190
        [DllImport("libmtp.dll")]
206
191
        static extern int LIBMTP_Update_Album (MtpDeviceHandle handle, ref AlbumStruct album);
210
195
    internal struct AlbumStruct
211
196
    {
212
197
        public uint album_id;
213
 
#if LIBMTP8
214
198
        public uint parent_id;
215
199
        public uint storage_id;
216
 
#endif
217
200
 
218
201
        [MarshalAs(UnmanagedType.LPStr)]
219
202
        public string name;
221
204
        [MarshalAs(UnmanagedType.LPStr)]
222
205
        public string artist;
223
206
 
224
 
#if LIBMTP8
225
207
        [MarshalAs(UnmanagedType.LPStr)]
226
208
        public string composer;
227
 
#endif
228
209
 
229
210
        [MarshalAs(UnmanagedType.LPStr)]
230
211
        public string genre;