-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGenerated.m
More file actions
1298 lines (1252 loc) · 56.8 KB
/
Copy pathGenerated.m
File metadata and controls
1298 lines (1252 loc) · 56.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Autogenerated from Pigeon (v26.0.3), do not edit directly.
// See also: https://pub.dev/packages/pigeon
#import "Generated.h"
#if TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#else
#import <Flutter/Flutter.h>
#endif
#if !__has_feature(objc_arc)
#error File requires ARC to be enabled.
#endif
static NSArray<id> *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 FlutterError *createConnectionError(NSString *channelName) {
return [FlutterError errorWithCode:@"channel-error" message:[NSString stringWithFormat:@"%@/%@/%@", @"Unable to establish connection on channel: '", channelName, @"'."] details:@""];
}
static id GetNullableObjectAtIndex(NSArray<id> *array, NSInteger key) {
id result = array[key];
return (result == [NSNull null]) ? nil : result;
}
@implementation WTPHandleTypeEnumBox
- (instancetype)initWithValue:(WTPHandleTypeEnum)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@implementation WTPCallInfoConstsBox
- (instancetype)initWithValue:(WTPCallInfoConsts)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@implementation WTPEndCallReasonEnumBox
- (instancetype)initWithValue:(WTPEndCallReasonEnum)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@implementation WTPIncomingCallErrorEnumBox
- (instancetype)initWithValue:(WTPIncomingCallErrorEnum)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@implementation WTPCallRequestErrorEnumBox
- (instancetype)initWithValue:(WTPCallRequestErrorEnum)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@implementation WTPCallkeepConnectionStateBox
- (instancetype)initWithValue:(WTPCallkeepConnectionState)value {
self = [super init];
if (self) {
_value = value;
}
return self;
}
@end
@interface WTPIOSOptions ()
+ (WTPIOSOptions *)fromList:(NSArray<id> *)list;
+ (nullable WTPIOSOptions *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPAndroidOptions ()
+ (WTPAndroidOptions *)fromList:(NSArray<id> *)list;
+ (nullable WTPAndroidOptions *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPOptions ()
+ (WTPOptions *)fromList:(NSArray<id> *)list;
+ (nullable WTPOptions *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPHandle ()
+ (WTPHandle *)fromList:(NSArray<id> *)list;
+ (nullable WTPHandle *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPEndCallReason ()
+ (WTPEndCallReason *)fromList:(NSArray<id> *)list;
+ (nullable WTPEndCallReason *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPIncomingCallError ()
+ (WTPIncomingCallError *)fromList:(NSArray<id> *)list;
+ (nullable WTPIncomingCallError *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPCallRequestError ()
+ (WTPCallRequestError *)fromList:(NSArray<id> *)list;
+ (nullable WTPCallRequestError *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@interface WTPCallkeepConnection ()
+ (WTPCallkeepConnection *)fromList:(NSArray<id> *)list;
+ (nullable WTPCallkeepConnection *)nullableFromList:(NSArray<id> *)list;
- (NSArray<id> *)toList;
@end
@implementation WTPIOSOptions
+ (instancetype)makeWithLocalizedName:(NSString *)localizedName
ringtoneSound:(nullable NSString *)ringtoneSound
ringbackSound:(nullable NSString *)ringbackSound
iconTemplateImageAssetName:(nullable NSString *)iconTemplateImageAssetName
maximumCallGroups:(NSInteger )maximumCallGroups
maximumCallsPerCallGroup:(NSInteger )maximumCallsPerCallGroup
supportsHandleTypeGeneric:(nullable NSNumber *)supportsHandleTypeGeneric
supportsHandleTypePhoneNumber:(nullable NSNumber *)supportsHandleTypePhoneNumber
supportsHandleTypeEmailAddress:(nullable NSNumber *)supportsHandleTypeEmailAddress
supportsVideo:(BOOL )supportsVideo
includesCallsInRecents:(BOOL )includesCallsInRecents
driveIdleTimerDisabled:(BOOL )driveIdleTimerDisabled {
WTPIOSOptions* pigeonResult = [[WTPIOSOptions alloc] init];
pigeonResult.localizedName = localizedName;
pigeonResult.ringtoneSound = ringtoneSound;
pigeonResult.ringbackSound = ringbackSound;
pigeonResult.iconTemplateImageAssetName = iconTemplateImageAssetName;
pigeonResult.maximumCallGroups = maximumCallGroups;
pigeonResult.maximumCallsPerCallGroup = maximumCallsPerCallGroup;
pigeonResult.supportsHandleTypeGeneric = supportsHandleTypeGeneric;
pigeonResult.supportsHandleTypePhoneNumber = supportsHandleTypePhoneNumber;
pigeonResult.supportsHandleTypeEmailAddress = supportsHandleTypeEmailAddress;
pigeonResult.supportsVideo = supportsVideo;
pigeonResult.includesCallsInRecents = includesCallsInRecents;
pigeonResult.driveIdleTimerDisabled = driveIdleTimerDisabled;
return pigeonResult;
}
+ (WTPIOSOptions *)fromList:(NSArray<id> *)list {
WTPIOSOptions *pigeonResult = [[WTPIOSOptions alloc] init];
pigeonResult.localizedName = GetNullableObjectAtIndex(list, 0);
pigeonResult.ringtoneSound = GetNullableObjectAtIndex(list, 1);
pigeonResult.ringbackSound = GetNullableObjectAtIndex(list, 2);
pigeonResult.iconTemplateImageAssetName = GetNullableObjectAtIndex(list, 3);
pigeonResult.maximumCallGroups = [GetNullableObjectAtIndex(list, 4) integerValue];
pigeonResult.maximumCallsPerCallGroup = [GetNullableObjectAtIndex(list, 5) integerValue];
pigeonResult.supportsHandleTypeGeneric = GetNullableObjectAtIndex(list, 6);
pigeonResult.supportsHandleTypePhoneNumber = GetNullableObjectAtIndex(list, 7);
pigeonResult.supportsHandleTypeEmailAddress = GetNullableObjectAtIndex(list, 8);
pigeonResult.supportsVideo = [GetNullableObjectAtIndex(list, 9) boolValue];
pigeonResult.includesCallsInRecents = [GetNullableObjectAtIndex(list, 10) boolValue];
pigeonResult.driveIdleTimerDisabled = [GetNullableObjectAtIndex(list, 11) boolValue];
return pigeonResult;
}
+ (nullable WTPIOSOptions *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPIOSOptions fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
self.localizedName ?: [NSNull null],
self.ringtoneSound ?: [NSNull null],
self.ringbackSound ?: [NSNull null],
self.iconTemplateImageAssetName ?: [NSNull null],
@(self.maximumCallGroups),
@(self.maximumCallsPerCallGroup),
self.supportsHandleTypeGeneric ?: [NSNull null],
self.supportsHandleTypePhoneNumber ?: [NSNull null],
self.supportsHandleTypeEmailAddress ?: [NSNull null],
@(self.supportsVideo),
@(self.includesCallsInRecents),
@(self.driveIdleTimerDisabled),
];
}
@end
@implementation WTPAndroidOptions
+ (instancetype)makeWithRingtoneSound:(nullable NSString *)ringtoneSound
ringbackSound:(nullable NSString *)ringbackSound {
WTPAndroidOptions* pigeonResult = [[WTPAndroidOptions alloc] init];
pigeonResult.ringtoneSound = ringtoneSound;
pigeonResult.ringbackSound = ringbackSound;
return pigeonResult;
}
+ (WTPAndroidOptions *)fromList:(NSArray<id> *)list {
WTPAndroidOptions *pigeonResult = [[WTPAndroidOptions alloc] init];
pigeonResult.ringtoneSound = GetNullableObjectAtIndex(list, 0);
pigeonResult.ringbackSound = GetNullableObjectAtIndex(list, 1);
return pigeonResult;
}
+ (nullable WTPAndroidOptions *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPAndroidOptions fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
self.ringtoneSound ?: [NSNull null],
self.ringbackSound ?: [NSNull null],
];
}
@end
@implementation WTPOptions
+ (instancetype)makeWithIos:(WTPIOSOptions *)ios
android:(WTPAndroidOptions *)android {
WTPOptions* pigeonResult = [[WTPOptions alloc] init];
pigeonResult.ios = ios;
pigeonResult.android = android;
return pigeonResult;
}
+ (WTPOptions *)fromList:(NSArray<id> *)list {
WTPOptions *pigeonResult = [[WTPOptions alloc] init];
pigeonResult.ios = GetNullableObjectAtIndex(list, 0);
pigeonResult.android = GetNullableObjectAtIndex(list, 1);
return pigeonResult;
}
+ (nullable WTPOptions *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPOptions fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
self.ios ?: [NSNull null],
self.android ?: [NSNull null],
];
}
@end
@implementation WTPHandle
+ (instancetype)makeWithType:(WTPHandleTypeEnum)type
value:(NSString *)value {
WTPHandle* pigeonResult = [[WTPHandle alloc] init];
pigeonResult.type = type;
pigeonResult.value = value;
return pigeonResult;
}
+ (WTPHandle *)fromList:(NSArray<id> *)list {
WTPHandle *pigeonResult = [[WTPHandle alloc] init];
WTPHandleTypeEnumBox *boxedWTPHandleTypeEnum = GetNullableObjectAtIndex(list, 0);
pigeonResult.type = boxedWTPHandleTypeEnum.value;
pigeonResult.value = GetNullableObjectAtIndex(list, 1);
return pigeonResult;
}
+ (nullable WTPHandle *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPHandle fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
[[WTPHandleTypeEnumBox alloc] initWithValue:self.type],
self.value ?: [NSNull null],
];
}
@end
@implementation WTPEndCallReason
+ (instancetype)makeWithValue:(WTPEndCallReasonEnum)value {
WTPEndCallReason* pigeonResult = [[WTPEndCallReason alloc] init];
pigeonResult.value = value;
return pigeonResult;
}
+ (WTPEndCallReason *)fromList:(NSArray<id> *)list {
WTPEndCallReason *pigeonResult = [[WTPEndCallReason alloc] init];
WTPEndCallReasonEnumBox *boxedWTPEndCallReasonEnum = GetNullableObjectAtIndex(list, 0);
pigeonResult.value = boxedWTPEndCallReasonEnum.value;
return pigeonResult;
}
+ (nullable WTPEndCallReason *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPEndCallReason fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
[[WTPEndCallReasonEnumBox alloc] initWithValue:self.value],
];
}
@end
@implementation WTPIncomingCallError
+ (instancetype)makeWithValue:(WTPIncomingCallErrorEnum)value {
WTPIncomingCallError* pigeonResult = [[WTPIncomingCallError alloc] init];
pigeonResult.value = value;
return pigeonResult;
}
+ (WTPIncomingCallError *)fromList:(NSArray<id> *)list {
WTPIncomingCallError *pigeonResult = [[WTPIncomingCallError alloc] init];
WTPIncomingCallErrorEnumBox *boxedWTPIncomingCallErrorEnum = GetNullableObjectAtIndex(list, 0);
pigeonResult.value = boxedWTPIncomingCallErrorEnum.value;
return pigeonResult;
}
+ (nullable WTPIncomingCallError *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPIncomingCallError fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
[[WTPIncomingCallErrorEnumBox alloc] initWithValue:self.value],
];
}
@end
@implementation WTPCallRequestError
+ (instancetype)makeWithValue:(WTPCallRequestErrorEnum)value {
WTPCallRequestError* pigeonResult = [[WTPCallRequestError alloc] init];
pigeonResult.value = value;
return pigeonResult;
}
+ (WTPCallRequestError *)fromList:(NSArray<id> *)list {
WTPCallRequestError *pigeonResult = [[WTPCallRequestError alloc] init];
WTPCallRequestErrorEnumBox *boxedWTPCallRequestErrorEnum = GetNullableObjectAtIndex(list, 0);
pigeonResult.value = boxedWTPCallRequestErrorEnum.value;
return pigeonResult;
}
+ (nullable WTPCallRequestError *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPCallRequestError fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
[[WTPCallRequestErrorEnumBox alloc] initWithValue:self.value],
];
}
@end
@implementation WTPCallkeepConnection
+ (instancetype)makeWithCallId:(NSString *)callId
state:(WTPCallkeepConnectionState)state {
WTPCallkeepConnection* pigeonResult = [[WTPCallkeepConnection alloc] init];
pigeonResult.callId = callId;
pigeonResult.state = state;
return pigeonResult;
}
+ (WTPCallkeepConnection *)fromList:(NSArray<id> *)list {
WTPCallkeepConnection *pigeonResult = [[WTPCallkeepConnection alloc] init];
pigeonResult.callId = GetNullableObjectAtIndex(list, 0);
WTPCallkeepConnectionStateBox *boxedWTPCallkeepConnectionState = GetNullableObjectAtIndex(list, 1);
pigeonResult.state = boxedWTPCallkeepConnectionState.value;
return pigeonResult;
}
+ (nullable WTPCallkeepConnection *)nullableFromList:(NSArray<id> *)list {
return (list) ? [WTPCallkeepConnection fromList:list] : nil;
}
- (NSArray<id> *)toList {
return @[
self.callId ?: [NSNull null],
[[WTPCallkeepConnectionStateBox alloc] initWithValue:self.state],
];
}
@end
@interface WTGeneratedPigeonCodecReader : FlutterStandardReader
@end
@implementation WTGeneratedPigeonCodecReader
- (nullable id)readValueOfType:(UInt8)type {
switch (type) {
case 129: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPHandleTypeEnumBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 130: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPCallInfoConstsBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 131: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPEndCallReasonEnumBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 132: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPIncomingCallErrorEnumBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 133: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPCallRequestErrorEnumBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 134: {
NSNumber *enumAsNumber = [self readValue];
return enumAsNumber == nil ? nil : [[WTPCallkeepConnectionStateBox alloc] initWithValue:[enumAsNumber integerValue]];
}
case 135:
return [WTPIOSOptions fromList:[self readValue]];
case 136:
return [WTPAndroidOptions fromList:[self readValue]];
case 137:
return [WTPOptions fromList:[self readValue]];
case 138:
return [WTPHandle fromList:[self readValue]];
case 139:
return [WTPEndCallReason fromList:[self readValue]];
case 140:
return [WTPIncomingCallError fromList:[self readValue]];
case 141:
return [WTPCallRequestError fromList:[self readValue]];
case 142:
return [WTPCallkeepConnection fromList:[self readValue]];
default:
return [super readValueOfType:type];
}
}
@end
@interface WTGeneratedPigeonCodecWriter : FlutterStandardWriter
@end
@implementation WTGeneratedPigeonCodecWriter
- (void)writeValue:(id)value {
if ([value isKindOfClass:[WTPHandleTypeEnumBox class]]) {
WTPHandleTypeEnumBox *box = (WTPHandleTypeEnumBox *)value;
[self writeByte:129];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPCallInfoConstsBox class]]) {
WTPCallInfoConstsBox *box = (WTPCallInfoConstsBox *)value;
[self writeByte:130];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPEndCallReasonEnumBox class]]) {
WTPEndCallReasonEnumBox *box = (WTPEndCallReasonEnumBox *)value;
[self writeByte:131];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPIncomingCallErrorEnumBox class]]) {
WTPIncomingCallErrorEnumBox *box = (WTPIncomingCallErrorEnumBox *)value;
[self writeByte:132];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPCallRequestErrorEnumBox class]]) {
WTPCallRequestErrorEnumBox *box = (WTPCallRequestErrorEnumBox *)value;
[self writeByte:133];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPCallkeepConnectionStateBox class]]) {
WTPCallkeepConnectionStateBox *box = (WTPCallkeepConnectionStateBox *)value;
[self writeByte:134];
[self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
} else if ([value isKindOfClass:[WTPIOSOptions class]]) {
[self writeByte:135];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPAndroidOptions class]]) {
[self writeByte:136];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPOptions class]]) {
[self writeByte:137];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPHandle class]]) {
[self writeByte:138];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPEndCallReason class]]) {
[self writeByte:139];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPIncomingCallError class]]) {
[self writeByte:140];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPCallRequestError class]]) {
[self writeByte:141];
[self writeValue:[value toList]];
} else if ([value isKindOfClass:[WTPCallkeepConnection class]]) {
[self writeByte:142];
[self writeValue:[value toList]];
} else {
[super writeValue:value];
}
}
@end
@interface WTGeneratedPigeonCodecReaderWriter : FlutterStandardReaderWriter
@end
@implementation WTGeneratedPigeonCodecReaderWriter
- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
return [[WTGeneratedPigeonCodecWriter alloc] initWithData:data];
}
- (FlutterStandardReader *)readerWithData:(NSData *)data {
return [[WTGeneratedPigeonCodecReader alloc] initWithData:data];
}
@end
NSObject<FlutterMessageCodec> *WTGetGeneratedCodec(void) {
static FlutterStandardMessageCodec *sSharedObject = nil;
static dispatch_once_t sPred = 0;
dispatch_once(&sPred, ^{
WTGeneratedPigeonCodecReaderWriter *readerWriter = [[WTGeneratedPigeonCodecReaderWriter alloc] init];
sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
});
return sSharedObject;
}
void SetUpWTPHostAndroidServiceApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<WTPHostAndroidServiceApi> *api) {
SetUpWTPHostAndroidServiceApiWithSuffix(binaryMessenger, api, @"");
}
void SetUpWTPHostAndroidServiceApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger, NSObject<WTPHostAndroidServiceApi> *api, NSString *messageChannelSuffix) {
messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @"";
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostAndroidServiceApi.hungUp", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(hungUpCallId:uuidString:completion:)], @"WTPHostAndroidServiceApi api (%@) doesn't respond to @selector(hungUpCallId:uuidString:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_callId = GetNullableObjectAtIndex(args, 0);
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 1);
[api hungUpCallId:arg_callId uuidString:arg_uuidString completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostAndroidServiceApi.incomingCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(incomingCallCallId:uuidString:handle:displayName:hasVideo:completion:)], @"WTPHostAndroidServiceApi api (%@) doesn't respond to @selector(incomingCallCallId:uuidString:handle:displayName:hasVideo:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_callId = GetNullableObjectAtIndex(args, 0);
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 1);
WTPHandle *arg_handle = GetNullableObjectAtIndex(args, 2);
NSString *arg_displayName = GetNullableObjectAtIndex(args, 3);
BOOL arg_hasVideo = [GetNullableObjectAtIndex(args, 4) boolValue];
[api incomingCallCallId:arg_callId uuidString:arg_uuidString handle:arg_handle displayName:arg_displayName hasVideo:arg_hasVideo completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
}
void SetUpWTPHostApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<WTPHostApi> *api) {
SetUpWTPHostApiWithSuffix(binaryMessenger, api, @"");
}
void SetUpWTPHostApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger, NSObject<WTPHostApi> *api, NSString *messageChannelSuffix) {
messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @"";
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.isSetUp", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(isSetUp:)], @"WTPHostApi api (%@) doesn't respond to @selector(isSetUp:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
FlutterError *error;
NSNumber *output = [api isSetUp:&error];
callback(wrapResult(output, error));
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.setUp", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setUp:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(setUp:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
WTPOptions *arg_options = GetNullableObjectAtIndex(args, 0);
[api setUp:arg_options completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.tearDown", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(tearDown:)], @"WTPHostApi api (%@) doesn't respond to @selector(tearDown:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
[api tearDown:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.reportNewIncomingCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(reportNewIncomingCall:handle:displayName:hasVideo:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(reportNewIncomingCall:handle:displayName:hasVideo:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
WTPHandle *arg_handle = GetNullableObjectAtIndex(args, 1);
NSString *arg_displayName = GetNullableObjectAtIndex(args, 2);
BOOL arg_hasVideo = [GetNullableObjectAtIndex(args, 3) boolValue];
[api reportNewIncomingCall:arg_uuidString handle:arg_handle displayName:arg_displayName hasVideo:arg_hasVideo completion:^(WTPIncomingCallError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.reportConnectingOutgoingCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(reportConnectingOutgoingCall:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(reportConnectingOutgoingCall:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
[api reportConnectingOutgoingCall:arg_uuidString completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.reportConnectedOutgoingCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(reportConnectedOutgoingCall:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(reportConnectedOutgoingCall:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
[api reportConnectedOutgoingCall:arg_uuidString completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.reportUpdateCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(reportUpdateCall:handle:displayName:hasVideo:proximityEnabled:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(reportUpdateCall:handle:displayName:hasVideo:proximityEnabled:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
WTPHandle *arg_handle = GetNullableObjectAtIndex(args, 1);
NSString *arg_displayName = GetNullableObjectAtIndex(args, 2);
NSNumber *arg_hasVideo = GetNullableObjectAtIndex(args, 3);
NSNumber *arg_proximityEnabled = GetNullableObjectAtIndex(args, 4);
[api reportUpdateCall:arg_uuidString handle:arg_handle displayName:arg_displayName hasVideo:arg_hasVideo proximityEnabled:arg_proximityEnabled completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.reportEndCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(reportEndCall:displayName:reason:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(reportEndCall:displayName:reason:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
NSString *arg_displayName = GetNullableObjectAtIndex(args, 1);
WTPEndCallReason *arg_reason = GetNullableObjectAtIndex(args, 2);
[api reportEndCall:arg_uuidString displayName:arg_displayName reason:arg_reason completion:^(FlutterError *_Nullable error) {
callback(wrapResult(nil, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.startCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(startCall:handle:displayNameOrContactIdentifier:video:proximityEnabled:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(startCall:handle:displayNameOrContactIdentifier:video:proximityEnabled:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
WTPHandle *arg_handle = GetNullableObjectAtIndex(args, 1);
NSString *arg_displayNameOrContactIdentifier = GetNullableObjectAtIndex(args, 2);
BOOL arg_video = [GetNullableObjectAtIndex(args, 3) boolValue];
BOOL arg_proximityEnabled = [GetNullableObjectAtIndex(args, 4) boolValue];
[api startCall:arg_uuidString handle:arg_handle displayNameOrContactIdentifier:arg_displayNameOrContactIdentifier video:arg_video proximityEnabled:arg_proximityEnabled completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.answerCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(answerCall:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(answerCall:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
[api answerCall:arg_uuidString completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.endCall", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(endCall:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(endCall:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
[api endCall:arg_uuidString completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.setHeld", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setHeld:onHold:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(setHeld:onHold:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
BOOL arg_onHold = [GetNullableObjectAtIndex(args, 1) boolValue];
[api setHeld:arg_uuidString onHold:arg_onHold completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.setMuted", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setMuted:muted:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(setMuted:muted:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
BOOL arg_muted = [GetNullableObjectAtIndex(args, 1) boolValue];
[api setMuted:arg_uuidString muted:arg_muted completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.setSpeaker", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(setSpeaker:enabled:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(setSpeaker:enabled:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
BOOL arg_enabled = [GetNullableObjectAtIndex(args, 1) boolValue];
[api setSpeaker:arg_uuidString enabled:arg_enabled completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.sendDTMF", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(sendDTMF:key:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(sendDTMF:key:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
NSString *arg_key = GetNullableObjectAtIndex(args, 1);
[api sendDTMF:arg_uuidString key:arg_key completion:^(WTPCallRequestError *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
{
FlutterBasicMessageChannel *channel =
[[FlutterBasicMessageChannel alloc]
initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PHostApi.getConnection", messageChannelSuffix]
binaryMessenger:binaryMessenger
codec:WTGetGeneratedCodec()];
if (api) {
NSCAssert([api respondsToSelector:@selector(getConnectionWithUuidString:completion:)], @"WTPHostApi api (%@) doesn't respond to @selector(getConnectionWithUuidString:completion:)", api);
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
NSArray<id> *args = message;
NSString *arg_uuidString = GetNullableObjectAtIndex(args, 0);
[api getConnectionWithUuidString:arg_uuidString completion:^(WTPCallkeepConnection *_Nullable output, FlutterError *_Nullable error) {
callback(wrapResult(output, error));
}];
}];
} else {
[channel setMessageHandler:nil];
}
}
}
@interface WTPDelegateFlutterApi ()
@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
@property(nonatomic, strong) NSString *messageChannelSuffix;
@end
@implementation WTPDelegateFlutterApi
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""];
}
- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{
self = [self init];
if (self) {
_binaryMessenger = binaryMessenger;
_messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix];
}
return self;
}
- (void)continueStartCallIntentHandle:(WTPHandle *)arg_handle displayName:(nullable NSString *)arg_displayName video:(BOOL)arg_video completion:(void (^)(FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.continueStartCallIntent", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];
[channel sendMessage:@[arg_handle ?: [NSNull null], arg_displayName ?: [NSNull null], @(arg_video)] reply:^(NSArray<id> *reply) {
if (reply != nil) {
if (reply.count > 1) {
completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]);
} else {
completion(nil);
}
} else {
completion(createConnectionError(channelName));
}
}];
}
- (void)didPushIncomingCallHandle:(WTPHandle *)arg_handle displayName:(nullable NSString *)arg_displayName video:(BOOL)arg_video callId:(NSString *)arg_callId uuid:(NSString *)arg_uuidString error:(nullable WTPIncomingCallError *)arg_error completion:(void (^)(FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.didPushIncomingCall", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];
[channel sendMessage:@[arg_handle ?: [NSNull null], arg_displayName ?: [NSNull null], @(arg_video), arg_callId ?: [NSNull null], arg_uuidString ?: [NSNull null], arg_error ?: [NSNull null]] reply:^(NSArray<id> *reply) {
if (reply != nil) {
if (reply.count > 1) {
completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]);
} else {
completion(nil);
}
} else {
completion(createConnectionError(channelName));
}
}];
}
- (void)performStartCall:(NSString *)arg_uuidString handle:(WTPHandle *)arg_handle displayNameOrContactIdentifier:(nullable NSString *)arg_displayNameOrContactIdentifier video:(BOOL)arg_video completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.performStartCall", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];
[channel sendMessage:@[arg_uuidString ?: [NSNull null], arg_handle ?: [NSNull null], arg_displayNameOrContactIdentifier ?: [NSNull null], @(arg_video)] reply:^(NSArray<id> *reply) {
if (reply != nil) {
if (reply.count > 1) {
completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]);
} else {
NSNumber *output = reply[0] == [NSNull null] ? nil : reply[0];
completion(output, nil);
}
} else {
completion(nil, createConnectionError(channelName));
}
}];
}
- (void)performAnswerCall:(NSString *)arg_uuidString completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.performAnswerCall", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];
[channel sendMessage:@[arg_uuidString ?: [NSNull null]] reply:^(NSArray<id> *reply) {
if (reply != nil) {
if (reply.count > 1) {
completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]);
} else {
NSNumber *output = reply[0] == [NSNull null] ? nil : reply[0];
completion(output, nil);
}
} else {
completion(nil, createConnectionError(channelName));
}
}];
}
- (void)performEndCall:(NSString *)arg_uuidString completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.performEndCall", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];
[channel sendMessage:@[arg_uuidString ?: [NSNull null]] reply:^(NSArray<id> *reply) {
if (reply != nil) {
if (reply.count > 1) {
completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]);
} else {
NSNumber *output = reply[0] == [NSNull null] ? nil : reply[0];
completion(output, nil);
}
} else {
completion(nil, createConnectionError(channelName));
}
}];
}
- (void)performSetHeld:(NSString *)arg_uuidString onHold:(BOOL)arg_onHold completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion {
NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.webtrit_callkeep_ios.PDelegateFlutterApi.performSetHeld", _messageChannelSuffix];
FlutterBasicMessageChannel *channel =
[FlutterBasicMessageChannel
messageChannelWithName:channelName
binaryMessenger:self.binaryMessenger
codec:WTGetGeneratedCodec()];