forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApiDefinition.cs
2886 lines (2289 loc) · 102 KB
/
ApiDefinition.cs
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
using System;
using System.Collections.Generic;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using StoreKit;
using UIKit;
namespace Google.MobileAds {
#region CustomLib
// This is a custom class created by me and is not part of Google Admob lib
// But it is necesary for this binding to work
[Static]
interface AdSizeCons {
[Internal]
[Field ("kGADAdSizeBanner", "__Internal")]
IntPtr _Banner { get; }
[Internal]
[Field ("kGADAdSizeLargeBanner", "__Internal")]
IntPtr _LargeBanner { get; }
[Internal]
[Field ("kGADAdSizeMediumRectangle", "__Internal")]
IntPtr _MediumRectangle { get; }
[Internal]
[Field ("kGADAdSizeFullBanner", "__Internal")]
IntPtr _FullBanner { get; }
[Internal]
[Field ("kGADAdSizeLeaderboard", "__Internal")]
IntPtr _Leaderboard { get; }
[Internal]
[Field ("kGADAdSizeSkyscraper", "__Internal")]
IntPtr _Skyscraper { get; }
[Internal]
[Field ("kGADAdSizeSmartBannerPortrait", "__Internal")]
IntPtr _SmartBannerPortrait { get; }
[Internal]
[Field ("kGADAdSizeSmartBannerLandscape", "__Internal")]
IntPtr _SmartBannerLandscape { get; }
[Internal]
[Field ("kGADAdSizeFluid", "__Internal")]
IntPtr _Fluid { get; }
[Internal]
[Field ("kGADAdSizeInvalid", "__Internal")]
IntPtr _Invalid { get; }
}
#endregion
// typedef void (^GADInitializationCompletionHandler)(GADInitializationStatus * _Nonnull);
delegate void InitializationCompletionHandler (InitializationStatus status);
// @interface GADMobileAds : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "GADMobileAds")]
interface MobileAds {
// + (GADMobileAds *)sharedInstance;
[Static]
[Export ("sharedInstance")]
MobileAds SharedInstance { get; }
// +(void)disableAutomatedInAppPurchaseReporting;
[Static]
[Export ("disableAutomatedInAppPurchaseReporting")]
void DisableAutomatedInAppPurchaseReporting ();
// +(void)disableSDKCrashReporting;
[Static]
[Export ("disableSDKCrashReporting")]
void DisableSDKCrashReporting ();
// @property(nonatomic, assign) float applicationVolume;
[Export ("applicationVolume", ArgumentSemantic.Assign)]
float ApplicationVolume { get; set; }
// @property(nonatomic, assign) BOOL applicationMuted;
[Export ("applicationMuted", ArgumentSemantic.Assign)]
bool ApplicationMuted { get; set; }
// @property(nonatomic, readonly, strong) GADAudioVideoManager *audioVideoManager;
[Export ("audioVideoManager", ArgumentSemantic.Strong)]
AudioVideoManager AudioVideoManager { get; }
// @property(nonatomic, readonly, strong) GADRequestConfiguration *requestConfiguration;
[Export ("requestConfiguration", ArgumentSemantic.Strong)]
RequestConfiguration RequestConfiguration { get; }
// @property (readonly, nonatomic) GADInitializationStatus * _Nonnull initializationStatus;
[Export ("initializationStatus")]
InitializationStatus InitializationStatus { get; }
// - (BOOL)isSDKVersionAtLeastMajor:(NSInteger)major minor:(NSInteger)minor patch:(NSInteger)patch;
[Export ("isSDKVersionAtLeastMajor:minor:patch:")]
void IsSDKVersionAtLeast (nint major, nint minor, nint patch);
// -(void)startWithCompletionHandler:(GADInitializationCompletionHandler _Nullable)completionHandler;
[Export ("startWithCompletionHandler:")]
void Start ([NullAllowed] InitializationCompletionHandler completionHandler);
// + (void)configureWithApplicationID:(NSString *)applicationID;
[Obsolete ("Use MobileAds.SharedInstance.Start method instead.")]
[Static]
[Export ("configureWithApplicationID:")]
void Configure (string applicationId);
}
// @interface GADMultipleAdsAdLoaderOptions : GADAdLoaderOptions
[BaseType (typeof (AdLoaderOptions), Name = "GADMultipleAdsAdLoaderOptions")]
interface MultipleAdsAdLoaderOptions {
// @property(nonatomic) NSInteger numberOfAds;
[Export ("numberOfAds")]
nint NumberOfAds { get; set; }
}
interface IAdNetworkExtras {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADAdNetworkExtras")]
interface AdNetworkExtras {
}
// @interface GADAdReward : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "GADAdReward")]
interface AdReward {
// @property(nonatomic, readonly, nonnull) NSString *type;
[Export ("type")]
string Type { get; }
// @property(nonatomic, readonly, nonnull) NSDecimalNumber *amount;
[Export ("amount")]
NSDecimalNumber Amount { get; }
// -(instancetype)initWithRewardType:(NSString *)rewardType rewardAmount:(NSDecimalNumber *)rewardAmount __attribute__((objc_designated_initializer));
[DesignatedInitializer]
[Export ("initWithRewardType:rewardAmount:")]
IntPtr Constructor (string rewardType, NSDecimalNumber rewardAmount);
}
[BaseType (typeof (UIView),
Name = "GADBannerView",
Delegates = new string [] { "Delegate", "AdSizeDelegate" },
Events = new Type [] { typeof (BannerViewDelegate), typeof (AdSizeDelegate) })]
interface BannerView {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("initWithAdSize:origin:")]
IntPtr Constructor (AdSize size, CGPoint origin);
[Export ("initWithAdSize:")]
IntPtr Constructor (AdSize size);
[NullAllowed]
[Export ("adUnitID", ArgumentSemantic.Copy)]
string AdUnitId { get; set; }
[Obsolete ("Use AdUnitId property instead. This will be removed in future versions.")]
[NullAllowed]
[Wrap ("AdUnitId")]
string AdUnitID { get; set; }
[NullAllowed]
[Export ("rootViewController", ArgumentSemantic.Weak)]
UIViewController RootViewController { get; set; }
[Export ("adSize", ArgumentSemantic.Assign)]
AdSize AdSize { get; set; }
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
IBannerViewDelegate Delegate { get; set; }
[Obsolete]
[NullAllowed]
[Export ("inAppPurchaseDelegate", ArgumentSemantic.Weak)]
IInAppPurchaseDelegate InAppPurchaseDelegate { get; set; }
// @property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAdSizeDelegate> adSizeDelegate;
[NullAllowed]
[Export ("adSizeDelegate", ArgumentSemantic.Weak)]
IAdSizeDelegate AdSizeDelegate { get; set; }
[Export ("loadRequest:")]
void LoadRequest ([NullAllowed] Request request);
[Export ("autoloadEnabled", ArgumentSemantic.Assign)]
bool AutoloadEnabled { [Bind ("isAutoloadEnabled")] get; set; }
// @property (readonly, nonatomic) GADResponseInfo * _Nullable responseInfo;
[NullAllowed]
[Export ("responseInfo")]
ResponseInfo ResponseInfo { get; }
// @property (copy, nonatomic) GADPaidEventHandler _Nullable paidEventHandler;
[NullAllowed]
[Export ("paidEventHandler", ArgumentSemantic.Copy)]
PaidEventHandler PaidEventHandler { get; set; }
[Obsolete]
[Export ("hasAutoRefreshed", ArgumentSemantic.Assign)]
bool HasAutoRefreshed { get; }
[Obsolete ("Use ResponseInfo.AdNetworkClassName.")]
[NullAllowed]
[Export ("mediatedAdView", ArgumentSemantic.Weak)]
UIView MediatedAdView { get; }
[Obsolete ("Use ResponseInfo.AdNetworkClassName.")]
[NullAllowed]
[Export ("adNetworkClassName")]
string AdNetworkClassName { get; }
}
interface IBannerViewDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADBannerViewDelegate")]
interface BannerViewDelegate {
[EventArgs ("BannerViewE")]
[EventName ("AdReceived")]
[Export ("adViewDidReceiveAd:")]
void DidReceiveAd (BannerView view);
[EventArgs ("BannerViewError")]
[EventName ("ReceiveAdFailed")]
[Export ("adView:didFailToReceiveAdWithError:")]
void DidFailToReceiveAd (BannerView view, RequestError error);
[EventArgs ("BannerViewE")]
[Export ("adViewWillPresentScreen:")]
void WillPresentScreen (BannerView adView);
[EventArgs ("BannerViewE")]
[Export ("adViewWillDismissScreen:")]
void WillDismissScreen (BannerView adView);
[EventArgs ("BannerViewE")]
[EventName ("ScreenDismissed")]
[Export ("adViewDidDismissScreen:")]
void DidDismissScreen (BannerView adView);
[EventArgs ("BannerViewE")]
[Export ("adViewWillLeaveApplication:")]
void WillLeaveApplication (BannerView adView);
}
[BaseType (typeof (NSObject), Name = "GADExtras")]
interface Extras : AdNetworkExtras {
[NullAllowed]
[Export ("additionalParameters", ArgumentSemantic.Copy)]
NSDictionary AdditionalParameters { get; set; }
}
[DisableDefaultCtor]
[BaseType (typeof (NSObject),
Name = "GADInterstitial",
Delegates = new string [] { "Delegate" },
Events = new Type [] { typeof (InterstitialDelegate) })]
interface Interstitial {
[Export ("initWithAdUnitID:")]
IntPtr Constructor (string adUnitID);
[Export ("adUnitID")]
string AdUnitId { get; }
[Obsolete ("Use AdUnitId property instead. This will be removed in future versions.")]
[Wrap ("AdUnitId")]
string AdUnitID { get; }
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
IInterstitialDelegate Delegate { get; set; }
[Obsolete]
[NullAllowed]
[Export ("inAppPurchaseDelegate", ArgumentSemantic.Weak)]
IInAppPurchaseDelegate InAppPurchaseDelegate { get; set; }
[Export ("loadRequest:")]
void LoadRequest ([NullAllowed] Request request);
[Export ("isReady")]
bool IsReady { get; }
[Export ("hasBeenUsed")]
bool HasBeenUsed { get; }
// @property (readonly, nonatomic) GADResponseInfo * _Nullable responseInfo;
[NullAllowed]
[Export ("responseInfo")]
ResponseInfo ResponseInfo { get; }
// @property (copy, nonatomic) GADPaidEventHandler _Nullable paidEventHandler;
[NullAllowed]
[Export ("paidEventHandler", ArgumentSemantic.Copy)]
PaidEventHandler PaidEventHandler { get; set; }
[Export ("presentFromRootViewController:")]
void Present ([NullAllowed] UIViewController rootViewController);
[Obsolete ("Use Present method instead. This will be removed in future versions.")]
[Wrap ("Present (rootViewController)")]
void PresentFromRootViewController ([NullAllowed] UIViewController rootViewController);
// -(BOOL)canPresentFromRootViewController:(UIViewController * _Nonnull)rootViewController error:(NSError * _Nullable * _Nullable)error;
[Export ("canPresentFromRootViewController:error:")]
bool CanPresent (UIViewController rootViewController, [NullAllowed] out NSError error);
[Obsolete ("Use ResponseInfo.AdNetworkClassName.")]
[NullAllowed]
[Export("adNetworkClassName")]
string AdNetworkClassName { get; }
}
interface IInterstitialDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADInterstitialDelegate")]
interface InterstitialDelegate {
[EventArgs ("InterstitialE")]
[EventName ("AdReceived")]
[Export ("interstitialDidReceiveAd:")]
void DidReceiveAd (Interstitial ad);
[EventArgs ("InterstitialDidFailToReceiveAdWithError")]
[EventName ("ReceiveAdFailed")]
[Export ("interstitial:didFailToReceiveAdWithError:")]
void DidFailToReceiveAd (Interstitial sender, RequestError error);
[EventArgs ("InterstitialE")]
[Export ("interstitialWillPresentScreen:")]
void WillPresentScreen (Interstitial ad);
// - (void)interstitialDidFailToPresentScreen:(GADInterstitial *)ad;
[EventArgs ("InterstitialE")]
[EventName ("FailedToPresentScreen")]
[Export ("interstitialDidFailToPresentScreen:")]
void DidFailToPresentScreen (Interstitial ad);
[EventArgs ("InterstitialE")]
[Export ("interstitialWillDismissScreen:")]
void WillDismissScreen (Interstitial ad);
[EventArgs ("InterstitialE")]
[EventName ("ScreenDismissed")]
[Export ("interstitialDidDismissScreen:")]
void DidDismissScreen (Interstitial ad);
[EventArgs ("InterstitialE")]
[Export ("interstitialWillLeaveApplication:")]
void WillLeaveApplication (Interstitial ad);
}
// @interface GADMediaContent : NSObject
[BaseType (typeof (NSObject), Name = "GADMediaContent")]
interface MediaContent {
// @property (readonly, nonatomic) GADVideoController * _Nonnull videoController;
[Export ("videoController")]
VideoController VideoController { get; }
// @property (readonly, nonatomic) BOOL hasVideoContent;
[Export ("hasVideoContent")]
bool HasVideoContent { get; }
// @property(nonatomic, readonly) CGFloat aspectRatio;
[Export ("aspectRatio")]
nfloat AspectRatio { get; }
// @property (readonly, nonatomic) NSTimeInterval duration;
[Export("duration")]
double Duration { get; }
// @property (readonly, nonatomic) NSTimeInterval currentTime;
[Export("currentTime")]
double CurrentTime { get; }
///
/// From GADMediaContent (NativeAd) category
///
// @property (nonatomic) UIImage * _Nullable mainImage;
[NullAllowed]
[Export ("mainImage", ArgumentSemantic.Assign)]
UIImage MainImage { get; set; }
}
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "GADRequest")]
interface Request : INSCopying {
[Field ("kGADSimulatorID", "__Internal")]
NSString SimulatorId { get; }
[Static]
[Export ("request")]
Request GetDefaultRequest ();
[Export ("registerAdNetworkExtras:")]
void RegisterAdNetworkExtras (IAdNetworkExtras extras);
[Export ("adNetworkExtrasFor:")]
IAdNetworkExtras AdNetworkExtrasFor ([NullAllowed] Class aClass);
[Export ("removeAdNetworkExtrasFor:")]
void RemoveAdNetworkExtrasFor (Class aClass);
[Static]
[Export ("sdkVersion")]
string SdkVersion { get; }
[Obsolete ("Use MobileAds.SharedInstance.RequestConfiguration.TestDeviceIdentifiers.")]
[NullAllowed]
[Export ("testDevices", ArgumentSemantic.Copy)]
string [] TestDevices { get; set; }
[Export ("setLocationWithLatitude:longitude:accuracy:")]
void SetLocation (nfloat latitude, nfloat longitude, nfloat accuracyInMeters);
[NullAllowed]
[Export ("keywords", ArgumentSemantic.Copy)]
string [] Keywords { get; set; }
[NullAllowed]
[Export ("contentURL", ArgumentSemantic.Copy)]
string ContentUrl { get; set; }
[NullAllowed]
[Export ("requestAgent", ArgumentSemantic.Copy)]
string RequestAgent { get; set; }
[Export ("gender", ArgumentSemantic.Assign)]
Gender Gender { get; set; }
[NullAllowed]
[Export ("birthday", ArgumentSemantic.Copy)]
NSDate Birthday { get; set; }
[Obsolete ("Use the Birthday property instead.")]
[Export ("setBirthdayWithMonth:day:year:")]
void SetBirthday (nint m, nint d, nint y);
[Obsolete ("Use SetLocation (nfloat, nfloat, nfloat) overload method instead.")]
[Export ("setLocationWithDescription:")]
void SetLocation (string locationDescription);
[Obsolete ("Use MobileAds.SharedInstance.RequestConfiguration.Tag method instead.")]
[Export ("tagForChildDirectedTreatment:")]
void Tag (bool forChildDirectedTreatment);
}
[Static]
interface MaxAdContentRatingConstants
{
// GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingGeneral;
[Field("GADMaxAdContentRatingGeneral", "__Internal")]
NSString General { get; }
// GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingParentalGuidance;
[Field("GADMaxAdContentRatingParentalGuidance", "__Internal")]
NSString ParentalGuidance { get; }
// GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingTeen;
[Field("GADMaxAdContentRatingTeen", "__Internal")]
NSString Teen { get; }
// GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingMatureAudience;
[Field("GADMaxAdContentRatingMatureAudience", "__Internal")]
NSString MatureAudience { get; }
}
// @interface GADRequestConfiguration : NSObject
[BaseType (typeof (NSObject), Name = "GADRequestConfiguration")]
interface RequestConfiguration {
// @property(nonatomic, strong, nullable) GADMaxAdContentRating maxAdContentRating;
[NullAllowed]
[Export ("maxAdContentRating", ArgumentSemantic.Strong)]
string MaxAdContentRating { get; set; }
// @property (copy, nonatomic) NSArray<NSString *> * _Nullable testDeviceIdentifiers;
[NullAllowed, Export ("testDeviceIdentifiers", ArgumentSemantic.Copy)]
string[] TestDeviceIdentifiers { get; set; }
// -(void)tagForUnderAgeOfConsent:(BOOL)underAgeOfConsent;
[Export ("tagForUnderAgeOfConsent:")]
void TagForUnderAgeOfConsent (bool underAgeOfConsent);
// -(void)tagForChildDirectedTreatment:(BOOL)childDirectedTreatment;
[Export ("tagForChildDirectedTreatment:")]
void TagForChildDirectedTreatment (bool childDirectedTreatment);
}
[DisableDefaultCtor]
[BaseType (typeof (NSError), Name = "GADRequestError")]
interface RequestError {
// extern NSString *const kGADErrorDomain __attribute__((visibility("default")));
[Internal]
[Field ("kGADErrorDomain", "__Internal")]
NSString _ErrorDomain { get; }
[Static]
[Wrap ("_ErrorDomain.ToString ()")]
string ErrorDomain { get; }
[Export ("initWithDomain:code:userInfo:")]
IntPtr Constructor (NSString appDomain, nint code, NSDictionary userInfo);
}
// @interface GADResponseInfo : NSObject
[BaseType (typeof(NSObject), Name = "GADResponseInfo")]
interface ResponseInfo
{
// extern NSString *const _Nonnull GADGoogleAdNetworkClassName;
[Field ("GADGoogleAdNetworkClassName", "__Internal")]
NSString GoogleAdNetworkClassName { get; }
// extern NSString *const _Nonnull GADCustomEventAdNetworkClassName;
[Field ("GADCustomEventAdNetworkClassName", "__Internal")]
NSString CustomEventAdNetworkClassName { get; }
// @property (readonly, nonatomic) NSString * _Nullable responseIdentifier;
[NullAllowed]
[Export ("responseIdentifier")]
string ResponseIdentifier { get; }
// @property (readonly, nonatomic) NSString * _Nonnull adNetworkClassName;
[Export ("adNetworkClassName")]
string AdNetworkClassName { get; }
}
// @interface GADRewardBasedVideoAd : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject),
Name = "GADRewardBasedVideoAd",
Delegates = new string [] { "Delegate" },
Events = new Type [] { typeof (RewardBasedVideoAdDelegate) })]
interface RewardBasedVideoAd {
// @property (nonatomic, weak) id<GADRewardBasedVideoAdDelegate> _Nullable delegate;
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
IRewardBasedVideoAdDelegate Delegate { get; set; }
// @property (readonly, getter = isReady, assign, nonatomic) BOOL ready;
[Export ("ready")]
bool IsReady { [Bind ("isReady")] get; }
// @property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName;
[NullAllowed]
[Export ("adNetworkClassName")]
string AdNetworkClassName { get; }
// @property(nonatomic, copy, GAD_NULLABLE) NSString *userIdentifier;
[NullAllowed]
[Export ("userIdentifier")]
string UserIdentifier { get; }
// @property (nonatomic, copy, nullable) NSString* customRewardString;
[NullAllowed]
[Export ("customRewardString")]
string CustomRewardString { get; set; }
// @property (readonly, nonatomic) NSDictionary<GADAdMetadataKey,id> * _Nullable adMetadata;
[NullAllowed, Export ("adMetadata")]
NSDictionary<NSString, NSObject> AdMetadata { get; }
// +(GADRewardBasedVideoAd *)sharedInstance;
[Static]
[Export ("sharedInstance")]
RewardBasedVideoAd SharedInstance { get; }
// -(void)loadRequest:(GADRequest *)request withAdUnitID:(NSString *)adUnitID;
[Export ("loadRequest:withAdUnitID:")]
void LoadRequest (Request request, string adUnitId);
// -(void)presentFromRootViewController:(UIViewController *)viewController;
[Export ("presentFromRootViewController:")]
void Present (UIViewController fromRootViewController);
[Obsolete ("Use Present method instead. This will be removed in future versions.")]
[Wrap ("Present (viewController)")]
void PresentFromRootViewController (UIViewController viewController);
}
interface IRewardBasedVideoAdDelegate {
}
// @protocol GADRewardBasedVideoAdDelegate <NSObject>
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADRewardBasedVideoAdDelegate")]
interface RewardBasedVideoAdDelegate {
// - (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd didRewardUserWithReward:(GADAdReward*)reward;
[Abstract]
[EventArgs ("RewardBasedVideoAdReward")]
[EventName ("UserRewarded")]
[Export ("rewardBasedVideoAd:didRewardUserWithReward:")]
void DidRewardUser (RewardBasedVideoAd rewardBasedVideoAd, AdReward reward);
// @optional -(void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd didFailToLoadwithError:(NSError *)error;
[EventArgs ("RewardBasedVideoAdError")]
[EventName ("FailedToLoad")]
[Export ("rewardBasedVideoAd:didFailToLoadWithError:")]
void DidFailToLoad (RewardBasedVideoAd rewardBasedVideoAd, NSError error);
// @optional -(void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("AdReceived")]
[Export ("rewardBasedVideoAdDidReceiveAd:")]
void DidReceiveAd (RewardBasedVideoAd rewardBasedVideoAd);
// @optional -(void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("Opened")]
[Export ("rewardBasedVideoAdDidOpen:")]
void DidOpen (RewardBasedVideoAd rewardBasedVideoAd);
// @optional -(void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("PlayingStarted")]
[Export ("rewardBasedVideoAdDidStartPlaying:")]
void DidStartPlaying (RewardBasedVideoAd rewardBasedVideoAd);
// - (void)rewardBasedVideoAdDidCompletePlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("PlayingCompleted")]
[Export ("rewardBasedVideoAdDidCompletePlaying:")]
void DidCompletePlaying (RewardBasedVideoAd rewardBasedVideoAd);
// @optional -(void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("Closed")]
[Export ("rewardBasedVideoAdDidClose:")]
void DidClose (RewardBasedVideoAd rewardBasedVideoAd);
// @optional -(void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[Export ("rewardBasedVideoAdWillLeaveApplication:")]
void WillLeaveApplication (RewardBasedVideoAd rewardBasedVideoAd);
// @optional -(void)rewardBasedVideoAdMetadataDidChange:(GADRewardBasedVideoAd * _Nonnull)rewardBasedVideoAd;
[EventArgs ("RewardBasedVideoAd")]
[EventName ("MetadataChanged")]
[Export ("rewardBasedVideoAdMetadataDidChange:")]
void MetadataDidChange (RewardBasedVideoAd rewardBasedVideoAd);
}
// typedef void (^GADRewardedAdLoadCompletionHandler)(GADRequestError * _Nullable);
delegate void RewardedAdLoadCompletionHandler ([NullAllowed] RequestError error);
// @interface GADRewardedAd : NSObject
[BaseType (typeof (NSObject),
Name = "GADRewardedAd",
Delegates = new [] { "AdMetadataDelegate" },
Events = new [] { typeof (RewardedAdMetadataDelegate) })]
interface RewardedAd {
// -(instancetype _Nonnull)initWithAdUnitID:(NSString * _Nonnull)adUnitID;
[Export ("initWithAdUnitID:")]
IntPtr Constructor (string adUnitId);
// -(void)loadRequest:(GADRequest * _Nullable)request completionHandler:(GADRewardedAdLoadCompletionHandler _Nullable)completionHandler;
[Async]
[Export ("loadRequest:completionHandler:")]
void LoadRequest ([NullAllowed] Request request, [NullAllowed] RewardedAdLoadCompletionHandler completionHandler);
// @property (readonly, nonatomic) NSString * _Nonnull adUnitID;
[Export ("adUnitID")]
string AdUnitId { get; }
// @property (readonly, getter = isReady, nonatomic) BOOL ready;
[Export ("isReady")]
bool IsReady { get; }
// @property (readonly, nonatomic) GADResponseInfo * _Nullable responseInfo;
[NullAllowed]
[Export ("responseInfo")]
ResponseInfo ResponseInfo { get; }
// @property (readonly, nonatomic) GADAdReward * _Nullable reward;
[NullAllowed]
[Export ("reward")]
AdReward Reward { get; }
// @property (copy, nonatomic) GADServerSideVerificationOptions * _Nullable serverSideVerificationOptions;
[NullAllowed]
[Export ("serverSideVerificationOptions", ArgumentSemantic.Copy)]
ServerSideVerificationOptions ServerSideVerificationOptions { get; set; }
// @property (readonly, nonatomic) NSDictionary<GADAdMetadataKey,id> * _Nullable adMetadata;
[NullAllowed]
[Export ("adMetadata")]
NSDictionary<NSString, NSObject> AdMetadata { get; }
// @property (nonatomic, weak) id<GADRewardedAdMetadataDelegate> _Nullable adMetadataDelegate;
[NullAllowed]
[Export ("adMetadataDelegate", ArgumentSemantic.Weak)]
IRewardedAdMetadataDelegate AdMetadataDelegate { get; set; }
// @property (copy, nonatomic) GADPaidEventHandler _Nullable paidEventHandler;
[NullAllowed]
[Export ("paidEventHandler", ArgumentSemantic.Copy)]
PaidEventHandler PaidEventHandler { get; set; }
// -(BOOL)canPresentFromRootViewController:(UIViewController * _Nonnull)rootViewController error:(NSError * _Nullable * _Nullable)error;
[Export ("canPresentFromRootViewController:error:")]
bool CanPresent (UIViewController rootViewController, [NullAllowed] out NSError error);
// -(void)presentFromRootViewController:(UIViewController * _Nonnull)viewController delegate:(id<GADRewardedAdDelegate> _Nonnull)delegate;
[Export ("presentFromRootViewController:delegate:")]
void Present (UIViewController viewController, IRewardedAdDelegate @delegate);
// @property (readonly, copy, nonatomic) NSString * _Nullable adNetworkClassName;
[Obsolete ("Use ResponseInfo.AdNetworkClassName.")]
[NullAllowed]
[Export ("adNetworkClassName")]
string AdNetworkClassName { get; }
}
interface IRewardedAdDelegate { }
// @protocol GADRewardedAdDelegate <NSObject>
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADRewardedAdDelegate")]
interface RewardedAdDelegate {
// @required -(void)rewardedAd:(GADRewardedAd * _Nonnull)rewardedAd userDidEarnReward:(GADAdReward * _Nonnull)reward;
[Abstract]
[Export ("rewardedAd:userDidEarnReward:")]
void UserDidEarnReward (RewardedAd rewardedAd, AdReward reward);
// @optional -(void)rewardedAd:(GADRewardedAd * _Nonnull)rewardedAd didFailToPresentWithError:(NSError * _Nonnull)error;
[Export ("rewardedAd:didFailToPresentWithError:")]
void DidFailToPresent (RewardedAd rewardedAd, NSError error);
// @optional -(void)rewardedAdDidPresent:(GADRewardedAd * _Nonnull)rewardedAd;
[Export ("rewardedAdDidPresent:")]
void DidPresent (RewardedAd rewardedAd);
// @optional -(void)rewardedAdDidDismiss:(GADRewardedAd * _Nonnull)rewardedAd;
[Export ("rewardedAdDidDismiss:")]
void DidDismiss (RewardedAd rewardedAd);
}
interface IRewardedAdMetadataDelegate { }
// @protocol GADRewardedAdMetadataDelegate <NSObject>
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADRewardedAdMetadataDelegate")]
interface RewardedAdMetadataDelegate {
// @optional -(void)rewardedAdMetadataDidChange:(GADRewardedAd * _Nonnull)rewardedAd;
[EventArgs ("RewardedAdMetadataChanged")]
[EventName ("Changed")]
[Export ("rewardedAdMetadataDidChange:")]
void DidChange (RewardedAd rewardedAd);
}
interface IAdSizeDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADAdSizeDelegate")]
interface AdSizeDelegate {
[Abstract]
[EventArgs ("AdSizeDelegateSize")]
[Export ("adView:willChangeAdSizeTo:")]
void WillChangeAdSizeTo (BannerView view, AdSize size);
}
// typedef void (^GADPaidEventHandler)(GADAdValue * _Nonnull);
delegate void PaidEventHandler (AdValue value);
// @interface GADAdValue : NSObject <NSCopying>
[BaseType(typeof(NSObject), Name = "GADAdValue")]
interface AdValue : INSCopying
{
// @property (readonly, nonatomic) GADAdValuePrecision precision;
[Export("precision")]
AdValuePrecision Precision { get; }
// @property (readonly, nonatomic) NSDecimalNumber * _Nonnull value;
[Export("value")]
NSDecimalNumber Value { get; }
// @property (readonly, nonatomic) NSString * _Nonnull currencyCode;
[Export("currencyCode")]
string CurrencyCode { get; }
}
interface IAppEventDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADAppEventDelegate")]
interface AppEventDelegate {
[Export ("adView:didReceiveAppEvent:withInfo:")]
void AdViewDidReceiveAppEvent (BannerView banner, string name, [NullAllowed] string info);
[Export ("interstitial:didReceiveAppEvent:withInfo:")]
void InterstitialDidReceiveAppEvent (Interstitial interstitial, string name, [NullAllowed] string info);
}
// typedef void (^GADAppOpenAdLoadCompletionHandler)(GADAppOpenAd * _Nullable, NSError * _Nullable);
delegate void AppOpenAdLoadCompletionHandler ([NullAllowed] AppOpenAd appOpenAd, [NullAllowed] NSError error);
// @interface GADAppOpenAd : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "GADAppOpenAd")]
interface AppOpenAd {
// +(void)loadWithAdUnitID:(NSString * _Nonnull)adUnitID request:(GADRequest * _Nullable)request orientation:(UIInterfaceOrientation)orientation completionHandler:(GADAppOpenAdLoadCompletionHandler _Nonnull)completionHandler;
[Async]
[Static]
[Export ("loadWithAdUnitID:request:orientation:completionHandler:")]
void Load (string adUnitId, [NullAllowed] Request request, UIInterfaceOrientation orientation, AppOpenAdLoadCompletionHandler completionHandler);
// @property (readonly, nonatomic) GADResponseInfo * _Nonnull responseInfo;
[Export ("responseInfo")]
ResponseInfo ResponseInfo { get; }
// @property (copy, nonatomic) GADPaidEventHandler _Nullable paidEventHandler;
[NullAllowed]
[Export ("paidEventHandler", ArgumentSemantic.Copy)]
PaidEventHandler PaidEventHandler { get; set; }
}
// typedef void (^GADAppOpenAdCloseHandler)();
delegate void AppOpenAdCloseHandler ();
// @interface GADAppOpenAdView : UIView
[BaseType (typeof (UIView), Name = "GADAppOpenAdView")]
interface AppOpenAdView {
// @property (nonatomic) GADAppOpenAd * _Nullable appOpenAd;
[NullAllowed]
[Export ("appOpenAd", ArgumentSemantic.Assign)]
AppOpenAd AppOpenAd { get; set; }
// @property (nonatomic) GADAppOpenAdCloseHandler _Nullable adCloseHandler;
[NullAllowed]
[Export ("adCloseHandler", ArgumentSemantic.Assign)]
AppOpenAdCloseHandler AdCloseHandler { get; set; }
}
interface ISwipeableBannerViewDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADSwipeableBannerViewDelegate")]
interface SwipeableBannerViewDelegate {
[Export ("adViewDidActivateAd:"), EventArgs ("SwipeableBannerViewDelegateInfo")]
void DidActivateAd (BannerView banner);
[Export ("adViewDidDeactivateAd:"), EventArgs ("SwipeableBannerViewDelegateInfo")]
void DidDeactivateAd (BannerView banner);
}
// @interface GADAudioVideoManager : NSObject
[BaseType (typeof (NSObject),
Name = "GADAudioVideoManager",
Delegates = new string [] { "Delegate" },
Events = new Type [] { typeof (AudioVideoManagerDelegate) })]
interface AudioVideoManager {
// @property(nonatomic, weak, nullable) id<GADAudioVideoManagerDelegate> delegate;
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
IAudioVideoManagerDelegate Delegate { get; set; }
// @property(nonatomic, assign) BOOL audioSessionIsApplicationManaged;
[Export ("audioSessionIsApplicationManaged")]
bool AudioSessionIsApplicationManaged { get; set; }
}
interface IAudioVideoManagerDelegate {
}
[Model (AutoGeneratedName = true)]
[Protocol]
[BaseType (typeof (NSObject), Name = "GADAudioVideoManagerDelegate")]
interface AudioVideoManagerDelegate {
// - (void)audioVideoManagerWillPlayVideo:(GADAudioVideoManager *)audioVideoManager;
[EventArgs ("AudioVideoManagerWillPlayVideo")]
[Export ("audioVideoManagerWillPlayVideo:")]
void WillPlayVideo (AudioVideoManager audioVideoManager);
// - (void)audioVideoManagerDidPauseAllVideo:(GADAudioVideoManager *)audioVideoManager;
[EventArgs ("AudioVideoManagerAllVideoPaused")]
[EventName ("AllVideoPaused")]
[Export ("audioVideoManagerDidPauseAllVideo:")]
void DidPauseAllVideo (AudioVideoManager audioVideoManager);
// - (void)audioVideoManagerWillPlayAudio:(GADAudioVideoManager *)audioVideoManager;
[EventArgs ("AudioVideoManagerWillPlayAudio")]
[Export ("audioVideoManagerWillPlayAudio:")]
void WillPlayAudio (AudioVideoManager audioVideoManager);
// - (void)audioVideoManagerDidStopPlayingAudio:(GADAudioVideoManager *)audioVideoManager;
[EventArgs ("AudioVideoManagerPlayingAudioStopped")]
[EventName ("PlayingAudioStopped")]
[Export ("audioVideoManagerDidStopPlayingAudio:")]
void DidStopPlayingAudio (AudioVideoManager audioVideoManager);
}
#region Search
// @interface GADServerSideVerificationOptions : NSObject <NSCopying>
[BaseType (typeof (NSObject), Name = "GADServerSideVerificationOptions")]
interface ServerSideVerificationOptions : INSCopying {
// @property (copy, nonatomic) NSString * _Nullable userIdentifier;
[NullAllowed]
[Export ("userIdentifier")]
string UserIdentifier { get; set; }
// @property (copy, nonatomic) NSString * _Nullable customRewardString;
[NullAllowed]
[Export ("customRewardString")]
string CustomRewardString { get; set; }
}
[BaseType (typeof (BannerView), Name = "GADSearchBannerView")]
interface SearchBannerView {
[Export ("initWithFrame:")]
IntPtr Constructor (CGRect frame);
[Export ("initWithAdSize:origin:")]
IntPtr Constructor (AdSize size, CGPoint origin);
[Export ("initWithAdSize:")]
IntPtr Constructor (AdSize size);
// @property(nonatomic, weak) IBOutlet id<GADAdSizeDelegate> adSizeDelegate;
[New]
[NullAllowed]
[Export ("adSizeDelegate", ArgumentSemantic.Weak)]
IAdSizeDelegate AdSizeDelegate { get; set; }
}
// @interface GADUnifiedNativeAd : NSObject
[BaseType (typeof (NSObject),
Name = "GADUnifiedNativeAd",
Delegates = new [] { "Delegate", "UnconfirmedClickDelegate" },
Events = new [] { typeof (UnifiedNativeAdDelegate), typeof (UnifiedNativeAdUnconfirmedClickDelegate) })]
interface UnifiedNativeAd {
// @property (readonly, copy, nonatomic) NSString * _Nullable headline;
[NullAllowed]
[Export ("headline")]
string Headline { get; }
// @property (readonly, copy, nonatomic) NSString * _Nullable callToAction;
[NullAllowed]
[Export ("callToAction")]
string CallToAction { get; }
// @property (readonly, nonatomic, strong) GADNativeAdImage * _Nullable icon;
[NullAllowed]
[Export ("icon", ArgumentSemantic.Strong)]
NativeAdImage Icon { get; }
// @property (readonly, copy, nonatomic) NSString * _Nullable body;
[NullAllowed]
[Export ("body")]
string Body { get; }
// @property (readonly, nonatomic, strong) NSArray<GADNativeAdImage *> * _Nullable images;
[NullAllowed]
[Export ("images", ArgumentSemantic.Strong)]
NativeAdImage [] Images { get; }
// @property (readonly, copy, nonatomic) NSDecimalNumber * _Nullable starRating;
[NullAllowed]
[Export ("starRating", ArgumentSemantic.Copy)]
NSDecimalNumber StarRating { get; }