FWProtocols.h
1 
5 @class UIView;
6 @class CLLocation;
7 @class MPMoviePlayerController;
8 @class UIViewController;
9 
10 @protocol FWAdManager;
11 @protocol FWContext;
12 @protocol FWSlot;
13 @protocol FWAdInstance;
14 @protocol FWCreativeRendition;
15 @protocol FWCreativeRenditionAsset;
16 @protocol FWRendererController;
17 @protocol FWRenderer;
18 
19 #pragma clang arc_cf_code_audited begin
20 
26 FW_EXTERN id<FWAdManager> newAdManager(void);
27 
36 FW_EXTERN void FWSetLogLevel(FWLogLevel value);
37 
44 FW_EXTERN void FWSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *handler);
45 
50 FW_EXTERN void FWClearCookie(void);
51 
56 FW_EXTERN void FWSetCookieOptOutState(BOOL value);
57 
62 FW_EXTERN BOOL FWGetCookieOptOutState(void);
63 
69 @protocol FWAdManager <NSObject>
75 - (void)setCurrentViewController:(UIViewController *)value;
76 
81 - (void)setServerUrl:(NSString *)value;
82 
87 - (void)setNetworkId:(NSUInteger)value;
88 
93 - (void)setLocation:(CLLocation *)value;
94 
99 - (NSUInteger)version;
100 
106 - (id<FWContext>)newContext;
107 
131 - (id<FWContext>)newContextWithContext:(id<FWContext>)context;
132 
136 - (void)disableFWCrashReporter;
137 @end
138 
142 @protocol FWContext <NSObject>
148 - (void)setVideoDisplayBase:(UIView *)value;
149 
154 - (void)setMoviePlayerFullscreen:(BOOL)value DEPRECATED_ATTRIBUTE;
155 
156 - (void)setMoviePlayerController:(MPMoviePlayerController *)value DEPRECATED_ATTRIBUTE;
157 
158 - (BOOL)setCapability:(NSString *)capability :(FWCapabilityStatus)status DEPRECATED_ATTRIBUTE;
159 
169 - (BOOL)setCapability:(NSString *)capability status:(FWCapabilityStatus)status;
170 
171 - (void)addKeyValue:(NSString *)key :(NSString *)value DEPRECATED_ATTRIBUTE;
172 
178 - (void)addValue:(NSString *)value forKey:(NSString *)key;
179 
180 - (void)setProfile:(NSString *)playerProfile :(NSString *)defaultTemporalSlotProfile :(NSString *)defaultVideoPlayerSlotProfile :(NSString *)defaultSiteSectionSlotProfile DEPRECATED_ATTRIBUTE;
181 
189 - (void)setPlayerProfile:(NSString *)playerProfile defaultTemporalSlotProfile:(NSString *)defaultTemporalSlotProfile defaultVideoPlayerSlotProfile:(NSString *)defaultVideoPlayerSlotProfile defaultSiteSectionSlotProfile:(NSString *)defaultSiteSectionSlotProfile;
190 
191 - (void)setVisitor:(NSString *)customId :(NSString *)ipV4Address :(NSUInteger)bandwidth :(NSString *)bandwidthSource DEPRECATED_ATTRIBUTE;
192 
200 - (void)setVisitorId:(NSString *)customId ipV4Address:(NSString *)ipV4Address bandwidth:(NSUInteger)bandwidth bandwidthSource:(NSString *)bandwidthSource;
201 
202 - (void)setVisitorHttpHeader:(NSString *)name :(NSString *)value DEPRECATED_ATTRIBUTE;
203 
209 - (void)setVisitorHTTPHeader:(NSString *)name withValue:(NSString *)value;
210 
211 - (void)setVideoAsset:(NSString *)videoAssetId :(NSTimeInterval)duration :(NSString *)location :(FWVideoAssetAutoPlayType)autoPlayType :(NSUInteger)videoPlayRandom :(NSUInteger)networkId :(FWIdType)idType :(NSUInteger)fallbackId :(FWVideoAssetDurationType)durationType DEPRECATED_ATTRIBUTE;
212 
233 - (void)setVideoAssetId:(NSString *)videoAssetId idType:(FWIdType)idType duration:(NSTimeInterval)duration durationType:(FWVideoAssetDurationType)durationType location:(NSString *)location autoPlayType:(FWVideoAssetAutoPlayType)autoPlayType videoPlayRandom:(NSUInteger)videoPlayRandom networkId:(NSUInteger)networkId fallbackId:(NSUInteger)fallbackId;
234 
242 - (void)setVideoAssetCurrentTimePosition:(NSTimeInterval)timePosition;
243 
244 - (void)setSiteSection:(NSString *)siteSectionId :(NSUInteger)pageViewRandom :(NSUInteger)networkId :(FWIdType)idType :(NSUInteger)fallbackId DEPRECATED_ATTRIBUTE;
245 
257 - (void)setSiteSectionId:(NSString *)siteSectionId idType:(FWIdType)idType pageViewRandom:(NSUInteger)pageViewRandom networkId:(NSUInteger)networkId fallbackId:(NSUInteger)fallbackId;
258 
259 - (void)addCandidateAd:(NSUInteger)candidateAdId DEPRECATED_ATTRIBUTE;
260 
265 - (void)addCandidateAdId:(NSUInteger)candidateAdId;
266 
267 - (void)addTemporalSlot:(NSString *)customId :(NSString *)adUnit :(NSTimeInterval)timePosition :(NSString *)slotProfile :(NSUInteger)cuePointSequence :(NSTimeInterval)maxDuration :(NSString *)acceptPrimaryContentType :(NSString *)acceptContentType :(NSTimeInterval)minDuration DEPRECATED_ATTRIBUTE;
268 
281 - (void)addTemporalSlot:(NSString *)customId adUnit:(NSString *)adUnit timePosition:(NSTimeInterval)timePosition slotProfile:(NSString *)slotProfile cuePointSequence:(NSUInteger)cuePointSequence minDuration:(NSTimeInterval)minDuration maxDuration:(NSTimeInterval)maxDuration acceptPrimaryContentType:(NSString *)acceptPrimaryContentType acceptContentType:(NSString *)acceptContentType;
282 
283 - (void)addVideoPlayerNonTemporalSlot:(NSString *)customId :(NSString *)adUnit :(NSUInteger)width :(NSUInteger)height :(NSString *)slotProfile :(BOOL)acceptCompanion :(FWInitialAdOption)initialAdOption :(NSString *)acceptPrimaryContentType :(NSString *)acceptContentType :(NSArray *)compatibleDimensions DEPRECATED_ATTRIBUTE;
284 
311 - (void)addVideoPlayerNonTemporalSlot:(NSString *)customId adUnit:(NSString *)adUnit width:(NSUInteger)width height:(NSUInteger)height slotProfile:(NSString *)slotProfile acceptCompanion:(BOOL)acceptCompanion initialAdOption:(FWInitialAdOption)initialAdOption acceptPrimaryContentType:(NSString *)acceptPrimaryContentType acceptContentType:(NSString *)acceptContentType compatibleDimensions:(NSArray *)compatibleDimensions;
312 
313 - (void)addSiteSectionNonTemporalSlot:(NSString *)customId :(NSString *)adUnit :(NSUInteger)width :(NSUInteger)height :(NSString *)slotProfile :(BOOL)acceptCompanion :(FWInitialAdOption)initialAdOption :(NSString *)acceptPrimaryContentType :(NSString *)acceptContentType :(NSArray *)compatibleDimensions DEPRECATED_ATTRIBUTE;
314 
341 - (void)addSiteSectionNonTemporalSlot:(NSString *)customId adUnit:(NSString *)adUnit width:(NSUInteger)width height:(NSUInteger)height slotProfile:(NSString *)slotProfile acceptCompanion:(BOOL)acceptCompanion initialAdOption:(FWInitialAdOption)initialAdOption acceptPrimaryContentType:(NSString *)acceptPrimaryContentType acceptContentType:(NSString *)acceptContentType compatibleDimensions:(NSArray *)compatibleDimensions;
342 
351 - (void)setVideoState:(FWVideoState)videoState;
352 
357 - (void)setVideoPlayheadTime:(NSTimeInterval *)playheadTime;
358 
363 - (NSArray * /* id<FWSlot> */)temporalSlots;
364 
369 - (NSArray * /* id<FWSlot> */)videoPlayerNonTemporalSlots;
370 
375 - (NSArray * /* id<FWSlot> */)siteSectionNonTemporalSlots;
376 
388 - (NSArray * /* id<FWSlot> */)getSlotsByTimePositionClass:(FWTimePositionClass)timePositionClass;
389 
395 - (id<FWSlot>)getSlotByCustomId:(NSString *)customId;
396 
397 - (void)submitRequest:(NSTimeInterval)timeoutInterval DEPRECATED_ATTRIBUTE;
398 
403 - (void)submitRequestWithTimeout:(NSTimeInterval)timeoutInterval;
404 
415 - (void)addRendererClass:(NSString *)className forContentType:(NSString *)contentType creativeAPI:(NSString *)creativeAPI slotType:(NSString *)slotType baseUnit:(NSString *)baseAdUnit adUnit:(NSString *)soldAsAdUnit withParameters:(NSDictionary *)parameters;
416 
426 - (void)setParameter:(NSString *)name withValue:(id)value forLevel:(FWParameterLevel)level;
427 
432 - (id)getParameter:(NSString *)name;
433 
444 - (void)setVideoDisplayCompatibleSizes:(NSArray *)compatibleDimensions;
445 
456 - (void)setRequestMode:(FWRequestMode)mode;
457 
462 - (void)setRequestDuration:(NSTimeInterval)requestDuration;
463 
467 - (void)resetExclusivity;
468 
469 - (void)startSubsession:(NSUInteger)subsessionToken DEPRECATED_ATTRIBUTE;
470 
479 - (void)startSubsessionWithToken:(NSUInteger)subsessionToken;
480 
486 - (NSString *)getVideoLocation;
487 
493 - (id<FWAdManager>)getAdManager;
494 
498 - (NSNotificationCenter *)notificationCenter;
499 
506 - (void)notifyUserAction:(FWUserAction)userAction;
507 
518 - (void)loadExtension:(NSString *)extensionName;
519 
524 - (void)requestTimelinePause;
525 
530 - (void)requestTimelineResume;
531 
532 - (NSString *)transactionId;
533 
534 @end
535 
536 
540 @protocol FWSlot <NSObject>
541 
546 - (NSString *)customId;
547 
555 - (FWSlotType)type;
556 
561 - (NSTimeInterval)timePosition;
562 
573 - (FWTimePositionClass)timePositionClass;
574 
579 - (NSTimeInterval)embeddedAdsDuration;
580 
585 - (NSTimeInterval)endTimePosition;
586 
591 - (NSArray * /* <id>FWAdInstance */)adInstances;
592 
597 - (NSInteger)width;
598 
603 - (NSInteger)height;
604 
609 - (void)processEvent:(NSString *)eventName;
610 
617 - (void)preload;
618 
625 - (void)play;
626 
630 - (void)stop;
631 
635 - (void)pause;
636 
640 - (void)resume;
641 
645 - (BOOL)visible;
646 
659 - (void)setVisible:(BOOL)value;
660 
666 - (UIView *)slotBase;
667 
673 - (void)setParameter:(NSString *)name withValue:(id)value;
674 
680 - (id)getParameter:(NSString *)name;
681 
686 - (NSTimeInterval)totalDuration;
687 
692 - (NSTimeInterval)playheadTime;
693 
698 - (id<FWAdInstance>)currentAdInstance;
699 @end
700 
701 
705 @protocol FWAdInstance <NSObject>
706 
711 - (NSUInteger)adId;
712 
713 - (NSString *)adUniqueId;
714 
720 - (NSUInteger)creativeId;
721 
726 - (id<FWCreativeRendition>)primaryCreativeRendition;
727 
728 - (NSArray *)getEventCallbackUrls:(NSString *)eventName :(NSString *)eventType DEPRECATED_ATTRIBUTE;
729 
759 - (NSArray *)getEventCallbackUrlsByEventName:(NSString *)eventName eventType:(NSString *)eventType;
760 
761 - (void)setEventCallbackUrls:(NSString *)eventName :(NSString *)eventType :(NSArray *)urls DEPRECATED_ATTRIBUTE;
762 
790 - (void)setEventCallbackUrls:(NSArray *)urls forEventName:(NSString *)eventName eventType:(NSString *)eventType;
791 
796 - (id<FWCreativeRendition>)addCreativeRendition;
797 
802 - (id<FWRendererController>)rendererController;
803 
812 - (id)getParameter:(NSString *)name;
813 
818 - (NSArray *)companionSlots;
819 
825 - (NSArray *)companionAdInstances;
826 
832 - (BOOL)isRequiredToShow;
833 
837 - (NSArray* /*id<FWCreativeRendition>*/)creativeRenditions;
838 
843 - (void)setPrimaryCreativeRendition:(id<FWCreativeRendition>)primaryCreativeRendition;
844 
848 - (id<FWSlot>)slot;
849 
850 - (void)play2;
851 
856 - (NSTimeInterval)duration;
857 
862 - (NSTimeInterval)playheadTime;
863 @end
864 
865 
869 @protocol FWCreativeRendition <NSObject>
870 
875 - (NSString *)contentType;
876 
880 - (void)setContentType:(NSString *)value;
881 
886 - (NSString *)wrapperType;
887 
891 - (void)setWrapperType:(NSString *)value;
892 
897 - (NSString *)wrapperUrl;
898 
902 - (void)setWrapperUrl:(NSString *)value;
903 
908 - (NSString *)creativeAPI;
909 
913 - (void)setCreativeAPI:(NSString *)value;
914 
919 - (NSString *)baseUnit;
920 
925 - (int)preference;
926 
930 - (void)setPreference:(int)value;
931 
936 - (NSUInteger)width;
937 
941 - (void)setWidth:(NSUInteger)value;
942 
947 - (NSUInteger)height;
948 
952 - (void)setHeight:(NSUInteger)value;
953 
958 - (NSTimeInterval)duration;
959 
964 - (void)setDuration:(NSTimeInterval)value;
965 
966 - (void)setParameter:(NSString *)name :(NSString *)value DEPRECATED_ATTRIBUTE;
967 
971 - (void)setParameter:(NSString *)name withValue:(NSString *)value;
972 
977 - (id<FWCreativeRenditionAsset>)primaryCreativeRenditionAsset;
978 
983 - (NSArray * /* <id>FWCreativeRenditionAsset */)otherCreativeRenditionAssets;
984 
988 - (id<FWCreativeRenditionAsset>)addCreativeRenditionAsset;
989 @end
990 
991 
995 @protocol FWCreativeRenditionAsset <NSObject>
1000 - (NSString *)name;
1001 
1005 - (void)setName:(NSString *)value;
1006 
1011 - (NSString *)url;
1012 
1016 - (void)setUrl:(NSString *)value;
1017 
1022 - (NSString *)content;
1023 
1027 - (void)setContent:(NSString *)value;
1028 
1033 - (NSString *)mimeType;
1034 
1038 - (void)setMimeType:(NSString *)value;
1039 
1044 - (NSString *)contentType;
1045 
1049 - (void)setContentType:(NSString *)value;
1050 
1055 - (NSInteger)bytes;
1056 
1061 - (void)setBytes:(NSInteger)value;
1062 @end
1063 
1064 
1066 
1067 - (void)postNotificationName:(NSString *)notificationName userInfo:(NSDictionary *)userInfo;
1068 
1069 @end
1070 
1071 
1076 @protocol FWRendererController <NSObject>
1077 
1083 - (CLLocation *)location;
1084 
1090 - (UIViewController *)currentViewController;
1091 
1092 - (MPMoviePlayerController *)moviePlayerController DEPRECATED_ATTRIBUTE;
1093 
1094 - (BOOL)moviePlayerFullscreen DEPRECATED_ATTRIBUTE;
1095 
1100 - (NSArray * /* id<FWCreativeRendition> */)renderableCreativeRenditions;
1101 
1133 - (void)processEvent:(NSString *)eventName info:(NSDictionary *)details;
1134 
1135 - (void)setCapability:(NSString *)eventCapability :(FWCapabilityStatus)status DEPRECATED_ATTRIBUTE;
1136 
1145 - (void)setCapability:(NSString *)eventCapability status:(FWCapabilityStatus)status;
1146 
1151 - (NSUInteger)version;
1152 
1157 - (id)getParameter:(NSString *)name;
1158 
1162 - (id<FWAdInstance>)adInstance;
1163 
1173 - (void)handleStateTransition:(FWRendererStateType)state info:(NSDictionary *)details;
1174 
1178 - (id<FWContext>)notificationContext;
1179 
1180 - (NSArray * /* id<FWAdInstance> */)scheduleAdInstances:(NSArray * /* id<FWSlot> */)slots DEPRECATED_ATTRIBUTE;
1181 
1187 - (NSArray * /* id<FWAdInstance> */)scheduleAdInstancesInSlots:(NSArray * /* id<FWSlot> */)slots;
1188 
1193 - (void)requestTimelinePause;
1194 
1199 - (void)requestTimelineResume;
1200 
1204 - (void)requestContentStateChange:(BOOL)pause DEPRECATED_ATTRIBUTE;
1205 
1209 - (void)log:(NSString *)msg;
1210 @end
1211 
1212 
1216 @protocol FWRenderer <NSObject>
1225 - (id)initWithRendererController:(id<FWRendererController>)rendererController;
1226 
1237 - (void)start;
1238 
1246 - (void)stop;
1247 
1252 - (NSDictionary *)moduleInfo;
1253 
1254 
1259 - (NSTimeInterval)duration;
1260 
1265 - (NSTimeInterval)playheadTime;
1266 
1267 @optional
1277 - (void)preload;
1278 
1282 - (void)pause;
1283 
1287 - (void)resume;
1288 
1289 @end
1290 
1294 @protocol FWExtension <NSObject>
1303 - (id)initWithFWContext:(id<FWContext>)context;
1304 
1312 - (void)stop;
1313 
1314 #pragma clang arc_cf_code_audited end
1315 
1316 @end
1317 
Definition: FWProtocols.h:1065