// // GADMAdNetworkConnectorProtocol.h // Google Mobile Ads SDK // // Copyright 2011 Google. All rights reserved. // #import #import @protocol GADMAdNetworkAdapter; /// Ad network adapters interact with the mediation SDK using an object that implements the /// GADMAdNetworkConnector protocol. The connector object can be used to obtain necessary /// information for ad requests, and to call back to the mediation SDK on ad request returns and /// user interactions. @protocol GADMAdNetworkConnector /// When you need to show a landing page or any other modal view, such as when a user clicks or when /// your Ads SDK needs to show an interstitial, use this method to obtain a UIViewController that /// you can use to show your modal view. Call the -presentViewController:animated:completion: method /// of the returned UIViewController. - (UIViewController *)viewControllerForPresentingModalView; /// Returns the preferred ad volume as a fraction of system volume (0.0 to 1.0). - (float)adVolume; /// Returns whether the ad should be muted. - (BOOL)adMuted; #pragma mark - Adapter Callbacks /// Tells the connector that the adapter failed to receive an ad. - (void)adapter:(id)adapter didFailAd:(NSError *)error; /// Tells the connector that the adapter received a banner ad. - (void)adapter:(id)adapter didReceiveAdView:(UIView *)view; /// Tells the connector that the adapter received an interstitial. - (void)adapterDidReceiveInterstitial:(id)adapter; /// Tells the connector that the adapter has received a unified mediated native ad. /// mediatedUnifiedNativeAd is used by the Google Mobile Ads SDK to construct a unified native ad /// object. - (void)adapter:(id)adapter didReceiveMediatedUnifiedNativeAd:(id)mediatedUnifiedNativeAd; #pragma mark Ad events // Adapter should call as many of these as possible, during the lifecycle of the loaded banner or // interstitial ad. /// Tells the connector that the adapter recorded a user click. - (void)adapterDidGetAdClick:(id)adapter; // Adapter should call as many of these as possible, during the lifecycle of the loaded banner ad. /// Tells the connector that the adapter will present a full screen modal. - (void)adapterWillPresentFullScreenModal:(id)adapter; /// Tells the connector that the adapter will dismiss a full screen modal. - (void)adapterWillDismissFullScreenModal:(id)adapter; /// Tells the connector that the adapter dismissed a full screen modal. - (void)adapterDidDismissFullScreenModal:(id)adapter; // Adapter should call these methods during the lifecycle of the loaded interstitial ad. /// Tells the connector that the adapter will present an interstitial. - (void)adapterWillPresentInterstitial:(id)adapter; /// Tells the connector that the adapter will dismiss an interstitial. - (void)adapterWillDismissInterstitial:(id)adapter; /// Tells the connector that the adapter did dismiss an interstitial. - (void)adapterDidDismissInterstitial:(id)adapter; #pragma mark Deprecated /// Deprecated. Use -adapterDidReceiveInterstitial:. - (void)adapter:(id)adapter didReceiveInterstitial:(NSObject *)interstitial GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidReceiveInterstitial:."); /// Deprecated. Use -adapterDidGetAdClick:. - (void)adapter:(id)adapter clickDidOccurInBanner:(UIView *)view GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidGetAdClick:."); /// Deprecated. Use -adapter:didFailAd:. - (void)adapter:(id)adapter didFailInterstitial:(NSError *)error GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapter:didFailAd:"); /// Deprecated. No replacement. - (void)adapterWillLeaveApplication:(id)adapter GAD_DEPRECATED_MSG_ATTRIBUTE("Deprecated. No replacement."); @end