IronSourceIAgent.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. using System.Collections.Generic;
  2. public interface IronSourceIAgent
  3. {
  4. void reportAppStarted ();
  5. //******************* Base API *******************//
  6. void onApplicationPause (bool pause);
  7. void setAge (int age);
  8. void setGender (string gender);
  9. void setMediationSegment (string segment);
  10. string getAdvertiserId ();
  11. void validateIntegration ();
  12. void shouldTrackNetworkState (bool track);
  13. bool setDynamicUserId (string dynamicUserId);
  14. void setAdaptersDebug(bool enabled);
  15. //******************* SDK Init *******************//
  16. void setUserId (string userId);
  17. void init (string appKey);
  18. void init (string appKey, params string[] adUnits);
  19. void initISDemandOnly (string appKey, params string[] adUnits);
  20. //******************* RewardedVideo API *******************//
  21. void showRewardedVideo ();
  22. void showRewardedVideo (string placementName);
  23. bool isRewardedVideoAvailable ();
  24. bool isRewardedVideoPlacementCapped (string placementName);
  25. IronSourcePlacement getPlacementInfo (string name);
  26. void setRewardedVideoServerParams(Dictionary<string, string> parameters);
  27. void clearRewardedVideoServerParams();
  28. //******************* RewardedVideo DemandOnly API *******************//
  29. void showISDemandOnlyRewardedVideo (string instanceId);
  30. void showISDemandOnlyRewardedVideo (string instanceId, string placementName);
  31. bool isISDemandOnlyRewardedVideoAvailable (string instanceId);
  32. //******************* Interstitial API *******************//
  33. void loadInterstitial ();
  34. void showInterstitial ();
  35. void showInterstitial (string placementName);
  36. bool isInterstitialReady ();
  37. bool isInterstitialPlacementCapped (string placementName);
  38. //******************* Interstitial DemandOnly API *******************//
  39. void loadISDemandOnlyInterstitial (string instanceId);
  40. void showISDemandOnlyInterstitial (string instanceId);
  41. void showISDemandOnlyInterstitial (string instanceId, string placementName);
  42. bool isISDemandOnlyInterstitialReady (string instanceId);
  43. //******************* Offerwall API *******************//
  44. void showOfferwall ();
  45. void showOfferwall (string placementName);
  46. bool isOfferwallAvailable ();
  47. void getOfferwallCredits ();
  48. //******************* Banner API *******************//
  49. void loadBanner (IronSourceBannerSize size, IronSourceBannerPosition position);
  50. void loadBanner (IronSourceBannerSize size, IronSourceBannerPosition position, string placementName);
  51. void destroyBanner();
  52. void displayBanner();
  53. void hideBanner();
  54. bool isBannerPlacementCapped(string placementName);
  55. void setSegment(IronSourceSegment segment);
  56. void setConsent(bool consent);
  57. }
  58. public static class IronSourceAdUnits
  59. {
  60. public static string REWARDED_VIDEO { get { return "rewardedvideo"; } }
  61. public static string INTERSTITIAL { get { return "interstitial"; } }
  62. public static string OFFERWALL { get { return "offerwall"; } }
  63. public static string BANNER { get { return "banner"; } }
  64. }
  65. public enum IronSourceBannerSize
  66. {
  67. BANNER = 1,
  68. LARGE_BANNER = 2,
  69. RECTANGLE_BANNER = 3,
  70. [System.Obsolete]
  71. TABLET_BANNER = 4,
  72. SMART_BANNER = 5
  73. };
  74. public enum IronSourceBannerPosition
  75. {
  76. TOP = 1,
  77. BOTTOM = 2
  78. };