-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
147 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// AFXAdRevenueData.cpp | ||
// MyGame | ||
// | ||
// Created by ivan.obodovskyi on 04.10.2024. | ||
// | ||
|
||
#include <stdio.h> | ||
#include "AFXAdRevenueData.h" | ||
|
||
// Constructor definition | ||
AFXAdRevenueData::AFXAdRevenueData(const std::string& monetizationNetwork, | ||
AppsFlyerXAdRevenueMediationNetworkType mediationNetwork, | ||
const std::string& currencyIso4217Code, | ||
double eventRevenue) | ||
: monetizationNetwork(monetizationNetwork), | ||
mediationNetwork(mediationNetwork), | ||
currencyIso4217Code(currencyIso4217Code), | ||
eventRevenue(eventRevenue) { | ||
} | ||
|
||
// Getters implementation | ||
std::string AFXAdRevenueData::getMonetizationNetwork() const { | ||
return monetizationNetwork; | ||
} | ||
|
||
AppsFlyerXAdRevenueMediationNetworkType AFXAdRevenueData::getMediationNetwork() const { | ||
return mediationNetwork; | ||
} | ||
|
||
std::string AFXAdRevenueData::getCurrencyIso4217Code() const { | ||
return currencyIso4217Code; | ||
} | ||
|
||
double AFXAdRevenueData::getEventRevenue() const { | ||
return eventRevenue; | ||
} | ||
|
||
int convertMeditationType(AppsFlyerXAdRevenueMediationNetworkType a) { | ||
return static_cast<int>(static_cast<int>(a)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// AFXAdRevenueData.h | ||
// MyGame | ||
// | ||
// Created by ivan.obodovskyi on 04.10.2024. | ||
// | ||
|
||
#include <string> | ||
|
||
#ifndef AFXAdRevenueData_h | ||
#define AFXAdRevenueData_h | ||
|
||
enum class AppsFlyerXAdRevenueMediationNetworkType { | ||
GoogleAdMob = 1, | ||
IronSource = 2, | ||
ApplovinMax = 3, | ||
Fyber = 4, | ||
Appodeal = 5, | ||
Admost = 6, | ||
Topon = 7, | ||
Tradplus = 8, | ||
Yandex = 9, | ||
ChartBoost = 10, | ||
Unity = 11, | ||
ToponPte = 12, | ||
Custom = 13, | ||
DirectMonetization = 14 | ||
}; | ||
|
||
#define kAppsFlyerAdRevenueMonetizationNetwork @"monetization_network" | ||
#define kAppsFlyerAdRevenueMediationNetwork @"mediation_network" | ||
#define kAppsFlyerAdRevenueEventRevenue @"event_revenue" | ||
#define kAppsFlyerAdRevenueEventRevenueCurrency @"event_revenue_currency" | ||
#define kAppsFlyerAdRevenueCustomParameters @"custom_parameters" | ||
#define kAFADRWrapperTypeGeneric @"adrevenue_sdk" | ||
|
||
//Pre-defined keys for non-mandatory dictionary | ||
|
||
//Code ISO 3166-1 format | ||
#define kAppsFlyerAdRevenueCountry @"country" | ||
|
||
//ID of the ad unit for the impression | ||
#define kAppsFlyerAdRevenueAdUnit @"ad_unit" | ||
|
||
//Format of the ad | ||
#define kAppsFlyerAdRevenueAdType @"ad_type" | ||
|
||
//ID of the ad placement for the impression | ||
#define kAppsFlyerAdRevenuePlacement @"placement" | ||
|
||
|
||
class AFXAdRevenueData { | ||
public: | ||
// Constructor with initialization parameters | ||
AFXAdRevenueData(const std::string& monetizationNetwork, | ||
AppsFlyerXAdRevenueMediationNetworkType mediationNetwork, | ||
const std::string& currencyIso4217Code, | ||
double eventRevenue); | ||
|
||
// Getter functions for each property | ||
std::string getMonetizationNetwork() const; | ||
AppsFlyerXAdRevenueMediationNetworkType getMediationNetwork() const; | ||
std::string getCurrencyIso4217Code() const; | ||
double getEventRevenue() const; | ||
int convertMeditationType(AppsFlyerXAdRevenueMediationNetworkType a); | ||
|
||
private: | ||
// Private member variables | ||
std::string monetizationNetwork; | ||
AppsFlyerXAdRevenueMediationNetworkType mediationNetwork; | ||
std::string currencyIso4217Code; | ||
double eventRevenue; | ||
}; | ||
|
||
|
||
#endif /* AFXAdRevenueData_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters