"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/bat-native-ads/src/bat/ads/internal/account/account.h" between
brave-core-1.30.89.tar.gz and brave-core-1.31.87.tar.gz

About: brave-core is the core engine for Brave, a "next generation" Chromium-based web browser. It tries to block ads and website trackers but displays optionally privacy-respecting advertisements to earn BAT tokens which can be spent to preferred publishers. Release channel.

account.h  (brave-core-1.30.89):account.h  (brave-core-1.31.87)
skipping to change at line 13 skipping to change at line 13
* License, v. 2.0. If a copy of the MPL was not distributed with this file, * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */ * You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_ #ifndef BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_
#define BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_ #define BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/observer_list.h"
#include "bat/ads/internal/account/account_observer.h" #include "bat/ads/internal/account/account_observer.h"
#include "bat/ads/internal/account/ad_rewards/ad_rewards_delegate.h" #include "bat/ads/internal/account/ad_rewards/ad_rewards_delegate.h"
#include "bat/ads/internal/account/confirmations/confirmations_observer.h" #include "bat/ads/internal/account/confirmations/confirmations_observer.h"
#include "bat/ads/internal/privacy/tokens/token_generator_interface.h" #include "bat/ads/internal/privacy/unblinded_tokens/unblinded_token_info_aliases .h"
#include "bat/ads/internal/tokens/redeem_unblinded_payment_tokens/redeem_unblind ed_payment_tokens_delegate.h" #include "bat/ads/internal/tokens/redeem_unblinded_payment_tokens/redeem_unblind ed_payment_tokens_delegate.h"
#include "bat/ads/transaction_info.h" #include "bat/ads/internal/tokens/refill_unblinded_tokens/refill_unblinded_token s_delegate.h"
namespace ads { namespace ads {
class AdRewards; class AdRewards;
class Confirmations; class Confirmations;
class ConfirmationType; class ConfirmationType;
class RedeemUnblindedPaymentTokens; class RedeemUnblindedPaymentTokens;
class RefillUnblindedTokens; class RefillUnblindedTokens;
class Statement; class Statement;
class Wallet; class Wallet;
struct CatalogIssuersInfo;
struct StatementInfo; struct StatementInfo;
struct WalletInfo; struct WalletInfo;
namespace privacy {
class TokenGeneratorInterface;
} // namespace privacy
class Account : public AdRewardsDelegate, class Account : public AdRewardsDelegate,
public ConfirmationsObserver, public ConfirmationsObserver,
public RedeemUnblindedPaymentTokensDelegate { public RedeemUnblindedPaymentTokensDelegate,
public RefillUnblindedTokensDelegate {
public: public:
explicit Account(privacy::TokenGeneratorInterface* token_generator); explicit Account(privacy::TokenGeneratorInterface* token_generator);
~Account() override; ~Account() override;
void AddObserver(AccountObserver* observer); void AddObserver(AccountObserver* observer);
void RemoveObserver(AccountObserver* observer); void RemoveObserver(AccountObserver* observer);
bool SetWallet(const std::string& id, const std::string& seed); bool SetWallet(const std::string& id, const std::string& seed);
skipping to change at line 65 skipping to change at line 70
void Reconcile(); void Reconcile();
void ProcessTransactions(); void ProcessTransactions();
void TopUpUnblindedTokens(); void TopUpUnblindedTokens();
private: private:
base::ObserverList<AccountObserver> observers_; base::ObserverList<AccountObserver> observers_;
privacy::TokenGeneratorInterface* token_generator_; // NOT_OWNED
std::unique_ptr<AdRewards> ad_rewards_; std::unique_ptr<AdRewards> ad_rewards_;
std::unique_ptr<Confirmations> confirmations_; std::unique_ptr<Confirmations> confirmations_;
std::unique_ptr<RedeemUnblindedPaymentTokens> std::unique_ptr<RedeemUnblindedPaymentTokens>
redeem_unblinded_payment_tokens_; redeem_unblinded_payment_tokens_;
std::unique_ptr<RefillUnblindedTokens> refill_unblinded_tokens_; std::unique_ptr<RefillUnblindedTokens> refill_unblinded_tokens_;
std::unique_ptr<Statement> statement_; std::unique_ptr<Statement> statement_;
std::unique_ptr<Wallet> wallet_; std::unique_ptr<Wallet> wallet_;
void ProcessUnclearedTransactions(); void ProcessUnclearedTransactions();
void NotifyWalletDidUpdate(const WalletInfo& wallet) const; void NotifyWalletDidUpdate(const WalletInfo& wallet) const;
void NotifyWalletDidChange(const WalletInfo& wallet) const; void NotifyWalletDidChange(const WalletInfo& wallet) const;
void NotifyInvalidWallet() const; void NotifyInvalidWallet() const;
void NotifyCatalogIssuersDidChange( void NotifyCatalogIssuersDidChange(
const CatalogIssuersInfo& catalog_issuers) const; const CatalogIssuersInfo& catalog_issuers) const;
void NotifyStatementOfAccountsDidChange() const; void NotifyStatementOfAccountsDidChange() const;
// AdRewardsDelegate implementation // AdRewardsDelegate:
void OnDidReconcileAdRewards() override; void OnDidReconcileAdRewards() override;
// ConfirmationsObserver implementation // ConfirmationsObserver:
void OnConfirmAd(const double estimated_redemption_value, void OnDidConfirm(const double estimated_redemption_value,
const ConfirmationInfo& confirmation) override; const ConfirmationInfo& confirmation) override;
void OnConfirmAdFailed(const ConfirmationInfo& confirmation) override; void OnFailedToConfirm(const ConfirmationInfo& confirmation) override;
// RedeemUnblindedPaymentTokensDelegate implementation // RedeemUnblindedPaymentTokensDelegate:
void OnDidRedeemUnblindedPaymentTokens( void OnDidRedeemUnblindedPaymentTokens(
const privacy::UnblindedTokenList unblinded_tokens) override; const privacy::UnblindedTokenList unblinded_tokens) override;
void OnFailedToRedeemUnblindedPaymentTokens() override; void OnFailedToRedeemUnblindedPaymentTokens() override;
void OnDidRetryRedeemingUnblindedPaymentTokens() override; void OnDidRetryRedeemingUnblindedPaymentTokens() override;
// RedeemUnblindedTokensDelegate:
void OnDidRefillUnblindedTokens() override;
void OnCaptchaRequiredToRefillUnblindedTokens(
const std::string& captcha_id) override;
}; };
} // namespace ads } // namespace ads
#endif // BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_ #endif // BRAVE_VENDOR_BAT_NATIVE_ADS_SRC_BAT_ADS_INTERNAL_ACCOUNT_ACCOUNT_H_
 End of changes. 11 change blocks. 
12 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)