292 lines
8.9 KiB
C#
292 lines
8.9 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 comadjustsdkAdjustAdRevenueWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(com.adjust.sdk.AdjustAdRevenue);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 7, 0, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setRevenue", _m_setRevenue);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdImpressionsCount", _m_setAdImpressionsCount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdRevenueNetwork", _m_setAdRevenueNetwork);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdRevenueUnit", _m_setAdRevenueUnit);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setAdRevenuePlacement", _m_setAdRevenuePlacement);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "addCallbackParameter", _m_addCallbackParameter);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "addPartnerParameter", _m_addPartnerParameter);
|
|
|
|
|
|
|
|
|
|
|
|
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) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _source = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = new com.adjust.sdk.AdjustAdRevenue(_source);
|
|
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 com.adjust.sdk.AdjustAdRevenue constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setRevenue(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
double _amount = LuaAPI.lua_tonumber(L, 2);
|
|
string _currency = LuaAPI.lua_tostring(L, 3);
|
|
|
|
gen_to_be_invoked.setRevenue( _amount, _currency );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdImpressionsCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _adImpressionsCount = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.setAdImpressionsCount( _adImpressionsCount );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdRevenueNetwork(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _adRevenueNetwork = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.setAdRevenueNetwork( _adRevenueNetwork );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdRevenueUnit(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _adRevenueUnit = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.setAdRevenueUnit( _adRevenueUnit );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setAdRevenuePlacement(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _adRevenuePlacement = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.setAdRevenuePlacement( _adRevenuePlacement );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_addCallbackParameter(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
string _value = LuaAPI.lua_tostring(L, 3);
|
|
|
|
gen_to_be_invoked.addCallbackParameter( _key, _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_addPartnerParameter(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
com.adjust.sdk.AdjustAdRevenue gen_to_be_invoked = (com.adjust.sdk.AdjustAdRevenue)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
string _value = LuaAPI.lua_tostring(L, 3);
|
|
|
|
gen_to_be_invoked.addPartnerParameter( _key, _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|