-
Notifications
You must be signed in to change notification settings - Fork 22
/
LDAdService.h
123 lines (102 loc) · 2.72 KB
/
LDAdService.h
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
#import "LDAdBanner.h"
#import "LDAdInterstitial.h"
#import "LDAdRewardedVideo.h"
/**
* Ad Service Configuration (adUnits)
*/
@protocol LDAdServiceSettings <NSObject>
/**
* App adUnit
*/
@property(nonatomic, strong) NSString *appId;
/**
* Banner adUnit
*/
@property(nonatomic, strong) NSString *banner;
/**
* Banner adUnit for iPad (optional).
* If it is not specified, the banner adUnit will be used.
*/
@property(nonatomic, strong) NSString *bannerIpad;
/**
* Interstitial adUnit.
*/
@property(nonatomic, strong) NSString *interstitial;
/**
* Interstitial adUnit for iPad (optional).
* If it is not specified, the interstitial adUnit will be used.
*/
@property(nonatomic, strong) NSString *interstitialIpad;
/**
* Reward video adUnit.
*/
@property(nonatomic, strong) NSString *rewardedVideo;
/**
* Reward video adUnit for iPad (optional).
* If it is not specified, the reward video adUnit will be used.
*/
@property(nonatomic, strong) NSString *rewardedVideoIpad;
/**
* Value to store if the user has given consent for personalized ads.
*/
@property(nonatomic, assign) BOOL *personalizedAdsConsent;
@end
/**
* Ad Service Protocol
*/
@protocol LDAdServiceProtocol
@property(nonatomic, strong) NSObject <LDAdServiceSettings> *settings;
/**
* Create AdBanner with default size and adUnit (taken from settings).
*
* @return The created banner.
*/
- (LDAdBanner *)createBanner;
/**
* Create AdBanner with custom adUnit and size
*
* @param adUnit The adUnit.
* @param size The size of the ad.
*
* @return The custom ad.
*/
- (LDAdBanner *)createBanner: (NSString *)adUnit size: (LDAdBannerSize)size;
/**
* Create AdInterstitial with default adUnit.
*
* @return The interstitial.
*/
- (LDAdInterstitial *)createInterstitial;
/**
* Create AdInterstitial with specific adUnit.
*
* @param adUnit The adUnit.
*
* @return The interstitial.
*/
- (LDAdInterstitial *)createInterstitial: (NSString *)adUnit;
/**
* Create a video only interstitial with specific adUnit.
* This method fallbacks to the default createInterstitial when the network doesn't support video only interstitial from client API.
*
* @param adUnit The adUnit.
*
* @return The interstitial.
*/
- (LDAdInterstitial *)createVideoInterstitial: (NSString *)adUnit;
/**
* Create a Rewarded video interstitial with default adUnit.
*
* @return The interstitial.
*/
- (LDAdRewardedVideo *)createRewardedVideo;
/**
* Create a Rewarded video interstitial with specific adUnit.
*
* @param adUnit The adUnit.
*
* @return The interstitial.
*/
- (LDAdRewardedVideo *)createRewardedVideo: (NSString *)adUnit;
@end
typedef NSObject <LDAdServiceProtocol> LDAdService;