private static void OnApolloLogDelegate(ApolloLogPriority pri, IntPtr msg) { Apollo apollo = IApollo.Instance as Apollo; if (apollo.logEvent != null) { apollo.logEvent(pri, Marshal.PtrToStringAnsi(msg)); } }
public override ApolloResult Initialize(ApolloInfo platformInfo) { ApolloCommon.ApolloInfo = platformInfo; if (platformInfo == null) { throw new Exception("ApolloInfo could not be null!!"); } ADebug.Log(string.Format("Apollo Init QQAppId:{0}, WXAppId:{1}, pluginName:{2}", platformInfo.QQAppId, platformInfo.WXAppId, platformInfo.PluginName)); if (string.IsNullOrEmpty(platformInfo.PluginName)) { ApolloCommon.ApolloInfo.PluginName = "MSDK"; } MsdkAdapter.InnerInstall(); return((ApolloResult)Apollo.apollo_init(platformInfo.ServiceId, platformInfo.MaxMessageBufferSize, ApolloCommon.ApolloInfo.PluginName)); }
public override bool SwitchPlugin(string pluginName) { return(Apollo.apollo_switchplugin(pluginName)); }
public override void SetApolloLogger(ApolloLogPriority pri, ApolloLogHandler handler) { ADebug.Log("SetApolloLogger"); this.logEvent = handler; Apollo.apollo_setApolloLogger(pri, new ApolloLogDelegate(Apollo.OnApolloLogDelegate)); }