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

« back to all changes in this revision

Viewing changes to external/maccore/src/AudioToolbox/AudioSession.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:
1
1
// 
2
 
// AudioSessions.cs:
 
2
// AudioSession.cs: AudioSession bindings
3
3
//
4
4
// Authors:
5
5
//    Miguel de Icaza (miguel@novell.com)
 
6
//    Marek Safar (marek.safar@gmail.com)
6
7
//     
7
8
// Copyright 2009 Novell, Inc
 
9
// Copyright 2011, 2012 Xamarin Inc.
8
10
//
9
11
// Permission is hereby granted, free of charge, to any person obtaining
10
12
// a copy of this software and associated documentation files (the
36
38
using MonoMac.Foundation;
37
39
 
38
40
using OSStatus = System.Int32;
39
 
using AudioQueueParameterID = System.UInt32;
40
 
using AudioQueueParameterValue = System.Single;
41
 
using AudioQueueRef = System.IntPtr;
42
 
using AudioQueueTimelineRef = System.IntPtr;
43
41
 
44
42
namespace MonoMac.AudioToolbox {
45
43
 
75
73
                                return "This operation requries AudioSession.Category to be explicitly set";
76
74
                                
77
75
                        }
78
 
                        return String.Format ("Unknown error code: 0x{0:x}", k);
 
76
                        return String.Format ("Unknown error code: {0}", k);
79
77
                }
80
78
                
81
79
                internal AudioSessionException (int k) : base (Lookup (k))
85
83
 
86
84
                public AudioSessionErrors ErrorCode { get; private set; }
87
85
        }
 
86
 
 
87
        public class AccessoryInfo
 
88
        {
 
89
                internal AccessoryInfo (int id, string description)
 
90
                {
 
91
                        ID = id;
 
92
                        Description = description;
 
93
                }
 
94
 
 
95
                public int ID { get; private set; }
 
96
                public string Description { get; private set; }
 
97
        }
88
98
        
89
99
        public class AudioSessionPropertyEventArgs :EventArgs {
90
100
                public AudioSessionPropertyEventArgs (AudioSessionProperty prop, int size, IntPtr data)
97
107
                public int Size  { get; set; }
98
108
                public IntPtr Data { get; set; }
99
109
        }
 
110
 
 
111
        public class AudioSessionRouteChangeEventArgs : EventArgs {
 
112
                static IntPtr route_change_key, previous_route_key, current_route_key;
 
113
 
 
114
                static AudioSessionRouteChangeEventArgs ()
 
115
                {
 
116
                        var lib = Dlfcn.dlopen (Constants.AudioToolboxLibrary, 0);
 
117
                        route_change_key = Dlfcn.GetIntPtr (lib, "kAudioSession_RouteChangeKey_Reason");
 
118
                        previous_route_key = Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteChangeKey_PreviousRouteDescription");
 
119
                        current_route_key = Dlfcn.GetIntPtr (lib, "kAudioSession_AudioRouteChangeKey_CurrentRouteDescription");
 
120
 
 
121
                        Dlfcn.dlclose (lib);
 
122
                }
 
123
 
 
124
                public NSDictionary Dictionary { get; private set; }
 
125
                
 
126
                public AudioSessionRouteChangeEventArgs (IntPtr dictHandle)
 
127
                {
 
128
                        Dictionary = new NSDictionary (dictHandle);
 
129
                }
 
130
                
 
131
                public AudioSessionRouteChangeReason Reason {
 
132
                        get {
 
133
                                using (var num = new NSNumber (Dictionary.LowlevelObjectForKey (route_change_key))){
 
134
                                        return (AudioSessionRouteChangeReason) num.Int32Value;
 
135
                                }
 
136
                        }
 
137
                }
 
138
 
 
139
                NSArray Extract (IntPtr key, NSString secondKey)
 
140
                {
 
141
                        var dictH = Dictionary.LowlevelObjectForKey (key);
 
142
                        if (dictH == IntPtr.Zero)
 
143
                                return null;
 
144
 
 
145
//                      Console.WriteLine ("Extracting from {2} {0} and getting {1}", new NSString (key), new NSDictionary (dictH).Description, Dictionary.Description);
 
146
                        // Description dictionary, indexed by the second key, the result is an array
 
147
                        using (var descDict = new NSDictionary (dictH)){
 
148
                                var sdict = descDict.LowlevelObjectForKey (secondKey.Handle);
 
149
                                if (sdict == IntPtr.Zero)
 
150
                                        return null;
 
151
 
 
152
                                return new NSArray (sdict);
 
153
                        }
 
154
                }
 
155
 
 
156
                public AudioSessionInputRouteKind PreviousInputRoute {
 
157
                        get {
 
158
                                using (var array = Extract (previous_route_key, AudioSession.AudioRouteKey_Inputs))
 
159
                                        return AudioSession.GetInputRoute (array);
 
160
                        }
 
161
                }
 
162
 
 
163
                public AudioSessionOutputRouteKind [] PreviousOutputRoutes {
 
164
                        get {
 
165
                                using (var array = Extract (previous_route_key, AudioSession.AudioRouteKey_Outputs))
 
166
                                        return AudioSession.GetOutputRoutes (array);
 
167
                        }
 
168
                }
 
169
 
 
170
                public AudioSessionInputRouteKind CurrentInputRoute {
 
171
                        get {
 
172
                                using (var array = Extract (current_route_key, AudioSession.AudioRouteKey_Inputs))
 
173
                                        return AudioSession.GetInputRoute (array);
 
174
                        }
 
175
                }
 
176
 
 
177
                public AudioSessionOutputRouteKind [] CurrentOutputRoutes {
 
178
                        get {
 
179
                                using (var array = Extract (current_route_key, AudioSession.AudioRouteKey_Outputs))
 
180
                                        return AudioSession.GetOutputRoutes (array);
 
181
                        }
 
182
                }
 
183
        }
100
184
        
101
185
        public static class AudioSession {
102
186
                static bool initialized;
103
187
                public static event EventHandler Interrupted;
104
188
                public static event EventHandler Resumed;
105
189
 
106
 
                static NSString AudioRouteKey_Type;
107
 
                static NSString AudioRouteKey_Inputs;
108
 
                static NSString AudioRouteKey_Outputs;
 
190
                internal static NSString AudioRouteKey_Type;
 
191
                internal static NSString AudioRouteKey_Inputs;
 
192
                internal static NSString AudioRouteKey_Outputs;
109
193
                
110
194
                static NSString InputRoute_LineIn;
111
195
                static NSString InputRoute_BuiltInMic;
122
206
                static NSString OutputRoute_USBAudio;
123
207
                static NSString OutputRoute_HDMI;
124
208
                static NSString OutputRoute_AirPlay;
 
209
                static NSString InputSourceKey_ID;
 
210
                static NSString InputSourceKey_Description;
 
211
                static NSString OutputDestinationKey_ID;
 
212
                static NSString OutputDestinationKey_Description;
125
213
                
126
214
                [DllImport (Constants.AudioToolboxLibrary)]
127
215
                extern static OSStatus AudioSessionInitialize(IntPtr cfRunLoop, IntPtr cfstr_runMode, InterruptionListener listener, IntPtr userData);
162
250
                        OutputRoute_USBAudio = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_USBAudio"));
163
251
                        OutputRoute_HDMI = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_HDMI"));
164
252
                        OutputRoute_AirPlay = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSessionOutputRoute_AirPlay"));
 
253
 
 
254
                        InputSourceKey_ID = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_InputSourceKey_ID"));
 
255
                        InputSourceKey_Description = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_InputSourceKey_Description"));
 
256
 
 
257
                        OutputDestinationKey_ID = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_OutputDestinationKey_ID"));
 
258
                        OutputDestinationKey_Description = new NSString (Dlfcn.GetIntPtr (lib, "kAudioSession_OutputDestinationKey_Description"));
165
259
                        
166
260
                        Dlfcn.dlclose (lib);
167
261
                        
182
276
 
183
277
                [DllImport (Constants.AudioToolboxLibrary)]
184
278
                extern static OSStatus AudioSessionSetActive (int active);
 
279
 
185
280
                public static void SetActive (bool active)
186
281
                {
187
282
                        int k = AudioSessionSetActive (active ? 1 : 0);
190
285
                }
191
286
 
192
287
                [DllImport (Constants.AudioToolboxLibrary)]
 
288
                extern static AudioSessionErrors AudioSessionSetActive (int active, AudioSessionActiveFlags inFlags);
 
289
 
 
290
                [Since (4,0)]
 
291
                public static AudioSessionErrors SetActive (bool active, AudioSessionActiveFlags flags)
 
292
                {
 
293
                        return AudioSessionSetActive (active ? 1 : 0, flags);
 
294
                }
 
295
 
 
296
                [DllImport (Constants.AudioToolboxLibrary)]
193
297
                extern static OSStatus AudioSessionGetProperty(AudioSessionProperty id, ref int size, IntPtr data);
194
298
 
195
299
                [DllImport (Constants.AudioToolboxLibrary)]
248
352
                static void SetInt (AudioSessionProperty property, int val)
249
353
                {
250
354
                        unsafe {
251
 
                                int k = AudioSessionSetProperty (property, 4, (IntPtr) (&val));
 
355
                                int k = AudioSessionSetProperty (property, sizeof (int), (IntPtr) (&val));
252
356
                                if (k != 0)
253
357
                                        throw new AudioSessionException (k);
254
358
                        }
297
401
                        }
298
402
                }
299
403
 
 
404
                [Obsolete ("Deprecated in iOS 5.0. Use InputRoute or OutputRoute instead")]
300
405
                static public string AudioRoute {
301
406
                        get {
302
407
                                return CFString.FetchString ((IntPtr) GetInt (AudioSessionProperty.AudioRoute));
303
408
                        }
304
409
                }
305
 
                
306
 
                static public AudioSessionInputRouteKind InputRoute {
307
 
                        get {
308
 
                                var arr = (NSArray) AudioRouteDescription [AudioRouteKey_Inputs];
309
 
                                
310
 
                                if (arr == null || arr.Count == 0)
311
 
                                        return AudioSessionInputRouteKind.None;
312
 
                                
313
 
                                var dict = new NSDictionary (arr.ValueAt (0));
 
410
 
 
411
                [Since (5,0)]
 
412
                static public AccessoryInfo[] InputSources {
 
413
                        get {
 
414
                                using (var array = new CFArray ((IntPtr) GetInt (AudioSessionProperty.InputSources))) {
 
415
                                        var res = new AccessoryInfo [array.Count];
 
416
                                        for (int i = 0; i < res.Length; ++i) {
 
417
                                                var dict = array.GetValue (i);
 
418
                                                var id = new NSNumber (CFDictionary.GetValue (dict, InputSourceKey_ID.Handle));
 
419
                                                var desc = CFString.FetchString (CFDictionary.GetValue (dict, InputSourceKey_Description.Handle));
 
420
 
 
421
                                                res [i] = new AccessoryInfo ((int) id, desc);
 
422
                                                id.Dispose ();
 
423
                                        }
 
424
                                        return res;
 
425
                                }
 
426
                        }
 
427
                }
 
428
 
 
429
                [Since (5,0)]
 
430
                static public AccessoryInfo[] OutputDestinations {
 
431
                        get {
 
432
                                using (var array = new CFArray ((IntPtr) GetInt (AudioSessionProperty.OutputDestinations))) {
 
433
                                        var res = new AccessoryInfo [array.Count];
 
434
                                        for (int i = 0; i < res.Length; ++i) {
 
435
                                                var dict = array.GetValue (i);
 
436
                                                var id = new NSNumber (CFDictionary.GetValue (dict, OutputDestinationKey_ID.Handle));
 
437
                                                var desc = CFString.FetchString (CFDictionary.GetValue (dict, OutputDestinationKey_Description.Handle));
 
438
 
 
439
                                                res [i] = new AccessoryInfo ((int) id, desc);
 
440
                                                id.Dispose ();
 
441
                                        }
 
442
                                        return res;
 
443
                                }
 
444
                        }
 
445
                }
 
446
 
 
447
                /* Could not test what sort of unique CFNumberRef value it's
 
448
 
 
449
                [Since (5,0)]
 
450
                static public int InputSource {
 
451
                        get {
 
452
                                return GetInt (AudioSessionProperty.InputSource);
 
453
                        }
 
454
                        set {
 
455
                                SetInt (AudioSessionProperty.InputSource, value);
 
456
                        }
 
457
                }
 
458
 
 
459
                [Since (5,0)]
 
460
                static public int OutputDestination {
 
461
                        get {
 
462
                                return GetInt (AudioSessionProperty.OutputDestination);
 
463
                        }
 
464
                        set {
 
465
                                SetInt (AudioSessionProperty.OutputDestination, value);
 
466
                        }
 
467
                }
 
468
 
 
469
                */
 
470
 
 
471
                static internal AudioSessionInputRouteKind GetInputRoute (NSArray arr)
 
472
                {
 
473
                        if (arr == null || arr.Count == 0)
 
474
                                return AudioSessionInputRouteKind.None;
 
475
                        
 
476
                        var dict = new NSDictionary (arr.ValueAt (0));
 
477
                        
 
478
                        if (dict == null || dict.Count == 0)
 
479
                                return AudioSessionInputRouteKind.None;
 
480
                        
 
481
                        var val = (NSString) dict [AudioRouteKey_Type];
 
482
                        
 
483
                        if (val == null)
 
484
                                return AudioSessionInputRouteKind.None;
 
485
                        
 
486
                        if (val == InputRoute_LineIn) {
 
487
                                return AudioSessionInputRouteKind.LineIn;
 
488
                        } else if (val == InputRoute_BuiltInMic) {
 
489
                                return AudioSessionInputRouteKind.BuiltInMic;
 
490
                        } else if (val == InputRoute_HeadsetMic) {
 
491
                                return AudioSessionInputRouteKind.HeadsetMic;
 
492
                        } else if (val == InputRoute_BluetoothHFP) {
 
493
                                return AudioSessionInputRouteKind.BluetoothHFP;
 
494
                        } else if (val == InputRoute_USBAudio) {
 
495
                                return AudioSessionInputRouteKind.USBAudio;
 
496
                        } else {
 
497
                                return (AudioSessionInputRouteKind) val.Handle;
 
498
                        }
 
499
                }
 
500
 
 
501
                static internal AudioSessionOutputRouteKind [] GetOutputRoutes (NSArray arr)
 
502
                {
 
503
                        if (arr == null || arr.Count == 0)
 
504
                                return null;
 
505
                        
 
506
                        var result = new AudioSessionOutputRouteKind [arr.Count];
 
507
                        for (uint i = 0; i < arr.Count; i++) {
 
508
                                var dict = new NSDictionary ((IntPtr) arr.ValueAt (i));
 
509
                                
 
510
                                result [i] = AudioSessionOutputRouteKind.None;
314
511
                                
315
512
                                if (dict == null || dict.Count == 0)
316
 
                                        return AudioSessionInputRouteKind.None;
 
513
                                        continue;
317
514
                                
318
515
                                var val = (NSString) dict [AudioRouteKey_Type];
319
516
                                
320
517
                                if (val == null)
321
 
                                        return AudioSessionInputRouteKind.None;
 
518
                                        continue;
322
519
                                
323
 
                                if (val == InputRoute_LineIn) {
324
 
                                        return AudioSessionInputRouteKind.LineIn;
325
 
                                } else if (val == InputRoute_BuiltInMic) {
326
 
                                        return AudioSessionInputRouteKind.BuiltInMic;
327
 
                                } else if (val == InputRoute_HeadsetMic) {
328
 
                                        return AudioSessionInputRouteKind.HeadsetMic;
329
 
                                } else if (val == InputRoute_BluetoothHFP) {
330
 
                                        return AudioSessionInputRouteKind.BluetoothHFP;
331
 
                                } else if (val == InputRoute_USBAudio) {
332
 
                                        return AudioSessionInputRouteKind.USBAudio;
333
 
                                } else {
334
 
                                        // now what?
335
 
                                        throw new Exception (); // return AudioSessionInputRouteKind.None;
336
 
                                }
 
520
                                if (val == OutputRoute_LineOut) {
 
521
                                        result [i] = AudioSessionOutputRouteKind.LineOut;
 
522
                                } else if (val == OutputRoute_Headphones) {
 
523
                                        result [i] = AudioSessionOutputRouteKind.Headphones;
 
524
                                } else if (val == OutputRoute_BluetoothHFP) {
 
525
                                        result [i] = AudioSessionOutputRouteKind.BluetoothHFP;
 
526
                                } else if (val == OutputRoute_BluetoothA2DP) {
 
527
                                        result [i] = AudioSessionOutputRouteKind.BluetoothA2DP;
 
528
                                } else if (val == OutputRoute_BuiltInReceiver) {
 
529
                                        result [i] = AudioSessionOutputRouteKind.BuiltInReceiver;
 
530
                                } else if (val == OutputRoute_BuiltInSpeaker) {
 
531
                                        result [i] = AudioSessionOutputRouteKind.BuiltInSpeaker;
 
532
                                } else if (val == OutputRoute_USBAudio) {
 
533
                                        result [i] = AudioSessionOutputRouteKind.USBAudio;
 
534
                                } else if (val == OutputRoute_HDMI) {
 
535
                                        result [i] = AudioSessionOutputRouteKind.HDMI;
 
536
                                } else if (val == OutputRoute_AirPlay) {
 
537
                                        result [i] = AudioSessionOutputRouteKind.AirPlay;
 
538
                                } else
 
539
                                        result [i] = (AudioSessionOutputRouteKind) val.Handle;
 
540
                        }
 
541
                        return result;
 
542
                }
 
543
 
 
544
                [Since (5,0)]
 
545
                static public AudioSessionInputRouteKind InputRoute {
 
546
                        get {
 
547
                                return GetInputRoute ((NSArray) AudioRouteDescription [AudioRouteKey_Inputs]);
337
548
                        }
338
549
                }
339
550
                
 
551
                [Since (5,0)]
340
552
                static public AudioSessionOutputRouteKind [] OutputRoutes {
341
553
                        get {
342
 
                                var arr = (NSArray) AudioRouteDescription [AudioRouteKey_Outputs];
343
 
                                
344
 
                                if (arr == null || arr.Count == 0)
345
 
                                        return null;
346
 
                                
347
 
                                var result = new AudioSessionOutputRouteKind [arr.Count];
348
 
                                for (uint i = 0; i < arr.Count; i++) {
349
 
                                        var dict = new NSDictionary ((IntPtr) arr.ValueAt (i));
350
 
                                        
351
 
                                        result [i] = AudioSessionOutputRouteKind.None;
352
 
                                        
353
 
                                        if (dict == null || dict.Count == 0)
354
 
                                                continue;
355
 
                                        
356
 
                                        var val = (NSString) dict [AudioRouteKey_Type];
357
 
                                        
358
 
                                        if (val == null)
359
 
                                                continue;
360
 
                                        
361
 
                                        if (val == OutputRoute_LineOut) {
362
 
                                                result [i] = AudioSessionOutputRouteKind.LineOut;
363
 
                                        } else if (val == OutputRoute_Headphones) {
364
 
                                                result [i] = AudioSessionOutputRouteKind.Headphones;
365
 
                                        } else if (val == OutputRoute_BluetoothHFP) {
366
 
                                                result [i] = AudioSessionOutputRouteKind.BluetoothHFP;
367
 
                                        } else if (val == OutputRoute_BluetoothA2DP) {
368
 
                                                result [i] = AudioSessionOutputRouteKind.BluetoothA2DP;
369
 
                                        } else if (val == OutputRoute_BuiltInReceiver) {
370
 
                                                result [i] = AudioSessionOutputRouteKind.BuiltInReceiver;
371
 
                                        } else if (val == OutputRoute_BuiltInSpeaker) {
372
 
                                                result [i] = AudioSessionOutputRouteKind.BuiltInSpeaker;
373
 
                                        } else if (val == OutputRoute_USBAudio) {
374
 
                                                result [i] = AudioSessionOutputRouteKind.USBAudio;
375
 
                                        } else if (val == OutputRoute_HDMI) {
376
 
                                                result [i] = AudioSessionOutputRouteKind.HDMI;
377
 
                                        } else if (val == OutputRoute_AirPlay) {
378
 
                                                result [i] = AudioSessionOutputRouteKind.AirPlay;
379
 
                                        
380
 
                                        }
381
 
                                }
382
 
                                
383
 
                                return result;
 
554
                                return GetOutputRoutes ((NSArray) AudioRouteDescription [AudioRouteKey_Outputs]);
384
555
                        }
385
556
                }
386
557
                
470
641
                        }
471
642
                }
472
643
 
473
 
                static public AudioSessionMode Mode {
474
 
                        get {
475
 
                                return (AudioSessionMode) GetInt (AudioSessionProperty.Mode);
476
 
                        }
477
 
                        set {
478
 
                                SetInt (AudioSessionProperty.Mode, (int) value);
479
 
                        }
480
 
                }
481
 
                
482
644
                static public bool OverrideCategoryDefaultToSpeaker {
483
645
                        get {
484
646
                                return GetInt (AudioSessionProperty.OverrideCategoryDefaultToSpeaker) != 0;
497
659
                        }
498
660
                }
499
661
                
 
662
                [Since (5,0)]
 
663
                static public AudioSessionMode Mode {
 
664
                        get {
 
665
                                return (AudioSessionMode) GetInt (AudioSessionProperty.Mode);
 
666
                        }
 
667
                        set {
 
668
                                SetInt (AudioSessionProperty.Mode, (int) value);
 
669
                        }
 
670
                }
 
671
 
 
672
                // InputSources
 
673
 
 
674
                [Since (5,0)]
 
675
                static public bool InputGainAvailable {
 
676
                        get {
 
677
                                return GetInt (AudioSessionProperty.InputGainAvailable) != 0;
 
678
                        }
 
679
                }
 
680
 
 
681
                [Since (5,0)]
 
682
                static public float InputGainScalar {
 
683
                        get {
 
684
                                return GetFloat (AudioSessionProperty.InputGainScalar);
 
685
                        }
 
686
                        set {
 
687
                                SetFloat (AudioSessionProperty.InputGainScalar, value);
 
688
                        }
 
689
                }
500
690
 
501
691
                delegate void _PropertyListener (IntPtr userData, AudioSessionProperty prop, int size, IntPtr data);
502
692
                public delegate void PropertyListener (AudioSessionProperty prop, int size, IntPtr data);
551
741
                                listeners [property] = null;
552
742
                }
553
743
 
 
744
               class RouteChangeListener {
 
745
                       public EventHandler<AudioSessionRouteChangeEventArgs> cback;
 
746
                       
 
747
                       public RouteChangeListener (EventHandler<AudioSessionRouteChangeEventArgs> cback)
 
748
                       {
 
749
                               this.cback = cback;
 
750
                       }
 
751
 
 
752
                       public void Listener (AudioSessionProperty prop, int size, IntPtr data)
 
753
                       {
 
754
                               cback (null, new AudioSessionRouteChangeEventArgs (data));
 
755
                       }
 
756
               }
 
757
               
 
758
               static Hashtable strongListenerHash;
 
759
               
 
760
               public static event EventHandler<AudioSessionRouteChangeEventArgs> AudioRouteChanged {
 
761
                       add {
 
762
                               if (strongListenerHash == null)
 
763
                                       strongListenerHash = new Hashtable ();
 
764
                               var routeChangeListener = new RouteChangeListener (value);
 
765
                               strongListenerHash [value] = routeChangeListener;
 
766
                               AddListener (AudioSessionProperty.AudioRouteChange, routeChangeListener.Listener);
 
767
                       }
 
768
 
 
769
                       remove {
 
770
                               if (strongListenerHash == null)
 
771
                                       return;
 
772
                               var k = strongListenerHash [value] as RouteChangeListener;
 
773
                               if (k != null){
 
774
                                       RemoveListener (AudioSessionProperty.AudioRouteChange, k.Listener);
 
775
                                       strongListenerHash.Remove (value);
 
776
                               }
 
777
                       }
 
778
               }
554
779
        }
555
780
}