NativeApp.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using MediaBrowser.Server.Mono;
  2. using System;
  3. using System.Runtime.InteropServices;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. using MediaBrowser.Common.Updates;
  7. using MediaBrowser.Model.Logging;
  8. using MediaBrowser.Model.Updates;
  9. namespace MediaBrowser.ServerApplication.Native
  10. {
  11. /// <summary>
  12. /// Class NativeApp
  13. /// </summary>
  14. public static class NativeApp
  15. {
  16. /// <summary>
  17. /// Shutdowns this instance.
  18. /// </summary>
  19. public static void Shutdown()
  20. {
  21. MainClass.Shutdown ();
  22. }
  23. /// <summary>
  24. /// Restarts this instance.
  25. /// </summary>
  26. public static void Restart()
  27. {
  28. MainClass.Restart ();
  29. }
  30. /// <summary>
  31. /// Determines whether this instance [can self restart].
  32. /// </summary>
  33. /// <returns><c>true</c> if this instance [can self restart]; otherwise, <c>false</c>.</returns>
  34. public static bool CanSelfRestart
  35. {
  36. get
  37. {
  38. return MainClass.CanSelfRestart;
  39. }
  40. }
  41. /// <summary>
  42. /// Gets a value indicating whether this instance can self update.
  43. /// </summary>
  44. /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value>
  45. public static bool CanSelfUpdate
  46. {
  47. get
  48. {
  49. return MainClass.CanSelfUpdate;
  50. }
  51. }
  52. public static bool SupportsAutoRunAtStartup
  53. {
  54. get { return false; }
  55. }
  56. public static void PreventSystemStandby()
  57. {
  58. }
  59. }
  60. }