GDTAdProtocol.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // GDTAdProtocol.h
  3. // GDTMobApp
  4. //
  5. // Created by rowanzhang on 2021/12/23.
  6. // Copyright © 2021 Tencent. All rights reserved.
  7. //
  8. #ifndef GDTAdProtocol_h
  9. #define GDTAdProtocol_h
  10. #define GDT_REQ_ID_KEY @"request_id"
  11. #define GDT_M_W_E_COST_PRICE @"expectCostPrice"
  12. #define GDT_M_W_H_LOSS_PRICE @"highestLossPrice"
  13. #define GDT_M_L_WIN_PRICE @"winPrice"
  14. #define GDT_M_L_LOSS_REASON @"lossReason"
  15. #define GDT_M_ADNID @"adnId"
  16. @protocol GDTAdProtocol <NSObject>
  17. @optional
  18. - (NSDictionary *)extraInfo;
  19. /**
  20. * 竞胜之后调用, 需要在调用广告 show 之前调用,旧的- (void)sendWinNotificationWithPrice:(NSInteger)price已废弃
  21. *
  22. * @param winInfo,竞胜信息 字典类型,支持的key为以下,注:key是个宏,在GDTAdProtocol.h中有定义,可以参考demo中的使用方法
  23. * GDT_M_W_E_COST_PRICE:竞胜价格 (单位: 分),值类型为NSNumber *
  24. * GDT_M_W_H_LOSS_PRICE:最高失败出价,值类型为NSNumber *
  25. *
  26. */
  27. - (void)sendWinNotificationWithInfo:(NSDictionary *)winInfo;
  28. /**
  29. * 竞败之后或未参竞调用,旧的- (void)sendLossNotificationWithWinnerPrice:(NSInteger)price lossReason:(GDTAdBiddingLossReason)reason winnerAdnID:(NSString *)adnID已废弃
  30. *
  31. * @pararm lossInfo 竞败信息,字典类型,注:key是个宏,在GDTAdProtocol.h中有定义,可以参考demo中的使用方法
  32. * GDT_M_L_WIN_PRICE :竞胜价格 (单位: 分),值类型为NSNumber *,选填
  33. * GDT_M_L_LOSS_REASON :优量汇广告竞败原因,竞败原因参考枚举GDTAdBiddingLossReason中的定义,值类型为NSNumber *,必填
  34. * GDT_M_ADNID :竞胜方渠道ID,值类型为NSString *,必填
  35. */
  36. - (void)sendLossNotificationWithInfo:(NSDictionary *)lossInfo;
  37. @end
  38. @protocol GDTAdDelegate <NSObject>
  39. @optional
  40. /**
  41. 投诉成功回调
  42. @params ad 广告对象实例
  43. */
  44. - (void)gdtAdComplainSuccess:(id)ad;
  45. @end
  46. #endif /* GDTAdProtocol_h */