# Keep implementations of the TopOn (com.secmtp.sdk.* >= v6.5.12) mediation adapter interfaces explicitly.
# They should be kept by the rules from modules *-tpn but it's good to add these rules here.
#
# ATBaseAdInternalAdapter was relocated between TopOn SDK versions:
#   <=6.5.40: com.secmtp.sdk.core.api.ATBaseAdInternalAdapter
#   > 6.5.40: com.secmtp.sdk.core.api.bridge.ATBaseAdInternalAdapter
# Keep both to ensure our adapter classes are retained regardless of which version is used.
#noinspection ShrinkerUnresolvedReference
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.core.api.ATBaseAdInternalAdapter {
    public <init>(...);
    public <methods>;
    protected <methods>;
}
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.core.api.bridge.ATBaseAdInternalAdapter {
    public <init>(...);
    public <methods>;
    protected <methods>;
}

# ATBaseAdInternalAdapter class and its mLoadListener field are accessed via reflection in
# TopOnATBaseAdInternalAdapterUtils. Keep both the class name (required for Class.forName()) and
# the field name in both class locations to prevent R8 from renaming either.
#noinspection ShrinkerUnresolvedReference
-keep class com.secmtp.sdk.core.api.ATBaseAdInternalAdapter {
    com.secmtp.sdk.core.api.ATCustomLoadListener mLoadListener;
}
-keep class com.secmtp.sdk.core.api.bridge.ATBaseAdInternalAdapter {
    com.secmtp.sdk.core.api.ATCustomLoadListener mLoadListener;
}

-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.banner.unitgroup.api.CustomBannerAdapter {
    public <init>(...);
    public <methods>;
}
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.nativead.unitgroup.api.CustomNativeAdapter {
    public <init>(...);
    public <methods>;
}
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.interstitial.unitgroup.api.CustomInterstitialAdapter {
    public <init>(...);
    public <methods>;
}
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.rewardvideo.unitgroup.api.CustomRewardVideoAdapter {
    public <init>(...);
    public <methods>;
}
-keep class com.opera.ads.mediation.topon.* extends com.secmtp.sdk.splashad.unitgroup.api.CustomSplashAdapter {
    public <init>(...);
    public <methods>;
}

-keep class com.opera.ads.mediation.topon.OperaMediationAdapter
