1537 lines
51 KiB
C#
1537 lines
51 KiB
C#
#if USE_UNI_LUA
|
|
using LuaAPI = UniLua.Lua;
|
|
using RealStatePtr = UniLua.ILuaState;
|
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
#else
|
|
using LuaAPI = XLua.LuaDLL.Lua;
|
|
using RealStatePtr = System.IntPtr;
|
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
#endif
|
|
|
|
using XLua;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace XLua.CSObjectWrap
|
|
{
|
|
using Utils = XLua.Utils;
|
|
public class AndroidAgentWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(AndroidAgent);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 47, 0, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getBridge", _m_getBridge);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetWaterfallConfiguration", _m_SetWaterfallConfiguration);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "onApplicationPause", _m_onApplicationPause);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getAdvertiserId", _m_getAdvertiserId);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "validateIntegration", _m_validateIntegration);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "shouldTrackNetworkState", _m_shouldTrackNetworkState);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setDynamicUserId", _m_setDynamicUserId);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdaptersDebug", _m_setAdaptersDebug);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setMetaData", _m_setMetaData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getConversionValue", _m_getConversionValue);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setManualLoadRewardedVideo", _m_setManualLoadRewardedVideo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setNetworkData", _m_setNetworkData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPauseGame", _m_SetPauseGame);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setUserId", _m_setUserId);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "init", _m_init);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "initISDemandOnly", _m_initISDemandOnly);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadRewardedVideo", _m_loadRewardedVideo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showRewardedVideo", _m_showRewardedVideo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isRewardedVideoAvailable", _m_isRewardedVideoAvailable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isRewardedVideoPlacementCapped", _m_isRewardedVideoPlacementCapped);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getPlacementInfo", _m_getPlacementInfo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setRewardedVideoServerParams", _m_setRewardedVideoServerParams);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "clearRewardedVideoServerParams", _m_clearRewardedVideoServerParams);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showISDemandOnlyRewardedVideo", _m_showISDemandOnlyRewardedVideo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadISDemandOnlyRewardedVideo", _m_loadISDemandOnlyRewardedVideo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isISDemandOnlyRewardedVideoAvailable", _m_isISDemandOnlyRewardedVideoAvailable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadInterstitial", _m_loadInterstitial);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showInterstitial", _m_showInterstitial);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isInterstitialReady", _m_isInterstitialReady);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isInterstitialPlacementCapped", _m_isInterstitialPlacementCapped);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadISDemandOnlyInterstitial", _m_loadISDemandOnlyInterstitial);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showISDemandOnlyInterstitial", _m_showISDemandOnlyInterstitial);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isISDemandOnlyInterstitialReady", _m_isISDemandOnlyInterstitialReady);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showOfferwall", _m_showOfferwall);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getOfferwallCredits", _m_getOfferwallCredits);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isOfferwallAvailable", _m_isOfferwallAvailable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadBanner", _m_loadBanner);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "destroyBanner", _m_destroyBanner);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "displayBanner", _m_displayBanner);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "hideBanner", _m_hideBanner);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "isBannerPlacementCapped", _m_isBannerPlacementCapped);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setSegment", _m_setSegment);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setConsent", _m_setConsent);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadConsentViewWithType", _m_loadConsentViewWithType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showConsentViewWithType", _m_showConsentViewWithType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdRevenueData", _m_setAdRevenueData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "launchTestSuite", _m_launchTestSuite);
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
|
|
var gen_ret = new AndroidAgent();
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_getBridge(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.getBridge( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetWaterfallConfiguration(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
WaterfallConfiguration _waterfallConfiguration = (WaterfallConfiguration)translator.GetObject(L, 2, typeof(WaterfallConfiguration));
|
|
AdFormat _adFormat;translator.Get(L, 3, out _adFormat);
|
|
|
|
gen_to_be_invoked.SetWaterfallConfiguration( _waterfallConfiguration, _adFormat );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_onApplicationPause(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _pause = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.onApplicationPause( _pause );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_getAdvertiserId(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.getAdvertiserId( );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_validateIntegration(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.validateIntegration( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_shouldTrackNetworkState(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _track = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.shouldTrackNetworkState( _track );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setDynamicUserId(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _dynamicUserId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.setDynamicUserId( _dynamicUserId );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdaptersDebug(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _enabled = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.setAdaptersDebug( _enabled );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setMetaData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
string _value = LuaAPI.lua_tostring(L, 3);
|
|
|
|
gen_to_be_invoked.setMetaData( _key, _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count >= 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 3) || (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)))
|
|
{
|
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
string[] _values = translator.GetParams<string>(L, 3);
|
|
|
|
gen_to_be_invoked.setMetaData( _key, _values );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.setMetaData!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_getConversionValue(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.getConversionValue( );
|
|
translator.PushAny(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setManualLoadRewardedVideo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _isOn = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.setManualLoadRewardedVideo( _isOn );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setNetworkData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _networkKey = LuaAPI.lua_tostring(L, 2);
|
|
string _networkData = LuaAPI.lua_tostring(L, 3);
|
|
|
|
gen_to_be_invoked.setNetworkData( _networkKey, _networkData );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetPauseGame(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _pause = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.SetPauseGame( _pause );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setUserId(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _userId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.setUserId( _userId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_init(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _appKey = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.init( _appKey );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count >= 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 3) || (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)))
|
|
{
|
|
string _appKey = LuaAPI.lua_tostring(L, 2);
|
|
string[] _adUnits = translator.GetParams<string>(L, 3);
|
|
|
|
gen_to_be_invoked.init( _appKey, _adUnits );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.init!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_initISDemandOnly(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _appKey = LuaAPI.lua_tostring(L, 2);
|
|
string[] _adUnits = translator.GetParams<string>(L, 3);
|
|
|
|
gen_to_be_invoked.initISDemandOnly( _appKey, _adUnits );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadRewardedVideo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.loadRewardedVideo( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showRewardedVideo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1)
|
|
{
|
|
|
|
gen_to_be_invoked.showRewardedVideo( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showRewardedVideo( _placementName );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.showRewardedVideo!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isRewardedVideoAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.isRewardedVideoAvailable( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isRewardedVideoPlacementCapped(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.isRewardedVideoPlacementCapped( _placementName );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_getPlacementInfo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.getPlacementInfo( _placementName );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setRewardedVideoServerParams(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Collections.Generic.Dictionary<string, string> _parameters = (System.Collections.Generic.Dictionary<string, string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<string, string>));
|
|
|
|
gen_to_be_invoked.setRewardedVideoServerParams( _parameters );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_clearRewardedVideoServerParams(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.clearRewardedVideoServerParams( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showISDemandOnlyRewardedVideo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showISDemandOnlyRewardedVideo( _instanceId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadISDemandOnlyRewardedVideo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.loadISDemandOnlyRewardedVideo( _instanceId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isISDemandOnlyRewardedVideoAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.isISDemandOnlyRewardedVideoAvailable( _instanceId );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadInterstitial(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.loadInterstitial( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showInterstitial(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1)
|
|
{
|
|
|
|
gen_to_be_invoked.showInterstitial( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showInterstitial( _placementName );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.showInterstitial!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isInterstitialReady(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.isInterstitialReady( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isInterstitialPlacementCapped(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.isInterstitialPlacementCapped( _placementName );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadISDemandOnlyInterstitial(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.loadISDemandOnlyInterstitial( _instanceId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showISDemandOnlyInterstitial(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showISDemandOnlyInterstitial( _instanceId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isISDemandOnlyInterstitialReady(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _instanceId = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.isISDemandOnlyInterstitialReady( _instanceId );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showOfferwall(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1)
|
|
{
|
|
|
|
gen_to_be_invoked.showOfferwall( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showOfferwall( _placementName );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.showOfferwall!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_getOfferwallCredits(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.getOfferwallCredits( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isOfferwallAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.isOfferwallAvailable( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadBanner(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 3&& translator.Assignable<IronSourceBannerSize>(L, 2)&& translator.Assignable<IronSourceBannerPosition>(L, 3))
|
|
{
|
|
IronSourceBannerSize _size = (IronSourceBannerSize)translator.GetObject(L, 2, typeof(IronSourceBannerSize));
|
|
IronSourceBannerPosition _position;translator.Get(L, 3, out _position);
|
|
|
|
gen_to_be_invoked.loadBanner( _size, _position );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 4&& translator.Assignable<IronSourceBannerSize>(L, 2)&& translator.Assignable<IronSourceBannerPosition>(L, 3)&& (LuaAPI.lua_isnil(L, 4) || LuaAPI.lua_type(L, 4) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
IronSourceBannerSize _size = (IronSourceBannerSize)translator.GetObject(L, 2, typeof(IronSourceBannerSize));
|
|
IronSourceBannerPosition _position;translator.Get(L, 3, out _position);
|
|
string _placementName = LuaAPI.lua_tostring(L, 4);
|
|
|
|
gen_to_be_invoked.loadBanner( _size, _position, _placementName );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to AndroidAgent.loadBanner!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_destroyBanner(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.destroyBanner( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_displayBanner(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.displayBanner( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_hideBanner(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.hideBanner( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_isBannerPlacementCapped(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _placementName = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.isBannerPlacementCapped( _placementName );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setSegment(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
IronSourceSegment _segment = (IronSourceSegment)translator.GetObject(L, 2, typeof(IronSourceSegment));
|
|
|
|
gen_to_be_invoked.setSegment( _segment );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setConsent(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _consent = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.setConsent( _consent );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_loadConsentViewWithType(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _consentViewType = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.loadConsentViewWithType( _consentViewType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_showConsentViewWithType(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _consentViewType = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.showConsentViewWithType( _consentViewType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdRevenueData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _dataSource = LuaAPI.lua_tostring(L, 2);
|
|
System.Collections.Generic.Dictionary<string, string> _impressionData = (System.Collections.Generic.Dictionary<string, string>)translator.GetObject(L, 3, typeof(System.Collections.Generic.Dictionary<string, string>));
|
|
|
|
gen_to_be_invoked.setAdRevenueData( _dataSource, _impressionData );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_launchTestSuite(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
AndroidAgent gen_to_be_invoked = (AndroidAgent)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.launchTestSuite( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|