lipengwei
2020-05-27 0742f1b913e1c0d9c6440e014da8c0518a089dc1
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
/*
 * Chartboost+Mediation.h
 * Chartboost
 *
 * Copyright 2019 Chartboost. All rights reserved.
 */
 
#import "Chartboost.h"
#import "CHBBanner.h"
#import "CHBInterstitial.h"
#import "CHBRewarded.h"
 
NS_ASSUME_NONNULL_BEGIN
 
// APIs required to integrate Chartboost with a mediation platform.
// If you are the end user of this framework you typically won't need this. It is intended to support mediation adapters and in-house mediation solutions.
 
// MARK: - CHBMediation
 
/*!
@class CHBMediation
@brief A class that holds information about the mediation library used to create an ad.
*/
@interface CHBMediation : NSObject
/*! @brief An identifier for the mediation library. */
@property (nonatomic, readonly) CBMediation mediationType;
/*! @brief The mediation library version. */
@property (nonatomic, readonly) NSString *libraryVersion;
/*! @brief The mediation library adapter version. */
@property (nonatomic, readonly) NSString *adapterVersion;
 
/*!
@brief The initializer for the mediation object.
@param mediationType The mediation library used. Pass CBMediationOther if your mediation is not listed in the predefined values.
@param libraryVersion A string representing the library version. E.g. "5.1.0"
@param adapterVersion A string representing the Chartbooost adapter version for this library. E.g. "5.1.0.1"
*/
- (instancetype)initWithType:(CBMediation)mediationType libraryVersion:(NSString*)libraryVersion adapterVersion:(NSString*)adapterVersion;
 
- (instancetype)init NS_UNAVAILABLE;
 
@end
 
// MARK: - CHBBanner Extensions
 
@interface CHBBanner (MediationAPI)
/*!
 @brief Similar to -[CHBBanner initWithSize:location:delegate], but including a mediation parameter.
 @discussion Use this initializer only if you are writing an adapter to use Chartboost with a mediation solution.
*/
- (instancetype)initWithSize:(CHBBannerSize)size location:(CBLocation)location mediation:(nullable CHBMediation *)mediation delegate:(nullable id<CHBBannerDelegate>)delegate;
 
/*!
 @brief Caches an ad using an OpenRTB bid response.
 @param bidResponse A bid response containing information about the ad to cache in OpenRTB format.
 @discussion Use this method if you want to cache an ad already obtained from a bidding solution.
 Use the isCached property or implement didCacheAd:error: in your ad delegate to be notified of a cache request result.
*/
- (void)cacheBidResponse:(NSString *)bidResponse NS_SWIFT_NAME(cache(bidResponse:));
 
@end
 
// MARK: - CHBInterstitial Extensions
 
@interface CHBInterstitial (MediationAPI)
/*!
 @brief Similar to -[CHBInterstitial initWithLocation:delegate], but including a mediation parameter.
 @discussion Use this initializer only if you are writing an adapter to use Chartboost with a mediation solution.
*/
- (instancetype)initWithLocation:(CBLocation)location mediation:(nullable CHBMediation *)mediation delegate:(nullable id<CHBInterstitialDelegate>)delegate;
 
/*!
 @brief Caches an ad using an OpenRTB bid response.
 @param bidResponse A bid response containing information about the ad to cache in OpenRTB format.
 @discussion Use this method if you want to cache an ad already obtained from a bidding solution.
 Use the isCached property or implement didCacheAd:error: in your ad delegate to be notified of a cache request result.
*/
- (void)cacheBidResponse:(NSString *)bidResponse NS_SWIFT_NAME(cache(bidResponse:));
 
@end
 
// MARK: - CHBRewarded Extensions
 
@interface CHBRewarded (MediationAPI)
/*!
 @brief Similar to -[CHBRewarded initWithLocation:delegate], but including a mediation parameter.
 @discussion Use this initializer only if you are writing an adapter to use Chartboost with a mediation solution.
*/
- (instancetype)initWithLocation:(CBLocation)location mediation:(nullable CHBMediation *)mediation delegate:(nullable id<CHBRewardedDelegate>)delegate;
 
/*!
 @brief Caches an ad using an OpenRTB bid response.
 @param bidResponse A bid response containing information about the ad to cache in OpenRTB format.
 @discussion Use this method if you want to cache an ad already obtained from a bidding solution.
 Use the isCached property or implement didCacheAd:error: in your ad delegate to be notified of a cache request result.
*/
- (void)cacheBidResponse:(NSString *)bidResponse NS_SWIFT_NAME(cache(bidResponse:));
 
@end
 
NS_ASSUME_NONNULL_END