#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 BFNotificationSDKManagerWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.NotificationSDKManager); Utils.BeginObjectRegister(type, L, translator, 0, 6, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitPuchContent", _m_InitPuchContent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetNotificationChannel", _m_ResetNotificationChannel); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterAndSendNotification", _m_RegisterAndSendNotification); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetNotificationTime", _m_GetNotificationTime); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsOpenAppFromNotification", _m_GetIsOpenAppFromNotification); 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 BF.NotificationSDKManager(); 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 BF.NotificationSDKManager constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Init( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_InitPuchContent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { string _title = LuaAPI.lua_tostring(L, 2); string _content = LuaAPI.lua_tostring(L, 3); gen_to_be_invoked.InitPuchContent( _title, _content ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ResetNotificationChannel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ResetNotificationChannel( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RegisterAndSendNotification(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { string _title = LuaAPI.lua_tostring(L, 2); string _text = LuaAPI.lua_tostring(L, 3); int _day = LuaAPI.xlua_tointeger(L, 4); int _hour = LuaAPI.xlua_tointeger(L, 5); int _minute = LuaAPI.xlua_tointeger(L, 6); int _second = LuaAPI.xlua_tointeger(L, 7); bool _repeat = LuaAPI.lua_toboolean(L, 8); gen_to_be_invoked.RegisterAndSendNotification( _title, _text, _day, _hour, _minute, _second, _repeat ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetNotificationTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { BF.NotificationInfo _notificationInfo = (BF.NotificationInfo)translator.GetObject(L, 2, typeof(BF.NotificationInfo)); var gen_ret = gen_to_be_invoked.GetNotificationTime( _notificationInfo ); 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_GetIsOpenAppFromNotification(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.NotificationSDKManager gen_to_be_invoked = (BF.NotificationSDKManager)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetIsOpenAppFromNotification( ); LuaAPI.lua_pushboolean(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } } }