IMAAdsLoader.h
1 //
2 // IMAAdsLoader.h
3 // GoogleIMA3
4 //
5 // Copyright (c) 2013 Google Inc. All rights reserved.
6 //
7 // Declares a set of classes used when loading ads.
8 
9 #import <Foundation/Foundation.h>
10 
11 @class IMAAdError;
12 @class IMAAdsLoader;
13 @class IMAAdsManager;
14 @class IMAStreamManager;
15 @class IMAAdsRequest;
16 @class IMAStreamRequest;
17 @class IMASettings;
18 
19 #pragma mark - IMAAdsLoadedData
20 
24 @interface IMAAdsLoadedData : NSObject
25 
30 @property(nonatomic, strong, readonly) IMAAdsManager *adsManager;
31 
36 @property(nonatomic, strong, readonly) IMAStreamManager *streamManager;
37 
41 @property(nonatomic, strong, readonly) id userContext;
42 
43 @end
44 
45 
46 #pragma mark - IMAAdLoadingErrorData
47 
51 @interface IMAAdLoadingErrorData : NSObject
52 
56 @property(nonatomic, strong, readonly) IMAAdError *adError;
57 
61 @property(nonatomic, strong, readonly) id userContext;
62 
63 @end
64 
65 #pragma mark - IMAAdsLoaderDelegate
66 
71 
78 - (void)adsLoader:(IMAAdsLoader *)loader adsLoadedWithData:(IMAAdsLoadedData *)adsLoadedData;
79 
86 - (void)adsLoader:(IMAAdsLoader *)loader failedWithErrorData:(IMAAdLoadingErrorData *)adErrorData;
87 
88 @end
89 
90 #pragma mark - IMAAdsLoader
91 
97 @interface IMAAdsLoader : NSObject
98 
103 @property(nonatomic, copy, readonly) IMASettings *settings;
104 
108 @property(nonatomic, weak) id<IMAAdsLoaderDelegate> delegate;
109 
115 + (NSString *)sdkVersion;
116 
126 - (instancetype)initWithSettings:(IMASettings *)settings;
127 
135 - (instancetype)init;
136 
145 - (void)requestAdsWithRequest:(IMAAdsRequest *)request;
146 
153 - (void)requestStreamWithRequest:(IMAStreamRequest *)request;
154 
159 - (void)contentComplete;
160 
161 @end
Ad data that is returned when the ads loader loads the ad.
Definition: IMAAdsLoader.h:24
Ad error data that is returned when the ads loader fails to load the ad.
Definition: IMAAdsLoader.h:51
Data class describing the ad request.
Definition: IMAAdsRequest.h:20
IMAAdsManager * adsManager
The ads manager instance created by the ads loader.
Definition: IMAAdsLoader.h:30
The IMAStreamManager class is responsible for playing streams.
Definition: IMAStreamManager.h:87
The IMAAdsManager class is responsible for playing ads.
Definition: IMAAdsManager.h:130
id userContext
The user context specified in the ads request.
Definition: IMAAdsLoader.h:41
IMAStreamManager * streamManager
The stream manager instance created by the ads loader.
Definition: IMAAdsLoader.h:36
Surfaces an error that occurred during ad loading or playing.
Definition: IMAAdError.h:151
Data class describing the stream request.
Definition: IMAStreamRequest.h:17
The IMAAdsLoader class allows the requesting of ads from the ad server.
Definition: IMAAdsLoader.h:97
The IMASettings class stores SDK wide settings.
Definition: IMASettings.h:14
Delegate object that receives state change callbacks from IMAAdsLoader.
Definition: IMAAdsLoader.h:70