2024-06-07 11:41:02 +08:00

93 lines
2.2 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// BaiduMobAdInterstitialDelegate.h
// BaiduMobAdWebSDK
//
// Created by deng jinxiang on 13-8-1.
//
//
#import <Foundation/Foundation.h>
#import "BaiduMobAdCommonConfig.h"
@class BaiduMobAdNative;
@class BaiduMobAdNativeAdView;
@class BaiduMobAdNativeAdObject;
@class BaiduMobAdExpressNativeView;
@protocol BaiduMobAdNativeAdDelegate <NSObject>
@required
/**
* 广告请求成功
* 请求成功的数组如果只成功返回一条原生广告数组大小为1
* 注意如果是返回元素nativeAds为BaiduMobAdNativeAdObject数组。如果是优选模板nativeAds为BaiduMobAdExpressNativeView数组
*/
- (void)nativeAdObjectsSuccessLoad:(NSArray *)nativeAds nativeAd:(BaiduMobAdNative *)nativeAd;
/**
* 广告请求失败
* adObject对象内仅有竞胜竞败能力支持无广告返回时提供竞败信息上传
*/
- (void)nativeAdsFailLoadCode:(NSString *)errCode
message:(NSString *)message
nativeAd:(BaiduMobAdNative *)nativeAd
adObject:(BaiduMobAdNativeAdObject *)adObject;
@optional
/**
* 应用在mssp.baidu.com上的APPID
*/
- (NSString *)publisherId;
/**
* 广告位id
*/
- (NSString *)apId;
/**
* 模版高度,仅用于信息流模版广告
*/
- (NSNumber *)baiduMobAdsHeight;
/**
* 模版宽度,仅用于信息流模版广告
*/
- (NSNumber *)baiduMobAdsWidth;
/**
* 渠道ID
*/
- (NSString *)channelId;
/**
* 启动位置信息
*/
- (BOOL)enableLocation;//如果enableplist 需要增加NSLocationWhenInUseUsageDescription
/**
* 广告请求失败
*/
- (void)nativeAdsFailLoadCode:(NSString *)errCode
message:(NSString *)message
nativeAd:(BaiduMobAdNative *)nativeAd
BaiduMobAdDEPRECATED_MSG("已废弃请使用nativeAdsFailLoadCode:message:nativeAd:adObject:");
@end
#pragma mark - 视频缓存delegate
@protocol BaiduMobAdNativeCacheDelegate <NSObject>
@optional
/**
* 视频缓存成功
*/
- (void)nativeVideoAdCacheSuccess:(BaiduMobAdNative *)nativeAd;
/**
* 视频缓存失败
*/
- (void)nativeVideoAdCacheFail:(BaiduMobAdNative *)nativeAd withError:(BaiduMobFailReason)reason;
@end