1217 lines
46 KiB
Objective-C
1217 lines
46 KiB
Objective-C
// Autogenerated from Pigeon (v9.0.7), do not edit directly.
|
|
// See also: https://pub.dev/packages/pigeon
|
|
|
|
#import "PlatformBridgeApis.h"
|
|
#import <Flutter/Flutter.h>
|
|
|
|
#if !__has_feature(objc_arc)
|
|
#error File requires ARC to be enabled.
|
|
#endif
|
|
|
|
static NSArray *wrapResult(id result, FlutterError *error) {
|
|
if (error) {
|
|
return @[
|
|
error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null]
|
|
];
|
|
}
|
|
return @[ result ?: [NSNull null] ];
|
|
}
|
|
static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) {
|
|
id result = array[key];
|
|
return (result == [NSNull null]) ? nil : result;
|
|
}
|
|
|
|
@interface MediaLoadRequestData ()
|
|
+ (MediaLoadRequestData *)fromList:(NSArray *)list;
|
|
+ (nullable MediaLoadRequestData *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface MediaInfo ()
|
|
+ (MediaInfo *)fromList:(NSArray *)list;
|
|
+ (nullable MediaInfo *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface MediaMetadata ()
|
|
+ (MediaMetadata *)fromList:(NSArray *)list;
|
|
+ (nullable MediaMetadata *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface WebImage ()
|
|
+ (WebImage *)fromList:(NSArray *)list;
|
|
+ (nullable WebImage *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface MediaTrack ()
|
|
+ (MediaTrack *)fromList:(NSArray *)list;
|
|
+ (nullable MediaTrack *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface MediaStatus ()
|
|
+ (MediaStatus *)fromList:(NSArray *)list;
|
|
+ (nullable MediaStatus *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface AdBreakStatus ()
|
|
+ (AdBreakStatus *)fromList:(NSArray *)list;
|
|
+ (nullable AdBreakStatus *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface AdBreakClipInfo ()
|
|
+ (AdBreakClipInfo *)fromList:(NSArray *)list;
|
|
+ (nullable AdBreakClipInfo *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface MediaQueueItem ()
|
|
+ (MediaQueueItem *)fromList:(NSArray *)list;
|
|
+ (nullable MediaQueueItem *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface CastDevice ()
|
|
+ (CastDevice *)fromList:(NSArray *)list;
|
|
+ (nullable CastDevice *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@interface CastMessage ()
|
|
+ (CastMessage *)fromList:(NSArray *)list;
|
|
+ (nullable CastMessage *)nullableFromList:(NSArray *)list;
|
|
- (NSArray *)toList;
|
|
@end
|
|
|
|
@implementation MediaLoadRequestData
|
|
+ (instancetype)makeWithShouldAutoplay:(nullable NSNumber *)shouldAutoplay
|
|
currentTime:(nullable NSNumber *)currentTime
|
|
mediaInfo:(nullable MediaInfo *)mediaInfo {
|
|
MediaLoadRequestData* pigeonResult = [[MediaLoadRequestData alloc] init];
|
|
pigeonResult.shouldAutoplay = shouldAutoplay;
|
|
pigeonResult.currentTime = currentTime;
|
|
pigeonResult.mediaInfo = mediaInfo;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaLoadRequestData *)fromList:(NSArray *)list {
|
|
MediaLoadRequestData *pigeonResult = [[MediaLoadRequestData alloc] init];
|
|
pigeonResult.shouldAutoplay = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.currentTime = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.mediaInfo = [MediaInfo nullableFromList:(GetNullableObjectAtIndex(list, 2))];
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaLoadRequestData *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaLoadRequestData fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.shouldAutoplay ?: [NSNull null]),
|
|
(self.currentTime ?: [NSNull null]),
|
|
(self.mediaInfo ? [self.mediaInfo toList] : [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation MediaInfo
|
|
+ (instancetype)makeWithContentId:(nullable NSString *)contentId
|
|
streamType:(StreamType)streamType
|
|
contentType:(nullable NSString *)contentType
|
|
mediaMetadata:(nullable MediaMetadata *)mediaMetadata
|
|
mediaTracks:(nullable NSArray<MediaTrack *> *)mediaTracks
|
|
streamDuration:(nullable NSNumber *)streamDuration
|
|
adBreakClips:(nullable NSArray<AdBreakClipInfo *> *)adBreakClips
|
|
customDataAsJson:(nullable NSString *)customDataAsJson {
|
|
MediaInfo* pigeonResult = [[MediaInfo alloc] init];
|
|
pigeonResult.contentId = contentId;
|
|
pigeonResult.streamType = streamType;
|
|
pigeonResult.contentType = contentType;
|
|
pigeonResult.mediaMetadata = mediaMetadata;
|
|
pigeonResult.mediaTracks = mediaTracks;
|
|
pigeonResult.streamDuration = streamDuration;
|
|
pigeonResult.adBreakClips = adBreakClips;
|
|
pigeonResult.customDataAsJson = customDataAsJson;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaInfo *)fromList:(NSArray *)list {
|
|
MediaInfo *pigeonResult = [[MediaInfo alloc] init];
|
|
pigeonResult.contentId = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.streamType = [GetNullableObjectAtIndex(list, 1) integerValue];
|
|
pigeonResult.contentType = GetNullableObjectAtIndex(list, 2);
|
|
pigeonResult.mediaMetadata = [MediaMetadata nullableFromList:(GetNullableObjectAtIndex(list, 3))];
|
|
pigeonResult.mediaTracks = GetNullableObjectAtIndex(list, 4);
|
|
pigeonResult.streamDuration = GetNullableObjectAtIndex(list, 5);
|
|
pigeonResult.adBreakClips = GetNullableObjectAtIndex(list, 6);
|
|
pigeonResult.customDataAsJson = GetNullableObjectAtIndex(list, 7);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaInfo *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaInfo fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.contentId ?: [NSNull null]),
|
|
@(self.streamType),
|
|
(self.contentType ?: [NSNull null]),
|
|
(self.mediaMetadata ? [self.mediaMetadata toList] : [NSNull null]),
|
|
(self.mediaTracks ?: [NSNull null]),
|
|
(self.streamDuration ?: [NSNull null]),
|
|
(self.adBreakClips ?: [NSNull null]),
|
|
(self.customDataAsJson ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation MediaMetadata
|
|
+ (instancetype)makeWithMediaType:(MediaType)mediaType
|
|
strings:(nullable NSDictionary<NSString *, NSString *> *)strings
|
|
webImages:(nullable NSArray<WebImage *> *)webImages {
|
|
MediaMetadata* pigeonResult = [[MediaMetadata alloc] init];
|
|
pigeonResult.mediaType = mediaType;
|
|
pigeonResult.strings = strings;
|
|
pigeonResult.webImages = webImages;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaMetadata *)fromList:(NSArray *)list {
|
|
MediaMetadata *pigeonResult = [[MediaMetadata alloc] init];
|
|
pigeonResult.mediaType = [GetNullableObjectAtIndex(list, 0) integerValue];
|
|
pigeonResult.strings = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.webImages = GetNullableObjectAtIndex(list, 2);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaMetadata *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaMetadata fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
@(self.mediaType),
|
|
(self.strings ?: [NSNull null]),
|
|
(self.webImages ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation WebImage
|
|
+ (instancetype)makeWithUrl:(nullable NSString *)url {
|
|
WebImage* pigeonResult = [[WebImage alloc] init];
|
|
pigeonResult.url = url;
|
|
return pigeonResult;
|
|
}
|
|
+ (WebImage *)fromList:(NSArray *)list {
|
|
WebImage *pigeonResult = [[WebImage alloc] init];
|
|
pigeonResult.url = GetNullableObjectAtIndex(list, 0);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable WebImage *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [WebImage fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.url ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation MediaTrack
|
|
+ (instancetype)makeWithId:(nullable NSNumber *)id
|
|
trackType:(TrackType)trackType
|
|
name:(nullable NSString *)name
|
|
trackSubtype:(TrackSubtype)trackSubtype
|
|
contentId:(nullable NSString *)contentId
|
|
language:(nullable NSString *)language {
|
|
MediaTrack* pigeonResult = [[MediaTrack alloc] init];
|
|
pigeonResult.id = id;
|
|
pigeonResult.trackType = trackType;
|
|
pigeonResult.name = name;
|
|
pigeonResult.trackSubtype = trackSubtype;
|
|
pigeonResult.contentId = contentId;
|
|
pigeonResult.language = language;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaTrack *)fromList:(NSArray *)list {
|
|
MediaTrack *pigeonResult = [[MediaTrack alloc] init];
|
|
pigeonResult.id = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.trackType = [GetNullableObjectAtIndex(list, 1) integerValue];
|
|
pigeonResult.name = GetNullableObjectAtIndex(list, 2);
|
|
pigeonResult.trackSubtype = [GetNullableObjectAtIndex(list, 3) integerValue];
|
|
pigeonResult.contentId = GetNullableObjectAtIndex(list, 4);
|
|
pigeonResult.language = GetNullableObjectAtIndex(list, 5);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaTrack *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaTrack fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.id ?: [NSNull null]),
|
|
@(self.trackType),
|
|
(self.name ?: [NSNull null]),
|
|
@(self.trackSubtype),
|
|
(self.contentId ?: [NSNull null]),
|
|
(self.language ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation MediaStatus
|
|
+ (instancetype)makeWithPlayerState:(PlayerState)playerState
|
|
isPlayingAd:(nullable NSNumber *)isPlayingAd
|
|
mediaInfo:(nullable MediaInfo *)mediaInfo
|
|
adBreakStatus:(nullable AdBreakStatus *)adBreakStatus {
|
|
MediaStatus* pigeonResult = [[MediaStatus alloc] init];
|
|
pigeonResult.playerState = playerState;
|
|
pigeonResult.isPlayingAd = isPlayingAd;
|
|
pigeonResult.mediaInfo = mediaInfo;
|
|
pigeonResult.adBreakStatus = adBreakStatus;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaStatus *)fromList:(NSArray *)list {
|
|
MediaStatus *pigeonResult = [[MediaStatus alloc] init];
|
|
pigeonResult.playerState = [GetNullableObjectAtIndex(list, 0) integerValue];
|
|
pigeonResult.isPlayingAd = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.mediaInfo = [MediaInfo nullableFromList:(GetNullableObjectAtIndex(list, 2))];
|
|
pigeonResult.adBreakStatus = [AdBreakStatus nullableFromList:(GetNullableObjectAtIndex(list, 3))];
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaStatus *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaStatus fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
@(self.playerState),
|
|
(self.isPlayingAd ?: [NSNull null]),
|
|
(self.mediaInfo ? [self.mediaInfo toList] : [NSNull null]),
|
|
(self.adBreakStatus ? [self.adBreakStatus toList] : [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation AdBreakStatus
|
|
+ (instancetype)makeWithAdBreakId:(nullable NSString *)adBreakId
|
|
adBreakClipId:(nullable NSString *)adBreakClipId
|
|
whenSkippableMs:(nullable NSNumber *)whenSkippableMs {
|
|
AdBreakStatus* pigeonResult = [[AdBreakStatus alloc] init];
|
|
pigeonResult.adBreakId = adBreakId;
|
|
pigeonResult.adBreakClipId = adBreakClipId;
|
|
pigeonResult.whenSkippableMs = whenSkippableMs;
|
|
return pigeonResult;
|
|
}
|
|
+ (AdBreakStatus *)fromList:(NSArray *)list {
|
|
AdBreakStatus *pigeonResult = [[AdBreakStatus alloc] init];
|
|
pigeonResult.adBreakId = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.adBreakClipId = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.whenSkippableMs = GetNullableObjectAtIndex(list, 2);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable AdBreakStatus *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [AdBreakStatus fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.adBreakId ?: [NSNull null]),
|
|
(self.adBreakClipId ?: [NSNull null]),
|
|
(self.whenSkippableMs ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation AdBreakClipInfo
|
|
+ (instancetype)makeWithId:(nullable NSString *)id
|
|
title:(nullable NSString *)title
|
|
contentId:(nullable NSString *)contentId
|
|
contentUrl:(nullable NSString *)contentUrl
|
|
clickThroughUrl:(nullable NSString *)clickThroughUrl
|
|
durationMs:(nullable NSNumber *)durationMs
|
|
imageUrl:(nullable NSString *)imageUrl
|
|
mimeType:(nullable NSString *)mimeType
|
|
whenSkippableMs:(nullable NSNumber *)whenSkippableMs {
|
|
AdBreakClipInfo* pigeonResult = [[AdBreakClipInfo alloc] init];
|
|
pigeonResult.id = id;
|
|
pigeonResult.title = title;
|
|
pigeonResult.contentId = contentId;
|
|
pigeonResult.contentUrl = contentUrl;
|
|
pigeonResult.clickThroughUrl = clickThroughUrl;
|
|
pigeonResult.durationMs = durationMs;
|
|
pigeonResult.imageUrl = imageUrl;
|
|
pigeonResult.mimeType = mimeType;
|
|
pigeonResult.whenSkippableMs = whenSkippableMs;
|
|
return pigeonResult;
|
|
}
|
|
+ (AdBreakClipInfo *)fromList:(NSArray *)list {
|
|
AdBreakClipInfo *pigeonResult = [[AdBreakClipInfo alloc] init];
|
|
pigeonResult.id = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.title = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.contentId = GetNullableObjectAtIndex(list, 2);
|
|
pigeonResult.contentUrl = GetNullableObjectAtIndex(list, 3);
|
|
pigeonResult.clickThroughUrl = GetNullableObjectAtIndex(list, 4);
|
|
pigeonResult.durationMs = GetNullableObjectAtIndex(list, 5);
|
|
pigeonResult.imageUrl = GetNullableObjectAtIndex(list, 6);
|
|
pigeonResult.mimeType = GetNullableObjectAtIndex(list, 7);
|
|
pigeonResult.whenSkippableMs = GetNullableObjectAtIndex(list, 8);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable AdBreakClipInfo *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [AdBreakClipInfo fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.id ?: [NSNull null]),
|
|
(self.title ?: [NSNull null]),
|
|
(self.contentId ?: [NSNull null]),
|
|
(self.contentUrl ?: [NSNull null]),
|
|
(self.clickThroughUrl ?: [NSNull null]),
|
|
(self.durationMs ?: [NSNull null]),
|
|
(self.imageUrl ?: [NSNull null]),
|
|
(self.mimeType ?: [NSNull null]),
|
|
(self.whenSkippableMs ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation MediaQueueItem
|
|
+ (instancetype)makeWithItemId:(nullable NSNumber *)itemId
|
|
playbackDuration:(nullable NSNumber *)playbackDuration
|
|
startTime:(nullable NSNumber *)startTime
|
|
media:(nullable MediaInfo *)media
|
|
autoplay:(nullable NSNumber *)autoplay
|
|
preloadTime:(nullable NSNumber *)preloadTime {
|
|
MediaQueueItem* pigeonResult = [[MediaQueueItem alloc] init];
|
|
pigeonResult.itemId = itemId;
|
|
pigeonResult.playbackDuration = playbackDuration;
|
|
pigeonResult.startTime = startTime;
|
|
pigeonResult.media = media;
|
|
pigeonResult.autoplay = autoplay;
|
|
pigeonResult.preloadTime = preloadTime;
|
|
return pigeonResult;
|
|
}
|
|
+ (MediaQueueItem *)fromList:(NSArray *)list {
|
|
MediaQueueItem *pigeonResult = [[MediaQueueItem alloc] init];
|
|
pigeonResult.itemId = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.playbackDuration = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.startTime = GetNullableObjectAtIndex(list, 2);
|
|
pigeonResult.media = [MediaInfo nullableFromList:(GetNullableObjectAtIndex(list, 3))];
|
|
pigeonResult.autoplay = GetNullableObjectAtIndex(list, 4);
|
|
pigeonResult.preloadTime = GetNullableObjectAtIndex(list, 5);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable MediaQueueItem *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [MediaQueueItem fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.itemId ?: [NSNull null]),
|
|
(self.playbackDuration ?: [NSNull null]),
|
|
(self.startTime ?: [NSNull null]),
|
|
(self.media ? [self.media toList] : [NSNull null]),
|
|
(self.autoplay ?: [NSNull null]),
|
|
(self.preloadTime ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation CastDevice
|
|
+ (instancetype)makeWithDeviceId:(nullable NSString *)deviceId
|
|
friendlyName:(nullable NSString *)friendlyName
|
|
modelName:(nullable NSString *)modelName {
|
|
CastDevice* pigeonResult = [[CastDevice alloc] init];
|
|
pigeonResult.deviceId = deviceId;
|
|
pigeonResult.friendlyName = friendlyName;
|
|
pigeonResult.modelName = modelName;
|
|
return pigeonResult;
|
|
}
|
|
+ (CastDevice *)fromList:(NSArray *)list {
|
|
CastDevice *pigeonResult = [[CastDevice alloc] init];
|
|
pigeonResult.deviceId = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.friendlyName = GetNullableObjectAtIndex(list, 1);
|
|
pigeonResult.modelName = GetNullableObjectAtIndex(list, 2);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable CastDevice *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [CastDevice fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.deviceId ?: [NSNull null]),
|
|
(self.friendlyName ?: [NSNull null]),
|
|
(self.modelName ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@implementation CastMessage
|
|
+ (instancetype)makeWithNamespace:(nullable NSString *)namespace
|
|
message:(nullable NSString *)message {
|
|
CastMessage* pigeonResult = [[CastMessage alloc] init];
|
|
pigeonResult.namespace = namespace;
|
|
pigeonResult.message = message;
|
|
return pigeonResult;
|
|
}
|
|
+ (CastMessage *)fromList:(NSArray *)list {
|
|
CastMessage *pigeonResult = [[CastMessage alloc] init];
|
|
pigeonResult.namespace = GetNullableObjectAtIndex(list, 0);
|
|
pigeonResult.message = GetNullableObjectAtIndex(list, 1);
|
|
return pigeonResult;
|
|
}
|
|
+ (nullable CastMessage *)nullableFromList:(NSArray *)list {
|
|
return (list) ? [CastMessage fromList:list] : nil;
|
|
}
|
|
- (NSArray *)toList {
|
|
return @[
|
|
(self.namespace ?: [NSNull null]),
|
|
(self.message ?: [NSNull null]),
|
|
];
|
|
}
|
|
@end
|
|
|
|
@interface CastHostApiCodecReader : FlutterStandardReader
|
|
@end
|
|
@implementation CastHostApiCodecReader
|
|
- (nullable id)readValueOfType:(UInt8)type {
|
|
switch (type) {
|
|
case 128:
|
|
return [AdBreakClipInfo fromList:[self readValue]];
|
|
case 129:
|
|
return [CastDevice fromList:[self readValue]];
|
|
case 130:
|
|
return [CastMessage fromList:[self readValue]];
|
|
case 131:
|
|
return [MediaInfo fromList:[self readValue]];
|
|
case 132:
|
|
return [MediaLoadRequestData fromList:[self readValue]];
|
|
case 133:
|
|
return [MediaMetadata fromList:[self readValue]];
|
|
case 134:
|
|
return [MediaQueueItem fromList:[self readValue]];
|
|
case 135:
|
|
return [MediaTrack fromList:[self readValue]];
|
|
case 136:
|
|
return [WebImage fromList:[self readValue]];
|
|
default:
|
|
return [super readValueOfType:type];
|
|
}
|
|
}
|
|
@end
|
|
|
|
@interface CastHostApiCodecWriter : FlutterStandardWriter
|
|
@end
|
|
@implementation CastHostApiCodecWriter
|
|
- (void)writeValue:(id)value {
|
|
if ([value isKindOfClass:[AdBreakClipInfo class]]) {
|
|
[self writeByte:128];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[CastDevice class]]) {
|
|
[self writeByte:129];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[CastMessage class]]) {
|
|
[self writeByte:130];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaInfo class]]) {
|
|
[self writeByte:131];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaLoadRequestData class]]) {
|
|
[self writeByte:132];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaMetadata class]]) {
|
|
[self writeByte:133];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaQueueItem class]]) {
|
|
[self writeByte:134];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaTrack class]]) {
|
|
[self writeByte:135];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[WebImage class]]) {
|
|
[self writeByte:136];
|
|
[self writeValue:[value toList]];
|
|
} else {
|
|
[super writeValue:value];
|
|
}
|
|
}
|
|
@end
|
|
|
|
@interface CastHostApiCodecReaderWriter : FlutterStandardReaderWriter
|
|
@end
|
|
@implementation CastHostApiCodecReaderWriter
|
|
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
|
|
return [[CastHostApiCodecWriter alloc] initWithData:data];
|
|
}
|
|
- (FlutterStandardReader *)readerWithData:(NSData *)data {
|
|
return [[CastHostApiCodecReader alloc] initWithData:data];
|
|
}
|
|
@end
|
|
|
|
NSObject<FlutterMessageCodec> *CastHostApiGetCodec() {
|
|
static FlutterStandardMessageCodec *sSharedObject = nil;
|
|
static dispatch_once_t sPred = 0;
|
|
dispatch_once(&sPred, ^{
|
|
CastHostApiCodecReaderWriter *readerWriter = [[CastHostApiCodecReaderWriter alloc] init];
|
|
sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
|
|
});
|
|
return sSharedObject;
|
|
}
|
|
|
|
void CastHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<CastHostApi> *api) {
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.sendMessage"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(sendMessageMessage:error:)], @"CastHostApi api (%@) doesn't respond to @selector(sendMessageMessage:error:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
NSArray *args = message;
|
|
CastMessage *arg_message = GetNullableObjectAtIndex(args, 0);
|
|
FlutterError *error;
|
|
[api sendMessageMessage:arg_message error:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.showCastDialog"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(showCastDialogWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(showCastDialogWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api showCastDialogWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.setMute"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(setMuteMuted:error:)], @"CastHostApi api (%@) doesn't respond to @selector(setMuteMuted:error:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
NSArray *args = message;
|
|
NSNumber *arg_muted = GetNullableObjectAtIndex(args, 0);
|
|
FlutterError *error;
|
|
[api setMuteMuted:arg_muted error:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.getCastDevice"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(getCastDeviceWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(getCastDeviceWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
CastDevice *output = [api getCastDeviceWithError:&error];
|
|
callback(wrapResult(output, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.loadMediaLoadRequestData"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(loadMediaLoadRequestDataRequest:error:)], @"CastHostApi api (%@) doesn't respond to @selector(loadMediaLoadRequestDataRequest:error:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
NSArray *args = message;
|
|
MediaLoadRequestData *arg_request = GetNullableObjectAtIndex(args, 0);
|
|
FlutterError *error;
|
|
[api loadMediaLoadRequestDataRequest:arg_request error:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.getMediaInfo"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(getMediaInfoWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(getMediaInfoWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
MediaInfo *output = [api getMediaInfoWithError:&error];
|
|
callback(wrapResult(output, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.play"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(playWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(playWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api playWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.pause"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(pauseWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(pauseWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api pauseWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.stop"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(stopWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(stopWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api stopWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.showTracksChooserDialog"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(showTracksChooserDialogWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(showTracksChooserDialogWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api showTracksChooserDialogWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.skipAd"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(skipAdWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(skipAdWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api skipAdWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.queueAppendItem"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(queueAppendItemItem:error:)], @"CastHostApi api (%@) doesn't respond to @selector(queueAppendItemItem:error:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
NSArray *args = message;
|
|
MediaQueueItem *arg_item = GetNullableObjectAtIndex(args, 0);
|
|
FlutterError *error;
|
|
[api queueAppendItemItem:arg_item error:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.queueNextItem"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(queueNextItemWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(queueNextItemWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api queueNextItemWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.queuePrevItem"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(queuePrevItemWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(queuePrevItemWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
[api queuePrevItemWithError:&error];
|
|
callback(wrapResult(nil, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.getQueueItemCount"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(getQueueItemCountWithError:)], @"CastHostApi api (%@) doesn't respond to @selector(getQueueItemCountWithError:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
FlutterError *error;
|
|
NSNumber *output = [api getQueueItemCountWithError:&error];
|
|
callback(wrapResult(output, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
{
|
|
FlutterBasicMessageChannel *channel =
|
|
[[FlutterBasicMessageChannel alloc]
|
|
initWithName:@"dev.flutter.pigeon.CastHostApi.getQueueItemAtIndex"
|
|
binaryMessenger:binaryMessenger
|
|
codec:CastHostApiGetCodec()];
|
|
if (api) {
|
|
NSCAssert([api respondsToSelector:@selector(getQueueItemAtIndexIndex:error:)], @"CastHostApi api (%@) doesn't respond to @selector(getQueueItemAtIndexIndex:error:)", api);
|
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
|
NSArray *args = message;
|
|
NSNumber *arg_index = GetNullableObjectAtIndex(args, 0);
|
|
FlutterError *error;
|
|
MediaQueueItem *output = [api getQueueItemAtIndexIndex:arg_index error:&error];
|
|
callback(wrapResult(output, error));
|
|
}];
|
|
} else {
|
|
[channel setMessageHandler:nil];
|
|
}
|
|
}
|
|
}
|
|
@interface CastFlutterApiCodecReader : FlutterStandardReader
|
|
@end
|
|
@implementation CastFlutterApiCodecReader
|
|
- (nullable id)readValueOfType:(UInt8)type {
|
|
switch (type) {
|
|
case 128:
|
|
return [AdBreakClipInfo fromList:[self readValue]];
|
|
case 129:
|
|
return [AdBreakStatus fromList:[self readValue]];
|
|
case 130:
|
|
return [CastMessage fromList:[self readValue]];
|
|
case 131:
|
|
return [MediaInfo fromList:[self readValue]];
|
|
case 132:
|
|
return [MediaMetadata fromList:[self readValue]];
|
|
case 133:
|
|
return [MediaStatus fromList:[self readValue]];
|
|
case 134:
|
|
return [MediaTrack fromList:[self readValue]];
|
|
case 135:
|
|
return [WebImage fromList:[self readValue]];
|
|
default:
|
|
return [super readValueOfType:type];
|
|
}
|
|
}
|
|
@end
|
|
|
|
@interface CastFlutterApiCodecWriter : FlutterStandardWriter
|
|
@end
|
|
@implementation CastFlutterApiCodecWriter
|
|
- (void)writeValue:(id)value {
|
|
if ([value isKindOfClass:[AdBreakClipInfo class]]) {
|
|
[self writeByte:128];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[AdBreakStatus class]]) {
|
|
[self writeByte:129];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[CastMessage class]]) {
|
|
[self writeByte:130];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaInfo class]]) {
|
|
[self writeByte:131];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaMetadata class]]) {
|
|
[self writeByte:132];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaStatus class]]) {
|
|
[self writeByte:133];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[MediaTrack class]]) {
|
|
[self writeByte:134];
|
|
[self writeValue:[value toList]];
|
|
} else if ([value isKindOfClass:[WebImage class]]) {
|
|
[self writeByte:135];
|
|
[self writeValue:[value toList]];
|
|
} else {
|
|
[super writeValue:value];
|
|
}
|
|
}
|
|
@end
|
|
|
|
@interface CastFlutterApiCodecReaderWriter : FlutterStandardReaderWriter
|
|
@end
|
|
@implementation CastFlutterApiCodecReaderWriter
|
|
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
|
|
return [[CastFlutterApiCodecWriter alloc] initWithData:data];
|
|
}
|
|
- (FlutterStandardReader *)readerWithData:(NSData *)data {
|
|
return [[CastFlutterApiCodecReader alloc] initWithData:data];
|
|
}
|
|
@end
|
|
|
|
NSObject<FlutterMessageCodec> *CastFlutterApiGetCodec() {
|
|
static FlutterStandardMessageCodec *sSharedObject = nil;
|
|
static dispatch_once_t sPred = 0;
|
|
dispatch_once(&sPred, ^{
|
|
CastFlutterApiCodecReaderWriter *readerWriter = [[CastFlutterApiCodecReaderWriter alloc] init];
|
|
sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
|
|
});
|
|
return sSharedObject;
|
|
}
|
|
|
|
@interface CastFlutterApi ()
|
|
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
|
|
@end
|
|
|
|
@implementation CastFlutterApi
|
|
|
|
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
|
|
self = [super init];
|
|
if (self) {
|
|
_binaryMessenger = binaryMessenger;
|
|
}
|
|
return self;
|
|
}
|
|
- (void)getSessionMessageNamespacesWithCompletion:(void (^)(NSArray<NSString *> *_Nullable, FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.getSessionMessageNamespaces"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
NSArray<NSString *> *output = reply;
|
|
completion(output, nil);
|
|
}];
|
|
}
|
|
- (void)onCastStateChangedCastState:(NSNumber *)arg_castState completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onCastStateChanged"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_castState ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onMessageReceivedMessage:(CastMessage *)arg_message completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onMessageReceived"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_message ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionStartingWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionStarting"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionStartedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionStarted"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionStartFailedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionStartFailed"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionEndingWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionEnding"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionEndedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionEnded"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionResumingWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionResuming"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionResumedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionResumed"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionResumeFailedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionResumeFailed"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSessionSuspendedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSessionSuspended"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onStatusUpdatedMediaStatus:(MediaStatus *)arg_mediaStatus completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onStatusUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_mediaStatus ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onMetadataUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onMetadataUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onQueueStatusUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onQueueStatusUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onPreloadStatusUpdatedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onPreloadStatusUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onSendingRemoteMediaRequestWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onSendingRemoteMediaRequest"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onAdBreakStatusUpdatedMediaStatus:(MediaStatus *)arg_mediaStatus completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onAdBreakStatusUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_mediaStatus ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onMediaErrorWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onMediaError"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onProgressUpdatedProgressMs:(NSNumber *)arg_progressMs durationMs:(NSNumber *)arg_durationMs completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onProgressUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_progressMs ?: [NSNull null], arg_durationMs ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)onAdBreakClipProgressUpdatedAdBreakId:(NSString *)arg_adBreakId adBreakClipId:(NSString *)arg_adBreakClipId progressMs:(NSNumber *)arg_progressMs durationMs:(NSNumber *)arg_durationMs whenSkippableMs:(NSNumber *)arg_whenSkippableMs completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.onAdBreakClipProgressUpdated"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_adBreakId ?: [NSNull null], arg_adBreakClipId ?: [NSNull null], arg_progressMs ?: [NSNull null], arg_durationMs ?: [NSNull null], arg_whenSkippableMs ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)itemsInsertedInRangeInsertIndex:(NSNumber *)arg_insertIndex insertCount:(NSNumber *)arg_insertCount completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.itemsInsertedInRange"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_insertIndex ?: [NSNull null], arg_insertCount ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)itemsReloadedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.itemsReloaded"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)itemsRemovedAtIndexesIndexes:(NSArray<NSNumber *> *)arg_indexes completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.itemsRemovedAtIndexes"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_indexes ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)itemsReorderedAtIndexesIndexes:(NSArray<NSNumber *> *)arg_indexes insertBeforeIndex:(NSNumber *)arg_insertBeforeIndex completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.itemsReorderedAtIndexes"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_indexes ?: [NSNull null], arg_insertBeforeIndex ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)itemsUpdatedAtIndexesIndexes:(NSArray<NSNumber *> *)arg_indexes completion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.itemsUpdatedAtIndexes"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:@[arg_indexes ?: [NSNull null]] reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)mediaQueueChangedWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.mediaQueueChanged"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
- (void)mediaQueueWillChangeWithCompletion:(void (^)(FlutterError *_Nullable))completion {
|
|
FlutterBasicMessageChannel *channel =
|
|
[FlutterBasicMessageChannel
|
|
messageChannelWithName:@"dev.flutter.pigeon.CastFlutterApi.mediaQueueWillChange"
|
|
binaryMessenger:self.binaryMessenger
|
|
codec:CastFlutterApiGetCodec()];
|
|
[channel sendMessage:nil reply:^(id reply) {
|
|
completion(nil);
|
|
}];
|
|
}
|
|
@end
|
|
|