~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/AVFoundation/Events.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
//   Miguel de Icaza (miguel@novell.com)
6
6
// Copyright 2009, Novell, Inc.
7
7
// Copyright 2010, Novell, Inc.
 
8
// Copyright 2011, 2012 Xamarin Inc.
8
9
//
9
10
// Permission is hereby granted, free of charge, to any person obtaining
10
11
// a copy of this software and associated documentation files (the
51
52
                public bool Status { get; private set; }
52
53
        }
53
54
 
54
 
        internal class InternalAVAudioPlayerDelegate : AVAudioPlayerDelegate {
 
55
        #pragma warning disable 672
 
56
        sealed class InternalAVAudioPlayerDelegate : AVAudioPlayerDelegate {
55
57
                internal EventHandler cbEndInterruption, cbBeginInterruption;
56
58
                internal EventHandler<AVStatusEventArgs> cbFinishedPlaying;
57
59
                internal EventHandler<AVErrorEventArgs> cbDecoderError;
71
73
                        if (cbDecoderError != null)
72
74
                                cbDecoderError (player, new AVErrorEventArgs (error));
73
75
                }
74
 
        
 
76
#if !MONOMAC    
75
77
                [Preserve (Conditional = true)]
76
78
                public override void BeginInterruption (AVAudioPlayer  player)
77
79
                {
85
87
                        if (cbEndInterruption != null)
86
88
                                cbEndInterruption (player, EventArgs.Empty);
87
89
                }
88
 
 
 
90
#endif
89
91
        }
 
92
        #pragma warning restore 672
90
93
        
91
94
        public partial class AVAudioPlayer {
92
95
                InternalAVAudioPlayerDelegate EnsureEventDelegate ()
158
161
                        if (cbEncoderError != null)
159
162
                                cbEncoderError (recorder, new AVErrorEventArgs (error));
160
163
                }
161
 
        
 
164
#if !MONOMAC    
162
165
                [Preserve (Conditional = true)]
163
166
                public override void BeginInterruption (AVAudioRecorder  recorder)
164
167
                {
167
170
                }
168
171
        
169
172
                [Preserve (Conditional = true)]
 
173
                [Obsolete ("Deprecated in iOS 6.0")]            
170
174
                public override void EndInterruption (AVAudioRecorder recorder)
171
175
                {
172
176
                        if (cbEndInterruption != null)
173
177
                                cbEndInterruption (recorder, EventArgs.Empty);
174
178
                }
175
 
 
 
179
#endif
176
180
        }
177
181
 
178
182
        public partial class AVAudioRecorder {
252
256
                public string Category { get; private set; }
253
257
        }
254
258
        
 
259
#if !MONOMAC
255
260
        internal class InternalAVAudioSessionDelegate : AVAudioSessionDelegate {
256
261
                internal EventHandler cbEndInterruption, cbBeginInterruption;
257
262
                internal EventHandler<AVCategoryEventArgs> cbCategoryChanged;
368
373
                        }
369
374
                }
370
375
        }
 
376
#endif
371
377
}