mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-25 08:23:35 +08:00
2ci2furious
This commit is contained in:
parent
0971137088
commit
1f2aca9f69
@ -1,18 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#if BA_AMAZON_BUILD
|
||||
|
||||
#include "ballistica/base/platform/android/amazon/base_plat_andr_amazon.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
|
||||
#include "ballistica/shared/ballistica.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
BasePlatformAndroidAmazon::BasePlatformAndroidAmazon() {}
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_AMAZON_BUILD
|
||||
@ -1,21 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#ifndef BALLISTICA_BASE_PLATFORM_ANDROID_AMAZON_BASE_PLAT_ANDR_AMAZON_H_
|
||||
#define BALLISTICA_BASE_PLATFORM_ANDROID_AMAZON_BASE_PLAT_ANDR_AMAZON_H_
|
||||
#if BA_AMAZON_BUILD
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ballistica/base/platform/android/base_platform_android.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
class BasePlatformAndroidAmazon : public BasePlatformAndroid {
|
||||
public:
|
||||
BasePlatformAndroidAmazon();
|
||||
};
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_AMAZON_BUILD
|
||||
#endif // BALLISTICA_BASE_PLATFORM_ANDROID_AMAZON_BASE_PLAT_ANDR_AMAZON_H_
|
||||
@ -1,54 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#if BA_OSTYPE_ANDROID
|
||||
#include "ballistica/base/platform/android/base_platform_android.h"
|
||||
|
||||
#include "ballistica/core/platform/android/android_utils.h"
|
||||
#include "ballistica/core/platform/android/core_platform_android.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
BasePlatformAndroid::BasePlatformAndroid() {}
|
||||
|
||||
void BasePlatformAndroid::LoginAdapterGetSignInToken(
|
||||
const std::string& login_type, int attempt_id) {
|
||||
core::CorePlatformAndroid::Get(g_core)->PushAndroidCommand3(
|
||||
"LOGIN_ADAPTER_GET_SIGN_IN_TOKEN", login_type.c_str(),
|
||||
std::to_string(attempt_id).c_str());
|
||||
}
|
||||
|
||||
void BasePlatformAndroid::LoginAdapterBackEndActiveChange(
|
||||
const std::string& login_type, bool active) {
|
||||
core::CorePlatformAndroid::Get(g_core)->PushAndroidCommand3(
|
||||
"LOGIN_ADAPTER_BACK_END_ACTIVE_CHANGE", login_type.c_str(),
|
||||
active ? "1" : "0");
|
||||
}
|
||||
|
||||
void BasePlatformAndroid::DoPurchase(const std::string& item) {
|
||||
core::CorePlatformAndroid::Get(g_core)->PushAndroidCommand2("PURCHASE",
|
||||
item.c_str());
|
||||
}
|
||||
|
||||
void BasePlatformAndroid::PurchaseAck(const std::string& purchase,
|
||||
const std::string& order_id) {
|
||||
core::CorePlatformAndroid::Get(g_core)->PushAndroidCommand3(
|
||||
"PURCHASE_ACK", purchase.c_str(), order_id.c_str());
|
||||
}
|
||||
|
||||
void BasePlatformAndroid::DoOpenURL(const std::string& url) {
|
||||
JNIEnv* env = core::CorePlatformAndroid::Get(g_core)->GetEnv();
|
||||
core::ScopedJNIReferenceFrame refs(env);
|
||||
auto context_class{core::CorePlatformAndroid::ContextClass()};
|
||||
jmethodID mid{env->GetStaticMethodID(context_class, "fromNativeOpenURL",
|
||||
"(Ljava/lang/String;)V")};
|
||||
assert(mid);
|
||||
if (mid) {
|
||||
jstring jurl = core::CorePlatformAndroid::NewJString(env, url);
|
||||
env->CallStaticVoidMethod(context_class, mid, jurl);
|
||||
env->DeleteLocalRef(jurl);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_OSTYPE_ANDROID
|
||||
@ -1,28 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#ifndef BALLISTICA_BASE_PLATFORM_ANDROID_BASE_PLATFORM_ANDROID_H_
|
||||
#define BALLISTICA_BASE_PLATFORM_ANDROID_BASE_PLATFORM_ANDROID_H_
|
||||
#if BA_OSTYPE_ANDROID
|
||||
|
||||
#include "ballistica/base/platform/base_platform.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
class BasePlatformAndroid : public BasePlatform {
|
||||
public:
|
||||
BasePlatformAndroid();
|
||||
void LoginAdapterGetSignInToken(const std::string& login_type,
|
||||
int attempt_id) override;
|
||||
void LoginAdapterBackEndActiveChange(const std::string& login_type,
|
||||
bool active) override;
|
||||
void DoPurchase(const std::string& item) override;
|
||||
void PurchaseAck(const std::string& purchase,
|
||||
const std::string& order_id) override;
|
||||
void DoOpenURL(const std::string& url) override;
|
||||
};
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_OSTYPE_ANDROID
|
||||
|
||||
#endif // BALLISTICA_BASE_PLATFORM_ANDROID_BASE_PLATFORM_ANDROID_H_
|
||||
@ -1,9 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#if BA_CARDBOARD_BUILD
|
||||
|
||||
#include "ballistica/base/platform/android/cardboard/base_pl_an_cardboard.h"
|
||||
|
||||
namespace ballistica::base {} // namespace ballistica::base
|
||||
|
||||
#endif // BA_CARDBOARD_BUILD
|
||||
@ -1,20 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#ifndef BALLISTICA_BASE_PLATFORM_ANDROID_CARDBOARD_BASE_PL_AN_CARDBOARD_H_
|
||||
#define BALLISTICA_BASE_PLATFORM_ANDROID_CARDBOARD_BASE_PL_AN_CARDBOARD_H_
|
||||
#if BA_CARDBOARD_BUILD
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ballistica/base/platform/android/base_platform_android.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
class BasePlatformAndroidCardboard : public BasePlatformAndroid {
|
||||
public:
|
||||
};
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_CARDBOARD_BUILD
|
||||
#endif // BALLISTICA_BASE_PLATFORM_ANDROID_CARDBOARD_BASE_PL_AN_CARDBOARD_H_
|
||||
@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#if BA_GOOGLE_BUILD
|
||||
#include "ballistica/base/platform/android/google/base_plat_andr_google.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
BasePlatformAndroidGoogle::BasePlatformAndroidGoogle() {}
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_GOOGLE_BUILD
|
||||
@ -1,22 +0,0 @@
|
||||
// Copyright (c) 2011-2022 Eric Froemling
|
||||
|
||||
#ifndef BALLISTICA_BASE_PLATFORM_ANDROID_GOOGLE_BASE_PLAT_ANDR_GOOGLE_H_
|
||||
#define BALLISTICA_BASE_PLATFORM_ANDROID_GOOGLE_BASE_PLAT_ANDR_GOOGLE_H_
|
||||
#if BA_GOOGLE_BUILD
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ballistica/base/platform/android/base_platform_android.h"
|
||||
|
||||
namespace ballistica::base {
|
||||
|
||||
class BasePlatformAndroidGoogle : public BasePlatformAndroid {
|
||||
public:
|
||||
BasePlatformAndroidGoogle();
|
||||
};
|
||||
|
||||
} // namespace ballistica::base
|
||||
|
||||
#endif // BA_GOOGLE_BUILD
|
||||
#endif // BALLISTICA_BASE_PLATFORM_ANDROID_GOOGLE_BASE_PLAT_ANDR_GOOGLE_H_
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user