61 lines
925 BLFS
C++
61 lines
925 BLFS
C++
/**
|
|
* @file
|
|
*
|
|
* @author Mamadou Babaei <mamadou@senseglove.com>
|
|
*
|
|
* @section LICENSE
|
|
*
|
|
* Copyright (c) 2020 - 2023 SenseGlove
|
|
*
|
|
* @section DESCRIPTION
|
|
*
|
|
* Provides Android-specific functionality.
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "Platform.hpp"
|
|
|
|
#if SG_PLATFORM_ANDROID
|
|
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <jni.h>
|
|
|
|
namespace SGConnect
|
|
{
|
|
class Android;
|
|
}// namespace SGConnect
|
|
|
|
class SGConnect::Android
|
|
{
|
|
public:
|
|
static int32_t Initialize(JNIEnv* env);
|
|
|
|
static Android& GetInstance();
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> Pimpl;
|
|
|
|
private:
|
|
Android();
|
|
|
|
public:
|
|
virtual ~Android();
|
|
|
|
public:
|
|
int32_t Init() const;
|
|
|
|
int32_t Dispose() const;
|
|
|
|
#if ! defined ( SENSEGLOVE_UNREAL_ENGINE_PLUGIN )
|
|
[[nodiscard]]
|
|
#endif /* ! defined ( SENSEGLOVE_UNREAL_ENGINE_PLUGIN ) */
|
|
std::string GetLibraryVersion() const;
|
|
};
|
|
|
|
#endif /* SG_PLATFORM_ANDROID */ |