Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/irov/Mengine
Browse files Browse the repository at this point in the history
  • Loading branch information
irov committed Aug 2, 2023
2 parents c15ec94 + bc935f3 commit 1188cd1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Plugins/AppleMARSDKPlugin/AppleMARSDKInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ namespace Mengine

public:
virtual void showRewardVideoAd( const ConstString & _itemName, uint32_t _itemNum ) = 0;

public:
virtual int64_t getInternetDate() const = 0;
};
//////////////////////////////////////////////////////////////////////////
}
Expand Down
9 changes: 9 additions & 0 deletions src/Plugins/AppleMARSDKPlugin/AppleMARSDKScriptEmbedding.mm
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,14 @@ static void s_AppleMARSDK_showRewardVideoAd( const ConstString & _itemName, uint
->showRewardVideoAd( _itemName, _itemNum );
}
//////////////////////////////////////////////////////////////////////////
static int64_t s_AppleMARSDK_getInternetDate()
{
int64_t date = APPLE_MARSDK_SERVICE()
->getInternetDate();

return date;
}
//////////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////////
AppleMARSDKScriptEmbedding::AppleMARSDKScriptEmbedding()
Expand All @@ -369,6 +377,7 @@ static void s_AppleMARSDK_showRewardVideoAd( const ConstString & _itemName, uint
pybind::def_function( _kernel, "appleMARSDKSubmitPaymentData", &Detail::s_AppleMARSDK_submitPaymentData );
pybind::def_function( _kernel, "appleMARSDKPropComplete", &Detail::s_AppleMARSDK_propComplete );
pybind::def_function( _kernel, "appleMARSDKShowRewardVideoAd", &Detail::s_AppleMARSDK_showRewardVideoAd );
pybind::def_function( _kernel, "appleMARSDKGetInternetDate", &Detail::s_AppleMARSDK_getInternetDate );

return true;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Plugins/AppleMARSDKPlugin/AppleMARSDKService.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ namespace Mengine
public:
void showRewardVideoAd( const ConstString & _itemName, uint32_t _itemNum ) override;

public:
int64_t getInternetDate() const override;

public:
void onUserLogin( const MARSDKResultParams & _params );
void onUserLogout( const MARSDKResultParams & _params );
Expand Down
7 changes: 7 additions & 0 deletions src/Plugins/AppleMARSDKPlugin/AppleMARSDKService.mm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@
delegate:m_adRewardedDelegate];
}
//////////////////////////////////////////////////////////////////////////
int64_t AppleMARSDKService::getInternetDate() const
{
NSInteger date = [[MARSDK sharedInstance] getInternetDate];

return date;
}
//////////////////////////////////////////////////////////////////////////
void AppleMARSDKService::onUserLogin( const MARSDKResultParams & _params )
{
LOGGER_MESSAGE( "event user login" );
Expand Down

0 comments on commit 1188cd1

Please sign in to comment.