@MarshalsPointer public static AVAudioSessionRouteChangeNotification toObject(Class<AVAudioSessionRouteChangeNotification> cls, long handle, long flags) { NSDictionary o = (NSDictionary) NSObject.Marshaler.toObject(NSDictionary.class, handle, flags); if (o == null) { return null; } return new AVAudioSessionRouteChangeNotification(o); } @MarshalsPointer
@MarshalsPointer public static long toNative(List<AVAudioSessionRouteChangeNotification> l, long flags) { if (l == null) { return 0L; } NSArray<NSDictionary> array = new NSMutableArray<>(); for (AVAudioSessionRouteChangeNotification i : l) { array.add(i.getDictionary()); } return NSObject.Marshaler.toNative(array, flags); } }
/** * @since Available in iOS 6.0 and later. */ public AVAudioSessionRouteChangeNotification setPreviousRoute(AVAudioSessionRouteDescription previousRoute) { set(Keys.PreviousRoute(), previousRoute); return this; } /*</methods>*/
public NSObject get(NSString key) { if (has(key)) { return data.get(key); } return null; } public AVAudioSessionRouteChangeNotification set(NSString key, NSObject value) {
/** * @since Available in iOS 6.0 and later. */ public AVAudioSessionRouteChangeNotification setReason(AVAudioSessionRouteChangeReason reason) { set(Keys.Reason(), NSNumber.valueOf(reason.value())); return this; } /**
public NSObject get(NSString key) { if (has(key)) { return data.get(key); } return null; } public AVAudioSessionRouteChangeNotification set(NSString key, NSObject value) {
@Override public void invoke(NSNotification a) { NSDictionary<?, ?> userInfo = a.getUserInfo(); AVAudioSessionRouteChangeNotification data = null; if (userInfo != null) { data = new AVAudioSessionRouteChangeNotification(userInfo); } block.invoke(data); } });
/** * @since Available in iOS 6.0 and later. */ public AVAudioSessionRouteChangeNotification setPreviousRoute(AVAudioSessionRouteDescription previousRoute) { set(Keys.PreviousRoute(), previousRoute); return this; } /*</methods>*/
public NSObject get(NSString key) { if (has(key)) { return data.get(key); } return null; } public AVAudioSessionRouteChangeNotification set(NSString key, NSObject value) {
@MarshalsPointer public static long toNative(List<AVAudioSessionRouteChangeNotification> l, long flags) { if (l == null) { return 0L; } NSArray<NSDictionary> array = new NSMutableArray<>(); for (AVAudioSessionRouteChangeNotification i : l) { array.add(i.getDictionary()); } return NSObject.Marshaler.toNative(array, flags); } }
@MarshalsPointer public static List<AVAudioSessionRouteChangeNotification> toObject(Class<? extends NSObject> cls, long handle, long flags) { NSArray<NSDictionary> o = (NSArray<NSDictionary>) NSObject.Marshaler.toObject(NSArray.class, handle, flags); if (o == null) { return null; } List<AVAudioSessionRouteChangeNotification> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(new AVAudioSessionRouteChangeNotification(o.get(i))); } return list; } @MarshalsPointer
/** * @since Available in iOS 6.0 and later. */ public AVAudioSessionRouteChangeNotification setPreviousRoute(AVAudioSessionRouteDescription previousRoute) { set(Keys.PreviousRoute(), previousRoute); return this; } /*</methods>*/
@MarshalsPointer public static long toNative(List<AVAudioSessionRouteChangeNotification> l, long flags) { if (l == null) { return 0L; } NSArray<NSDictionary> array = new NSMutableArray<>(); for (AVAudioSessionRouteChangeNotification i : l) { array.add(i.getDictionary()); } return NSObject.Marshaler.toNative(array, flags); } }
@MarshalsPointer public static AVAudioSessionRouteChangeNotification toObject(Class<AVAudioSessionRouteChangeNotification> cls, long handle, long flags) { NSDictionary o = (NSDictionary) NSObject.Marshaler.toObject(NSDictionary.class, handle, flags); if (o == null) { return null; } return new AVAudioSessionRouteChangeNotification(o); } @MarshalsPointer
/** * @since Available in iOS 6.0 and later. */ public AVAudioSessionRouteChangeNotification setReason(AVAudioSessionRouteChangeReason reason) { set(Keys.Reason(), NSNumber.valueOf(reason.value())); return this; } /**