UnityAdsStubs.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. #if defined(__ANDROID__)
  2. #include <cstddef>
  3. #define DONTSTRIP __attribute__((used))
  4. #define EXPORT __attribute__((visibility("default")))
  5. extern "C"
  6. {
  7. typedef void (*UnityAdsReadyCallback)(const char * placementId);
  8. typedef void (*UnityAdsDidErrorCallback)(long rawError, const char * message);
  9. typedef void (*UnityAdsDidStartCallback)(const char * placementId);
  10. typedef void (*UnityAdsDidFinishCallback)(const char * placementId, long rawFinishState);
  11. EXPORT DONTSTRIP void UnityAdsEngineInitialize(const char * gameId, bool testMode) {}
  12. EXPORT DONTSTRIP void UnityAdsEngineShow(const char * placementId) {}
  13. EXPORT DONTSTRIP bool UnityAdsEngineGetDebugMode() { return false; }
  14. EXPORT DONTSTRIP void UnityAdsEngineSetDebugMode(bool debugMode) {}
  15. EXPORT DONTSTRIP bool UnityAdsEngineIsSupported() { return false; }
  16. EXPORT DONTSTRIP bool UnityAdsEngineIsReady(const char * placementId) { return false; }
  17. EXPORT DONTSTRIP long UnityAdsEngineGetPlacementState(const char * placementId) { return -1; }
  18. EXPORT DONTSTRIP const char * UnityAdsEngineGetVersion() { return NULL; }
  19. EXPORT DONTSTRIP bool UnityAdsEngineIsInitialized() { return false; }
  20. EXPORT DONTSTRIP void UnityAdsEngineSetMetaData(const char * category, const char * data) {}
  21. EXPORT DONTSTRIP void UnityAdsEngineSetReadyCallback(UnityAdsReadyCallback callback) {}
  22. EXPORT DONTSTRIP void UnityAdsEngineSetDidErrorCallback(UnityAdsDidErrorCallback callback) {}
  23. EXPORT DONTSTRIP void UnityAdsEngineSetDidStartCallback(UnityAdsDidStartCallback callback) {}
  24. EXPORT DONTSTRIP void UnityAdsEngineSetDidFinishCallback(UnityAdsDidFinishCallback callback) {}
  25. }
  26. #endif