You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

59 lines
2.3 KiB

  1. // Copyright (C) 2015 Google, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. using System;
  15. using GoogleMobileAds.Api;
  16. namespace GoogleMobileAds.Common
  17. {
  18. public interface IRewardBasedVideoAdClient
  19. {
  20. // Ad event fired when the reward based video ad has been received.
  21. event EventHandler<EventArgs> OnAdLoaded;
  22. // Ad event fired when the reward based video ad has failed to load.
  23. event EventHandler<AdFailedToLoadEventArgs> OnAdFailedToLoad;
  24. // Ad event fired when the reward based video ad is opened.
  25. event EventHandler<EventArgs> OnAdOpening;
  26. // Ad event fired when the reward based video ad has started playing.
  27. event EventHandler<EventArgs> OnAdStarted;
  28. // Ad event fired when the reward based video ad has rewarded the user.
  29. event EventHandler<Reward> OnAdRewarded;
  30. // Ad event fired when the reward based video ad is closed.
  31. event EventHandler<EventArgs> OnAdClosed;
  32. // Ad event fired when the reward based video ad is leaving the application.
  33. event EventHandler<EventArgs> OnAdLeavingApplication;
  34. // Ad event fired when the reward based video ad completes playing.
  35. event EventHandler<EventArgs> OnAdCompleted;
  36. // Creates a reward based video ad and adds it to the view hierarchy.
  37. void CreateRewardBasedVideoAd();
  38. // Requests a new ad for the reward based video ad.
  39. void LoadAd(AdRequest request, string adUnitId);
  40. // Determines whether the reward based video has loaded.
  41. bool IsLoaded();
  42. // Returns the mediation adapter class name.
  43. string MediationAdapterClassName();
  44. // Shows the reward based video ad on the screen.
  45. void ShowRewardBasedVideoAd();
  46. // Sets the user id of current user.
  47. void SetUserId(string userId);
  48. }
  49. }