biospackageservice.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //! BiosCheckUpdateResult represent result of the PromptUpdateAsync request.
  2. class BiosCheckUpdateResult
  3. {
  4. //! Is new update available?
  5. bool m_IsUpdate;
  6. //! Is update mandatory?
  7. bool m_IsMandatory;
  8. };
  9. class BiosPackageService
  10. {
  11. //! Async check if exist new update
  12. /*!
  13. @return EBiosError indicating if the async operation is pending.
  14. */
  15. proto native EBiosError CheckUpdateAsync();
  16. //! Prompt user to accept update with system GUI
  17. /*!
  18. @return EBiosError indicating if the async operation is pending.
  19. */
  20. proto native EBiosError PromptUpdateAsync();
  21. //! Show store for current title (system GUI). Only on Xbox.
  22. /*!
  23. @return EBiosError indicating if the async operation is pending.
  24. */
  25. proto native EBiosError ShowStoreAsync();
  26. //! Callback function for CheckUpdateAsync()
  27. /*!
  28. @param checkUpdateResult contain information about availability of new update and if it is mandatory.
  29. @param error indicating success or fail of the async operation.
  30. */
  31. void OnCheckUpdate(BiosCheckUpdateResult checkUpdateResult, EBiosError error)
  32. {
  33. if ( !error && ( checkUpdateResult.m_IsUpdate || checkUpdateResult.m_IsMandatory ) )
  34. {
  35. OnlineServices.PromptUpdate();
  36. }
  37. }
  38. //! Callback function for PromptUpdateAsync()
  39. /*!
  40. Show system UI with update.
  41. On Xbox, game suspend after accept update.
  42. @param error indicating success or fail of the async operation.
  43. */
  44. void OnPromptUpdate(EBiosError error)
  45. {
  46. OnlineServices.ErrorCaught( error );
  47. }
  48. //! Callback function for ShowStoreAsync()
  49. /*!
  50. @param error indicating success or fail of the async operation.
  51. */
  52. void OnShowStore(EBiosError error)
  53. {
  54. OnlineServices.ErrorCaught( error );
  55. }
  56. };