Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

IStore.cs 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Collections.Generic;
  2. using System.Collections.ObjectModel;
  3. namespace UnityEngine.Purchasing.Extension
  4. {
  5. /// <summary>
  6. /// Represents the public interface of the underlying store system such as Google Play,
  7. /// or the Apple App store.
  8. /// </summary>
  9. public interface IStore
  10. {
  11. /// <summary>
  12. /// Initialize the instance using the specified <see cref="!:IStoreCallback" />.
  13. /// </summary>
  14. /// <param name="callback"> The callback interface for the store. </param>
  15. void Initialize(IStoreCallback callback);
  16. /// <summary>
  17. /// Fetch the latest product metadata, including purchase receipts,
  18. /// asynchronously with results returned via <c>IStoreCallback</c>.
  19. /// </summary>
  20. /// <param name="products"> The collection of products desired </param>
  21. void RetrieveProducts(ReadOnlyCollection<ProductDefinition> products);
  22. /// <summary>
  23. /// Handle a purchase request from a user.
  24. /// Developer payload is provided for stores
  25. /// that define such a concept (Google Play).
  26. /// </summary>
  27. /// <param name="product"> The product to be purchased. </param>
  28. /// <param name="developerPayload"> The developer payload expected by the specific store implementation </param>
  29. void Purchase(ProductDefinition product, string developerPayload);
  30. /// <summary>
  31. /// Called by Unity Purchasing when a transaction has been recorded.
  32. /// Store systems should perform any housekeeping here,
  33. /// such as closing transactions or consuming consumables.
  34. /// </summary>
  35. /// <param name="product"> The product purchased </param>
  36. /// <param name="transactionId"> The id of the transaction </param>
  37. void FinishTransaction(ProductDefinition product, string transactionId);
  38. }
  39. }