BBASMBannerAdInnerProtocol.h 1.44 KB
//
//  BBASMBannerAdInnerProtocol.h
//  SWANAd
//
//  Created by Bao,Shiwei on 2019/3/5.
//  Copyright © 2019年 Baidu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol BBASMBannerAdInnerProtocol <NSObject>

/**
 * @brief 执行Onload回调
 *
 */
- (void)runOnLoad;

/**
 * @brief 执行错误回调
 *
 * @param code 错误码
 */
- (void)runOnError:(NSDictionary *)code;

/**
 * @brief 执行宽高变化回调
 *
 * @param size 字典(width+height)
 */
- (void)runOnResize:(NSDictionary *)size;


/**
 * @brief 执行show成功回调
 *
 */
- (void)runShowSucc;

/**
 * @brief 绑定对象保护
 *
 */
- (void)protectSelf;

/**
 * @brief 绑定对象解除保护
 *
 */
- (void)unprotectSelf;

/**
 * @brief 外置sd_webimage
 *
 * @param url 图片URL
 * @param view view
 */
- (void)viewSetImageWithURL:(NSURL *)url view:(UIImageView *)view;

/**
 * @brief 点击后弹出LP页
 *
 * @param url LP页URL
 */
- (void)showLPViewControllerWithURL:(NSURL *)url;

/**
 * @brief 将广告组件挂载到界面
 *
 * @param view 广告view
 */
- (void)addAdSubView:(UIView *)view;

/**
 * @brief 是否展示banner关闭按钮 (11.7)
 *
 * @return YES/NO
 */
- (BOOL)shouldShowCloseButton;

/**
 * @brief banner被点击关闭(11.7)
 *
 * @param adUnitId 返回广告位Id
 * @param timeStamp 返回时间戳(秒)
 */
- (void)bannerDidclose:(NSString *)adUnitId
             timeStamp:(NSTimeInterval)timeStamp;

@end