in_app_purchase_product.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright (c) 2018 Amaplex Software, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ATOM_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_
  5. #define ATOM_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_
  6. #include <string>
  7. #include <vector>
  8. #include "base/callback.h"
  9. namespace in_app_purchase {
  10. // --------------------------- Structures ---------------------------
  11. struct Product {
  12. // Product Identifier
  13. std::string productIdentifier;
  14. // Product Attributes
  15. std::string localizedDescription;
  16. std::string localizedTitle;
  17. std::string contentVersion;
  18. std::vector<uint32_t> contentLengths;
  19. // Pricing Information
  20. double price = 0.0;
  21. std::string formattedPrice;
  22. // Downloadable Content Information
  23. bool downloadable = false;
  24. Product(const Product&);
  25. Product();
  26. ~Product();
  27. };
  28. // --------------------------- Typedefs ---------------------------
  29. typedef base::Callback<void(const std::vector<in_app_purchase::Product>&)>
  30. InAppPurchaseProductsCallback;
  31. // --------------------------- Functions ---------------------------
  32. void GetProducts(const std::vector<std::string>& productIDs,
  33. const InAppPurchaseProductsCallback& callback);
  34. } // namespace in_app_purchase
  35. #endif // ATOM_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_