IAntiAddictionJob.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using CheckPayResult = Plugins.AntiAddictionUIKit.CheckPayResult;
  3. using TapTap.AntiAddiction.Model;
  4. namespace TapTap.AntiAddiction
  5. {
  6. internal interface IAntiAddictionJob
  7. {
  8. /// <summary>
  9. /// 根据状态的对外回调
  10. /// </summary>
  11. Action<int, string> ExternalCallback { get;}
  12. int AgeRange { get; }
  13. int RemainingTimeInMinutes { get; }
  14. /// <summary>
  15. /// 剩余时间(单位:秒)
  16. /// </summary>
  17. int RemainingTime { get; }
  18. string CurrentToken { get; }
  19. /// <summary>
  20. /// 新的初始化接口
  21. /// </summary>
  22. /// <param name="config"></param>
  23. /// <param name="callback">int 代表返回 code, string 代表 message</param>
  24. void Init(AntiAddictionConfig config, Action<int, string> callback);
  25. void Startup(string userId);
  26. void Exit();
  27. void EnterGame();
  28. void LeaveGame();
  29. void CheckPayLimit(long amount
  30. , Action<CheckPayResult> handleCheckPayLimit
  31. , Action<string> handleCheckPayLimitException);
  32. void SubmitPayResult(long amount
  33. , Action handleSubmitPayResult
  34. , Action<string> handleSubmitPayResultException);
  35. bool isStandalone();
  36. }
  37. }